Logo Search packages:      
Sourcecode: libdc1394-22 version File versions  Download package

dc1394error_t dc1394_avt_set_aoi ( dc1394camera_t camera,
dc1394bool_t  on_off,
int  left,
int  top,
int  width,
int  height 
)

Set on/off and area

Definition at line 1148 of file avt.c.

References dc1394_set_adv_control_register().

{
    dc1394error_t err;
    uint32_t curval;

    /* ON / OFF : Bit 6 */
    curval = on_off << 25;

    /* Set feature on off */
    err=dc1394_set_adv_control_register(camera,REG_CAMERA_AVT_AUTOFNC_AOI, curval);
    DC1394_ERR_RTN(err,"Could not set AVT autofocus AOI");

    /* Set size */
    err=dc1394_set_adv_control_register(camera,REG_CAMERA_AVT_AF_AREA_SIZE, (width << 16) | height);
    DC1394_ERR_RTN(err,"Could not set AVT AF area size");

    /* Set position */
    err=dc1394_set_adv_control_register(camera,REG_CAMERA_AVT_AF_AREA_POSITION,(left << 16) | top );
    DC1394_ERR_RTN(err,"Could not set AVT AF area position");

    return DC1394_SUCCESS;
}


Generated by  Doxygen 1.6.0   Back to index