10 #ifndef mrpt_vision_utils_H
11 #define mrpt_vision_utils_H
29 class CObservationStereoImages;
30 class CObservationBearingRange;
32 class CObservationVisualLandmarks;
70 int y_search_size=-1);
104 const double focalLengthX,
105 const double focalLengthY,
106 const double centerX,
107 const double centerY);
154 unsigned int camIndex = 0,
155 unsigned int resolutionX = 320,
156 unsigned int resolutionY = 240 );
162 CFeatureList & list );
170 CFeatureList & leftList,
171 CFeatureList & rightList,
172 float threshold = 1.0);
180 const CFeatureList & list,
189 const poses::CPose3D & Rt );
226 const CFeatureList & list1,
227 const CFeatureList & list2,
228 CMatchedFeatureList & matches,
229 const TMatchingOptions & options = TMatchingOptions(),
230 const TStereoSystemParams & params = TStereoSystemParams() );
240 const CMatchedFeatureList & mList,
261 const CFeatureList & theList,
265 const CMatchedFeatureList & matches,
267 vector<TPoint3D> & out_points );
276 const CFeatureList & leftList,
277 const CFeatureList & rightList,
278 vector<TPoint3D> & vP3D,
279 const TStereoSystemParams & params = TStereoSystemParams() );
288 const CFeaturePtr & leftFeat,
289 const CFeaturePtr & rightFeat,
291 const TStereoSystemParams & params = TStereoSystemParams() );
300 CMatchedFeatureList & mfList,
301 const TStereoSystemParams & param,
313 CFeatureList & leftList,
314 CFeatureList & rightList,
315 const TStereoSystemParams & param,
325 const vector<double> & sg,
336 const CMatchedFeatureList & inMatches,
338 const double & baseline,
340 const vector<double> & sg,
350 const vector<double> & sg,
371 const poses::CPose3D & rightCameraPose,
A class for storing a map of 3D probabilistic landmarks.
A pair (x,y) of pixel coordinates (subpixel resolution).
float VISION_IMPEXP computeMainOrientation(const 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) ...
CMatrixDouble33 VISION_IMPEXP buildIntrinsicParamsMatrix(const double focalLengthX, const double focalLengthY, const double centerX, const double centerY)
Builds the intrinsic parameters matrix A from parameters:
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
void VISION_IMPEXP getDispersion(const CFeatureList &list, CVectorFloat &std, CVectorFloat &mean)
Computes the dispersion of the features in the image.
A class for storing images as grayscale or RGB bitmaps.
Declares a class derived from "CObservation" that stores a Landmarks Map as seen from a stereo camera...
void VISION_IMPEXP projectMatchedFeature(const CFeaturePtr &leftFeat, const CFeaturePtr &rightFeat, TPoint3D &p3D, const TStereoSystemParams ¶ms=TStereoSystemParams())
Computes the 3D position of a particular matched feature.
This observation represents a number of range-bearing value pairs, each one for a detected landmark...
double VISION_IMPEXP computeMsd(const TMatchingPairList &list, const poses::CPose3D &Rt)
Computes the mean squared distance between a set of 3D correspondences ...
void VISION_IMPEXP projectMatchedFeatures(const CMatchedFeatureList &matches, const mrpt::utils::TStereoCamera &stereo_camera, vector< TPoint3D > &out_points)
This namespace contains algorithms for SLAM, localization, map building, representation of robot's ac...
Structure to hold the parameters of a pinhole stereo camera model.
void VISION_IMPEXP addFeaturesToImage(const CImage &inImg, const CFeatureList &theList, CImage &outImg)
Draw rectangles around each of the features on a copy of the input image.
void VISION_IMPEXP normalizeImage(const CImage &image, CImage &nimage)
Normalizes the brigthness and contrast of an image by setting its mean value to zero and its standard...
A numeric matrix of compile-time fixed size.
This base provides a set of functions for maths stuff.
void VISION_IMPEXP cloudsToMatchedList(const CObservationVisualLandmarks &cloud1, const CObservationVisualLandmarks &cloud2, TMatchingPairList &outList)
Transform two clouds of 3D points into a matched list of points ...
TPoint3D VISION_IMPEXP pixelTo3D(const TPixelCoordf &xy, const CMatrixDouble33 &A)
Extract a UNITARY 3D vector in the direction of a 3D point, given from its (x,y) pixels coordinates...
void VISION_IMPEXP flip(CImage &img)
Invert an image using OpenCV function.
void VISION_IMPEXP computeStereoRectificationMaps(const TCamera &cam1, const TCamera &cam2, const 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...
double VISION_IMPEXP computeSAD(const CImage &patch1, const CImage &patch2)
Calculates the Sum of Absolutes Differences (range [0,1]) between two patches.
void VISION_IMPEXP rowChecking(CFeatureList &leftList, CFeatureList &rightList, float threshold=1.0)
Search for correspondences which are not in the same row and deletes them.
Column vector, like Eigen::MatrixX*, but automatically initialized to zeros since construction...
This template class provides the basic functionality for a general 2D any-size, resizable container o...
Observation class for either a pair of left+right or left+disparity images from a stereo camera...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
void VISION_IMPEXP StereoObs2BRObs(const CObservationStereoImages &inObs, const vector< double > &sg, CObservationBearingRange &outObs)
Converts a stereo images observation into a bearing and range observation.
void VISION_IMPEXP openCV_cross_correlation(const CImage &img, const 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...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
void VISION_IMPEXP deleteRepeatedFeats(CFeatureList &list)
Explore the feature list and removes features which are in the same coordinates.
EIGEN_STRONG_INLINE double mean() const
Computes the mean of the entire matrix.
CMatrixDouble33 VISION_IMPEXP defaultIntrinsicParamsMatrix(unsigned int camIndex=0, unsigned int resolutionX=320, unsigned int resolutionY=240)
Returns the stored, default intrinsic params matrix for a given camera:
void VISION_IMPEXP 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.
Structure to hold the parameters of a pinhole camera model.
size_t VISION_IMPEXP 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.