显示AI识别的置信值

serial
Matthew 1 year ago
parent 36b60371b8
commit c58d8aa0a1

@ -215,7 +215,7 @@ CPhoneDevice::CPhoneDevice(JavaVM* vm, jobject service, const std::string& appPa
#ifdef USING_NRSEC #ifdef USING_NRSEC
TurnOnCameraPower(env); TurnOnCameraPower(env);
CGpioControl::setSpiPower(true); GpioControl::setSpiPower(true);
#endif #endif
} }
@ -937,6 +937,7 @@ bool CPhoneDevice::TakePhoto(const IDevice::PHOTO_INFO& photoInfo, const vector<
params.zoom = mPhotoInfo.zoom; params.zoom = mPhotoInfo.zoom;
params.zoomRatio = mPhotoInfo.zoomRatio; params.zoomRatio = mPhotoInfo.zoomRatio;
// GpioControl::EnableGpio(CMD_SET_CAM_3V3_EN_STATE, true); // GpioControl::EnableGpio(CMD_SET_CAM_3V3_EN_STATE, true);
bool res = false; bool res = false;
@ -1211,8 +1212,7 @@ bool CPhoneDevice::OnImageReady(cv::Mat& mat)
it->label, item.name.c_str(), it->x, it->y, it->w, it->h, pt.x, pt.y, textSize.width, textSize.height); it->label, item.name.c_str(), it->x, it->y, it->w, it->h, pt.x, pt.y, textSize.width, textSize.height);
ALOGI(buf); ALOGI(buf);
#endif #endif
ft2->putText(mat, item.name + std::to_string((int)(it->prob * 100.0)), pt, fontSize, textColor, thickness, cv::LINE_AA, false, true);
ft2->putText(mat, item.name, pt, fontSize, textColor, thickness, cv::LINE_AA, false, true);
} }
++it; ++it;
} }

Loading…
Cancel
Save