Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel4

...

When using the image rotation and upside-down settings of the CV2x camera, the YC images the app can get are not automatically flipped, and the app has to implement the flipping process.

In addition, for some CV2x cameras (box type, dome type), regardless of the upside-down setting, the YC images that the app can get are inverted by default due to the orientation of the image sensor. Please refer to the following page to implement the inversion process after getting the YC images.

https://dev-partner-en.i-pro.com/space/TPFAQEN/967836262/Installation+direction+of+the+camera+and+retrieved+YC+image

...

The frame rate of the YC image for multi-directional camera is limited.

 2M / 4M : max. 15 fps

 6M  5M / 6M / 4K : max. 7.5 fps

Example of AI processing sequence

...

Partners can freely implement protocols. The sample app mqtt_sample implements MQTT.

アプリからのカメラファームウェアのCGIの実行

アプリケーションからカメラファームウェアのHTTPポートに対してローカル通信としてCGIを実行することが可能です。ユーザー認証が必要となるため、カメラのユーザー名、パスワードをアプリケーションの設定値として実装する必要があります。

ローカル通信時に必要となるカメラのHTTPポート番号設定は ADAM_GetHttpInfo で取得することができます。

...

Run camera firmware API (CGI) from app

...

It is possible to run CGI from the application to the HTTP port of the camera firmware as local communication. Since user authentication is required, the camera's user name and password must be implemented as application configuration. The camera's HTTP port number setting, which is required for local communication, can be got by ADAM_GetHttpInfo.


CGI documentation: https://i-pro.com/products_and_solutions/jaen/surveillance/learning-and-support/device-integration/cgii-itgpro-camera
各CGIの仕様については、About CGI details, please contact us from the support page of each region.https://japancs.i-pro.com/page/inquiryからお問い合わせください。

カメラ内部のRAM,ROMの活用

カメラの機種によって使用可能なリソースは異なります

参考:/products_and_solutions/en/surveillance/contact-us

Utilize camera’s internal RAM and ROM

...

Available resources depending on the camera model.

ref. https://dev-partner-en.i-pro.com/space/TPFAQTPFAQEN/694780048/i-PROカメラへのソフトウェアインストール条件

ROM(フラッシュメモリ)への保存

ADAM_GetAppDataDirPathで取得されるディレクトリに対して保存したデータはカメラ内部のフラッシュメモリに保存されるため、カメラの電源をOff/Onを行っても保存されます。

フラッシュメモリには書き込み回数に上限があるため、映像から検知したデータなどを保存したい場合は、SDカードまたは外部装置へ送信して保存する必要があります。

一時的なRAMへの保存で十分の場合は、RAMの上限を超えない範囲でADAM_GetAppTmpDirPathで取得されるディレクトリに保存してください。

高頻度のフラッシュメモリへの書き込みが行われ劣化した場合、アプリのインストール、起動、その他アプリの動作に影響を及ぼす場合があります。

SDK 2.01以降のResouce Monitorでは、フラッシュメモリへのアクセス状況を確認可能です。不要なアクセスがないかどうか、開発中にご確認ください。

参考:701433474/Installation+conditions+for+applications

Storing data to ROM (flash memory)

ADAM_GetAppDataDirPath provides the directory to store data into flash memory inside the camera. The data will be kept even if the camera is turned off and on.

Because there is a limit to the number of times that a flash memory can be written to, if you want to save data detected from video, you need to send it to an SD card or external device and save it there.

When temporarily storing into RAM is enough, ADAM_GetAppTmpDirPath provides the direcltory on RAM, and you can use it as long as it does not exceed the RAM limit.

Resource Monitor tool in SDK 2.01 or later allows you to check the status of access to flash memory. Please check during development to see if there is any unnecessary access.

ref: https://dev-partner-en.i-pro.com/space/TPFAQTPFAQEN/10281632201039828049/Resource+Monitor

また、各カメラのROMサイズの上限を超えて、保存が行われた場合、カメラのファームウェアがアプリを停止します。この場合、カメラのWEBブラウザの管理ログに「不正終了(ROM容量制限(実容量))」が表示されます。

RAMの活用

各カメラのRAMサイズの上限を超えて使用された場合、カメラのファームウェアがアプリを停止します。この場合、カメラのWEBブラウザの管理ログに「不正終了(RAM容量制限)」が表示されます。

また、ADAM_GetAppTmpDirPathで取得されるディレクトリに一時的にデータを格納することが可能です。

この場合も上限を超えないようにご使用下さい。

リソース情報の取得方法

開発中はSDK同梱のResouce Monitorで確認可能です。

アプリ内部で取得する場合は、以下のいずれかの方法で可能です。If the used ROM size exceeds the limit, camera's firmware will stop the app. In this case, “Illegal termination (ROM capacity limit (actual capacity))” will be displayed in the camera's web browser control log.

Storing data to RAM

It is possible to temporarily store data in the directory got by ADAM_GetAppTmpDirPath.

In this case, please make sure not to exceed the upper limit.

If the used RAM size exceeds the limit, camera's firmware will stop the app. In this case, “Illegal termination (RAM capacity limit)” will be displayed in the camera's web browser control log.

How to get resource information

During development, you can check it using the Resource Monitor tool included in the SDK.

If you want to get it within the app, you can do so in one of the following ways.

  1. Adam WebAPI getAppResourceInfo

  2. /proc/[pid]/statusやstatus, /proc/[pid]/statmで取得statm

  3. ADAM_GetRomRamSize *Supported in SDK v2.01以降で対応

