type = OutputMetadata::GetSupportedType(pObject, "score_type", supportedScoreTypes);
} catch (const std::exception& e) {
LOGE("Invalid %s", e.what());
+ return MEDIA_VISION_ERROR_INVALID_OPERATION;
}
if (json_object_has_member(pObject, "dequantization")) {
int OutputMetadata::ParseScore(JsonObject *root)
{
- LOGI("ENTER");
-
if (!json_object_has_member(root, "score")) {
LOGI("No score outputmetadata");
- LOGI("LEAVE");
return MEDIA_VISION_ERROR_NONE;
}
- score.ParseScore(root);
-
- LOGI("LEAVE");
- return MEDIA_VISION_ERROR_NONE;
+ return score.ParseScore(root);
}
BoxInfo::BoxInfo() :
decodingType = OutputMetadata::GetSupportedType(pObject, "decoding_type", supportedBoxDecodingTypes);
} catch (const std::exception& e) {
LOGE("Invalid %s", e.what());
+ return MEDIA_VISION_ERROR_INVALID_OPERATION;
}
array = json_object_get_array_member(pObject, "box_order");
int OutputMetadata::ParseBox(JsonObject *root)
{
- LOGI("ENTER");
-
if (!json_object_has_member(root, "box")) {
LOGE("No box outputmetadata");
- LOGI("LEAVE");
return MEDIA_VISION_ERROR_NONE;
}
- box.ParseBox(root);
-
- LOGI("LEAVE");
- return MEDIA_VISION_ERROR_NONE;
+ return box.ParseBox(root);
}
int Label::ParseLabel(JsonObject *root)
this->nmsParam.mode = OutputMetadata::GetSupportedType(object, "mode", this->nmsParam.supportedBoxNmsTypes);
} catch (const std::exception& e) {
LOGE("Invalid %s", e.what());
+ return MEDIA_VISION_ERROR_INVALID_OPERATION;
}
this->nmsParam.iouThreshold = static_cast<float>(json_object_get_double_member(object,"iou_threshold"));