LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I am trying to white balance my acquired image, but instead get a green image, has anyone encountered such a problem?

Similar to Vision's white balancing utility, my VI allows the user to draw an ROI around a region and ideally reset the red, green, blue gains to make the area white. When I make red, green, and blue values equal one another, instead of white, I get a green region. Has anyone else had this problem or know if I am doing something completely wrong?
 
Or has anyone tried doing this already and knows of a white balancing algorithm that works?
 
Thanks in advance.
 
- josh
0 Kudos
Message 1 of 8
(4,384 Views)

The QuickTime vi's at this site have whiteness control in some of them.

http://labview.epfl.ch/qt/QTVIs.html

0 Kudos
Message 2 of 8
(4,377 Views)
Thanks for the help, but from what I can tell, the vi's don't show how they control the white and if they are changing RGB gains to do it. It seems to be all done in their "code interface node."
Again though, thanks for trying to help.
0 Kudos
Message 3 of 8
(4,366 Views)

hi there,

i bet there's something wrong with the order of the color bytes or their datatypes. compare it with the "RGB to color.vi" from the "Graphics & Sound" -> "Picture Functions" palette. can you please post some code?

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 4 of 8
(4,364 Views)
Hi Chris,
 
I'm using IMAQ ColorImageToArray and I've checked with IMAQ IntegerToColorValue that I'm getting the correct RGB values. I can post my code, however, I am using a QImaging camera which only uses their own VIs to do functions similar to IMAQ functions such as grab setup, grab acquire, initialize, close. The VIs can be downloaded here: http://www.qimaging.com/support/downloads/.
 
Thanks again for the help.
0 Kudos
Message 5 of 8
(4,360 Views)
Sounds like you are dealing with data from a Bayer array. If that's the case, there are usually twice as many Green elements as there are Red and Blue. The luminance signal, Y, is = 0.25R + 0.5G + 0.25B.  White balance doesn't mean making all of the values equal to each other. It means making a "neutral" portion of the image appear neutral.  This may mean striking an imbalance based upon the color of the light used to form the image.

0 Kudos
Message 6 of 8
(4,346 Views)

Right,

I put once my finger in a white balance software and it IS really difficult : that is why the best way to calibrate colors, even on a good digital imager is to shoot on a white point to tune the color levels. There are grey word theory and others... but all have their own limitations.

 

Sheers

 

Doc-Doc
http://www.machinevision.ch
http://visionindustrielle.ch
Please take time to rate this answer
0 Kudos
Message 7 of 8
(4,343 Views)
Right now I can select an area of white to allow for the RGB values to be averaged over the area. Then, I was attempting to do grey world assumption by trying to make the R,G,B values equal to one another. I just assume I'm not understanding the concept and missing something obvious with my code and thinking.
 
Thanks for the input, Doc-Doc and Tariah.
0 Kudos
Message 8 of 8
(4,337 Views)