WEB UIの実装

アプリでWEB UIを自由に実装し、カメラのWEBブラウザから表示することが可能です(ex. MJPEGと検知枠の表示、アプリの設定変更など)

WEB UIは各種サンプルアプリでも実装されており、またweb_template_appでは、一般的にアプリに必要となる機能が含まれています。

アプリのライセンスアクティベーションが必要となる場合、これらはすべてパートナー様で設計、実装頂く必要があります。カメラのMACアドレスやシリアル番号はSDKで取得可能であり、ご使用下さい。

複数のAIモデル及び複数アプリの活用

1つのアプリに複数のAIモデルを組み込み、動作させることが可能です。

また、アプリを複数にわけ、アプリ間での通信を行う場合は、サンプルアプリiac_server_sample_app、iac_client_sample_appを参照ください。

死活監視

カメラのファームウェアとアプリのメインスレッドにて約20秒間隔で死活監視が行われます。メインスレッドでの待機処理や時間のかかる処理は行わないようにしてください。

連続2回アプリからの応答がなかった場合、アプリが異常になっていると判定し、ファームウェアはアプリを停止します。その後、そのアプリがスケジュール動作期間内である場合は、再度自動的に起動します。

また、外部装置からのAdamCGI(WEB API)を受信し、アプリがファームウェアに対して応答を返却しない場合も同様に停止、再起動が行われます。例えば、アプリで受信パラメータに対するチェックを行い、異常と判断した場合にもADAM_ServerResponse_SendまたはADAM_ServerResponse_SendAsIsでファームウェアに対する応答を実装する必要があります。

また、アプリ内の別のスレッドを死活監視対象に追加したい場合は、ADAM_KeepAlive_Addをご使用下さい。

CV2xとCV52カメラアプリの互換性・SoC判別方法

...

  1. .01 or later

Utilize SD memory card

...

To access SD memory card from the app, set [On] for [Basic] - [SD memory card] - [Ext. software mode] on camera's web.

ADAM_GetSdCardPath provides the directory.

With external library SQLite, you can also create a database on the SD memory card. This is implemented in the sample app sqlite_app.

When [FAT] is used for [SD Memory Card File System Format] setting, the recording function to the SD memory card by the camera firmware also works, but this cannot be guaranteed.

When [ext] is used, the recording function to the SD memory card by the camera firmware does not work.

There is a limit to the number of times you can write to an SD memory card. For details, please refer to the manufacturer's information.

WEB UI implementation

...

You can freely implement WEB UI in your app and display it from the camera's WEB browser (e.g. displaying MJPEG and detection bounding box, changing app settings, etc.).

WEB UI is also implemented in various sample apps, and web_template_app includes functions that are generally required for apps.

If license activation is required for the app, this must be implemented by the partner. SDK provides camera's MAC address and serial number.

Use of multiple AI models and multiple apps

...

It is possible to include multiple AI models in one app.

If you want to divide the app into multiple apps and communicate between them, please refer to the sample apps iac_server_sample_app and iac_client_sample_app.

Keep-alive monitoring

...

The camera firmware will try communicating to app's main thread at intervals of about 20 seconds. Please do not perform waiting processes or time-consuming processes in the main thread.

If the app does not respond for two consecutive times, it is judged that the app status is abnormal and the firmware will stop the app automatically. If the app is still within its scheduled operation period, it will automatically start again.

In addition, when the external device send AdamCGI (WEB API) to camera and the application does not return a response to the firmware, the application will stop and restart in the same way.

For example, even if the application checks the received parameters and determines that client request is not correct, app must implement a response to the firmware using ADAM_ServerResponse_Send or ADAM_ServerResponse_SendAsIs.

If you want to add another thread in your app to the keep-alive monitoring list, use ADAM_KeepAlive_Add.

CV2x and CV52 camera app compatibility and how to distinguish SoC

...

Camera apps for SoCs with Cv2x and CV52 are not compatible. If you have already developed a Cv2x camera app and would like to develop a CV52 camera app, you will need to convert the AI ​​model (https://dev-partner-en.i-pro.com/space/TPFAQEN/TPFAQ/1187053582)と、ビルド時のオプションを変更(1186890263/How+to+create+an+AI+model+for+ambaCV5X) and change the build options (https://dev-partner-en.i-pro.com/space/TPFAQTPFAQEN/1112245115/SDKインストール1158545409/SDK+installation+(v1.80以降))する必要がありますソースコードでは以下によって制御を分けることが可能です。ビルド時のオプションによって一方が有効となります。80+or+later)).

In the source code, following define can be used. Either one will be enabled depending on the build options.

#ifdef ADAM_TARGET_PF_ipro_ambaCV2X_linux

#ifdef ADAM_TARGET_PF_ipro_ambaCV5X_linux

SDK v2.01以降に同梱されているサンプルアプリケーションwebThis is implemented in the sample applications web_template_app, yuv_dnn_app, yuv_pose_ap, yuv_ssd_app, yuv_yolo_app, yuv_yolov5_app, and yuv_yolov8_appで実装されています。また、SDK2.01以降に対応したファームウェアバージョンで追加されたSDK ADAM_GetSocTypeでSoCの情報を取得し、動的に制御を分けることも可能です。app included in SDK v2.01 or later.

In addition, it is also possible to get SoC information using the SDK ADAM_GetSocType, which was added in firmware versions compatible with SDK 2.01 and later.