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

dc1394error_t dc1394_avt_get_color_corr ( dc1394camera_t camera,
dc1394bool_t on_off,
int32_t *  Crr,
int32_t *  Cgr,
int32_t *  Cbr,
int32_t *  Crg,
int32_t *  Cgg,
int32_t *  Cbg,
int32_t *  Crb,
int32_t *  Cgb,
int32_t *  Cbb 
)

Get Color Correction + Coefficients

Definition at line 1631 of file avt.c.

References dc1394_get_adv_control_register().

{
    dc1394error_t err;
    uint32_t value;

    //retrieve color correction
    err=dc1394_get_adv_control_register(camera, REG_CAMERA_AVT_COLOR_CORR, &value);
    DC1394_ERR_RTN(err,"Could not get AVT color correction");

    //ON / OFF : Bit 6
    *on_off = (uint32_t)((value & 0x2000000UL) >> 25);

    //red channel coefficients
    err=dc1394_get_adv_control_register(camera, REG_CAMERA_AVT_COLOR_CORR_CRR, (uint32_t *)Crr);
    DC1394_ERR_RTN(err,"Could not get AVT color correction coefficient Crr");

    err=dc1394_get_adv_control_register(camera, REG_CAMERA_AVT_COLOR_CORR_CGR, (uint32_t *)Cgr);
    DC1394_ERR_RTN(err,"Could not get AVT color correction coefficient Cgr");

    err=dc1394_get_adv_control_register(camera, REG_CAMERA_AVT_COLOR_CORR_CBR, (uint32_t *)Cbr);
    DC1394_ERR_RTN(err,"Could not get AVT color correction coefficient Cbr");

    //green channel coefficients
    err=dc1394_get_adv_control_register(camera, REG_CAMERA_AVT_COLOR_CORR_CRG, (uint32_t *)Crg);
    DC1394_ERR_RTN(err,"Could not get AVT color correction coefficient Crg");

    err=dc1394_get_adv_control_register(camera, REG_CAMERA_AVT_COLOR_CORR_CGG, (uint32_t *)Cgg);
    DC1394_ERR_RTN(err,"Could not get AVT color correction coefficient Cgg");

    err=dc1394_get_adv_control_register(camera, REG_CAMERA_AVT_COLOR_CORR_CBG, (uint32_t *)Cbg);
    DC1394_ERR_RTN(err,"Could not get AVT color correction coefficient Cbg");

    //blue channel coefficients
    err=dc1394_get_adv_control_register(camera, REG_CAMERA_AVT_COLOR_CORR_CRB, (uint32_t *)Crb);
    DC1394_ERR_RTN(err,"Could not get AVT color correction coefficient Crb");

    err=dc1394_get_adv_control_register(camera, REG_CAMERA_AVT_COLOR_CORR_CGB, (uint32_t *)Cgb);
    DC1394_ERR_RTN(err,"Could not get AVT color correction coefficient Cgb");

    err=dc1394_get_adv_control_register(camera, REG_CAMERA_AVT_COLOR_CORR_CBB, (uint32_t *)Cbb);
    DC1394_ERR_RTN(err,"Could not get AVT color correction coefficient Cbb");

    return DC1394_SUCCESS;
}


Generated by  Doxygen 1.6.0   Back to index