Page 1 of 1

[RESOLVED]possible bug -equalize IM 6.7.9.1 Q16

Posted: 2012-08-25T17:43:18-07:00
by fmw42
IM 6.7.9.1 Q16 Mac OSX Snow Leopard.

Is -equalize channel sensitive? That is can I force it to sync all channels.

It seems that by default is equalizes each channel as if -channel rgb was specified. When I try to add -channel sync, it does not change the input image.


Input:
Image


No sync:
convert zelda2.jpg -equalize zelda2_equal.jpg
Image

With sync: result same as input
convert zelda2.jpg -channel sync -equalize zelda2_equal_sync.jpg
Image

Using my redist script with uniform distribution, which should be like syncing the channels with -equalize:
redist -s uniform zelda2.jpg zelda2_uni.jpg
Image

Re: possible but -equalize IM 6.7.9.1 Q16

Posted: 2012-08-25T18:23:12-07:00
by magick
The -equalize option is not sensitive to the -channel sync option.

Re: possible but -equalize IM 6.7.9.1 Q16

Posted: 2012-08-25T19:49:40-07:00
by fmw42
OK. Thanks for clearing that up.

Re: [Resolved]possible but -equalize IM 6.7.9.1 Q16

Posted: 2012-08-26T05:53:24-07:00
by magick
Forgot to mention, we'll get a patch into ImageMagick 6.7.9-3 Beta to support -channel sync for the -equalize option. Use this command:
  • convert zelda2.jpg -colorspace rgb -channel sync -equalize -colorspace sRGB zelda2_equal_sync.jpg

Re: [Resolved]possible but -equalize IM 6.7.9.1 Q16

Posted: 2012-08-26T11:09:59-07:00
by fmw42
magick wrote:Forgot to mention, we'll get a patch into ImageMagick 6.7.9-3 Beta to support -channel sync for the -equalize option. Use this command:
  • convert zelda2.jpg -colorspace rgb -channel sync -equalize -colorspace sRGB zelda2_equal_sync.jpg

OK. Thanks.

Will IM 7 make all the channel sync operators work the same. In most cases it is synced by default and one has to use -channel rgb to make them work on each channel separately. -equalize is just the opposite. That is OK for IM 6 as I don't want to upset the nominal way it works for others. But perhaps we should consider making them all work consistently in IM 7. Thoughts for consideration.

Re: [Resolved]possible but -equalize IM 6.7.9.1 Q16

Posted: 2012-08-26T12:34:18-07:00
by magick
IMv7 is designed to address the deficiencies in IMv6, however, -channel sync is one aspect of IMv7 that has not been addressed properly yet. Primarily because its implementation is slightly different for each algorithm, there is no consistent method to support it. When you start testing IMv7, we will address -channel sync on a case-by-case algorithm basis.

Re: [Resolved]possible but -equalize IM 6.7.9.1 Q16

Posted: 2012-08-26T12:36:55-07:00
by fmw42
magick wrote:IMv7 is designed to address the deficiencies in IMv6, however, -channel sync is one aspect of IMv7 that has not been addressed properly yet. Primarily because its implementation is slightly different for each algorithm, there is no consistent method to support it. When you start testing IMv7, we will address -channel sync on a case-by-case algorithm basis.

OK. Good idea.

Re: [Resolved]possible but -equalize IM 6.7.9.1 Q16

Posted: 2012-09-03T15:58:39-07:00
by fmw42
magick wrote:Forgot to mention, we'll get a patch into ImageMagick 6.7.9-3 Beta to support -channel sync for the -equalize option. Use this command:
  • convert zelda2.jpg -colorspace rgb -channel sync -equalize -colorspace sRGB zelda2_equal_sync.jpg
IM 6.7.9.3 Q16 Mac OSX Snow Leopard

OK. It seems to work now.

This reproduces produces my redist uniform results for all the channels in sync.
convert zelda2.jpg -set colorspace RGB -equalize zelda2_eq_nl_sync.jpg

Without the -set channel RGB, it is much lighter -- just color management
convert zelda2.jpg -equalize zelda2_eq_nl_sync.jpg


This reproduces the old -equalize result:
convert zelda2.jpg -channel rgb -equalize zelda2_eq_rgb_new.jpg

Odd that adding -set colorspace RGB, does not have any affect (no different from the previous result)?
convert zelda2.jpg -set colorspace RGB -channel rgb -equalize zelda2_nl_eq_rgb_new.jpg