mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-16 13:41:30 +08:00
[Bug Fix] fixed ocr visualize error (#2090)
This commit is contained in:
@@ -20,11 +20,15 @@ namespace vision {
|
||||
cv::Mat VisOcr(const cv::Mat& im, const OCRResult& ocr_result,
|
||||
const float score_threshold) {
|
||||
auto vis_im = im.clone();
|
||||
bool have_score =
|
||||
(ocr_result.boxes.size() == ocr_result.rec_scores.size());
|
||||
|
||||
for (int n = 0; n < ocr_result.boxes.size(); n++) {
|
||||
if (have_score) {
|
||||
if (ocr_result.rec_scores[n] < score_threshold) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
cv::Point rook_points[4];
|
||||
|
||||
for (int m = 0; m < 4; m++) {
|
||||
|
Reference in New Issue
Block a user