Ask Your Question
1

HOGDescripter does not compute 64 by 64 training images

asked 2014-08-15 02:45:31 -0600

TheMLearner gravatar image

updated 2014-08-17 18:04:29 -0600

Hi,

I am new to OpenCV, currently I am building a C++ testing program using 2.4.9 on Windows 7, 32bit. I am trying to make HOGDescripter computing training images of 64 by 64 pixels. It works OK with 64 wide 128 high image, but not 64 by 64. Is this a bug? Bellow is the code snippet:

        HOGDescriptor hog(
            Size(64, 64),
            Size(16, 16),
            Size(8, 8),
            Size(8, 8), // cell size
            9, // n bins
            1, // deriv aperture
            0.0, // win sigma
            HOGDescriptor::L2Hys,
            0.2, //_L2HysThreshold
            false, // gamma correction
            HOGDescriptor::DEFAULT_NLEVELS // n levels
            );

....

            vector<Point> locations(1);
            hog.compute(img,
                features,
                Size(8, 8),
                Size(),
                locations);

After the compute function, The vector "features" contains all invalid data, I think they are negative infinite.

Thanks in advance,

Dakai

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-08-17 23:53:52 -0600

TheMLearner gravatar image

Hi All,

I have figured that one out, that the Gaussian parameter for normalization can not be zero. By using DEFAULT_WIN_SIGMA, all works well now.

Cheers, Dakai

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-08-15 02:45:31 -0600

Seen: 205 times

Last updated: Aug 17 '14