26 #include <pcl/point_cloud.h>
27 #include <pcl/point_types.h>
30 #include <Math/Math2d.h>
34 class CSIFTFeatureCalculator;
35 class CStereoCalibration;
47 const CByteImage* pImageRightColor,
48 const CByteImage* pImageLeftGrey,
49 const CByteImage* pImageRightGrey,
50 const int nDisparityPointDistance,
51 CStereoCalibration* pStereoCalibration,
53 std::vector<CMSERDescriptor3D*>& aAllMSERs,
54 std::vector<CHypothesisPoint*>& aPointsFromDepthImage,
55 CByteImage* pDisparityImage,
56 std::vector<Vec3d>* pAll3DPoints = NULL);
58 #ifdef OLP_USE_DEPTH_MAP
61 const CByteImage* pImageLeftGrey,
62 const pcl::PointCloud<pcl::PointXYZRGBA>::Ptr pointcloud,
63 const int nDisparityPointDistance,
65 std::vector<CMSERDescriptor3D*>& aAllMSERs,
66 std::vector<CHypothesisPoint*>& aPointsFromDepthImage,
67 const CCalibration* calibration);
71 void FilterForegroundPoints(
const std::vector<CHypothesisPoint*>& aAllPoints,
72 const CByteImage* pForegroundImage,
73 std::vector<CHypothesisPoint*>& aForegroundPoints);
76 const CByteImage* pForegroundImage,
77 float& fForegroundRatio,
78 int& nNumForegroundPixels);
79 static inline void GetEnclosingRectangle(
const Vec2d* pPoints,
86 static inline int CountForegroundPixelsInRectangle(
const Vec2d vMiddleMin,
87 const Vec2d vMinMiddle,
88 const Vec2d vMaxMiddle,
89 const Vec2d vMiddleMax,
90 const CByteImage* pForegroundImage);
92 void GetPointsFromDisparity(
const CByteImage* pImageLeftColor,
93 const CByteImage* pImageRightColor,
94 const CByteImage* pImageLeftGrey,
95 const CByteImage* pImageRightGrey,
96 CStereoCalibration* pStereoCalibration,
97 const int nDisparityPointDistance,
98 std::vector<CHypothesisPoint*>& aPointsFromDisparity,
99 CByteImage* pDisparityImage,
100 std::vector<Vec3d>* pAll3DPoints);
102 void CalculateSmoothedDisparityImage(
float* pInputDisparity,
103 float* pSmoothedDisparity,
104 const int nRadius = 1);
106 #ifdef OLP_USE_DEPTH_MAP
107 static Vec3d GetCorresponding3DPoint(
const Vec2d point2D,
108 const pcl::PointCloud<pcl::PointXYZRGBA>::Ptr pointcloud);
111 static const int m_nMaxNumInterestPoints = 4000;
112 Vec2d* m_pInterestPoints;
114 CSIFTFeatureCalculator* m_pSIFTFeatureCalculator;