Hi, I am tring to use HOGDescriptor of OpenCv3.0 under VS2012 to compute the hog features.And my codes is as flows:
cv::Mat img=cv::imread("D:\pictures\1.bmp";
if(img.data==NULL)
{
cout<<"load pictures error"<<endl;< p="">
}
if(img.cols!=hog.winSize.width||img.rows!=hog.winSize.height)
{
count<<"the size of pictures is wrong"<<endl;< p="">
}
cv::HOGDescriptor;
hog(cv::Size(64,64),cv::Size(16,16),cv::Size(8,8),cv::Size(8,8),9);
vector featureVec;
hog.compute(img,featureVec);
//fails,"Access error occurred while writing position 0 x00477218”
I examine the codes many times, and don't why.
Please help me. Thank you.