Using the Utility with an Acquired Image
Complete the following steps to acquire an image and find the correctsettings for an image:
- Verify that your image acquisition device and camera are correctly configured using Measurement and Automation Explorer (MAX). Refer to Measurement & Automation Explorer Help for IMAQ for information about configuring your image acquisition device and camera.
- Launch the NI-IMAQ White Balancing Utility from Programs»National Instruments»Vision»Bayer White Balancing Utility.
- Click the Snap button to acquire a single image, or
click the Grab button to capture images in continuous mode.
Tip Use an image with distinct areas of red, green, blue, and white to determine the correct settings. If you have a color printer, you can print and use the RGB Image Example.
- Select the Bayer Pattern tab and select the appropriate Bayer Encoding Pattern for the image.
Note The Bayerpattern can appear in one of the following four variations, depending on the current left and top offsets of the acquisition window:GBGB
- Select the Gains tab.
- Set the desired white level. The default white level value is 220.
- Click the ROI button and select a white region of interest on the image.
- Click Auto Calculate Gains to calculate the
Note You also can use the individual Gain controls to manually adjust the white balance.
- Select the Parameters tab and record the displayed values to use in your application.
Use these calculated parameters with the imgBayerColorDecode and imgCalculateBayerColorLUT functions or IMAQ Create Bayer LUT and IMAQ Bayer Color Decode VIs.