Ask Your Question

Revision history [back]

click to hide/show revision 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)

btw, here are the javadocs

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)

btw, here are the javadocs