Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of contents

...

Table of Contents
minLevel1
maxLevel4

Introduction

...

Here we will explain the steps to build a development environment for the iPRO Camera SDK application using a Docker image. Also, in this tutorial, the SDK installation directory is described as ${SDK_DIR}.

Info

This tutorial only supports SDK ver.1.80 or later. Please note that it cannot be used with versions earlier than SDK ver.1.80 or lower.

Advance preparation

...

First, select the OS for development. Choose between Linux OS and Windows OS.

Note

Development with SDK ver.1.80 or later is only supported in the GUI environment of Linux OS. We cannot support development in Windows OS or CUI environments even if problems occur. Please use it for trial purposes until you install Linux OS.

Preparing the Docker environment on Linux OS

The steps here are performed in the following environment.

...

Info

Please check in advance whether your environment allows uninstallation. We cannot guarantee any inconvenience caused by uninstalling the software.

Install an app that allows you to install Docker.

...

Code Block
sudo apt install unzip

...

Note

Be sure to copy the SDK zip file into Ubuntu before extracting the zip file. If you extract it on another OS such as Windows and then move it to Ubuntu, it will not work properly.

The preparation of the Docker environment on Linux OS is now complete. Proceed to "Prepare the build environment".

Preparing the Docker environment on Windows OS(Windows + Docker Desktop)

When using Docker Desktop, there may be a fee depending on the number of employees and annual income of the company using it. Please see here(Japanese) for accurate information.

...

Info

As of 2022/11/02, we have a track record of building a Windows + Docker Desktop environment in the Windows 10 21H2 environment. Please search for information on external sites to create an environment after 2022/11/02.

Preparing the Docker environment on Windows OS(Windows + WSL + Docker Engine)

Install WSL. WSL requires Windows 10 version 2004 or higher (build 19041 or higher) or Windows 11. Please see here(Japanese) for details.

...

Code Block
sudo apt install unzip

...

Note

Be sure to copy the SDK zip file into Ubuntu before extracting the zip file. If you extract it on another OS such as Windows and then move it to Ubuntu, it will not work properly.

The preparation of the Docker environment on Windows OS is now complete. Proceed to "Prepare the build environment."

Info

To shut down Ubuntu, open powershell and type “wsl --shutdown”.

Prepare the build environment

...

After installing Docker, prepare the environment for building the app. For a GUI environment, use Visual Studio Code.

...

Info

・We cannot support operation in a CUI environment even if you contact us.

・If you develop using anything other than Visual Studio Code in a GUI environment, we cannot support it, so we recommend using Visual Studio Code.

...

When starting an ubuntu 18.04-based container with Visual Studio Code 1.88 or later versions, an "Connect to an OS version not supported by Visual Studio Code?" message is displayed. Please press the allow button.

For Windows, please download from the link below.
Visual Studio Code - Code Editing. Redefined

...

Code Block
sudo snap install --classic code

Next, install the You can downgrade the .devcontainer extension from below.

...

Next, install the Visual Studio Code Dev Containers extension. First, start Visual Studio Code. On Linux, you can start it by typing code in the terminal. Select extensions from the left menu and enter "Dev Containers" in the search window.

...

Reference information: Please refer to Developing inside a Container using Visual Studio Code Remote Development “Getting started”.

How to build the app

Extract the SDK file.

Since the SDK zip file has already been placed in any folder, extract it to any folder.

Code Block
cd [any folder]
unzip iPRO_CAMERA_SDK_Vx_xx_Container.zip
Info

Please replace the zip file name with the obtained SDK file.

Change to the extracted directory.

Code Block
cd ${SDK_DIR}

Using Visual Studio Code in a GUI environment

Start Visual Studio Code in ${SDK_DIR}.

Code Block
code .

Click the >< mark at the bottom left of the screen to open the command palette, then select "Reopen in Container".

...

Note

Be sure to copy the SDK zip file into Ubuntu before extracting the zip file. If you extract it on another OS such as Windows and then move it to Ubuntu, it will not work properly.
However, in a Docker Desktop environment, unzip the zip file on a Windows OS.

Info

Please replace the zip file name with the obtained SDK file.

Please place your developer license (development.key) in the SDK/conf folder.

...

Change to the extracted directory.

Code Block
cd ${SDK_DIR}

Using Visual Studio Code in a GUI environment

Start Visual Studio Code in ${SDK_DIR}.

Code Block
code .
Info

If you are using Docker Desktop, start Visual Studio Code and open the ${SDK_DIR} folder.

Click the >< mark at the bottom left of the screen to open the command palette, then select "Reopen in Container".

...

Building the Docker image will begin according to .devcontainer/Dockerfile.
You can check the progress by clicking "Starting Dev container (Show logs)" at the bottom right.

...

Preparation is complete when "Dev Container: iPRO Camera SDK for CV2 environment" is displayed to the right of the >< mark at the bottom left of the screen.

...

If bash is not displayed, press the "+" to the right of the section that says "Dev Containers" and select bash.

...

Configure the environment before making.

If you want to build an extension app for ambaCV2X

...

.

...

Configure the environment before making.

Info

Please check below for the SoC (ambaCV2X or ambaCV5X) of the camera you will be using.

Installation conditions for applications - Technology Partner FAQ (En) - Confluence (atlassian.net)

  • If you want to build an extension app for ambaCV5XambaCV2X

    Code Block
    source setup_env.sh ipro-ambaCV5X
Info

When restarting the PC, you will need to configure the environment again before making. If you cannot make, please make sure that you have configured the environment.

Now you can build the app. As an example, if you want to build C/C++ skeleton_sample_app, move to the target directory and run make as shown below.

Code Block
cd ${SDK_DIR}/src/adamapp/skeleton_sample_app/
make

 

Build the ambaCV2X and ambaCV5X extension apps into one file

This article explains how to combine ambaCV2X and ambaCV5X applications into one file. If there is no need to combine them into one file, there is no problem if you do not perform this. Build the ambaCV2X and ambaCV5X apps in advance. As an example, if you build Python's sqlite_app, the following files will be generated.

SQLiteSampleAppPy_V0_1_ambaCV2X.ext
SQLiteSampleAppPy_V0_1_ambaCV2X.zip
SQLiteSampleAppPy_V0_1_ambaCV5X.ext
SQLiteSampleAppPy_V0_1_ambaCV5X.zip

Now, move to the target directory as shown below and run make pack.

Code Block
cd ${SDK_DIR}/src/adamapp-py/sqlite_app/
make pack

If successful, the ambaCV2X and ambaCV5X apps will be combined into one file.

SQLiteSampleAppPy_V0_1_ambaCV2X5X.ext
SQLiteSampleAppPy_V0_1_ambaCV2X5X.zip

The above files are available for ambaCV2X and ambaCV5X cameras.

...

  • ambaCV2X
  • If you want to build an extension app for ambaCV5X

    Code Block
    source setup_env.sh ipro-ambaCV5X
Info

When restarting the PC, you will need to configure the environment again before making. If you cannot make, please make sure that you have configured the environment.

If you are creating a Python app for CV2x developed with SDK ver.1.80 or earlier and want to create an app for CV52 with SDK ver.2.00 or later, please also refer to this.

Now you can build the app. As an example, if you want to build C/C++ skeleton_sample_app, move to the target directory and run make as shown below.

Code Block
cd ${SDK_DIR}/src/adamapp/skeleton_sample_app/
make

 

Build the ambaCV2X and ambaCV5X extension apps into one file

Please see here for details.

Operation check

Install the app in the .ext file you created on the camera and check that it works. Here, access the camera from a web browser as shown below and try installing it.

...