Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

YC image usage


Available resolution list for app

The list of YC image resolutions available to the app varies depending on the camera firmware settings.

ref: https://dev-partner-en.i-pro.com/space/TPFAQEN/1172766748/Available+YC+image+resolution+by+ADAM_CamPref_Get()

Support upside-down image

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

This 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 included in SDK v2.01 or later.

360-degree fisheye camera

Depending on the image capture mode configuration, app can use the desired images such as fisheye images or de-warped images in the app.

https://dev-partner-en.i-pro.com/space/TPFAQEN/1301708940/Use+360-degree+fisheye+camera+with+the+AdamApp+app

Multi-directional camera

For multi-directional cameras, when installing the app, select the camera number (No. 1 to No. 4) to install the app on. When using ADAM_DevYcVideo_Create, the YC images got by the app will automatically be those from that camera number. When using ADAM_DevRawVideo_Create, it is possible to specify the image from a specific camera number or automatically, depending on the argument.

If you want to display video from a camera number on the web UI of the app, for example, please use Adam_GetSensorChannel to get the camera number where the app is installed, and then use the CGI.

(ex. /cgi-bin/mjpeg?ch=2, /cgi-bin/mjpeg?ch=3, /cgi-bin/mjpeg?ch=4)

This is implemented in the sample applications web_template_app.

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

 2M / 4M : max. 15 fps

 6M / 4K : max. 7.5 fps

Example of AI processing sequence


image-20240530-062539.png

Perform AI processing when camera firmware event is triggered

Instead of performing image analysis on all YC images, you can use ADAM_DevInputAlarm_Create to have the app receive VMD or terminal alarm events detected by the camera and then process them for a fixed period of time (this is implemented in the sample app web_template_app), or you can use ADAM_DevPtzPresetPositionState_Create to receive the trigger that PTZ camera moves to a preset position.

ADAM_DevInputAlarm_Create is not supported for python.

Sending data to external devices


When event is generated in the app, app can use the SDK to trigger alarm on camera firmware, or the app can communicate directly with external devices.

ADAM_Alarm_Notify

The following camera firmware functions can be triggered.

ex.

*This SDK is implemented in the sample applications alarm_sample_app and web_template_app.

ADAM_MetaDataStream_SetRaw

Data can be sent as RTSP metadata channel. Software that utilizes this data needs to be developed by our partners.

Also, by using a specified data format, it can be integrated with i-PRO Active Guard and various VMS automatically.

https://dev-partner-en.i-pro.com/space/TPFAQEN/1051271527/i-PRO+Active+Guard+integration+guide

*This SDK is implemented in the sample applications meta_stream_app and web_template_app.

ADAM_AdditionalInfo_Set

Data can be added to the RTP extension header for H.264, H.265, and audio transmission. In case of JPEG, COM segment is used. It is neccessary for partner to develop client software.

*This SDK is implemented in the sample application additional_info_sample_app.

Other protocol

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

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


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

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

CGIドキュメントダウンロード:https://i-pro.com/products_and_solutions/ja/surveillance/learning-and-support/device-integration/cgi-itg-camera

各CGIの仕様については、https://japancs.i-pro.com/page/inquiryからお問い合わせください。

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


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

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

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

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

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

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

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

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

参考:https://dev-partner.i-pro.com/space/TPFAQ/1028163220/Resource+Monitor

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

RAMの活用

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

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

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

リソース情報の取得方法

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

アプリ内部で取得する場合は、以下のいずれかの方法で可能です。

  1. Adam WebAPI getAppResourceInfo

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

  3. ADAM_GetRomRamSize *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判別方法


SoCがCv2xのカメラ用アプリとCV52のカメラ用アプリは互換性がありません。Cv2xカメラ用アプリをすでに開発済で、CV52カメラ用アプリを開発する場合はAIモデル変換(https://dev-partner.i-pro.com/space/TPFAQ/1187053582)と、ビルド時のオプションを変更(https://dev-partner.i-pro.com/space/TPFAQ/1112245115/SDKインストール(v1.80以降))する必要があります

ソースコードでは以下によって制御を分けることが可能です。ビルド時のオプションによって一方が有効となります。

#ifdef ADAM_TARGET_PF_ipro_ambaCV2X_linux

#ifdef ADAM_TARGET_PF_ipro_ambaCV5X_linux

SDK v2.01以降に同梱されているサンプルアプリケーションweb_template_app, yuv_dnn_app, yuv_pose_ap, yuv_ssd_app, yuv_yolo_app,yuv_yolov5_app,yuv_yolov8_appで実装されています。

また、SDK2.01以降に対応したファームウェアバージョンで追加されたSDK ADAM_GetSocTypeでSoCの情報を取得し、動的に制御を分けることも可能です。

  • No labels