类 Input::VisionSource

表示视觉数据源,用作计算机视觉操作的输入。

成员

属性

语法: public Input::VisionSourceProperties & Properties;

获取其他 VisionSource 属性的集合。

~VisionSource

语法: public inline virtual ~VisionSource ( );

析构 VisionSource 类的实例。

FromDefaultCaptureDevice

语法: public inline static std::shared_ptr< VisionSource > FromDefaultCaptureDevice ( );

使用默认捕获设备(例如相机)初始化 VisionSource 类的新实例。

返回

包装在 std::shared_ptr 中的新创建的 VisionSource

尚不支持与 ImageAnalyzer 一起使用

FromCaptureDevice

语法: public inline static std::shared_ptr< VisionSource > FromCaptureDevice ( const std::string & deviceAttributes );

从由其属性指定的捕获设备初始化 VisionSource 类的新实例。

参数

  • deviceAttributes 捕获设备属性 (例如“front=true;”) ,或默认捕获设备的空字符串<

返回

包装在 std::shared_ptr 中的新创建的 VisionSource

尚不支持与 ImageAnalyzer 一起使用。

FromCaptureDevice

语法: public inline static std::shared_ptr< VisionSource > FromCaptureDevice ( const std::wstring & deviceAttributes );

从由其属性指定的捕获设备初始化 VisionSource 类的新实例。

参数

  • deviceAttributes 捕获设备属性 (例如“front=true;”) ,或默认捕获设备的空字符串<

返回

包装在 std::shared_ptr 中的新创建的 VisionSource

尚不支持与 ImageAnalyzer 一起使用。

FromFile

语法: public inline static std::shared_ptr< VisionSource > FromFile ( const std::string & fileName );

使用本地输入图像或视频文件初始化 VisionSource 类的新实例。

参数

  • fileName 本地文件的完整路径名称

返回

包装在 std::shared_ptr 中的新创建的 VisionSource

FromFile

语法: public inline static std::shared_ptr< VisionSource > FromFile ( const std::wstring & fileName );

使用本地输入图像或视频文件初始化 VisionSource 类的新实例。

参数

  • fileName 本地文件的完整路径名称

返回

包装在 std::shared_ptr 中的新创建的 VisionSource

FromUrl

语法: public inline static std::shared_ptr< VisionSource > FromUrl ( const std::string & url );

使用指定的 Internet 可访问 URL 初始化 VisionSource 类的新实例。

参数

  • url 输入媒体的可访问 URL

返回

包装在 std::shared_ptr 中的新创建的 VisionSource

FromUrl

语法: public inline static std::shared_ptr< VisionSource > FromUrl ( const std::wstring & url );

使用指定的 Internet 可访问 URL 初始化 VisionSource 类的新实例。

参数

  • url 输入媒体的可访问 URL

返回

包装在 std::shared_ptr 中的新创建的 VisionSource

FromFrameSource

语法: public inline static std::shared_ptr< VisionSource > FromFrameSource ( const std::shared_ptr< Frames::FrameSource > & frameSource );

使用 FrameSource 初始化 VisionSource 类的新实例。

参数

  • frameSource 通过 FrameSource::FromFormat () 获取的 FrameSource

返回

包装在 std::shared_ptr 中的新创建的 VisionSource

尚不支持与 ImageAnalyzer 一起使用

FromFrameSetSource

语法: public inline static std::shared_ptr< VisionSource > FromFrameSetSource ( const std::shared_ptr< Frames::FrameSetSource > & frameSetSource );

使用 FrameSource 初始化 VisionSource 类的新实例。

参数

  • frameSetSource 通过 FrameSetSource::FromFormat () 获取的 FrameSetSource

返回

包装在 std::shared_ptr 中的新创建的 VisionSource

尚不支持与 ImageAnalyzer 一起使用

FromImageSourceBuffer

语法: public inline static std::shared_ptr< VisionSource > FromImageSourceBuffer ( const std::shared_ptr< ImageSourceBuffer > & imageSourceBuffer );

从 ImageSourceBuffer 初始化 VisionSource 类的新实例,允许应用程序从内存缓冲区传入图像。

参数

  • imageSourceBuffer 包含要处理的图像的图像源缓冲区

返回

新创建的 VisionSource 作为 std::shared_ptr