Help getting simple command to run

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
dholcomb9711
Posts: 16
Joined: 2018-06-08T03:45:59-07:00
Authentication code: 1152

Help getting simple command to run

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Help getting simple command to run

Post 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
dholcomb9711
Posts: 16
Joined: 2018-06-08T03:45:59-07:00
Authentication code: 1152

Re: Help getting simple command to run

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Help getting simple command to run

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Help getting simple command to run

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Help getting simple command to run

Post by fmw42 »

One more option

Code: Select all

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