Supported hardware devices
Any compatible video device through the OpenCV capture interface.
Device configuration settings
-
Type =
"OpenCVVideo"
-
VideoURL Complete URL of the file or stream to capture. Either VideoURL or DeviceIndex must be specified.
Default = " "
-
DeviceIndex Index of the video device to use. Either VideoURL or DeviceIndex must be specified.
Default = " "
-
CaptureAPI The capture API to use for this device.
Default = "CAP_ANY"
-
FrameSize The 2 dimensional frame size to use for capturing (example: FrameSize="1920 1080")
Default = " "
-
AcquisitionRate The FPS to request of the camera
Default = " "
-
FourCC The four character code for pixel format (Example: "MJPG")
Default = " "
-
CameraMatrix A 9 valued entry specifying the 3x3 intrinsic camera matrix. Both CameraMatrix and DistortionCoefficients must be specified for undistortion to occur.
Default = " "
-
DistortionCoefficients Up to 8 value entry specifying the camera distortion coefficients. Both CameraMatrix and DistortionCoefficients must be specified for undistortion to occur.
Default = " "
-
AutofocusEnabled A boolean value ("TRUE" or "FALSE") specifying whether the camera can autofocus.
Default = "FALSE"
-
AutoexposureEnabled A boolean value ("TRUE" or "FALSE") specifying whether the camera can automatically set the exposure.
Default = "FALSE"
-
DataSources Exactly one
DataSource
child element is required.
Example configuration file PlusDeviceSet_Server_OpenCVVideoSource.xml
<PlusConfiguration version="2.1">
<DataCollection StartupDelaySec="1.0" >
<DeviceSet
Name="PlusServer: OpenCV device capturing an RTSP stream"
Description="Broadcasting acquired video through OpenIGTLink"
/>
<Device
Id="VideoDevice"
Type="OpenCVVideo"
RequestedCaptureApi="CAP_FFMPEG"
StreamURL="rtsp://127.0.0.1:8554/hello.sdp">
<DataSources>
<DataSource Type="Video" Id="Video" ImageType="RGB_COLOR" PortUsImageOrientation="MF" />
</DataSources>
<OutputChannels>
<OutputChannel Id="VideoStream" VideoDataSourceId="Video" />
</OutputChannels>
</Device>
</DataCollection>
<CoordinateDefinitions>
<Transform From="Image" To="Reference"
Matrix="
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1" />
</CoordinateDefinitions>
<PlusOpenIGTLinkServer
MaxNumberOfIgtlMessagesToSend="1"
MaxTimeSpentWithProcessingMs="50"
ListeningPort="18944"
SendValidTransformsOnly="true"
OutputChannelId="VideoStream" >
<DefaultClientInfo>
<MessageTypes>
<Message Type="IMAGE" />
</MessageTypes>
<ImageNames>
<Image Name="Image" EmbeddedTransformToFrame="Reference" />
</ImageNames>
</DefaultClientInfo>
</PlusOpenIGTLinkServer>
</PlusConfiguration>