| | |
| | | |
| | | void VptDetectWrapper::init() { |
| | | m_param.mode = DEVICE_GPU; |
| | | #if 0 |
| | | m_param.gpuid = m_gpuIdx; |
| | | m_param.hp_recg_config = SY_CONFIG_OPEN; |
| | | m_param.hcp_recg_config = SY_CONFIG_OPEN; |
| | |
| | | m_param.vehicle_pendant_det_recg_config = SY_CONFIG_OPEN; |
| | | m_param.dbPath = const_cast<char *>(m_dbFilePath.data()); |
| | | m_param.log = SY_CONFIG_OPEN; |
| | | #else |
| | | m_param.gpuid = m_gpuIdx; |
| | | m_param.hp_recg_config = SY_CONFIG_CLOSE; |
| | | m_param.hcp_recg_config = SY_CONFIG_CLOSE; |
| | | m_param.vehicle_color_config = SY_CONFIG_CLOSE; |
| | | m_param.vehicle_recg_config = SY_CONFIG_CLOSE; |
| | | m_param.vehicle_pendant_det_recg_config = SY_CONFIG_CLOSE; |
| | | m_param.dbPath = const_cast<char *>(m_dbFilePath.data()); |
| | | m_param.log = SY_CONFIG_CLOSE; |
| | | #endif |
| | | vpt_pic_init(&m_handle, m_param); |
| | | } |
| | | |
| | |
| | | m_results.emplace_back(std::move(changeAnalysisRes(colorIndex, result.info[i].analysis_res))); |
| | | m_results.back().bskRect.setRect(result.info[i].obj_rect.left_, result.info[i].obj_rect.top_, |
| | | result.info[i].obj_rect.width_, result.info[i].obj_rect.height_); |
| | | } else {} |
| | | m_results.back().obj_score = result.info[i].obj_score; |
| | | } else { |
| | | VptDetectResults vptDetectResults; |
| | | vptDetectResults.sdkDetectType = static_cast<SDKDetectType>(colorIndex); |
| | | vptDetectResults.bskRect.setRect(result.info[i].obj_rect.left_, result.info[i].obj_rect.top_, |
| | | result.info[i].obj_rect.width_, result.info[i].obj_rect.height_); |
| | | vptDetectResults.obj_score = result.info[i].obj_score; |
| | | m_results.emplace_back(vptDetectResults); |
| | | } |
| | | } |
| | | //release source |
| | | if (result.info != NULL) { |