Class PitchAndRollEstimatorQueue
- Defined in File image_warp_util.h 
Class Documentation
- 
class PitchAndRollEstimatorQueue
- A class for estimating image warping based on perspective distortion. Primarily intended for use with downward-facing camera methods. - Public Functions - 
PitchAndRollEstimatorQueue()
- Constructor. 
 - 
inline ~PitchAndRollEstimatorQueue()
 - 
void SetBufferSize(size_t buff_size = 50)
- Sets the circular buffer capacity for computing statistics. - Parameters:
- buff_size – [in] The desired size of the buffer 
 
 - 
void Clear()
- Clears the buffer. 
 - 
void WarpPoints(const cv::Mat &points_in, cv::Mat &points_out, const cv::Size &image_size, bool use_median = true)
- Warps points based on the stored estimated pitch and roll. - Parameters:
- points_in – [in] The input points matrix 
- points_out – [out] The output points matrix 
- image_size – [in] The corresponding image size 
- use_median – [in] Specify whether to use median or mean values, default is use_median = true 
 
 
 - 
void GenerateNewEstimate(const cv::Mat &points1, const cv::Mat &points2, const cv::Size &image_size)
- Estimates pitch and roll from corresponding points and loads the pitch and roll data onto the buffer. - Parameters:
- points1 – [in] Points from first image 
- points2 – [in] Corresponding points from second image 
- image_size – [in] The size of the image 
 
 
 - 
void LoadNewData(double new_pitch, double new_roll)
- Loads new pitch and roll data directly onto the buffer. - Parameters:
- new_pitch – [in] New pitch data 
- new_roll – [in] New roll data 
 
 
 - 
bool GetMeanPitchAndRoll(double &pitch, double &roll)
- Computes the mean pitch and roll. - Parameters:
- pitch – [out] The computed mean pitch (will be zero if buffer is empty) 
- roll – [out] The computed mean roll (will be zero if buffer is empty) 
 
- Return values:
- Returns – false if the buffer is empty 
 
 - 
bool GetMedianPitchAndRoll(double &pitch, double &roll)
- Computes the median pitch and roll. - Parameters:
- pitch – [out] The computed median pitch (will be zero if buffer is empty) 
- roll – [out] The computed median roll (will be zero if buffer is empty) 
 
- Return values:
- Returns – false if the buffer is empty 
 
 
- 
PitchAndRollEstimatorQueue()