图像和图像处理中的特征提取

时间:2014-01-21 15:56:19

标签: c++ image-processing

在我的项目中我应该进行人脸检测。我成功了,但现在我想在其中进行特征提取。那么有没有算法呢?

1 个答案:

答案 0 :(得分:3)

Here您有一个使用OpenCV进行特征检测的教程。有很多特征检测算法(参见Wikipedia)。 OpenCV教程向您展示了使用SURF功能的示例。该示例的主要部分是:

SurfFeatureDetector detector(400);
std::vector<KeyPoint> keypoints_1;
detector.detect( img_1, keypoints_1 );

keypoints_1中,您拥有更相关的要点。然后我相信你需要围绕这一点描述一个补丁。 我建议按照this tutorial这样做。代码的主要部分是:

//vector of keypoints  
vector< cv::KeyPoint > keypointsS; //keypoints for scene
//Descriptor matrices
Mat descriptors_scene;

SurfDescriptorExtractor extractor;
extractor.compute( sceneMat, keypointsS, descriptors_scene );
相关问题