Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/cv/pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ PipelineResults Pipeline::run(const ImageData& imageData) {
}
}

LOG_F(INFO, "Finished Pipeline on an image");

// Wrap up the final annotated image to return
// Wrap up the final annotated image to compress and return
ImageData processedData = imageData;
processedData.DATA = processedImage;
std::optional<cv::Mat> compressed = compressImg(processedImage);
processedData.DATA = compressed.value_or(processedImage);;

LOG_F(INFO, "Finished Pipeline on an image");
// Return a PipelineResults that includes:
// 1) The final big image with bounding boxes drawn
// 2) The bounding boxes + localized GPS coords
Expand Down
6 changes: 2 additions & 4 deletions src/network/gcs_routes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,8 @@ DEF_GCS_HANDLE(Get, targets, all) {
// Set the run ID
target.set_run_id(run.run_id);

std::optional<cv::Mat> optCompressedImg = compressImg(run.annotatedImage);
cv::Mat compressed_image = optCompressedImg.has_value() ?
optCompressedImg->clone() : run.annotatedImage;
std::string b64 = cvMatToBase64(compressed_image);

std::string b64 = cvMatToBase64(run.annotatedImage);
target.set_picture(b64);

// Ensure coords and bboxes vectors are the same size (should be guaranteed by Aggregator
Expand Down
Loading