HOGDescriptor.computer error [closed]

asked 2015-04-06 01:53:23 -0600

Baozhen Liu gravatar image

updated 2015-04-08 06:46:48 -0600

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;
}

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 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.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-10-02 02:55:42.082224

Comments

1

Hi. Are you sure that you have checked this source code? Your code in the question will not compile, it contains a lot of syntax errors.

Siegfried gravatar imageSiegfried ( 2015-04-08 06:56:51 -0600 )edit

Thanks for your help. I have solved this problem through change the "additional dependencies" in the property of the project. Thanks again.

Baozhen Liu gravatar imageBaozhen Liu ( 2015-04-08 20:38:40 -0600 )edit

HI,I have the same problem. Could you help me what you change the addtion lib.

baifrank gravatar imagebaifrank ( 2015-05-22 03:53:52 -0600 )edit