Ask Your Question

Link Qian's profile - activity

2017-01-15 19:03:46 -0600 commented question any possible to detect object with cascade training model and HOG feature

HOG feature was remove quietly from cascade classifier without any comment in 3.2.0 release note.

2017-01-13 21:43:19 -0600 received badge  Scholar (source)
2017-01-13 21:43:16 -0600 commented answer any possible to detect object with cascade training model and HOG feature

great answer! thank a lot!

2017-01-13 01:20:29 -0600 asked a question any possible to detect object with cascade training model and HOG feature

I'm an newbie to OpenCV 3.2.0. recently I train a object detector via opencv_traincascade with HOG feature type. Then I write the code for detecting object.

  HOGDescriptor hog_desc;
  if (hog_desc.load("hog-cascade.xml")) {
     Mat src, src_gray;
    src = imread("test.jpg");
    cvtColor(src, src_gray, COLOR_RGB2GRAY);
    equalizedHist(src_gray, src_gray);
    vector<rect> foundLocations;
    hog_desc.detectMultiScale(src_gray, foundLocations);    
  }

the last line of code raises the error OpenCV Error: Assertion failed( dsize.area() > 0 || (inv_scale_x > 0 && inv_scale_y > 0)) in size, file .../opencv/modules/imgproc/src/imgwarp.cpp, line 3493

my question is HOG detector was removed from opencv 3.2?