I'm using INRIA person dataset, i iterate the images and everything is fine and after i have this function
vector<Mat> HOG_extract(Mat input_image, bool patch_size, int width, int height)
{
Mat gray_image;
cvtColor(input_image, gray_image, CV_BGR2GRAY);
HOGDescriptor hog;
hog.winSize = Size(width, height);
hog.blockSize = Size(block_size, block_size);
hog.blockStride = Size(block_stride, block_stride);
hog.cellSize = Size(cell_size, cell_size);
hog.nbins = bin_size;
vector<float> hog_value;
vector<Point> locations;
hog.compute(gray_image, hog_value, Size(0, 0), Size(0, 0), locations);
}
when he gets to hog.compute i receive an exception and libpng error: IDAT: invalid distance too far back.
like how i can solve this? looks like something happend when using imread and converting in gray