Hi,
Could some one please help in applying following to an 16 bit grayscal(or RGB).
1. Invert LUT
2. Enhance Contrast ( Equalize Histogram)
I have uploaded the steps that i took to do same in ImageJ and the sample input image. Please help in doing exact same thing in Image Magick.
https://drive.google.com/folderview?id= ... sp=sharing
Thanks
Rathor
Invert LUT and Equilize Histogram
-
- Posts: 21
- Joined: 2016-02-21T13:47:15-07:00
- Authentication code: 1151
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Invert LUT and Equilize Histogram
To equalise with IM, just use the "-equalize" operator.
IM doesn't contain operators for specialist processing of histograms (aka cluts) so I wrote some, as process modules. See my "Process modules" page. For example, to invert a clut, "-process invclut".
"[Adaptive] Contrast-limited equalisation" may also be of interest.
IM doesn't contain operators for specialist processing of histograms (aka cluts) so I wrote some, as process modules. See my "Process modules" page. For example, to invert a clut, "-process invclut".
"[Adaptive] Contrast-limited equalisation" may also be of interest.
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Invert LUT and Equilize Histogram
Why do you need to invert the lut? I am not sure what your end goal is? What does a LUT have to do with histogram equalization? Are you doing two separate steps? 1) apply some LUT via -clut, then 2) -equalize.
Convert your LUT to an image if necessary. Then -negate the lut image, then use -clut to apply it. Then do -equalize.
(unix syntax)
(windows syntax)
Convert your LUT to an image if necessary. Then -negate the lut image, then use -clut to apply it. Then do -equalize.
(unix syntax)
Code: Select all
convert image \( lutimage -negate \) -clut -equalize resultimage
Code: Select all
convert image ( lutimage -negate ) -clut -equalize resultimage
-
- Posts: 21
- Joined: 2016-02-21T13:47:15-07:00
- Authentication code: 1151
Re: Invert LUT and Equilize Histogram
Hi,
Frankly i do no know what an Invert LUT does, but doing this gives me the image i want to see( A Brighter , metallic effect image).
These are 2 separate steps. I will apply your command shortly and update you about the result.
Thanks for your help
Rathor
Frankly i do no know what an Invert LUT does, but doing this gives me the image i want to see( A Brighter , metallic effect image).
These are 2 separate steps. I will apply your command shortly and update you about the result.
Thanks for your help
Rathor
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Invert LUT and Equilize Histogram
If you cannot tell us what and inverted LUT is supposed to do, how can we know what to tell you to reproduce it in imagemagick?
-
- Posts: 21
- Joined: 2016-02-21T13:47:15-07:00
- Authentication code: 1151
Re: Invert LUT and Equilize Histogram
Fred,
As per ImageJ , Invert LUT Inverts the current lookup table. For 8-bit images, the value (v) of each entry in the table is replaced by 255 − v. With inverted LUTs, pixels with a value of zero are white and pixels with a value 255 are black. Unlike the Edit▷Invert ↑ command, pixels values are not altered, only the way the image is displayed on the screen.
Full definition including equalize is available at http://rsbweb.nih.gov/ij/docs/guide/146-29.html
Please have a look and suggest something.
Thanks
Rathor
As per ImageJ , Invert LUT Inverts the current lookup table. For 8-bit images, the value (v) of each entry in the table is replaced by 255 − v. With inverted LUTs, pixels with a value of zero are white and pixels with a value 255 are black. Unlike the Edit▷Invert ↑ command, pixels values are not altered, only the way the image is displayed on the screen.
Full definition including equalize is available at http://rsbweb.nih.gov/ij/docs/guide/146-29.html
Please have a look and suggest something.
Thanks
Rathor
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Invert LUT and Equilize Histogram
My command above should do what you want. Repeated below:
Unix:
Window:
Doing the above is no different from but probably slightly faster than
or
The above assumes you have a LUT in image form. If you only have LUT values as a string or as a txt file, let us know and we can show you how to convert that into a LUT image.
Perhaps you should upload your image and lut to some free hosting service and put the URL here, so we can retrieve it and test with it.
Unix:
Code: Select all
convert image \( lutimage -negate \) -clut -equalize resultimage
Code: Select all
convert image ( lutimage -negate ) -clut -equalize resultimage
Code: Select all
convert image -negate lutimage -clut -equalize resultimage
Code: Select all
convert image lutimage -clut -negate -equalize resultimage
Perhaps you should upload your image and lut to some free hosting service and put the URL here, so we can retrieve it and test with it.