1 | initial version |
though i think, you're somewhat "on the wrong boat here" (abusing a computer-vision lib for simple image manipulations), you'd basically do the same thing as in gimp:
(pseudo code, as i don't have any java around)
cvtColor(bgr, hsv, COLOR_BGR2HSV)
split() into seperate H,S,V channels
subtract(H, some_value, H)
merge() H,S,V back again to a single hsv image
cvtColor(hsv, bgr, COLOR_HSV2BGR)
2 | No.2 Revision |
though i think, you're somewhat "on the wrong boat here" (abusing a computer-vision lib for simple image manipulations), you'd basically do the same thing as in gimp:
(pseudo code, as i don't have any java around)
cvtColor(bgr, hsv, COLOR_BGR2HSV)
split() into seperate H,S,V channels
subtract(H, channels, V is "lightness"
subtract(V, some_value, H)
V)
merge() H,S,V back again to a single hsv image
cvtColor(hsv, bgr, COLOR_HSV2BGR)