我想用OpenCv3.0的HOGDescriptor下VS2012.And我的代码是流向:一些问题在OpenCv3.0 2012
cv::Mat img=cv::imread("D:\\pictures\\1.bmp";
if(img.data==NULL)
{
cout<<"load pictures error"<<endl;
}
if(img.cols!=hog.winSize.width||img.rows!=hog.winSize.height)
{
count<<"the size of pictures is wrong"<<endl;
}
cv::HOGDescriptor;
hog(cv::Size(64,64),cv::Size(16,16),cv::Size(8,8),cv::Size(8,8),9);
vector<float> featureVec;
hog.compute(img,featureVec);
//fails,"Access error occurred while writing position 0 x00477218”
我检查代码很多次,和唐为什么。
请帮帮我。谢谢。