I don't think that title makes sense, but this is best explained visually. I have 2 images, an original and one that I made in Gimp using HSL and multiply. The problem is that the program that I am outputting in only has RGB sliders. Can IM tell me the difference in RGB values between two images?
Original
http://www.pasteall.org/pic/show.php?id=62852
Target
http://www.pasteall.org/pic/show.php?id=62853
Since this is a layered gimp file I can change the original to something easier to read for IM if that helps.
Thanks
Need to find RGB differences of 2 images
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Need to find RGB differences of 2 images
You can separate channels and use IM compare to get a metric of the differences for each channel, such as rms. From that you can probably compute a channel multiply factor. But the real difference may not be linear.
Or you can separate channels and use -compose difference to get a visual difference between the two images. But I suspect you really want the slider values and IM has no way to tell what those sliders actually do.
By the way, the images that download are jpg.
If you want some way to convert from one to the other, you can use the HALD clut technique. You create in IM a hald image. Then take that to the system that modified the image and process it with the same settings used to modify the original image. Save as png. Then bring that back to IM and use -hald-clut to map the original into the processed version.
see
http://www.imagemagick.org/Usage/color_mods/#hald-clut
Or you can separate channels and use -compose difference to get a visual difference between the two images. But I suspect you really want the slider values and IM has no way to tell what those sliders actually do.
By the way, the images that download are jpg.
If you want some way to convert from one to the other, you can use the HALD clut technique. You create in IM a hald image. Then take that to the system that modified the image and process it with the same settings used to modify the original image. Save as png. Then bring that back to IM and use -hald-clut to map the original into the processed version.
see
http://www.imagemagick.org/Usage/color_mods/#hald-clut
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Need to find RGB differences of 2 images
I'm not sure what you want. If you ...
... you'll get loads of information, including the mean values for each of the Red, Green and Blue channels.
However, a simple transformation in HSL may not be a simple transformation in RGB. Did you modify all three of Hue, Saturaion and Lightness? Or just two?
I have a script somewhere that can calculate a HSL transformation from one colour to another, but I'm not sure if that will help.
Code: Select all
identify -verbose image.jpg
However, a simple transformation in HSL may not be a simple transformation in RGB. Did you modify all three of Hue, Saturaion and Lightness? Or just two?
I have a script somewhere that can calculate a HSL transformation from one colour to another, but I'm not sure if that will help.
snibgo's IM pages: im.snibgo.com
Re: Need to find RGB differences of 2 images
What I did was to create a layer in Gimp above the original, tweaked the HSL of it, set it to multiply, and reduced the transparency. I've tried just manually tweaking rgb for quite some time, but I'm starting to think it isn't possible without the multiply effect. I will check the identify output when I get back to it and see if that will point me in the right direction.
I just meant that I could make a simpler test pattern, as opposed to the sprite graphics, if it would make any IM functions more accurate.By the way, the images that download are jpg.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Need to find RGB differences of 2 images
Are you asking for the IM equivalent to making a new layer, adjusting the HSL values and using -compose multiply? Or are you just trying to get the same HSL values? The latter would be very difficult if not impossible, in my estimation with such limited information.
Re: Need to find RGB differences of 2 images
Basically I'm trying to achieve the same color shift using only RGB adjustments, but I don't think it will happen, there simply is not enough control.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Need to find RGB differences of 2 images
With Gimp you have converted to HSL, made some adjustments, and converted back to RGB. (I'll ignore the multiply.)
No simple adjustment in RGB can be made equivalent to this. You may be able to find an RGB adjustment that gives a similar result, but you need to know exactly what the sliders do. The obvious technique is to play with the sliders on the input file until the result looks like the output created by Gimp.
No simple adjustment in RGB can be made equivalent to this. You may be able to find an RGB adjustment that gives a similar result, but you need to know exactly what the sliders do. The obvious technique is to play with the sliders on the input file until the result looks like the output created by Gimp.
snibgo's IM pages: im.snibgo.com