Page 1 of 1
Adjust image color levels
Posted: 2012-10-29T09:33:28-07:00
by theunsheydenrych
HI
Is it possible to adjust the color input levels of a image with imagemagick?
The process i follow with a lot of images is to open it in Gimp then adjust the input levels manually.
Regards
Re: Adjust image color levels
Posted: 2012-10-29T11:01:45-07:00
by fmw42
theunsheydenrych wrote:HI
Is it possible to adjust the color input levels of a image with imagemagick?
The process i follow with a lot of images is to open it in Gimp then adjust the input levels manually.
Regards
What do you mean by adjust the input levels? What function in GIMP? My guess is that you mean to use + or -level in IM. If you are on Linux/Mac or windows with cygwin, see my script, levels.
If this is not what you want, then please describe in more detail. Perhaps a screen snap from GIMP would help.
Also what version of IM are you using and on what platform?
Re: Adjust image color levels
Posted: 2012-10-29T23:07:01-07:00
by theunsheydenrych
Sorry for the information not added.
Here it is.
Screenshot of Gimp Color Level adjustment before the adjustment.
http://img202.imageshack.us/img202/779/ ... evels1.png
Screenshot of Gimp Color Level adjustment after the adjustment.
http://img856.imageshack.us/img856/8168 ... evels2.png
ImageMagick Version: ImageMagick 6.6.9-7 2012-08-17 Q16
Working on Ubuntu 12.04
Is it possible to do this with ImageMagick?
Thanks for the reply
Re: Adjust image color levels
Posted: 2012-10-30T10:39:34-07:00
by fmw42
IM does not have any GUI, but the functionality is there with -level or with -contrast-stretch, or my script, levels, at the link below. You would have to generate a histogram to see where to set the black and white point in -level. Contrast-stretch allow you to set a clip point based upon cumulative percentage.
see
http://www.imagemagick.org/Usage/color_mods/#level
http://www.imagemagick.org/Usage/color_ ... st-stretch
http://www.imagemagick.org/Usage/color_ ... ar-stretch
http://www.imagemagick.org/script/comma ... .php#level
http://www.imagemagick.org/script/comma ... st-stretch
http://www.imagemagick.org/script/comma ... ar-stretch
Re: Adjust image color levels
Posted: 2012-10-30T20:55:45-07:00
by snibgo
The technique I use is to apply the same adjustments in Gimp to a gradient file, then use IM to "clut" the image with the adjusted gradient file.
Re: Adjust image color levels
Posted: 2012-10-30T21:08:04-07:00
by fmw42
snibgo wrote:The technique I use is to apply the same adjustments in Gimp to a gradient file, then use IM to "clut" the image with the adjusted gradient file.
That is a very good technique to match something from PS or GIMP with IM if you know exactly what you want to do with the image in PS.
A slightly better way is to use a HALD image and -hald-clut.
see
http://www.imagemagick.org/Usage/color_mods/#hald-clut
Note that both techniques only work on pixel-by-pixel (color changes) and will not work correctly if the modification is spatially dependent, such as convolution or blur or sharpen etc, which mix neighboring pixels.