Page 1 of 1

Help getting simple command to run

Posted: 2019-03-05T23:11:40-07:00
by dholcomb9711
Greetings,

I am using : 7.0.7-35 Q16 x64 2018-05-21 on Windows 10.


I found this page for autocoloring (http://www.fmwconcepts.com/imagemagick/ ... /index.php)...

But no matter what I do, I can't get the script to run. I have tried the following commands in several forms :

Code: Select all

magick convert autocolor -m gamma -c separate test.jpg test2.jpg
magick  autocolor -m gamma -c separate test.jpg test2.jpg
magick convert test.jpg autocolor -m gamma -c separate  test2.jpg
The image is in the correct folder, but I keep getting the error :

Code: Select all

convert: unable to open image 'autocolor': No such file or directory @ error/blob.c/OpenBlob/3375.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/512.
convert: unrecognized option `-m' @ error/convert.c/ConvertImageCommand/2266.
What am I doing wrong? I would like to experiment on the output settings but I can't even get it to run the first time. Surely it is something simple I am missing?

Thanks for any assistance.

Re: Help getting simple command to run

Posted: 2019-03-06T00:35:15-07:00
by fmw42
The script is a bash unix shell script making calls to ImageMagick. It does not run on plain Window. But can run in Window 10 unix. The syntax would be

Code: Select all

bash path2/autocolor -m gamma -c separate path2/test.jpg path2/test2.jpg
If the script and the files are all in your working directory, then

Code: Select all

bash autocolor -m gamma -c separate test.jpg test2.jpg
See instructions for use on my web site at the link below

Re: Help getting simple command to run

Posted: 2019-03-07T01:42:54-07:00
by dholcomb9711
If I may ask (for a Win 10 setup on the IM version I posted above) - is there anything I could do in the command line to get these results or similar? I am not picky but it is too much of a blue hue and I can't seem to find anything in the online documentation that might help with this, besides commands that do not work on regular win10. Here is what is going on. Before on left, and after on right (I used auto-color in photoshop).



Image

Re: Help getting simple command to run

Posted: 2019-03-07T09:43:04-07:00
by fmw42
In the future please post your IM version. Also post separate images so we can use your exact input image to test.

Try

Code: Select all

convert image.png -channel rgb -auto-level result.png 
or

Code: Select all

convert image.png -channel rgb -normalize result2.png
or

Code: Select all

convert image.png -channel rgb -contrast-stretch 5,5 result3.png
You can adjust the values as you want. All these get me close.

If you install Win 10 Unix or add Cygwin to your Windows, then you could use my script.

Re: Help getting simple command to run

Posted: 2019-03-07T09:54:04-07:00
by fmw42
Another option is to do white balancing. Pick a point in the clouds that you know should be white. Get its color. Then divide each color value into 255 and then use -color-matrix

blue=rgb(123,170,221)

rr=255/123=2.073170731707317
gg=255/170=1.5
bb=255/221=1.153846153846154

Code: Select all

convert image.png -alpha off -color-matrix "2.07 0 0  0 1.5 0  0 0 1.15" result4.png

Re: Help getting simple command to run

Posted: 2019-03-07T20:04:57-07:00
by fmw42
One more option

Code: Select all

convert image.png -channel rgb -auto-level -auto-gamma result5.png