Using the Utility with an Acquired Image

NI IMAQ White Balancing Utility

Using the Utility with an Acquired Image

Complete the following steps to acquire an image and find the correct gain settings for an image:

  1. 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.
  2. Launch the NI-IMAQ White Balancing Utility from Programs»National Instruments»Vision»Bayer White Balancing Utility.
  3. 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.
  4. Select the Bayer Pattern tab and select the appropriate Bayer Encoding Pattern for the image.

    Note  The Bayer CFA pattern can appear in one of the following four variations, depending on the current left and top offsets of the acquisition window:
            
    GBGB
    RGRG
    GRGR
    BGBG
    BGBG
    GRGR
    RGRG
    GBGB
  5. Select the Gains tab.
  6. Set the desired white level. The default white level value is 220.
  7. Click the ROI button and select a white region of interest on the image.
  8. Click Auto Calculate Gains to calculate the RGB gain settings.

    Note  You also can use the individual Gain controls to manually adjust the white balance.
  9. 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.

For more information about finding the correct gain settings, refer to About Bayer Cameras and NI-IMAQ White Balancing Utility FAQs.