The HOG feature extraction visualization [closed]
Hi all, I am using the HOGDescriptor class built-in the opencv 3.1 library. I can run the code to extract the descriptor values into the vector<float>.
compute (InputArray img, std::vector< float > &descriptors, Size winStride=Size(), Size padding=Size(), const std::vector< Point > &locations=std::vector< Point>()) const
However, I don't know which order the descriptors is stored in this vector "std::vector< float > &descriptors" row-column-bin or anything else. I really need the visualization of HOG descriptors. I also found the sample code here
http://www.juergenwiki.de/work/wiki/d...
But it seems that the order of 3 for-loops when he computes the gradient strengths conflict as usuall (we usually loop row then col then bin)
// compute gradient strengths per cell int descriptorDataIdx = 0; int cellx = 0; int celly = 0; for (int blockx=0; blockx<blocks_in_x_dir; blockx++) { for (int blocky=0; blocky<blocks_in_y_dir; blocky++) { // 4 cells per block ... for (int cellNr=0; cellNr<4; cellNr++) {
I am really embarrassed at this point. Hope anyone can help me. Thank you !
also have a look at this visualization .
could you highlight, why you think, it matters ? (apart from "convention", i guess)
I mean line 175-180 https://github.com/Itseez/opencv/blob...
The adapted interface provided below his code, which is more general, is still working over here. Could you try running that version and report back the errors that it might throw in your case?