Public Member Functions | Private Member Functions | Private Attributes
swri_image_util::PitchAndRollEstimatorQueue Class Reference

A class for estimating image warping based on perspective distortion. Primarily intended for use with downward-facing camera methods. More...

#include <image_warp_util.h>

List of all members.

Public Member Functions

void Clear ()
 Clears the buffer.
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.
bool GetMeanPitchAndRoll (double &pitch, double &roll)
 Computes the mean pitch and roll.
bool GetMedianPitchAndRoll (double &pitch, double &roll)
 Computes the median pitch and roll.
void LoadNewData (double new_pitch, double new_roll)
 Loads new pitch and roll data directly onto the buffer.
 PitchAndRollEstimatorQueue ()
 Constructor.
void SetBufferSize (int32_t buff_size=50)
 Sets the circular buffer capacity for computing statistics.
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.
 ~PitchAndRollEstimatorQueue ()

Private Member Functions

void ComputeStats ()
 Computes the statistics on the data in the buffers.

Private Attributes

double mean_pitch_
double mean_roll_
double median_pitch_
double median_roll_
boost::circular_buffer< double > pitches_
boost::circular_buffer< double > rolls_

Detailed Description

A class for estimating image warping based on perspective distortion. Primarily intended for use with downward-facing camera methods.

Definition at line 212 of file image_warp_util.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 452 of file image_warp_util.cpp.

Definition at line 220 of file image_warp_util.h.


Member Function Documentation

Clears the buffer.

Definition at line 499 of file image_warp_util.cpp.

Computes the statistics on the data in the buffers.

Definition at line 579 of file image_warp_util.cpp.

void swri_image_util::PitchAndRollEstimatorQueue::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:
[in]points1Points from first image
[in]points2Corresponding points from second image
[in]image_sizeThe size of the image

Definition at line 512 of file image_warp_util.cpp.

bool swri_image_util::PitchAndRollEstimatorQueue::GetMeanPitchAndRoll ( double &  pitch,
double &  roll 
)

Computes the mean pitch and roll.

Parameters:
[out]pitchThe computed mean pitch (will be zero if buffer is empty)
[out]rollThe computed mean roll (will be zero if buffer is empty)
Return values:
Returnsfalse if the buffer is empty

Definition at line 537 of file image_warp_util.cpp.

bool swri_image_util::PitchAndRollEstimatorQueue::GetMedianPitchAndRoll ( double &  pitch,
double &  roll 
)

Computes the median pitch and roll.

Parameters:
[out]pitchThe computed median pitch (will be zero if buffer is empty)
[out]rollThe computed median roll (will be zero if buffer is empty)
Return values:
Returnsfalse if the buffer is empty

Definition at line 551 of file image_warp_util.cpp.

void swri_image_util::PitchAndRollEstimatorQueue::LoadNewData ( double  new_pitch,
double  new_roll 
)

Loads new pitch and roll data directly onto the buffer.

Parameters:
[in]new_pitchNew pitch data
[in]new_rollNew roll data

Definition at line 566 of file image_warp_util.cpp.

Sets the circular buffer capacity for computing statistics.

Parameters:
[in]buff_sizeThe desired size of the buffer

Definition at line 463 of file image_warp_util.cpp.

void swri_image_util::PitchAndRollEstimatorQueue::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:
[in]points_inThe input points matrix
[out]points_outThe output points matrix
[in]image_sizeThe corresponding image size
[in]use_medianSpecify whether to use median or mean values, default is use_median = true

Definition at line 475 of file image_warp_util.cpp.


Member Data Documentation

Definition at line 300 of file image_warp_util.h.

Definition at line 301 of file image_warp_util.h.

Definition at line 302 of file image_warp_util.h.

Definition at line 303 of file image_warp_util.h.

boost::circular_buffer<double> swri_image_util::PitchAndRollEstimatorQueue::pitches_ [private]

Definition at line 297 of file image_warp_util.h.

boost::circular_buffer<double> swri_image_util::PitchAndRollEstimatorQueue::rolls_ [private]

Definition at line 298 of file image_warp_util.h.


The documentation for this class was generated from the following files:


swri_image_util
Author(s): Kris Kozak
autogenerated on Tue Oct 3 2017 03:19:34