opencv_edge_detection_app

 

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}.

For cameras with an ambaCV2X SoC, installation will fail if the application file exceeds approximately 100MB. For more information about SoC, see below.
Installation conditions for applications - Technology Partner FAQ (En) - Confluence (atlassian.net)

 

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++)


This article describes how to build it as AdamApp.
If you want to build it as Container AdamApp for Azure IoT Edge, see below.

Development tutorial (Container AdamApp for Azure IoT Edge) - Technology Partner FAQ (En) - Confluence (atlassian.net)

See here for building with C/C++.

 

How to use the sample app


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.