Table of contents
Introduction
This explanation assumes that the i-PRO camera application development environment has been completed.
If you are not ready to build the development environment, please refer to here to complete it.
Also, in this tutorial, the SDK installation directory is described as ${SDK_DIR}
.
Operation overview
opencv_edge_detection_app is a sample app that detects and displays edges in an image.
This app display an image that emphasizes the outline, etc., as shown below.
External libraries required for operation
To build with C/C++, need below:
OpenCV
The use of external libraries will be explained later.
Directory path of the sample app
The C/C++ source code is stored below.
${SDK_DIR}/src/adamapp/opencv_edge_detection_app
No Python source code.
How to build the sample app (C/C++)
See here for building with C/C++.
How to use the sample app
The default resolution of the sample app is 1280x720. It will not work if the camera resolution setting is not 1280x720. Please see below for details.
Fail to call ADAM_DevYcVideo_Create() - Technology Partner FAQ (En) - Confluence (atlassian.net)
Here is an example of edge detection in an image captured by a camera.
-Before edge detection
-After edge detection
Appendix
How to change preferences
This application has some preferneces which a user is able to change.
When changing some preferneces, push "AppPrefs" button in "ADAM OPERATION UI" html page.
Resoultion:
Resolution to get jpeg images.
Specfify QVGA(320x240) or VGA(640x480) or HD(1280x720) or FHD(1920x1080).
However, by the ability of the camera, it may not work with the specified value.Frame rate:
Frame rate to get YC(YUV) images which are encoded to jpeg images.
Specify 1 or more.
However, by the ability of the camera, it may not work with the specified value.