Neutral Parameters This programming example shows how to setup the neutral parameters of a video capture device using IC Imaging Control and the CSimpleProperty class.
Language: | Visual C++
Version: | 3.0.6
Released: | 20081119
Author: | IC Imaging Control Support Department
Requirements: |
Software: | IC Imaging Control >3.0
Hardware: | Camera, converter or grabber with WDM Stream Class drivers.
Download sample | Neutral Parameters - VC++

The CSimpleProperty class is stored in the files

- Samples\VC71\Common\SimplePropertyAccess.h
- Samples\VC71\Common\SimplePropertyAccess.cpp

of the IC Imaging Control installation path. If the SimplePropertyAccess.cpp was added to the current project, the property "not using precompiled header "stdafx.h" must be set in the project settings for this file.

Include the Samples\VC71\Common\SimplePropertyAccess.h in the project.

After the video capture device has been opened, create the CSimpleProperty object:

    // Create the simple property class using the available properties of the selected device.
    CSimplePropertyAccess cSimpleProperty( cGrabber.getAvailableVCDProperties() );

Disable the appropriate property automatics like gain, white balance and brightness:

    // Disable all property automatics
    cSimpleProperty.setAuto(VCDID_Gain, false);
    cSimpleProperty.setAuto(VCDID_WhiteBalance, false);
    cSimpleProperty.setAuto(VCDID_Brightness, false);

Now set the parameter values for gain, brightness, white balance blue and red :

    // Now set the neutral values
    // Gain neutral is 180 for FireWire and 260 for USB cameras of The Imaging Source.
    cSimpleProperty.setValue(VCDID_Gain, 260);
    cSimpleProperty.setValue(VCDElement_WhiteBalanceBlue, 32);
    cSimpleProperty.setValue(VCDElement_WhiteBalanceRed, 32);
    cSimpleProperty.setValue(VCDID_Brightness, 0);
    cSimpleProperty.setValue(VCDID_Gamma, 10);
    cSimpleProperty.setValue(VCDID_Hue, 180);
    cSimpleProperty.setValue(VCDID_Saturation, 127);

The list of properties to be set can be enhanced as needed, e.g. hue, saturation and so on.

The parameter values to be set depend on the used video capture device.