- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

I am comparing an image with known HSV to my output using the IPP library.

True Values:

H 149

S 80

V 100

Output from Ipp call converting from RGB to HSV:

H 64

S 205

V 255

If I normalize by 255,

H 0.25

S 0.80

V 1.00

So, this explains the encoding for S and V.

What I expect is to multiply the normalized Hue value by 360 to get back the "true" value, which in this case should be 149.As you can see I am getting back 90 instead.

What don't I understand about the IPP representation of Hue?

Thanks!

Link Copied

5 Replies

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

p.s. I also assumed that Hue was in radians, but am not getting my true value back.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

I used a HLS conversion on the same image.

The "true" values:

H 149

L 60

S 100

The values from the HLS:

H 105

L 153

S 255

If I normalize (divide by 255):

H 0.41

L 0.6

S1.0

and then multiply H by 360 and L and S by 100

H 148

L 60

S 100

Not too bad of a match.

So the H in the IPP HLS algorithm gives approxthe right answer, but the H in the IPP HSV algorithm is still a mystery.

Could someone please help explain?

Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

What RGB values you use to get these output HSV?

Vladimir

Vladimir

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Quoting - Vladimir Dudnik (Intel)

*What RGB values you use to get these output HSV?*

Vladimir

Vladimir

Thanks for your response. The values I used were:

R 50

G 255

B 150

I added the testimage (green149.jpg) as an attachment.

I was a bit confused whether the red and blue channels needed to beswapped The HLS method (which appears to be bringing back the correct results) is named "ippiBGRToHLS" (not, RGB to HLS), whereas the HSV method (which appears to not be correct) is named "ippiRGBtoHSV".

Having played with this problem a bit more this morning, it appears that I need to swap the R and B channels from the order in which they naturally occur in my imported Bitmap, whenever I use a method named RGB.

Sound right?

ps just tested and this did the trick.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Regards,

Vladimir

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page