class cv::videostab::TwoPassStabilizer
#include <stabilizer.hpp> class TwoPassStabilizer: public cv::videostab::StabilizerBase, public cv::videostab::IFrameSource { public: // methods Ptr<IMotionStabilizer> motionStabilizer() const; bool mustEstimateTrimaRatio() const; virtual Mat nextFrame(); virtual void reset(); void setEstimateTrimRatio(bool val); void setMotionStabilizer(Ptr<IMotionStabilizer> val); void setWobbleSuppressor(Ptr<WobbleSuppressorBase> val); Ptr<WobbleSuppressorBase> wobbleSuppressor() const; protected: // fields bool doWobbleSuppression_; int frameCount_; bool isPrePassDone_; std::vector<Mat> motions2_; Ptr<IMotionStabilizer> motionStabilizer_; bool mustEstTrimRatio_; Mat suppressedFrame_; Ptr<WobbleSuppressorBase> wobbleSuppressor_; // methods virtual Mat estimateMotion(); virtual Mat estimateStabilizationMotion(); virtual Mat postProcessFrame(const Mat& frame); void runPrePassIfNecessary(); virtual void setUp(const Mat& firstFrame); };
Inherited Members
public: // methods int borderMode() const; Ptr<DeblurerBase> deblurrer() const; bool doCorrectionForInclusion() const; Ptr<IFrameSource> frameSource() const; Ptr<InpainterBase> inpainter() const; Ptr<ILog> log() const; Ptr<ImageMotionEstimatorBase> motionEstimator() const; int radius() const; void setBorderMode(int val); void setCorrectionForInclusion(bool val); void setDeblurer(Ptr<DeblurerBase> val); void setFrameSource(Ptr<IFrameSource> val); void setInpainter(Ptr<InpainterBase> val); void setLog(Ptr<ILog> ilog); void setMotionEstimator(Ptr<ImageMotionEstimatorBase> val); void setRadius(int val); void setTrimRatio(float val); float trimRatio() const; virtual Mat nextFrame() = 0; virtual void reset() = 0; protected: // fields std::vector<float> blurrinessRates_; int borderMode_; int curPos_; int curStabilizedPos_; Ptr<DeblurerBase> deblurer_; bool doCorrectionForInclusion_; bool doDeblurring_; bool doInpainting_; Mat finalFrame_; Mat frameMask_; std::vector<Mat> frames_; Size frameSize_; Ptr<IFrameSource> frameSource_; Ptr<InpainterBase> inpainter_; Mat inpaintingMask_; Ptr<ILog> log_; Ptr<ImageMotionEstimatorBase> motionEstimator_; std::vector<Mat> motions_; Mat preProcessedFrame_; clock_t processingStartTime_; int radius_; std::vector<Mat> stabilizationMotions_; std::vector<Mat> stabilizedFrames_; std::vector<Mat> stabilizedMasks_; float trimRatio_; // methods bool doOneIteration(); virtual Mat estimateMotion() = 0; virtual Mat estimateStabilizationMotion() = 0; void logProcessingTime(); Mat nextStabilizedFrame(); virtual Mat postProcessFrame(const Mat& frame); void reset(); virtual void setUp(const Mat& firstFrame); void stabilizeFrame();