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

dc1394error_t dc1394_avt_set_shading ( dc1394camera_t camera,
dc1394bool_t  on_off,
dc1394bool_t  compute,
dc1394bool_t  show,
uint32_t  frame_nb 
)

Set the shading to on/off and the number of frames used to compute the shading reference frame

Definition at line 311 of file avt.c.

References dc1394_get_adv_control_register(), and dc1394_set_adv_control_register().

{
    dc1394error_t err;
    uint32_t curval;

    /* Retrieve current shading properties */
    err=dc1394_get_adv_control_register(camera,REG_CAMERA_AVT_SHDG_CTRL, &curval);
    DC1394_ERR_RTN(err,"Could not get AVT shading control reg");

    /* Shading ON / OFF : Bit 6 */
    curval = (curval & 0xFDFFFFFFUL) | ((on_off ) << 25);

    /* Compute : Bit 5 */
    curval = (curval & 0xFBFFFFFFUL) | ((compute ) << 26);

    /* Show Image : Bit 4 */
    curval = (curval & 0xF7FFFFFFUL) | ((show ) << 27);

    /* Number of images : Bits 24..31 */
    curval = (curval & 0xFFFFFF00UL) | ((frame_nb & 0xFFUL ));

    /* Set new parameters */
    err=dc1394_set_adv_control_register(camera,REG_CAMERA_AVT_SHDG_CTRL, curval);
    DC1394_ERR_RTN(err,"Could not set AVT shading control reg");

    return DC1394_SUCCESS;

}


Generated by  Doxygen 1.6.0   Back to index