Colour balancing - green reduction - changed the question

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
geoland
Posts: 74
Joined: 2015-05-14T05:11:38-07:00
Authentication code: 6789

Colour balancing - green reduction - changed the question

Post by geoland »

This image was processed by removing background tint and using Fred's autowhite colorbalance and curves scripts as follows.

Code: Select all

convert stack.tif -depth 16 -channel all -normalize +channel +normalize +compress -alpha off 2.miff

	./autowhite 2.miff 3.miff

	./colorbalance -c g -a 15 3.miff 4.miff

	./curves -g C "25,75" 4.miff stack_devel.tif
The result is exceptionally good. However, it would be preferable to filter out more of the green, retaining the luminance provided by the green channel without the tint.

I am seeking suggestions about the best way to go about doing this automatically with a degree of certainty, rather than manual adjustment to the image.
Version: ImageMagick 7.0.7 (latest compiled from source) Q32 x86_64 (as of) 2018 - 04 - 31 xubuntu
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Colour balancing - green reduction - changed the question

Post by fmw42 »

Was that the original or the result? It might help if post both, so others can experiment.
geoland
Posts: 74
Joined: 2015-05-14T05:11:38-07:00
Authentication code: 6789

Re: Colour balancing - green reduction - changed the question

Post by geoland »

This is the source 16bit tif file ~72MB
Version: ImageMagick 7.0.7 (latest compiled from source) Q32 x86_64 (as of) 2018 - 04 - 31 xubuntu
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Colour balancing - green reduction - changed the question

Post by fmw42 »

One suggestion would be to process the original in Photoshop or GIMP. Then create 3D Hald image in ImageMagick and take it to your Photoshop or GIMP, then apply the same adjustments (as long as they are global changes and not local such as sharpening or convolutions) to the Hald Image. Then bring the Hald image back to ImageMagick and use it to apply to all your other similar photographs.
geoland
Posts: 74
Joined: 2015-05-14T05:11:38-07:00
Authentication code: 6789

Re: Colour balancing - green reduction - changed the question

Post by geoland »

With a little more experimenting, I find the colorbalance reference channel makes a difference image to image. Referenced to Blue the example image is nicely representative. Other images benefit from Red or Green.
Version: ImageMagick 7.0.7 (latest compiled from source) Q32 x86_64 (as of) 2018 - 04 - 31 xubuntu
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Colour balancing - green reduction - changed the question

Post by fmw42 »

Have you tried -color-matrix? That might help, but it does need some effort to learn.
geoland
Posts: 74
Joined: 2015-05-14T05:11:38-07:00
Authentication code: 6789

Re: Colour balancing - green reduction - changed the question

Post by geoland »

Thanks Fred, I have. I am using -color-matrix for applying channel multipliers to images from DSLRs without an astronomical filter mod. The user can add up to 5 matrices. It is a little intensive for developing a preview. And I may have asked the question too soon. Your scripts do precisely what's required. I just need to play a bit more. Every new feature is a new learning curve...
Version: ImageMagick 7.0.7 (latest compiled from source) Q32 x86_64 (as of) 2018 - 04 - 31 xubuntu
Post Reply