PDA

View Full Version : how sort position template in source image ?



woraprud
30th January 2013, 04:21
Hi everyone,

I have question about sort position template in source image. when i have position x,y,width and height of template on source image.
i need covert position to letter 12345678.

8649

Thank you.

Santosh Reddy
30th January 2013, 06:16
It does not make any sense to me, consider re-wording the post.

Do you want number rocognition from image file?

woraprud
30th January 2013, 10:12
I 'm sorry. My english is really bad. and thank you for trying to help me.

I use Opencv Template matching. Now I can get the position (x,y) of each template (example 1, 3, 2, 4, 6, 5, 7, 8)
i want method coding to check sequence of position in template.
From picture the result that I want is 1 2 3 4 5 6 7 8. how do i check?

Thank you.

Added after 1 1:

8652

X , Y ,Width, Height,Value
227, 153, 22, 27, 3
247, 152, 20, 27, /
266, 153, 21, 27, 0
267, 120, 21, 27, S
287, 152, 21, 27, 6
288, 115, 17, 27, 1
307, 153, 21, 27, 0
327, 152, 21, 27, 9
347, 151, 17, 27, 1
369, 151, 21, 27, 2

sequence is S13/060912

Thank you.

Santosh Reddy
30th January 2013, 11:05
I still don't understand your problem.

You have images, and you can match them, and have their positions (x,y). Then what is stopping you in just rearranging the X, Y is the matched images?

lanz
30th January 2013, 14:11
I think he's trying to form a sensible string (when reading from left to right, top to bottom) from a set of detected characters.

You can use scan line algorithm to track lines along the image and fuzzily decide what symbol goes to what line. I am afraid there is no exact algorithm.
Consider the following case:
8657
It can be 12345 and 13425.