Ask Your Question
0

What is the best way to detect lines or corners from possibly wavy handwritting?

asked 2012-12-29 19:42:10 -0600

ZachTM gravatar image

updated 2012-12-30 11:56:52 -0600

I didnt know how to best word my title but I will try to explain it here. It is pretty simple, for example if I have a hand drawn square root symbol, for the most part it is made up of 3 lines.

If somone uses a ruler, I could easily get 3 lines extracted from the image, but the problem is that sometimes the lines will be quite wavy, like the above though that is a more exaggerated case. Does anyone know of a way I can get lines or even the corners from something like this, or should I just use my character classifier for these types of symbols too. I was able to use hough lines to detect a dash without using a classifier by just looking at the horizontal vs vertical lines but this is a bit more complex. (As far as I know)

Thanks for any suggestions, I know its maybe an unusual question.

Edit: In case this is of interest to anyone else: Using Mostafa Stataki's answer, I was able to acheive the following result with an extremely wavy square root symbol and a very high epsilon of 50 in approxPolyDP :

image description

I couldn't have imagined a better result!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2012-12-30 01:58:55 -0600

updated 2012-12-30 02:53:52 -0600

You can use approxPolyDP(Douglas-Peucker algorithm) for line approximation. You can use this sample. The best solution for solve this problem create skeleton of image then approximate skeleton by Douglas-Peucker algorithm.

edit flag offensive delete link more

Comments

Wow thanks +1 for using my answer from another question! And it worked great!

ZachTM gravatar imageZachTM ( 2012-12-30 10:37:37 -0600 )edit

Question Tools

Stats

Asked: 2012-12-29 19:42:10 -0600

Seen: 995 times

Last updated: Dec 30 '12