dilevin / computer-graphics-raster-images

Computer Graphics Assignment about Raster Images
1 stars 7 forks source link

RGB to HSV #34

Open nevvyraj opened 4 years ago

nevvyraj commented 4 years ago

I was looking at the RGB to HSV conversion linked from the readme (https://en.wikipedia.org/wiki/HSL_and_HSV#Converting_to_RGB) and I'm wondering if the if H < 0; H = H + 360 is being applied to the reference solution that gets desaturated.png? I notice if I add this part into my conversion I'm seeing less green around the ear and nose, but if I remove it I get something similar to the reference image.

images/desaturated.png desaturated

my desaturated.ppm if i include the H < 0 check. desaturated_1

Is the H < 0 check not needed for this assignment?

songfeil commented 4 years ago

I think the check should be included since hue is periodic.

songfeil commented 4 years ago

But since the reference image is wrong, we won't deduct mark for the ear :)