2

I want to convert circular text area to rectangular text area for OCR process.I used logpolar() function of opencv. Sometimes it gives good results but sometimes text seems split into two parts according to text area position on circle. OCR process working good (with Tesseract + OpenCV). But my text area not in fixed position and text always created with 10 digits. I need solution that working in all possible status. problem explanation:

problem explanation

I wrote my code according to this post. Firstly I selected ROI then process this ROI (later I will write code for fixed roi selection). I tried all possible parameter values using trackbars. But results are not good

Please see my code and other results.

Good result,I always want to get something like this:

gd

Bad result:

bd

Bad result:

bd

My code;

int radius = 80;
int dr = 95;
logPolar(imcrop, polarr, Point2f(radius + dr, radius + dr), 30, WARP_FILL_OUTLIERS);
cv::rotate(polarr, finall, ROTATE_90_COUNTERCLOCKWISE);
resize(finall, finall, Size(640, 480));
threshold(finall, thresholded, 250, 255, THRESH_BINARY + THRESH_OTSU);

I want to extract text area always one piece. How can I solve this problem?

jpyams
  • 4,030
  • 9
  • 41
  • 66
Ahmet Anil
  • 31
  • 3

0 Answers0