LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

White Balance Utility

I am using the two bayer vi's to set up a continuous white balance vi, and it is working functionally.  However, I am trying to fine tune the LUT so that it corrects the color better.  In the help for the bayer LUT vi says to use the white balance utility to help with this.  But when I go into the WBU and enter in the interface MAX has listed (which is cam0) it says the sessiosn is invalid.  Do I need to set the camera interface up in VISA?  And if so, when I use the wizard, can I use a file to load the stuff?  And which file is it?

 

vas 8.5, vdm 8.6 (newest ones, not sure if this is the right number)

 

Matt

0 Kudos
Message 1 of 8
(4,547 Views)

Hi Matt,

 

There is a white balancing utility built into MAX.  If you select the camera you are interested in, you can select the "Bayer Color" tab at the bottom of the configuration screen.  This interface is the same as the White Balancing Utility.  Hope this helps!

Stephen Meserve
National Instruments
0 Kudos
Message 2 of 8
(4,502 Views)

Stephen, 

 

I have used the one in max, but I thought the other one helps built the LUT for the bayer decode vi.  The issue is I am trying to make a cont white balance program.  I took the raw data from the camera, which is a 1d array and resized it into a 2d with the resolution ration.  This image looks like an 8 bit bayer encoded image.  Is this correct?  And if not, how do you get the raw 8 bit image from the camera to apply the LUT and bayer decode vi too? 

 

On the assumption my way works, the corrected image is not getting corrected.  I have a vi that takes in a regularly captured image, computes the bayer gains for each channel, and then feeds them into the gain inputs to the bayer LUT vi.  However, the images aren't getting any better.  The gains seem to be ok though, cause when i set the gains in the camera using a property node, the image looks very balanced.  Is there some trick to using the LUT and encoder vis?  

 

I was thinking that I could first set the gains in the camera with using property nodes and grab configure and then use the other vi that continuously checks computes the gains from the normal grab and feed that into the other vi that corrects the balance using LUT and bayer decode vi.  Does this seem sensible?  

 

THanks for your help. 

 

Matt

0 Kudos
Message 3 of 8
(4,493 Views)

Hi Matt,

 

Your property node solution is certainly sensible.  Property nodes are a very versatile and scalable method of programming in LabVIEW.  I would definitely recommend this methodology.

 

Stephen Meserve
National Instruments
0 Kudos
Message 4 of 8
(4,480 Views)

Dear Stephen

 

I read your comment, and I ask to you about it in detail.

 

I want to put  the "Auto calcurate Gain value" function in my program.

 

so, could you notice to me about the formula or algorithm about it?

 

Can I get it from the NI support team?

 

Jun

Dissem - NI Vision Alliance in Korea

0 Kudos
Message 5 of 8
(3,683 Views)

This Knowledgebase article talks about how the Auto-Calculate Gains utility works. Basically, you will need to extract a region of interest in the image and calculate what numbers by which you need to multiply the individual color planes in order to make the region of interest pure white.

 

http://digital.ni.com/public.nsf/allkb/B2E3D62889D4CB78862572CF007EB758?OpenDocument

 

Jeremy P.

Applications Engineer
National Instruments
0 Kudos
Message 6 of 8
(3,656 Views)

Dear Jeremy

 

Thank you for your reply

but, I already read this article.

 

I just want to know about how to calculare each color plane for pure white,

 

I don't know  that NI only supply this function in the MAX, and why does not serve the VI.

 

Best regaqrds

Jun  

0 Kudos
Message 7 of 8
(3,638 Views)

Hi Redfield.

 

The color panes for white should be 255 for each color pane. Here is some more information about our color paletes:

http://zone.ni.com/reference/en-XX/help/372916P-01/nivisionconcepts/palettes/

 

Paolo F.
National Instruments
Applications Engineer
0 Kudos
Message 8 of 8
(3,616 Views)