Ask Your Question
0

Opencv-Gimp Lightness

asked 2016-12-20 14:57:33 -0600

jcmorhum gravatar image

System information (version)

OpenCV => 2.4.13 Operating System / Platform => Windows 64 Bit Compiler => Eclipse Neon Detailed description

How to reduce lightness in java with Opencv? These images show how to do it in Gimp but I need it with the Opencv library

Original: image description

With Lightness: image description

Help me please!

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
3

answered 2016-12-21 06:54:12 -0600

Eduardo gravatar image

For more complex image processing techniques, it could be worthwhile to dig into the source code of Gimp to replicate / translate the function into another programming langage or library.

Starting by the documentation and the Github search bar, you should find:

Also, if you are a Gimp fan, I recommend the G'MIC Gimp plugin that adds tons of image processing operations to Gimp (source code and C++ API).

edit flag offensive delete link more

Comments

This gimp plugin how can I use it in eclipse for example?

jcmorhum gravatar imagejcmorhum ( 2016-12-21 13:44:21 -0600 )edit
2

answered 2016-12-21 00:42:31 -0600

berak gravatar image

updated 2016-12-21 00:44:07 -0600

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, V is "lightness"
subtract(V, some_value, V)
merge() H,S,V back again to a single hsv image
cvtColor(hsv, bgr, COLOR_HSV2BGR)

btw, here are the javadocs

edit flag offensive delete link more

Comments

It is for a project with OpenCV but I need to process the image and I have not found anything with OpenCV

jcmorhum gravatar imagejcmorhum ( 2016-12-21 13:46:30 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-12-20 14:57:33 -0600

Seen: 973 times

Last updated: Dec 21 '16