28 #include <Math/Math2d.h>
30 #include <pcl/point_types.h>
31 #include <pcl/point_cloud.h>
32 #include <pcl/point_types.h>
36 class CSIFTFeatureCalculator;
37 class CStereoCalibration;
49 void GetAllFeaturePoints(
const CByteImage* pImageLeftColor,
const CByteImage* pImageRightColor,
const CByteImage* pImageLeftGrey,
const CByteImage* pImageRightGrey,
const int nDisparityPointDistance, CStereoCalibration* pStereoCalibration,
50 CSIFTFeatureArray& aAllSIFTPoints, std::vector<CMSERDescriptor3D*>& aAllMSERs, std::vector<CHypothesisPoint*>& aPointsFromDepthImage, CByteImage* pDisparityImage, std::vector<Vec3d>* pAll3DPoints = NULL);
52 #ifdef OLP_USE_DEPTH_MAP
54 void GetAllFeaturePoints(
const CByteImage* pImageLeftColor,
const CByteImage* pImageLeftGrey,
const pcl::PointCloud<pcl::PointXYZRGBA>::Ptr pointcloud,
const int nDisparityPointDistance,
55 CSIFTFeatureArray& aAllSIFTPoints, std::vector<CMSERDescriptor3D*>& aAllMSERs, std::vector<CHypothesisPoint*>& aPointsFromDepthImage,
const CCalibration* calibration);
60 void FilterForegroundPoints(
const std::vector<CHypothesisPoint*>& aAllPoints,
const CByteImage* pForegroundImage, std::vector<CHypothesisPoint*>& aForegroundPoints);
62 void CalculateForegroundRatioOfHypothesis(
const CObjectHypothesis* pHypothesis,
const CByteImage* pForegroundImage,
float& fForegroundRatio,
int& nNumForegroundPixels);
63 static inline void GetEnclosingRectangle(
const Vec2d* pPoints,
const int nNumPoints,
Vec2d& p1,
Vec2d& p2,
Vec2d& p3,
Vec2d& p4,
bool& bRotated);
64 static inline int CountForegroundPixelsInRectangle(
const Vec2d vMiddleMin,
const Vec2d vMinMiddle,
const Vec2d vMaxMiddle,
const Vec2d vMiddleMax,
const CByteImage* pForegroundImage);
66 void GetPointsFromDisparity(
const CByteImage* pImageLeftColor,
const CByteImage* pImageRightColor,
const CByteImage* pImageLeftGrey,
const CByteImage* pImageRightGrey, CStereoCalibration* pStereoCalibration,
67 const int nDisparityPointDistance, std::vector<CHypothesisPoint*>& aPointsFromDisparity, CByteImage* pDisparityImage, std::vector<Vec3d>* pAll3DPoints);
69 void CalculateSmoothedDisparityImage(
float* pInputDisparity,
float* pSmoothedDisparity,
const int nRadius = 1);
71 #ifdef OLP_USE_DEPTH_MAP
72 static Vec3d GetCorresponding3DPoint(
const Vec2d point2D,
const pcl::PointCloud<pcl::PointXYZRGBA>::Ptr pointcloud);
75 static const int m_nMaxNumInterestPoints = 4000;
76 Vec2d* m_pInterestPoints;
78 CSIFTFeatureCalculator* m_pSIFTFeatureCalculator;