benjaminwan / OcrLiteNcnn

chineseocr lite onnx to ncnn,超轻量级中文ocr demo,支持ncnn推理 ( dbnet+crnn+anglenet)
https://github.com/ouyanghuiyu/chineseocr_lite
49 stars 15 forks source link

输出的似乎不是框坐标 #9

Open wode2016501 opened 1 year ago

wode2016501 commented 1 year ago

for (int i = 0; i < textBoxes.size(); ++i) { Logger("TextBox%d[score(%f),[x: %d, y: %d], [x: %d, y: %d], [x: %d, y: %d], [x: %d, y: %d]]\n", i, textBoxes[i].score, textBoxes[i].boxPoint[0].x, textBoxes[i].boxPoint[0].y, textBoxes[i].boxPoint[1].x, textBoxes[i].boxPoint[1].y, textBoxes[i].boxPoint[2].x, textBoxes[i].boxPoint[2].y, textBoxes[i].boxPoint[3].x, textBoxes[i].boxPoint[3].y); }

benjaminwan commented 1 year ago

https://github.com/benjaminwan/OcrLiteNcnn/blob/38ca3f506cf474aa926ce58d31ed9b441871a52a/src/OcrLite.cpp#L159 for (int i = 0; i < textBoxes.size(); ++i) { Logger("TextBox%d[score(%f),[x: %d, y: %d], [x: %d, y: %d], [x: %d, y: %d], [x: %d, y: %d]]\n", i, textBoxes[i].score, textBoxes[i].boxPoint[0].x, textBoxes[i].boxPoint[0].y, textBoxes[i].boxPoint[1].x, textBoxes[i].boxPoint[1].y, textBoxes[i].boxPoint[2].x, textBoxes[i].boxPoint[2].y, textBoxes[i].boxPoint[3].x, textBoxes[i].boxPoint[3].y); }

是加了padding的框坐标