Go Down

Topic: How to identify letters with ARDUINO (Read 882 times) previous topic - next topic

Lp3114

Hey guys, I'm searching for some king of sensor that's able to identify the letters"S", "H" and "U".
I have 30 days to make it so please help me suggesting sensors and the code I have to use for it

Please, Thank you :)

AWOL

"S", "H" and "U" are strings, not letters.
Any Arduino can recognise 'S', 'H' and 'U' - no sensor required.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.
I speak for myself, not Arduino.

slipstick

I think you need to be a little more precise. Start by defining where and how the letters are presented.

In handwriting on paper? Ten foot high projected on a wall? On a smartphone screen? As characters in a serial feed? Over bluetooth by an app?


BTW what does this have to do with Robotics?

Steve

kenwood120s

Assuming this is an OCR type of application (but you didn't say) you should start by investigating the algorithms that are used. How do YOU tell the difference between S, H and U? Draw them on grids and draw lines a across and down and try to define the topology of those 3 letters. You lecturer (for this is surely a class assignment?) will have chosen those 3 letters for a reason....


[gumby]I've got my head stuck in the cupboard[/gumby]

Lp3114

I need to build a robot that, among other functions, needs to identify a letter about 5-10 cm from a supposed sensor capable of doing that, and that letter varies between "S", "H" and "U".

The font of these letters is arial.

Sorry for the lack of information

kenwood120s

Ok well you've got me interested, not that I have any ideas right now.

So it reads those letters and presumably decides what to do, like stop or reverse or blink leds or something.

I don't think pattern recognition is a trivial task at all, not that I know anything about it.

But I would start by looking at the topology of those letters to see what it is that makes an "S" an "S", a "U" a "U" and an "H" an "H". There's a subtle distinction between the U and H for example, with an H being a U with legs.

What's your experience with this sort of thing?

[gumby]I've got my head stuck in the cupboard[/gumby]

jremington

A camera and image processing is probably the only option, but AVR based Arduinos can't do image processing.

slipstick

So it's Arial. How big? What colour letter and background? Always placed vertically in front of the robot or do you have to find it and position the sensor first?

Interesting challenge for an Arduino.  I think there's probably a lot of important information in the project specification that you haven't told us yet.

Steve

jremington

Why not post the exact assignment your instructor gave you?

That way we aren't guessing what it is you are supposed to do.

Lp3114

#9
Oct 07, 2017, 06:28 pm Last Edit: Oct 07, 2017, 07:45 pm by Lp3114
I have no experience in image recognition, and after identifying these letters, the robot will drop 2 rescue kits, if for U, 1 if for H, and none if for S.


I thought of using 3 light binary sensors, but he would have to center the letter right in the middle ...
For example
take 2 points in common from S and H, in the case, one in the middle and one in the end.
two points in common of H and U, in this case the two ends.
and two in common of S and U, in the case an end and a low point



I swear, I'm telling you everything I know.
the size of the letter is something about 10 cmx 10 cm or less
the letter is black and the background is white, always vertically

dougp


jremington

Quote
I swear, I'm telling you everything I know.
Why bother, in that case? The project is hopeless.

Lp3114


pixy is a good, but does not sell in Brazil and I have little time, does anyone know another solution? cheaper?

btw, I just want to do some personal stuffs, and I'm asking if anyone knows how to do those things

slipstick

If it's just "personal stuffs" how come it has a 30 day deadline?

What you really need is some way to find the vertical centre line of the letter then scan down it. If you find 3 black lines it's "S", one in middle, it's "H" and one at the bottom, it's "U". Maybe some of the line following robot techniques might be a start? Though doing it from 10cm away might be asking a lot.

Steve

kenwood120s

#14
Oct 08, 2017, 06:04 am Last Edit: Oct 08, 2017, 06:05 am by kenwood120s
What you really need is some way to find the vertical centre line of the letter then scan down it. If you find 3 black lines it's "S", one in middle, it's "H" and one at the bottom, it's "U".
That's pretty much what I was thinking some posts ago in #3 and #5 when I said to draw some horizontal and vertical lines- need to figure what makes an "S" an "S" and not an "H", etc.

You could have some kind of binary sensor as you suggested, and have it on a pan/tilt servo, and look for some number of elements like 5 or 10 say (that you identify) that identify one letter from the other. If it finds 4/5 or 8/10 "S-like" elements it's an "S", then. But if it finds <4 or <8, it's not sure. Something along those lines might be feasible?

You could weight the elements it has to look for: a "U" has no horizontal in the middle, while both the "S" and "H" do. So a lack of middle horizontal is diagnostic of a "U", so it counts more towards the decision, while of course you need to look for other things too in case the sensor missed the - in the middle of an "S" or "H".

But.... if this is your own project, why don't you pick other symbols that are easier to identify? They don't have to be letters as far as the robot is concerned. Or pick letters which are easier to discriminate among: the "U" and "H" problem could be thrown away. I think with 26 letters to choose from, you could find 3 that are easier?

[gumby]I've got my head stuck in the cupboard[/gumby]

Go Up