Hello,
I wish to make the following comparison:
On one side, I have a simple image (A) which contains certain colors :
On the other hand, I have another image (B) that contains a color palette :
I want to know if the dominant colors in image A are contained in image B
how do I proceed?
thank you
(french user : sorry to my bad english)
Colors of an image contained in another image
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Colors of an image contained in another image
see -unique-colors or just use the histogram
http://www.imagemagick.org/Usage/quantize/#extract
http://www.imagemagick.org/Usage/files/#histogram
http://www.imagemagick.org/script/comma ... que-colors
Code: Select all
convert image -unique-colors txt:-
http://www.imagemagick.org/Usage/files/#histogram
http://www.imagemagick.org/script/comma ... que-colors
Re: Colors of an image contained in another image
Thank you for your answer
I tried:
And loop on results and push HEXA on database
And loop on resultst and compare each HEXA with image B results on database
But I think the problem is that I use a limited palette too? Not enough intervals colors?
I tried:
Code: Select all
convert image_B.gif -colors 256 -depth 8 -format "%c" histogram:info:
Code: Select all
convert image_A.gif -colors 256 -depth 8 -format "%c" histogram:info:
But I think the problem is that I use a limited palette too? Not enough intervals colors?
Re: Colors of an image contained in another image
Maybe I'm not using the right method.
The project is:
- Taking a picture of a liquid for analysis (like this: http://www.poolplaza.com/pool-school/pH_testing.shtml)
- We try to determine in which areas of the range "red phenol" the liquid is (negative, not determined, positive)
Thank you for your advice
The project is:
- Taking a picture of a liquid for analysis (like this: http://www.poolplaza.com/pool-school/pH_testing.shtml)
- We try to determine in which areas of the range "red phenol" the liquid is (negative, not determined, positive)
Thank you for your advice
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Colors of an image contained in another image
Perhaps you have a sample colour patch and want to find that in the colour chart of pH values.
So, scale your sample to a single pixel. Then do a subimage-search for that pixel in the colour chart o find the closest match.
So, scale your sample to a single pixel. Then do a subimage-search for that pixel in the colour chart o find the closest match.
snibgo's IM pages: im.snibgo.com
Re: Colors of an image contained in another image
Hello,
My apologies for the response time. I solved my problem by calculating the distance Delta E
Thank you for your ideas
My apologies for the response time. I solved my problem by calculating the distance Delta E
Thank you for your ideas