From 5aaf6f5bd01e348852c0af2ab4a5bf7a264cf46c Mon Sep 17 00:00:00 2001 From: shivabohemian Date: Tue, 28 Jun 2022 20:02:18 +0800 Subject: [PATCH] fix compile bug --- deploy/lite/crnn_process.cc | 2 ++ deploy/lite/ocr_db_crnn.cc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/deploy/lite/crnn_process.cc b/deploy/lite/crnn_process.cc index 6d5fc150..dd39cd38 100644 --- a/deploy/lite/crnn_process.cc +++ b/deploy/lite/crnn_process.cc @@ -35,11 +35,13 @@ cv::Mat CrnnResizeImg(cv::Mat img, float wh_ratio, int rec_image_height) { else resize_w = int(ceilf(imgH * ratio)); + cv::Mat resize_img; cv::resize(img, resize_img, cv::Size(resize_w, imgH), 0.f, 0.f, cv::INTER_LINEAR); cv::copyMakeBorder(resize_img, resize_img, 0, 0, 0, int(imgW - resize_img.cols), cv::BORDER_CONSTANT, {127, 127, 127}); + return resize_img; } std::vector ReadDict(std::string path) { diff --git a/deploy/lite/ocr_db_crnn.cc b/deploy/lite/ocr_db_crnn.cc index cb2bf779..fde0d07d 100644 --- a/deploy/lite/ocr_db_crnn.cc +++ b/deploy/lite/ocr_db_crnn.cc @@ -474,7 +474,7 @@ void system(char **argv){ std::vector rec_times; RunRecModel(boxes, srcimg, rec_predictor, rec_text, rec_text_score, - charactor_dict, cls_predictor, use_direction_classify, &rec_times); + charactor_dict, cls_predictor, use_direction_classify, &rec_times, rec_image_height); //// visualization auto img_vis = Visualization(srcimg, boxes); -- GitLab