Go to the documentation of this file.
10 #ifndef mrpt_vision_utils_H
11 #define mrpt_vision_utils_H
32 class CObservationVisualLandmarks;
66 size_t& x_max,
size_t& y_max,
double& max_val,
int x_search_ini = -1,
67 int y_search_ini = -1,
int x_search_size = -1,
int y_search_size = -1);
102 const double focalLengthX,
const double focalLengthY,
const double centerX,
103 const double centerY);
151 unsigned int camIndex = 0,
unsigned int resolutionX = 320,
152 unsigned int resolutionY = 240);
261 std::vector<mrpt::math::TPoint3D>& out_points);
275 std::vector<mrpt::math::TPoint3D>& vP3D,
382 void* outMap2x,
void* outMap2y);
A pair (x,y) of pixel coordinates (subpixel resolution).
void rowChecking(CFeatureList &leftList, CFeatureList &rightList, float threshold=1.0)
Search for correspondences which are not in the same row and deletes them.
size_t matchFeatures(const CFeatureList &list1, const CFeatureList &list2, CMatchedFeatureList &matches, const TMatchingOptions &options=TMatchingOptions(), const TStereoSystemParams ¶ms=TStereoSystemParams())
Find the matches between two lists of features which must be of the same type.
void computeStereoRectificationMaps(const mrpt::img::TCamera &cam1, const mrpt::img::TCamera &cam2, const mrpt::poses::CPose3D &rightCameraPose, void *outMap1x, void *outMap1y, void *outMap2x, void *outMap2y)
Computes a pair of x-and-y maps for stereo rectification from a pair of cameras and the relative pose...
Declares a class derived from "CObservation" that stores a Landmarks Map as seen from a stereo camera...
Column vector, like Eigen::MatrixX*, but automatically initialized to zeros since construction.
Declares a matrix of booleans (non serializable).
void flip(mrpt::img::CImage &img)
Invert an image using OpenCV function.
mrpt::math::CMatrixDouble33 buildIntrinsicParamsMatrix(const double focalLengthX, const double focalLengthY, const double centerX, const double centerY)
Builds the intrinsic parameters matrix A from parameters:
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
void StereoObs2BRObs(const mrpt::obs::CObservationStereoImages &inObs, const std::vector< double > &sg, mrpt::obs::CObservationBearingRange &outObs)
Converts a stereo images observation into a bearing and range observation.
float computeMainOrientation(const mrpt::img::CImage &image, unsigned int x, unsigned int y)
Computes the main orientation of a set of points with an image (for using in SIFT-based algorithms)
void openCV_cross_correlation(const mrpt::img::CImage &img, const mrpt::img::CImage &patch_img, size_t &x_max, size_t &y_max, double &max_val, int x_search_ini=-1, int y_search_ini=-1, int x_search_size=-1, int y_search_size=-1)
Computes the correlation between this image and another one, encapsulating the openCV function cvMatc...
void cloudsToMatchedList(const mrpt::obs::CObservationVisualLandmarks &cloud1, const mrpt::obs::CObservationVisualLandmarks &cloud2, mrpt::tfest::TMatchingPairList &outList)
Transform two clouds of 3D points into a matched list of points ...
A list of visual features, to be used as output by detectors, as input/output by trackers,...
std::shared_ptr< CFeature > Ptr
Structure to hold the parameters of a pinhole stereo camera model.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
mrpt::math::TPoint3D pixelTo3D(const mrpt::img::TPixelCoordf &xy, const mrpt::math::CMatrixDouble33 &A)
Extract a UNITARY 3D vector in the direction of a 3D point, given from its (x,y) pixels coordinates,...
This observation represents a number of range-bearing value pairs, each one for a detected landmark,...
Structure to hold the parameters of a pinhole camera model.
void projectMatchedFeature(const CFeature::Ptr &leftFeat, const CFeature::Ptr &rightFeat, mrpt::math::TPoint3D &p3D, const TStereoSystemParams ¶ms=TStereoSystemParams())
Computes the 3D position of a particular matched feature.
A class for storing images as grayscale or RGB bitmaps.
void getDispersion(const CFeatureList &list, mrpt::math::CVectorFloat &std, mrpt::math::CVectorFloat &mean)
Computes the dispersion of the features in the image.
GLenum GLsizei GLenum GLenum const GLvoid * image
void projectMatchedFeatures(const CMatchedFeatureList &matches, const mrpt::img::TStereoCamera &stereo_camera, std::vector< mrpt::math::TPoint3D > &out_points)
void generateMask(const CMatchedFeatureList &mList, mrpt::math::CMatrixBool &mask1, mrpt::math::CMatrixBool &mask2, int wSize=10)
Calculates the Sum of Absolutes Differences (range [0,1]) between two patches.
EIGEN_STRONG_INLINE double mean() const
Computes the mean of the entire matrix.
Parameters associated to a stereo system.
A class for storing a map of 3D probabilistic landmarks.
void deleteRepeatedFeats(CFeatureList &list)
Explore the feature list and removes features which are in the same coordinates.
void addFeaturesToImage(const mrpt::img::CImage &inImg, const CFeatureList &theList, mrpt::img::CImage &outImg)
Draw rectangles around each of the features on a copy of the input image.
double computeMsd(const mrpt::tfest::TMatchingPairList &list, const poses::CPose3D &Rt)
Computes the mean squared distance between a set of 3D correspondences ...
mrpt::math::CMatrixDouble33 defaultIntrinsicParamsMatrix(unsigned int camIndex=0, unsigned int resolutionX=320, unsigned int resolutionY=240)
Returns the stored, default intrinsic params matrix for a given camera:
double computeSAD(const mrpt::img::CImage &patch1, const mrpt::img::CImage &patch2)
Calculates the Sum of Absolutes Differences (range [0,1]) between two patches.
Observation class for either a pair of left+right or left+disparity images from a stereo camera.
GLenum const GLfloat * params
void normalizeImage(const mrpt::img::CImage &image, mrpt::img::CImage &nimage)
Normalizes the brigthness and contrast of an image by setting its mean value to zero and its standard...
A structure containing options for the matching.
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |