Skip to content

Add feature.hog support for RGB images - #2011

Closed
sdsingh wants to merge 5 commits into
scikit-image:masterfrom
sdsingh:rgb_hog
Closed

sdsingh wants to merge 5 commits into
scikit-image:masterfrom
sdsingh:rgb_hog

Conversation

@sdsingh

@sdsingh sdsingh commented Mar 16, 2016

Copy link
Copy Markdown

I wrote a test case benchmarking against matlab, however the results do not match.
I was unable to find good images to test against elsewhere (despite consulting some friends who have also implemented color HOG).
If anyone has other ideas for testing the color behavior, I'm all ears!

@stefanv

stefanv commented Mar 16, 2016

Copy link
Copy Markdown
Member

@sdsingh Are the results comparable? Do they look similar when vizualised?

@sdsingh

sdsingh commented Mar 17, 2016

Copy link
Copy Markdown
Author

Compared to the gray computation of HOG, the color computation appears reasonable, with some gradients visually a bit stronger, as expected.
color_v_gray

Comparing to MATLAB, however, has been a bit difficult.
Since the values didn't match directly, I took a look at the actual images.
Uploading color_mlb_sk.png…

It seems that MATLAB follows a similar rescaling of intensity values, just like the HOG demo (http://scikit-image.org/docs/dev/auto_examples/plot_hog.html). So, I used the same rescaling process as the HOG demo to obtain:
color_mlb_sk_rescale

These appear to be visually similar, although due to MATLAB's fancy plotting abilities, the MATLAB image is a bit easier to inspect.

I checked the sums of the respective Histogram values returned by each function. They differ drastically, so I tried normalizing by these sums, to no avail.

Curious, I plotted the actual histograms, which seem to differ drastically, in a nonlinear way.

Matlab
gray_mlab

Scikit-Image
gray_sk

Shaun Singh and others added 2 commits March 16, 2016 17:45
@soupault soupault added the ⏩ type: Enhancement Improve existing features label Apr 6, 2016
@soupault soupault changed the title Rgb Hog Add feature.hog support for RGB images Oct 25, 2016
@soupault

soupault commented Nov 4, 2017

Copy link
Copy Markdown
Member

This implementation is not in line with the paper.
Closing in advance of #2870.

@soupault soupault closed this Nov 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⏩ type: Enhancement Improve existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants