Author |
Message |
Fogmeister
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 7:35 pm Posts: 6580 Location: Getting there
|
Has anyone ever had to program any sort of OCR reader in the past? I've found a couple of resources online but wondered if there were any recommendations. Would be quite interesting to write my own set of algorithms but I think a library would be better 
|
Wed Sep 28, 2011 3:15 pm |
|
 |
JJW009
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 6:58 pm Posts: 8767 Location: behind the sofa
|
I can't help, but funnily enough I had a similar thought yesterday so I'm also interested. I want to do a Sodoku solver that you can run on a phone and point at a puzzle, but the idea of just getting the information from the camera rather put me off...
_________________jonbwfc's law: "In any forum thread someone will, no matter what the subject, mention Firefly." When you're feeling too silly for x404, youRwired.net
|
Wed Sep 28, 2011 3:31 pm |
|
 |
Fogmeister
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 7:35 pm Posts: 6580 Location: Getting there
|
Hmm... intriguing... What made you come up with the idea? The app I'm currently working on is this one... http://www.sudokuwiki.org/Sudoku_Solver ... le_Devices
|
Wed Sep 28, 2011 7:27 pm |
|
 |
JJW009
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 6:58 pm Posts: 8767 Location: behind the sofa
|
LOL - I was reading this article from a couple of weeks ago: http://www.codeproject.com/KB/game/VBSu ... rator.aspxand I thought to myself "My mum would love that if you could just scan the puzzle in and solve it on the phone". I'd been playing with QR codes, so the idea of scanning in a grid of data was fresh in my mind.
_________________jonbwfc's law: "In any forum thread someone will, no matter what the subject, mention Firefly." When you're feeling too silly for x404, youRwired.net
|
Wed Sep 28, 2011 9:32 pm |
|
 |
JJW009
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 6:58 pm Posts: 8767 Location: behind the sofa
|
Bloomin' 'eck - I should have read that news letter better. Further down was this: http://www.codeproject.com/KB/game/Webc ... olver.aspxThat's for a PC rather than a phone though. Still, some good pointers including this: http://opencv.willowgarage.com/wiki/"OpenCV (Open Source Computer Vision) is a library of programming functions for real time computer vision."
_________________jonbwfc's law: "In any forum thread someone will, no matter what the subject, mention Firefly." When you're feeling too silly for x404, youRwired.net
|
Wed Sep 28, 2011 10:32 pm |
|
 |
Fogmeister
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 7:35 pm Posts: 6580 Location: Getting there
|
This might make things a bit easier https://github.com/Haoest/SudokuResolvAt least I'll be able to use that to begin with. Might try to optimise it myself for a later version.
|
Fri Sep 30, 2011 12:53 pm |
|
 |
Fogmeister
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 7:35 pm Posts: 6580 Location: Getting there
|
Well I finally got my teeth into the Sudoku Resolv code. One thing I can say is that whoever wrote that app had no idea what he was doing at all! I don't think there is a single thing it does right. I found another sample project and managed to finally get my app to run with the included libraries. I also had a read through the code and I know what I now have to do. The only thing I need now is to actually code it  LOL!
|
Thu Mar 01, 2012 8:51 am |
|
 |
rustybucket
I haven't seen my friends in so long
Joined: Thu Jun 18, 2009 5:10 pm Posts: 5836
|
Oo Oo Oo Oo! My mum worked on OCR for the Post Office after she was at university. 
_________________Jim
|
Thu Mar 01, 2012 9:49 am |
|
 |
Fogmeister
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 7:35 pm Posts: 6580 Location: Getting there
|
That's cool. I've been reading up on the opencv library today and having a look at some samples. There's a hell of a lot of work left to do but I can now see what I have to do rather than being completely in the dark about it  Hopefully, I'll be recognising sudoku boards before the week is over 
|
Thu Mar 01, 2012 10:21 am |
|
 |
Fogmeister
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 7:35 pm Posts: 6580 Location: Getting there
|
OK, so I've got the app recognising edges and drawing them back to the screen (i.e. black with white edges) but that's it at the moment.
This stuff is so difficult mainly due to lack of documentation.
|
Wed Mar 07, 2012 8:47 am |
|
 |
Fogmeister
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 7:35 pm Posts: 6580 Location: Getting there
|
OK, I've been reading tonight and I think I'll be able to get the recogniser working tonight!
Woop!
I'll keep you posted!
|
Wed Mar 07, 2012 2:35 pm |
|
 |
Fogmeister
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 7:35 pm Posts: 6580 Location: Getting there
|
OK, last night was a failure. I was trying for hours but didn't get anywhere. Main problem is that the project I was using as a reference was using boost to transfer images around and I didn't really understand what it was doing. Anyway, I've fricking found a fricking iPhone opencv project that doesn't use anything else. And it's using the latest version of opencv! Get in! http://aptogo.co.uk/2011/09/opencv-framework-for-ios/There you go. Will be using this tonight. My main problem was converting UIImages into opencv Mat objects. This covers it all! 
|
Thu Mar 08, 2012 10:01 am |
|
 |
Fogmeister
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 7:35 pm Posts: 6580 Location: Getting there
|
OK, I had a look at the aptogo example project...
OMG it makes everything so easy!
I went through my project and deleted all the stupid setups that I had been forced to do to get the other opencv projects to run. Then by adding a single file (OK a framework) opencv just worked!
I've come across a little stumbling block but I think I'm almost past it now.
Basically, everything is done bar reading the numbers.
If you take a photo of a sudoku board I can return an unPerspectived version and cropped to just the board!
|
Thu Mar 08, 2012 11:24 pm |
|
 |
Fogmeister
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 7:35 pm Posts: 6580 Location: Getting there
|
WOOOOO!!!
Got the OCR Working!
ATM it's about 90-95% accurate so when the board loads you have to correct around 3 - 6 cell numbers but apart from that it's working!
WOOOOOO!!!
|
Mon Mar 12, 2012 12:22 am |
|
 |
JJW009
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 6:58 pm Posts: 8767 Location: behind the sofa
|
Sounds like you've broken the back of the challenge, congratulations 
_________________jonbwfc's law: "In any forum thread someone will, no matter what the subject, mention Firefly." When you're feeling too silly for x404, youRwired.net
|
Mon Mar 12, 2012 1:11 am |
|
|