LeadingTrackComponent

最低版本: 1.0.0最后更新: 2020/3/30

组件功能:

处理引领过程中:云台转动,设置拾音角度,检测目标人,切换视觉摄像头等操作

支持平台

平台是否支持
豹小秘
豹花/大瓶
M平台

参数

参数名类型属性JS类型Java类型默认值必填说明最低版本
paramLeadingTrackParamlostTimenumberlong2000msno判断人丢失的超时时间1.0.0
waitTimenumberlong-1000msno超距等待超时时间(默认-1,即一直等待,不会判断超时)1.0.0
farawayDistancenumberdouble2.8mno超距距离1.0.0
detectDelaynumberlong5000msno人脸检测延迟1.0.0
maxDistancenumberdouble3mno丢失判断,有效人脸最大距离1.0.0
maxFaceAngleXnumberdouble60度no丢失判断,有效人脸最大角度1.0.0
personAppearTimeoutnumberlong1500msno找人超时时间1.0.0
param_track_need_find_personbooleanbooleantrueno导航过程中是否需要检测目标人1.0.0

状态码

返回状态码描述
STATUS_LEAD_TRACK_FIND_PERSON32720007找到可跟踪的目标人
STATUS_TRACK_SUCCESS32720001焦点跟随成功
STATUS_GUEST_FARAWAY32720004引领目标人超距
STATUS_LEAD_GUEST_APPEAR32720010目标人出现
STATUS_GUEST_FARAWAY_END32720005引领目标人靠近
STATUS_LEAD_GUEST_LOST32720008目标人丢失
STATUS_LEAD_GUEST_FARAWAY_TIMEOUT32720009超距状态超时
STATUS_CAMERA_SWITCH_FAILED32720011切换摄像头失败

示例代码:

this.leadingTrackParam = new LeadingTrackParam(

   undefined,

   15000,

   undefined,

   undefined,

   undefined,

   undefined,

   3000

);

<LeadingTrackComponent

   ref={this.leadingTrackComponentRef}

   navigation={this.navigation}

   param={this.leadingTrackParam}

   onStatusUpdate={

       this.leadingTrackOnStatusUpdate

   }

/>

public leadingTrackOnStatusUpdate = (param?: ComponentEvent): boolean => {

   console.log('LeadingViewModel leadingTrackOnStatusUpdate', param);

   if (param && param.status) {

       switch (param.status) {

           case ComponentStatusConst.STATUS_TRACK_SUCCESS:

               break;

           case ComponentStatusConst.STATUS_TRACK_FAILED:

           case ComponentStatusConst.STATUS_CAMERA_SWITCH_FAILED: {

               break;

           }

           case ComponentStatusConst.STATUS_GUEST_FARAWAY:

                break;

           case ComponentStatusConst.STATUS_GUEST_FARAWAY_END:

           case ComponentStatusConst.STATUS_LEAD_GUEST_LOST:

               break;

           case ComponentStatusConst.STATUS_LEAD_GUEST_FARAWAY_TIMEOUT:

               break;

           default:

               break;

       }

   }

   return true;

};