Running Demo Codes
This application of image edge detection supports both Python and C++ versions. The detailed steps are as follows:
Step:
- To run Python application:
Enter the Python application directory, and run the demo code on VisionFive 2 Debian:
cd /usr/share/doc/opencv-doc/examples/python/ python3 edge.py 4
- To run C++ application:
Perform the following step under the user directory on VisionFive 2 Debian to run the C++ demo:
example_cpp_videocapture_camera --device=4
Tip:
- Normally,
/dev/video1
represents the camera connected to MIPI CSI, and/dev/video4
represents the USB camera. - Added
--device
and number 1 or 4 as an input parameter to specify the number of the video device capturing a video stream.
Result:
- HDMI monitor displays the real-time video stream from a webcam;
- The terminal where the image edge detection demo code is run will print the running frame rate and other information in real-time.
![](../Image/VisionFive2/objectdection_edge.png)