Image I/O
Main Sheet Configuration
- Required Modules
- CvfdWebcam
- LOOP0 (This appears after you create iterator sheet.)
CvfdWebcam
- Module Description
This module opens a camera device file supported by OpenCV with a specific device index.
- Module Location
Node list > FDOPENCV_ORG:Video > CvfdWebcam
- Property settings
Name | Type | Value | Explanation |
---|---|---|---|
INDEX | int | an integer | Camera device index you want to open |
An integer must be specified. If you have only one camera on your computer, -1 is ok.
If you want to open more than 2 cameras, you have to specify the device index.
LOOP0
Set “IMAGEOUT” for this output after iterator sheet configuration.
Iterator Sheet Configuration
- Required Modules
- CvfdQueryFrame
- CvfdhShowImage
CvfdQueryFrame
- Module Description
This module reads an image stream in a frame-by-frame manner.
- Module Location
Node list > FDOPENCV_ORG:Video > CvfdQueryFrame
- Property settings
There is no property parameter.
- Terminal settings
Set “VIDEO” for this input.
Set “CONDITION” for this “BOOL” output.
CvfdhShowImage
- Module Description
This module displays the input image stream with a specific window title.
- Module Location
Node list > FDOPENCV_HRI:ImageIO > CvfdhShowImage
- Property settings
Name | Type | Value | Explanation |
---|---|---|---|
WINDOW_TITLE | string | BaseImage | Title of the image window |
FLAGS | int | 1 | Flag to enable automatic window resizing |
Set BaseImage to your preferred title.
- Terminal settings
Set “IMAGEOUT” for this output.
Examining the network file
Save the network file before closing [e.g.) load_and_show_webcam.n ]
Connect your camera supported by OpenCV [e.g.) USB camera]
Go to the terminal and run the HARK network file
./load_and_show_webcam.n
You’ll see the video stream in BaseImage window.