ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 How to match colors between two images
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

mhieta

Finland
78 Posts

Posted - May 02 2015 :  04:31:35  Show Profile  Reply
Hi,

I'm trying to make match color between two images.
My first and initial idea was to analyze first image to find average color what is used and use that color in second image as layer and make some adjustments to that layer. But this is no go idea. Is there better ones?

- Marko

xequte

38514 Posts

Posted - May 04 2015 :  00:09:42  Show Profile  Reply
Hi Marko

Sorry, when you say match the color, do you mean compare two images and find the parts (pixels) of the image that are the same color on both?

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

mhieta

Finland
78 Posts

Posted - May 04 2015 :  10:27:13  Show Profile  Reply
Hi Nigel,

For ex. if you have two flower images. One is blue and second is red. Now I want that blue flower to be same same color as the second flower.

You can read this kind of method here:
http://photo.stackexchange.com/questions/13187/does-gimp-have-a-match-color-function-similar-to-that-in-adobe-photoshop

- Marko

Go to Top of Page

xequte

38514 Posts

Posted - May 04 2015 :  18:24:17  Show Profile  Reply
Hi Marko

I'm afraid there is no way to do this with ImageEn.


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

rmklever

Norway
51 Posts

Posted - May 08 2015 :  19:48:06  Show Profile  Reply
Hi mhieta,

Take a look here:

http://imageen.com/ieforum/topic.asp?whichpage=3&TOPIC_ID=1446#7858

It might be what you are looking for.


Roy M Klever
Klever on Delphi - www.rmklever.com
Go to Top of Page

mhieta

Finland
78 Posts

Posted - May 10 2015 :  04:26:21  Show Profile  Reply
Hi Roy,

Yes that is exactly what I'm looking for.

I found floating point issue when using single color image to match another single color image. Like these:





But anyway thank you big times.

- Marko
Go to Top of Page

mhieta

Finland
78 Posts

Posted - May 10 2015 :  10:15:40  Show Profile  Reply
Hi Roy,

This should fix that floating point issue:
if dr1 = 0 then dr1:=1;
      r:= Trunc(r2 + (Pixel.r - r1) * dr2 / dr1);
      if dg1 = 0 then dg1:=1;
      g:= Trunc(g2 + (Pixel.g - g1) * dg2 / dg1);
      if db1 = 0 then db1:=1;
      b:= Trunc(b2 + (Pixel.b - b1) * db2 / db1);
      if r < 0 then r:= 0 else if r > 255 then r:= 255;
      if g < 0 then g:= 0 else if g > 255 then g:= 255;
      if b < 0 then b:= 0 else if b > 255 then b:= 255;


But since you made the hard work. Can you verify that this is right fix for it :)

- Marko
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: