I am using the HOG class that extract the HOG features of an image and return an Histogram (Histogram class).
The histogram class is simple, it's a double[]. However, I do not find any vizualisations methods or class to permit me to see this output.
I tried to code my own method, but I can see that it displays the local Histogram at the wrong place as the histogram doesn't make sense with the image and some artifacts are clearly noticeable. I clearly don't print the right data in the right place. That's because I have no idea how the data is stored in the double[], in what order, what sequence?
If anyone knows how to it is stored, or know a way to display it, let me know.
Many thanks,
Yoann Varquet
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Say you have an image 64x128
you bin it 8x8 (cell size)
that's 8x16 cells to form the image
it is also 7x15 blocks (8-1 and 16-1 as they overlap by 50%)
each block are 16x16pixels, and also 2x2cells;
Here is where my error laid:
the strategy I was using didn't have the right parameters:
public FixedHOGStrategy(int cellSize,
int cellsPerBlock,
FixedHOGStrategy.BlockNormalisation norm)
in this case, cellSize = 8 & cellsPerBlock = 2. (I understood cells per block as in 2x2=4, but in facts what it requires is the BlockSize)
anyway once I work that out, the function I used was pretty straight forward:
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi all,
I am using the HOG class that extract the HOG features of an image and return an Histogram (Histogram class).
The histogram class is simple, it's a double[]. However, I do not find any vizualisations methods or class to permit me to see this output.
Here is what I use:
I tried to code my own method, but I can see that it displays the local Histogram at the wrong place as the histogram doesn't make sense with the image and some artifacts are clearly noticeable. I clearly don't print the right data in the right place. That's because I have no idea how the data is stored in the double[], in what order, what sequence?
If anyone knows how to it is stored, or know a way to display it, let me know.
Many thanks,
Yoann Varquet
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
After a long time on it, I worked it out. It was mostly because I didn't understand fully the use of:`
Say you have an image 64x128
you bin it 8x8 (cell size)
that's 8x16 cells to form the image
it is also 7x15 blocks (8-1 and 16-1 as they overlap by 50%)
each block are 16x16pixels, and also 2x2cells;
Here is where my error laid:
the strategy I was using didn't have the right parameters:
public FixedHOGStrategy(int cellSize,
int cellsPerBlock,
FixedHOGStrategy.BlockNormalisation norm)
in this case, cellSize = 8 & cellsPerBlock = 2. (I understood cells per block as in 2x2=4, but in facts what it requires is the BlockSize)
anyway once I work that out, the function I used was pretty straight forward:
I hope that helps.
Good luck to all.
Yoann