Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
swri_image_util::PitchAndRollEstimator 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

cv::Mat EstimateNominalAngle (double &nominal_pitch, double &nominal_roll, bool show_image_diff=false)
 Estimates the nominal pitch and roll of the camera (from perfectly vertical) from two overlapping images.
 PitchAndRollEstimator ()
 Constructor.

Static Public Member Functions

static cv::Mat EstimateNominalAngle (const cv::Mat &points1, const cv::Mat &points2, const cv::Size &image_size, double &nominal_pitch, double &nominal_roll)
 Estimates the nominal pitch and roll of the camera (from perfectly vertical) from two overlapping images.

Private Member Functions

bool ComputeGeometricMatches ()
 Matches keypoints using loose geometric constraints and stores them in kp1_matched_ and kp2_matched_.
void WarpAffinePoints (const cv::Mat &T, const cv::Mat &pts_in, cv::Mat &pts_out)
 Warps a matrix of points (in the same form as the inliers)
void WarpPoints (double pitch, double roll, const cv::Mat &pts_in, cv::Mat &pts_out)
 Warps a matrix of points (in the same form as the inliers)

Static Private Member Functions

static bool EstimateTransforms (cv::Mat &pts1, cv::Mat &pts2, cv::Mat &T_affine, cv::Mat &T_rigid, double &rms_error)
 Estimates the "nearest" rigid, and corresponding full affine transformation for a set of matching points.

Private Attributes

cv::Mat descriptors1_
cv::Mat descriptors2_
cv::Mat im1_
cv::Mat im2_
cv::Mat K_
std::vector< cv::KeyPoint > kp1_
cv::Mat kp1_matched_
std::vector< cv::KeyPoint > kp2_
cv::Mat kp2_matched_
cv::Mat T_
cv::detail::PlaneWarper warper_

Detailed Description

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

Definition at line 105 of file image_warp_util.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 111 of file image_warp_util.h.


Member Function Documentation

Matches keypoints using loose geometric constraints and stores them in kp1_matched_ and kp2_matched_.

Return values:
Returnsfalse if unable to find valid matches

Definition at line 299 of file image_warp_util.cpp.

cv::Mat swri_image_util::PitchAndRollEstimator::EstimateNominalAngle ( double &  nominal_pitch,
double &  nominal_roll,
bool  show_image_diff = false 
)

Estimates the nominal pitch and roll of the camera (from perfectly vertical) from two overlapping images.

Returns:
Returns the rotation matrix for the computed pitch and roll

Definition at line 145 of file image_warp_util.cpp.

cv::Mat swri_image_util::PitchAndRollEstimator::EstimateNominalAngle ( const cv::Mat &  points1,
const cv::Mat &  points2,
const cv::Size &  image_size,
double &  nominal_pitch,
double &  nominal_roll 
) [static]

Estimates the nominal pitch and roll of the camera (from perfectly vertical) from two overlapping images.

Returns:
Returns the rotation matrix for the computed pitch and roll

Definition at line 206 of file image_warp_util.cpp.

bool swri_image_util::PitchAndRollEstimator::EstimateTransforms ( cv::Mat &  pts1,
cv::Mat &  pts2,
cv::Mat &  T_affine,
cv::Mat &  T_rigid,
double &  rms_error 
) [static, private]

Estimates the "nearest" rigid, and corresponding full affine transformation for a set of matching points.

Parameters:
[in]pts1
[in]pts2
[out]T_affine
[out]T_rigid
[out]rms_errorThe RMS (distance) error for inlier points using the rigid transform
Return values:
Returnsfalse if unable to find enough valid matches

Definition at line 360 of file image_warp_util.cpp.

void swri_image_util::PitchAndRollEstimator::WarpAffinePoints ( const cv::Mat &  T,
const cv::Mat &  pts_in,
cv::Mat &  pts_out 
) [private]

Warps a matrix of points (in the same form as the inliers)

Parameters:
[in]TThe 2D rigid transform to use for warping
[in]pts_inThe points to warp
[out]pts_outThe warped points

Definition at line 411 of file image_warp_util.cpp.

void swri_image_util::PitchAndRollEstimator::WarpPoints ( double  pitch,
double  roll,
const cv::Mat &  pts_in,
cv::Mat &  pts_out 
) [private]

Warps a matrix of points (in the same form as the inliers)

Parameters:
[in]pitchThe pitch used to warp the point
[in]rollThe roll used to warp the point
[in]pts_inThe points to warp
[out]pts_outThe warped points

Definition at line 391 of file image_warp_util.cpp.


Member Data Documentation

Definition at line 146 of file image_warp_util.h.

Definition at line 147 of file image_warp_util.h.

Definition at line 138 of file image_warp_util.h.

Definition at line 139 of file image_warp_util.h.

Definition at line 141 of file image_warp_util.h.

std::vector<cv::KeyPoint> swri_image_util::PitchAndRollEstimator::kp1_ [private]

Definition at line 144 of file image_warp_util.h.

Definition at line 149 of file image_warp_util.h.

std::vector<cv::KeyPoint> swri_image_util::PitchAndRollEstimator::kp2_ [private]

Definition at line 145 of file image_warp_util.h.

Definition at line 150 of file image_warp_util.h.

Definition at line 142 of file image_warp_util.h.

cv::detail::PlaneWarper swri_image_util::PitchAndRollEstimator::warper_ [private]

Definition at line 152 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