display white balance / color correction

Status
Not open for further replies.

Frank B

Senior Member
Display is the ILI9341, but my question is independend from the exact display-model:

What steps are needed to do a color-correction ? The white on the ILI is not really white - if a compare a white sheet of paper whith the display, the displays colors are a bit too cold.

I can take a photo with both, the display ("displaying white")and the paper and use a rgb color-picker to grab the colours.
Is it good enough to calculate a factor for each of red, green , and blue ? Or do i have to use a more complicated way ? How ?

Are any color-experts here ? :confused:
 
Last edited:
Display is the ILI9341, but my question is independend from the exact display-model:

What steps are needed to do a color-correction ? The white on the ILI is not really white - if a compare a white sheet of paper whith the display, the displays colors are a bit too warm.

I can take a photo with both, the display ("displaying white")and the paper and use a rgb color-picker to grab the colours.
Is it good enough to calculate a factor for each of red, green , and blue ? Or do i have to use a more complicated way ? How ?

Are any color-experts here ? :confused:

Not an easy answer. Which color temperature do you want... Most computer monitors are set to 6500K or higher, which is quite blue.

Normaly the calibration is done with a device (like the eye one display pro), but the software will probably be not possible on a teensy. I would check the freeware argyll first, but doubt it.

Those build an ICC profile that is used with software like lcms to convert all images.

It's a quite complicated topic. (images have almost always a gamma correction applied also, which has to be taken into account)
 
Display is the ILI9341, but my question is independend from the exact display-model:

What steps are needed to do a color-correction ? The white on the ILI is not really white - if a compare a white sheet of paper whith the display, the displays colors are a bit too warm.

I can take a photo with both, the display ("displaying white")and the paper and use a rgb color-picker to grab the colours.
You can try, but it will be quite inaccurate. A different light source will result in different results, as will a different camera sensor.

Is it good enough to calculate a factor for each of red, green , and blue ?

If you are lucky and it's well-behaved yes.

However, there are quite mis-behaved LCDs, where you might have a gamma of 1.5 for one color channel and 2.4 for another (or even worse, not following a gamma curve). In this case, if you perform the simple scaling, you will have color balance issues in darker colors. In most cases, using a separate correction curve for each color channel should give good results (a separate gamma adjustment for each color channel may be enough).

Standard graphics cards have exactly that in hardware, 3 1D LUTs, one for each color channel.

ILI9341 has some per-color gamma adjustment features which you may be able to use, but the datasheet seriously sucks.

\\

To create correction curves, you could create them eye-balling things and using trial and error or you could use ArgyllCMS with a colorimeter (you can get an Eye-One Display or Datacolor Spyder for < €100). Use 'spotread' for measurements (with a custom sketch to display the color).
 
Thank you guys.
I have a datacolor spyder (a very old version, I guess it is the first - I hope it works with windows 10 - last used with win 7 a year ago), but I don't think that I can use it with a teensy.
Your hints helped - I now think it's better to compare the display with my PC-display (calibrated IPS).
I place the ILI near the PC-Display and take photos of both together - with both displaying the same color.
This way the white balance of my camera (a Nikon SLR) does not matter - Is this correct ?

I don't know the mathematical background for the LUTs, and I want to keep it simple - what do you think, how many points(samples) per colorchannel are minimal needed ? Don't want to spend too much time with taking pictures and samples manually, and I don't need "absolute correctness".

Is it a simple linear interpolation ?

@TNI, for the ILI 565 mode, I'll need three tables with 32 (red), 64 (green) and 32 (blue) entries - correct ?
 
Last edited:
Thank you guys.
I have a datacolor spyder (a very old version, I guess it is the first - I hope it works with windows 10 - last used with win 7 a year ago), but I don't think that I can use it with a teensy.

You would run ArgyllCMS spotread on your PC and display some fixed color on the ILI (via some sketch) and make manual measurements. Something like 5 - 10 per color is probably more than enough with some decent interpolation.

Your hints helped - I now think it's better to compare the display with my PC-display (calibrated IPS).
I place the ILI near the PC-Display and take photos of both together - with both displaying the same color.
That will work, if the spectrum of backlight / LCD color filters is reasonably similar between the two.

This way, I hope the white balance of my camera (a Nikon SLR) does not matter. Is this correct ?
Yes.

I don't know the mathematical background for the LUTs, and I want to keep it simple - what do you think, how many points(samples) per colorchannel are minimal needed ? (Don't want to spend too much time with taking pictures and samples manually) and I don't need "absolute correctness".
Try the linear scaling with just matching white first - it may be good enough for what you want.

@TNI, for the ILI 565 mode, I'll need three tables with 32 (red), 64 (green) and 32 (blue) entries - correct ?
I only glanced at the datasheet, but it seems you have a grayscale gamma curve and you can have adjustments for the red and blue curves (which will be based on the grayscale curve).
 
Frank - that 32x32 RGB LED display I'm working on from AdaFruit code has this implementation: RGBmatrixPanel.cpp#L270

It won't help create the table of course . . .

I have not dealt with that code - I just saw it pass by. It is for KS Retroball that I got an Alpha unit for. It was PIC based with UNO pinout - and I wired it up for TEENSY so it is going to ship with a pinout to mount a Teensy.

I should try to enable the correction - I turned on a white background and it was not pretty and the rest of the display colors were outshone.
 
Try the linear scaling with just matching white first - it may be good enough for what you want.

If that doesn't work well enough, it's probably easiest to just play a bit with different gamma values for the different colors and not bother with more measurements.
 
Hi

For a simple lookup table per color I would do a simple sequence:

Set the white balance of you're Nikon camera first to "flash" (about 5400K) or maybe "cloudy" (a bit cooler)

Show a number of grey tints (maybe with the rgb nr on it) on you're teensy powered display and take a picture of all.
Use the resulting values with the color picker to feed you're correction lookup table.
Retest it and adapt you're correction values.

If you're only doing one greytint I would use 75% white and not 100% white.

The picture taking part is imho not the most time taking part...
 
Thank you both :)

I made a little testpic:
testbild_320.png

(downloaded from wikipedia)

And a sketch to display it:
 

Attachments

  • testbild-170806a.zip
    34.9 KB · Views: 141
Hm, very difficult to take a picture.. all settings "off" or "neutral" - all taken picture show too much blue.
I'll try to compensate this somehow..

downloading argyll color.
[h=2][/h]
 
Last edited:
Argyll is definitly better, but can be a big amount of work if you have to make all the patches ;-) Be sure to label and save them.

First eye-balling a 75% grey patch (187,187,187) and get corrections for the red and blue color change bot with the same factor, but opposite sign (more red = warmer, more blue = colder). To be correct you'l have to "un-gamma" the picture before correcting.
If that patch is ok, take a RAW picture for it and do a white balance on the (187,187,187) patch and then add additional corrections to the others.
 
Agryll.. yeah.. I downloaded the Windows version and ended with a zipfile containing 100 *.exe in a "bin" subfolder and I don't know where to start.. hm. Where is the GUI ?
RAW is a good idea. Thanks. I'm away the next days, and try it again EOW (end of week ;)
 
Status
Not open for further replies.
Back
Top