x404.co.uk
http://www.x404.co.uk/forum/

OCR
http://www.x404.co.uk/forum/viewtopic.php?f=4&t=14850
Page 1 of 2

Author:  Fogmeister [ Wed Sep 28, 2011 3:15 pm ]
Post subject:  OCR

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 :D

Author:  JJW009 [ Wed Sep 28, 2011 3:31 pm ]
Post subject:  Re: OCR

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...

Author:  Fogmeister [ Wed Sep 28, 2011 7:27 pm ]
Post subject:  Re: OCR

JJW009 wrote:
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...

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

Author:  JJW009 [ Wed Sep 28, 2011 9:32 pm ]
Post subject:  Re: OCR

LOL - I was reading this article from a couple of weeks ago: http://www.codeproject.com/KB/game/VBSu ... rator.aspx

and 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.

Author:  JJW009 [ Wed Sep 28, 2011 10:32 pm ]
Post subject:  Re: OCR

Bloomin' 'eck - I should have read that news letter better. Further down was this:

http://www.codeproject.com/KB/game/Webc ... olver.aspx

That'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."

Author:  Fogmeister [ Fri Sep 30, 2011 12:53 pm ]
Post subject:  Re: OCR

This might make things a bit easier :D

https://github.com/Haoest/SudokuResolv

At least I'll be able to use that to begin with. Might try to optimise it myself for a later version.

Author:  Fogmeister [ Thu Mar 01, 2012 8:51 am ]
Post subject:  Re: OCR

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!

Author:  rustybucket [ Thu Mar 01, 2012 9:49 am ]
Post subject:  Re: OCR

Oo Oo Oo Oo!

My mum worked on OCR for the Post Office after she was at university. 8-)

Author:  Fogmeister [ Thu Mar 01, 2012 10:21 am ]
Post subject:  Re: OCR

rustybucket wrote:
Oo Oo Oo Oo!

My mum worked on OCR for the Post Office after she was at university. 8-)

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 :D

Hopefully, I'll be recognising sudoku boards before the week is over :D

Author:  Fogmeister [ Wed Mar 07, 2012 8:47 am ]
Post subject:  Re: OCR

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.

Author:  Fogmeister [ Wed Mar 07, 2012 2:35 pm ]
Post subject:  Re: OCR

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!

Author:  Fogmeister [ Thu Mar 08, 2012 10:01 am ]
Post subject:  Re: OCR

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! :D

Author:  Fogmeister [ Thu Mar 08, 2012 11:24 pm ]
Post subject:  Re: OCR

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!

Author:  Fogmeister [ Mon Mar 12, 2012 12:22 am ]
Post subject:  Re: OCR

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!!!

Author:  JJW009 [ Mon Mar 12, 2012 1:11 am ]
Post subject:  Re: OCR

Sounds like you've broken the back of the challenge, congratulations :D

Page 1 of 2 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/