1 | initial version |
would it be best for me to just make my own BOW routine for a hog feature ?
i'm afraid, you have to. a HOGDescriptor is not a FeatureExtractor.
The authors refer to 32 * 32 "patches",
yes, you have to sample your image with a grid of patches, then compute a hog descriptor per patch. (those are actually column vectors, so you'll have to reshape() them to a row, and stack them hoizontally, so with 10x10 patches, you should have a 100 rows, 1760 columns Mat per image. for 30 images, that's [1760x3000]. then you can throw that into kmeans, and reduce it to 128 rows and 1760 cols again, that's your vocabulary.
2 | No.2 Revision |
would it be best for me to just make my own BOW routine for a hog feature ?
i'm afraid, you have to. a HOGDescriptor is not a FeatureExtractor.
The authors refer to 32 * 32 "patches",
yes, you have to sample your image with a grid of patches, then compute a hog descriptor per patch. (those are actually column vectors, so you'll have to reshape() them to a row, and stack them hoizontally, so with 10x10 patches, you should have a 100 rows, 1760 (sorry, forgot the correct number) columns Mat per image. for 30 images, that's [1760x3000]. then you can throw that into kmeans, and reduce it to 128 rows and 1760 cols again, that's your vocabulary.