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>
|
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. More...
|
|
|
bool | ComputeGeometricMatches () |
| Matches keypoints using loose geometric constraints and stores them in kp1_matched_ and kp2_matched_. More...
|
|
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) More...
|
|
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) More...
|
|
|
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. More...
|
|
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.
◆ PitchAndRollEstimator()
swri_image_util::PitchAndRollEstimator::PitchAndRollEstimator |
( |
| ) |
|
|
inline |
◆ ComputeGeometricMatches()
bool swri_image_util::PitchAndRollEstimator::ComputeGeometricMatches |
( |
| ) |
|
|
private |
Matches keypoints using loose geometric constraints and stores them in kp1_matched_ and kp2_matched_.
- Return values
-
Returns | false if unable to find valid matches |
Definition at line 299 of file image_warp_util.cpp.
◆ EstimateNominalAngle() [1/2]
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.
◆ EstimateNominalAngle() [2/2]
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.
◆ EstimateTransforms()
bool swri_image_util::PitchAndRollEstimator::EstimateTransforms |
( |
cv::Mat & |
pts1, |
|
|
cv::Mat & |
pts2, |
|
|
cv::Mat & |
T_affine, |
|
|
cv::Mat & |
T_rigid, |
|
|
double & |
rms_error |
|
) |
| |
|
staticprivate |
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_error | The RMS (distance) error for inlier points using the rigid transform |
- Return values
-
Returns | false if unable to find enough valid matches |
Definition at line 360 of file image_warp_util.cpp.
◆ WarpAffinePoints()
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] | T | The 2D rigid transform to use for warping |
[in] | pts_in | The points to warp |
[out] | pts_out | The warped points |
Definition at line 411 of file image_warp_util.cpp.
◆ WarpPoints()
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] | pitch | The pitch used to warp the point |
[in] | roll | The roll used to warp the point |
[in] | pts_in | The points to warp |
[out] | pts_out | The warped points |
Definition at line 391 of file image_warp_util.cpp.
◆ descriptors1_
cv::Mat swri_image_util::PitchAndRollEstimator::descriptors1_ |
|
private |
◆ descriptors2_
cv::Mat swri_image_util::PitchAndRollEstimator::descriptors2_ |
|
private |
◆ im1_
cv::Mat swri_image_util::PitchAndRollEstimator::im1_ |
|
private |
◆ im2_
cv::Mat swri_image_util::PitchAndRollEstimator::im2_ |
|
private |
◆ K_
cv::Mat swri_image_util::PitchAndRollEstimator::K_ |
|
private |
◆ kp1_
std::vector<cv::KeyPoint> swri_image_util::PitchAndRollEstimator::kp1_ |
|
private |
◆ kp1_matched_
cv::Mat swri_image_util::PitchAndRollEstimator::kp1_matched_ |
|
private |
◆ kp2_
std::vector<cv::KeyPoint> swri_image_util::PitchAndRollEstimator::kp2_ |
|
private |
◆ kp2_matched_
cv::Mat swri_image_util::PitchAndRollEstimator::kp2_matched_ |
|
private |
◆ T_
cv::Mat swri_image_util::PitchAndRollEstimator::T_ |
|
private |
◆ warper_
cv::detail::PlaneWarper swri_image_util::PitchAndRollEstimator::warper_ |
|
private |
The documentation for this class was generated from the following files: