diff --git a/src/openalpr/alpr_impl.cpp b/src/openalpr/alpr_impl.cpp index 1432bba..8d30a6a 100644 --- a/src/openalpr/alpr_impl.cpp +++ b/src/openalpr/alpr_impl.cpp @@ -83,7 +83,11 @@ AlprFullDetails AlprImpl::recognizeFullDetails(cv::Mat img, std::vectordebugTiming) { - timespec endTime; - getTime(&endTime); cout << "Total Time to process image: " << diffclock(startTime, endTime) << "ms." << endl; } @@ -294,11 +299,10 @@ string AlprImpl::toJson( const AlprResults results ) cJSON_AddNumberToObject(root,"epoch_time", results.epoch_time ); cJSON_AddNumberToObject(root,"version", 2 ); - - if (results.total_processing_time_ms >= 0) - { - cJSON_AddNumberToObject(root,"processing_time_ms", results.total_processing_time_ms ); - } + cJSON_AddNumberToObject(root,"img_width", results.img_width ); + cJSON_AddNumberToObject(root,"img_height", results.img_height ); + cJSON_AddNumberToObject(root,"processing_time_ms", results.total_processing_time_ms ); + cJSON_AddItemToObject(root, "results", jsonResults=cJSON_CreateArray()); for (uint i = 0; i < results.plates.size(); i++)