0

i have a strange question. I have two images one with only the green RGB channel and the other with only the red channel. These two images are matched (before applying the filters) for luminance, contrast and spatial frequency (with a Matlab toolbox). However i realized that green and red have different perceived luminance. Is there any method to match, as much as possible, this aspect?

  • 1
    Yes, convert to Lab and normalize the L channel – joojaa Jan 21 at 18:19
  • thanks @joojaa! could you explain a little bit the procedure? Unfortunately i'm not skilled in image processing. do you have some code? or some references? – Filippo Gambarota Jan 21 at 18:22
  • Read on rgb2lab then you should have most of the job done. Sorry i dont have matlab license up to date. Its not like i couldnt update it but I dont find matlab all that useful, its huge, its slow, its a bad language and its not particularily elegant. So if i could find a pythonic simulink that would be great, but untill then i can use modellica based stuff. In fact system modeller ties with mathematica, which i do find useful. – joojaa Jan 21 at 21:28
1

Actually you have got an exact answer in a comment, but if you have no idea what is CIE's Lab color system and what makes it worth to use, you have a reason to learn something of color systems. Shortly: Lab is a quite succesful attempt to present the perceived (=subjective) luminosity and the color independently. By changing color components a and b you do not change the perceived luminosity. By changing the luminosity component L you do not change the apparent hue nor colorfulness (=chroma). I wrote colorfulness, not saturation, which has some usage only in the RGB system (In Photoshop with color mode = Lab there's still adjustment for saturation, but it affects chroma)

In the beginning you can do something coarser and check, if it's enough. In simplified color theory one can calculate the following subjective relative luminosity from the RGB numbers:

L = 0,3*R + 0,59*G + 0,11*B

Color televisions use this. You can thus darken your green image to the same luminosity scale than your red image by multiplying the G numbers with 0,3/0,59 (=0,508).

As well you can divide the R numbers with the same factor, but that can cause clipping.

This is really very coarse when compared how much effort is put to the development of the Lab system. But check, if it works for you.

An opinion: The formula where I took that 0,508 from, is obviously estimated from television screen tube phosphor materials, relative linearized sensitivity of the eye and finally the nonlinearity of the screen behaviour has been linearized somehow. It seems to give too dark result if one uses curves or levels in Photoshop. If I adjust visually G-component of a white to black gradient as dark as the R component is, when both are watched in parallel as green and red, the right multiplication factor for G is 0,57, not 0,508.

I have a calibrated display but the accuracy of the calibration is unknown. I haven't made measurements, only made the line in Image > Adjustments > Curves more or less tilted until the result seems right. So, this isn't more than my opinion.

A screenshot (which proves nothing due several color conversions between us):

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.