Hey guys,
Is there an ImageMagick feature/routine which will enable me to match the colors of one image to a second image? I'm looking for something similar to the Photoshop 'match color' tool referenced here:
http://www.peachpit.com/articles/article.aspx?p=706213
My situation: I have an image mosaic of Color-infrared aerial photographs for which I've used ImageMagick to process. However, the final processing step as suggested by the manufacturer of our camera is to take our image mosaic and match the colors to an existing CIR aerial photograph for a final product. I have an old version of Photoshop that doesn't have this feature--and I'd prefer to avoid Photoshop anyhow--and was wondering if this were possible with ImageMagick.
Thanks!!
match colors like in Photoshop?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: match colors like in Photoshop?
The article doesn't say what PS actually does.
You can recolour an image so every pixel becomes as close as it can to a colour in another image:
If this doesn't do what you want, can you provide sample images?
You can recolour an image so every pixel becomes as close as it can to a colour in another image:
Code: Select all
convert in.png reference.png -dither -remap out.png
snibgo's IM pages: im.snibgo.com
Re: match colors like in Photoshop?
Is that correct?
Using convert in.png reference.png -dither -remap out.png
I get an error
convert: unrecognized dither method `-remap' @ error/convert.c/ConvertImageCommand/1285
Looking at the documents -dither takes a switch so
convert in.png -dither None -remap reference.png out.png
works
but what is your advice on the dither options? None/Riemersma/FloydSteinberg (any others?)
Using PClinuxOS and ImageMagick 6.8.0-2 2013-04-13 Q16
Using convert in.png reference.png -dither -remap out.png
I get an error
convert: unrecognized dither method `-remap' @ error/convert.c/ConvertImageCommand/1285
Looking at the documents -dither takes a switch so
convert in.png -dither None -remap reference.png out.png
works
but what is your advice on the dither options? None/Riemersma/FloydSteinberg (any others?)
Using PClinuxOS and ImageMagick 6.8.0-2 2013-04-13 Q16
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: match colors like in Photoshop?
I do not think there is any best method. Just try each and use whatever looks best for your image.but what is your advice on the dither options? None/Riemersma/FloydSteinberg (any others?)
-dither none is like no dithering or +dither, so for dithering you only have two choices. I am not sure which is used by default.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: match colors like in Photoshop?
Gosh, I fouled up the syntax badly. That should have been:
See http://www.imagemagick.org/script/comma ... ptions.php
Code: Select all
convert in.png -remap reference.png out.png
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: match colors like in Photoshop?
Perhaps it is doing something like my histmatch script. However, some tests seem to show that -remap seems to work better.