DXR_API

对外合作API接口


相机心跳包(输出)

<h1>简要描述:</h1> <p>1、该接口主要用于和客户端握手,客户端通过监听改topic,判断算法服务是否正常 2、其中每个相机的状态是独立的 3、内容如下:</p> <ul> <li>project_version项目版本(主要用于区分项目,算法服务框架组成:公共部分+具体的项目)</li> <li>project_name项目名字</li> <li>project_version_num框架版本号(包含了:公共部分+具体的项目)</li> <li>project_version_date框架版本更新时间</li> <li>相机key: <ul> <li>ping:边缘设备ping相机ip的延迟</li> <li>cam_status:相机状态是否正常,主要看能不能取到图像,取不到则为False</li> <li>alg_status: 算法状态,算法异常则为False</li> <li>相机的配置参数</li> </ul></li> </ul> <h1>topic话题名称规则</h1> <pre><code>/aiserver_status</code></pre> <p>aiserver_status为固定字段,不会改变</p> <h1>话题地址:</h1> <pre><code>工控机的地址</code></pre> <h1>话题数据格式</h1> <pre><code>{ &amp;#039;cam_rtsp_left&amp;#039;: { &amp;#039;ping&amp;#039;: 0.8749961853027344, &amp;#039;cam_status&amp;#039;: True, &amp;#039;alg_status&amp;#039;: True, &amp;#039;camconfig&amp;#039;: { &amp;#039;CamAction&amp;#039;: &amp;#039;open&amp;#039;, &amp;#039;CamKey&amp;#039;: &amp;#039;cam_rtsp_left&amp;#039;, &amp;#039;CamName&amp;#039;: &amp;#039;双目左视&amp;#039;, &amp;#039;CamType&amp;#039;: &amp;#039;Network&amp;#039;, &amp;#039;CamUrl&amp;#039;: &amp;#039;rtsp://admin:Asb11023@192.168.1.88:554/Streaming/Channels/101&amp;#039;, &amp;#039;CamGs&amp;#039;: False, &amp;#039;CamGsGpu&amp;#039;: False, &amp;#039;CamSkip&amp;#039;: 1, &amp;#039;CamPort&amp;#039;: 8000, &amp;#039;Side&amp;#039;: &amp;#039;Client&amp;#039;, &amp;#039;AlgConfig&amp;#039;: { &amp;#039;Algtype&amp;#039;: [9], &amp;#039;Polygon&amp;#039;: [[0, 0, 1, 1]], &amp;#039;AlgThred&amp;#039;: [[0.5]], &amp;#039;MinPixel&amp;#039;: [[1, 1]], &amp;#039;Positioning&amp;#039;: False, &amp;#039;Specialdata&amp;#039;: { &amp;#039;savevideo&amp;#039;: False } } } }, &amp;#039;cam_rtsp_right&amp;#039;: { &amp;#039;ping&amp;#039;: 0.7822513580322266, &amp;#039;cam_status&amp;#039;: True, &amp;#039;alg_status&amp;#039;: True, &amp;#039;camconfig&amp;#039;: { &amp;#039;CamAction&amp;#039;: &amp;#039;open&amp;#039;, &amp;#039;CamKey&amp;#039;: &amp;#039;cam_rtsp_right&amp;#039;, &amp;#039;CamName&amp;#039;: &amp;#039;双目右视&amp;#039;, &amp;#039;CamType&amp;#039;: &amp;#039;Network&amp;#039;, &amp;#039;CamUrl&amp;#039;: &amp;#039;rtsp://admin:Asb11023@192.168.1.89:554/Streaming/Channels/101&amp;#039;, &amp;#039;CamGs&amp;#039;: False, &amp;#039;CamGsGpu&amp;#039;: False, &amp;#039;CamSkip&amp;#039;: 1, &amp;#039;CamPort&amp;#039;: 8001, &amp;#039;Side&amp;#039;: &amp;#039;Client&amp;#039;, &amp;#039;AlgConfig&amp;#039;: { &amp;#039;Algtype&amp;#039;: [10, 17], &amp;#039;Polygon&amp;#039;: [[0, 0, 1, 1], [0, 0, 1, 1]], &amp;#039;AlgThred&amp;#039;: [[0.5], [0.5]], &amp;#039;MinPixel&amp;#039;: [[1, 1], [1, 1]], &amp;#039;Positioning&amp;#039;: False, &amp;#039;Specialdata&amp;#039;: { &amp;#039;savevideo&amp;#039;: False } } } }, &amp;#039;project_version&amp;#039;: &amp;#039;v0.0.0&amp;#039;, &amp;#039;project_name&amp;#039;: &amp;#039;item_FC&amp;#039;, &amp;#039;project_version_num&amp;#039;: &amp;#039;1.0.11.6&amp;#039;, &amp;#039;project_version_date&amp;#039;: &amp;#039;20240712&amp;#039; }</code></pre> <h1>心跳包数据说明</h1> <table> <thead> <tr> <th>参数名</th> <th>必选</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>project_version</td> <td>是</td> <td>string</td> <td>框架版本号</td> </tr> <tr> <td>project_name</td> <td>是</td> <td>string</td> <td>框架名称</td> </tr> <tr> <td>project_version_num</td> <td>否</td> <td>string</td> <td>视觉版本号</td> </tr> <tr> <td>project_version_date</td> <td>否</td> <td>string</td> <td>视觉版本号发布日期</td> </tr> <tr> <td>CamKey</td> <td>是</td> <td>dict</td> <td>相机唯一标识key</td> </tr> </tbody> </table> <h1>心跳包中 CamKey 数据说明</h1> <table> <thead> <tr> <th>参数名</th> <th>必选</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>ping</td> <td>是</td> <td>string</td> <td>ping此相机的延迟</td> </tr> <tr> <td>cam_status</td> <td>是</td> <td>bool</td> <td>相机状态</td> </tr> <tr> <td>alg_status</td> <td>是</td> <td>bool</td> <td>相机算法状态</td> </tr> <tr> <td>camconfig</td> <td>是</td> <td>dict</td> <td>相机参数</td> </tr> </tbody> </table> <p>camconfig详情见接口 <a href="https://www.showdoc.com.cn/DXRAPI/11558474059845706">https://www.showdoc.com.cn/DXRAPI/11558474059845706</a></p> <h1>心跳包中 camconfig 数据说明</h1> <table> <thead> <tr> <th>参数名</th> <th>必选</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>CamAction</td> <td>是</td> <td>string</td> <td>相机控制 open/close</td> </tr> <tr> <td>CamKey</td> <td>是</td> <td>string</td> <td>相机唯一key值</td> </tr> <tr> <td>CamName</td> <td>是</td> <td>string</td> <td>相机中文名称</td> </tr> <tr> <td>CamType</td> <td>是</td> <td>string</td> <td>相机流类型 Network——网络相机 /Usb——usb相机 /Mp4——视频</td> </tr> <tr> <td>CamUrl</td> <td>是</td> <td>string</td> <td>相机流地址</td> </tr> <tr> <td>CamGs</td> <td>是</td> <td>bool</td> <td>视频流是否需要gs解码</td> </tr> <tr> <td>CamGsGpu</td> <td>是</td> <td>bool</td> <td>视频流是否需要gs GPU解码</td> </tr> <tr> <td>CamSkip</td> <td>是</td> <td>int</td> <td>视频流抽帧帧数</td> </tr> <tr> <td>CamPort</td> <td>是</td> <td>int</td> <td>相机port号 暂无意义</td> </tr> <tr> <td>Side</td> <td>是</td> <td>string</td> <td>指令最后从哪边发出 Web——视觉 /Client——客户端</td> </tr> <tr> <td>AlgConfig</td> <td>是</td> <td>dict</td> <td>相机算法处理参数</td> </tr> </tbody> </table> <h1>心跳包中 AlgConfig 数据说明</h1> <table> <thead> <tr> <th>参数名</th> <th>必选</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td>Algtype</td> <td>是</td> <td>list</td> <td>算法类型</td> </tr> <tr> <td>Polygon</td> <td>是</td> <td>list</td> <td>图像处理区域</td> </tr> <tr> <td>AlgThred</td> <td>是</td> <td>list</td> <td>算法类型对应的阈值</td> </tr> <tr> <td>MinPixel</td> <td>是</td> <td>list</td> <td>目标最小尺寸</td> </tr> <tr> <td>Positioning</td> <td>是</td> <td>bool</td> <td>是否定点任务</td> </tr> <tr> <td>Specialdata</td> <td>是</td> <td>dict</td> <td>额外事务配置参数</td> </tr> </tbody> </table> <p>Specialdata详情见额外事务接口 <a href="https://www.showdoc.com.cn/DXRAPI/11558474009752268">https://www.showdoc.com.cn/DXRAPI/11558474009752268</a></p> <h1>接口变更记录</h1> <p>20240311 视觉版本1.0.11.3增加心跳包功能 20240712 视觉版本1.0.11.6增加视觉版本号和视觉版本号发布日期</p>

页面列表

ITEM_HTML