CVTracker: Fix bug in JSON error handling

This commit is contained in:
FeRD (Frank Dana)
2021-09-08 12:35:57 -04:00
parent 01d40b22fb
commit aee95d3bac

View File

@@ -314,20 +314,22 @@ void CVTracker::SetJsonValue(const Json::Value root) {
double h = root["region"]["normalized_height"].asDouble();
cv::Rect2d prev_bbox(x,y,w,h);
bbox = prev_bbox;
if (!root["region"]["first-frame"].isNull()){
start = root["region"]["first-frame"].asInt64();
json_interval = true;
}
else{
processingController->SetError(true, "No first-frame");
error = true;
}
}
else{
processingController->SetError(true, "No initial bounding box selected");
error = true;
}
if (!root["region"]["first-frame"].isNull()){
start = root["region"]["first-frame"].asInt64();
json_interval = true;
}
else{
processingController->SetError(true, "No first-frame");
error = true;
}
}
/*