Пример #1
0
bool CvCaptureCAM_CMU::setFormat(int format)
{
    C1394Camera* cmucam = camera();
    if( !cmucam )
        return false;
    if( format < 0 || format > 2 || !cmucam->HasVideoFormat(format) )
        return false;
    cmucam->StopImageAcquisition();
    cmucam->SetVideoFormat(format);
    cmucam->StartImageAcquisition();
    return true;	
}
Пример #2
0
bool CvCaptureCAM_CMU::setMode(int mode)
{
    int format;
    C1394Camera* cmucam = camera();
    if( !cmucam )
        return false;
    format = cmucam->GetVideoFormat();
    if( mode < 0 || mode > 7 || !cmucam->HasVideoMode(format, mode))
        return false;
    cmucam->StopImageAcquisition();
    cmucam->SetVideoMode(mode);
    cmucam->StartImageAcquisition();
    return true;	
}
Пример #3
0
bool CvCaptureCAM_CMU::setFrameRate(int rate)
{
    int format, mode;
    C1394Camera* cmucam = camera();
    if( !cmucam )
        return false;
    mode = cmucam->GetVideoMode();
    format = cmucam->GetVideoFormat();
    if( rate < 0 || rate > 5 || !cmucam->HasVideoFrameRate(format, mode, rate) )
        return false;
    cmucam->StopImageAcquisition();
    cmucam->SetVideoFrameRate(rate);
    cmucam->StartImageAcquisition();
    return true;	
}