当前位置: 首页>>代码示例>>C++>>正文


C++ videoInput::setupDevice方法代码示例

本文整理汇总了C++中videoInput::setupDevice方法的典型用法代码示例。如果您正苦于以下问题:C++ videoInput::setupDevice方法的具体用法?C++ videoInput::setupDevice怎么用?C++ videoInput::setupDevice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在videoInput的用法示例。


在下文中一共展示了videoInput::setupDevice方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: open

// Initialize camera input
bool CvCaptureCAM_DShow::open( int _index )
{
    close();
    VI.setupDevice(_index);
    if( !VI.isDeviceSetup(_index) )
        return false;
    index = _index;
    return true;
}
开发者ID:Barco-VCT,项目名称:VirtualClinicalTrials,代码行数:10,代码来源:cvcap_dshow.cpp

示例2: open

// Initialize camera input
bool CvCaptureCAM_DShow::open( int _index )
{
	int try_index = _index;
	int devices = 0;

    close();
    devices = VI.listDevices(true);
    if (devices == 0)
    	return false;
    try_index = try_index < 0 ? 0 : (try_index > devices-1 ? devices-1 : try_index);

    if (OPENCV_FPS) {
        VI.setIdealFramerate(try_index, OPENCV_FPS);
    }

    VI.setupDevice(try_index);
    if( !VI.isDeviceSetup(try_index) )
        return false;
    index = try_index;
    return true;
}
开发者ID:marccodes,项目名称:lfl,代码行数:22,代码来源:cvcap_dshow.cpp

示例3: setProperty

bool CvCaptureCAM_DShow::setProperty( int property_id, double value )
{
    int width = 0, height = 0;
    
    switch( property_id )
    {
    case CV_CAP_PROP_FRAME_WIDTH:
        width = cvRound(value);
        height = width*3/4;
        break;
    case CV_CAP_PROP_FRAME_HEIGHT:
        height = cvRound(value);
        width = height*4/3;
    default:
        return false;
    }

    if( width != VI.getWidth(index) || height != VI.getHeight(index) )
    {
        VI.stopDevice(index);
        VI.setupDevice(index, width, height);
    }
    return VI.isDeviceSetup(index);
}
开发者ID:Barco-VCT,项目名称:VirtualClinicalTrials,代码行数:24,代码来源:cvcap_dshow.cpp

示例4: InitVideo

// запуск получения кадров с видеокамеры
void InitVideo()
{
	// int numDevices = videoInput::listDevices();
	VI.setUseCallback(true);
	VI.setupDevice(dev, ImageWidth, ImageHeight, VI_COMPOSITE); 
}
开发者ID:suratovvlad,项目名称:videostream,代码行数:7,代码来源:SampleVideo.cpp


注:本文中的videoInput::setupDevice方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。