cv::HOGDescriptor::compute crashes in 2.4.9 (not in 2.4.6)
Hi
in some code that I am maintaining, we call cv::HOGDescriptor::compute. After ROS opencv package upgraded to 2.4.9 from 2.4.6 it started to crash. Nothing else has changed in my code. I am not familiar at all with HOG descriptors, so I'm not sure how to go about this, so I'm hoping somebody can tell me what has changed lately in this function.
here is the error that I get: opencv2/core/core.hpp:345: size_t cv::alignSize(size_t, int): Assertion `(n & (n - 1)) == 0' failed. (this is checking that n is power of 2)
and here is some of my code (hopefully enough of it to give you a sense of what's going on):
this is how I construct the HOGDescriptor:
hog_ = new cv::HOGDescriptor(win_size_, block_size_, block_stride_,
cell_size_, num_bins_,
1, -1, 0, 0.2, false);
where win_size_ is (30,30), block_size_ is (30,30), block_stride_ is (10,10), cell_size is (5,5), and num_bins_ is 6.
And this is how I call compute:
hog_->compute(img, cv_result_, cv::Size(), cv::Size(), coords_);
where img is a cv::Mat1b of 60x60, and coords_ contains 4 elements: {(0,30),(15,0),(15,15),(30,30)}