It is currently Tue Jun 27, 2017 7:06 pm



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Image to Text
Unread postPosted: Sat May 06, 2017 6:10 am 
Offline

Joined: Mon Oct 22, 2012 7:32 am
Posts: 139
Does anyone have experience converting image to text.
I wrote a BINGO system that allows you to play multiple cards at once as is the norm at most places.
It has on file multiple win patterns.

When you play you are given several sheets usually with about 4 to 6 card layouts per sheet.
I have to manually enter the card info that takes a lot of time. I'd like to get this info automatically.
When playing the game, the sheet you select is displayed with the multiple card layouts.
You enter the called numbers and the proper boxes are marked and displayed. If any card matches any win pattern that card blinks and it says "BINGO".

The system works great, except for the time to input the sheet info.

I'd like to photo each sheet and store the data in a database with the sheet number, card number,and the column and row numbers.

Thanks for the help..
Dan


Report this post
Top
 Profile  
 
 Post subject: Re: Image to Text
Unread postPosted: Sat May 06, 2017 6:36 am 
Offline
User avatar

Joined: Wed Jul 10, 2013 8:11 am
Posts: 359
Hi Dan,

Quote:
Does anyone have experience converting image to text.


Try ENCODE$() and DECODE$() with "BASE64" like eMail attachments.

Gregor

EDIT Quote


Last edited by aFox on Sat May 06, 2017 8:55 am, edited 1 time in total.

Report this post
Top
 Profile  
 
 Post subject: Re: Image to Text
Unread postPosted: Sat May 06, 2017 7:21 am 
Offline

Joined: Tue Dec 04, 2012 10:50 am
Posts: 659
Location: UK
aFox wrote:
Try ENCODE$() and DECODE$() with "BASE64" like eMail attachments.

I'm baffled! But perhaps because I have never played bingo...

I thought the point was to do character recognition. Not sure why, though...

Mike.


Report this post
Top
 Profile  
 
 Post subject: Re: Image to Text
Unread postPosted: Sat May 06, 2017 8:21 am 
Offline
User avatar

Joined: Thu Nov 21, 2013 7:00 pm
Posts: 639
mjcoon wrote:
I'm baffled!..


Yes, the OP is looking for OCR method to recognise numbers in a grid on a sheet, furthur complicated that
each sheet contains more than one layout.

I think it would be interesting to see if anyone can do this for even just one card.
Has anyone even tried to scan a bitmap??

_________________
- Failure is not an option. It is bundled with the software. -


Report this post
Top
 Profile  
 
 Post subject: Re: Image to Text
Unread postPosted: Sat May 06, 2017 10:03 am 
Offline

Joined: Mon Oct 22, 2012 7:32 am
Posts: 139
Quote:
Yes, the OP is looking for OCR method to recognise numbers in a grid on a sheet, furthur complicated that
each sheet contains more than one layout.


Here is an example of 6 cards on one sheet. I've seen them as high as 8 per.
http://www.bingomachine.biz/printbingocards.html
I need to scan sheets like this create information about each card..


Report this post
Top
 Profile  
 
 Post subject: Re: Image to Text
Unread postPosted: Sat May 06, 2017 10:32 am 
Offline
User avatar

Joined: Thu May 16, 2013 2:58 pm
Posts: 179
May this will be help you:
https://github.com/renard314/textfairy

_________________
My Apps on the Google Play Store.

Please click on the Banner below, thank you!
Image


Report this post
Top
 Profile  
 
 Post subject: Re: Image to Text
Unread postPosted: Sat May 06, 2017 11:00 am 
Offline
User avatar

Joined: Sat Mar 26, 2016 9:23 am
Posts: 94
I use Textdairy myself.

Good stuff, Maynard!


Report this post
Top
 Profile  
 
 Post subject: Re: Image to Text
Unread postPosted: Sun May 07, 2017 10:51 am 
Offline
User avatar

Joined: Thu Nov 21, 2013 7:00 pm
Posts: 639
dtrieb's suggestion was my first thought, i.e a native call to do the OCR.
It seems a like a long and involved way to do it, but looks doable either with a shell call (SYSTEM)
or JNI (even more complex).

Another obvious way is to do it entirely in BASIC! with Gr.get.bmpixel. But scanning every single
pixel into an array (which someone has asked before) for an OCR algorithm will be slow and clunky.

Then I thought you may not have to scan every pixel. If you can find the corners of one bingo card
on a sheet, then you can guess where a cell is inside the grid. You can then Gr.get.bmpixel relative
selected pixels to work out what number it is. Do this for every cell to get all the numbers. I think it
will be fast enough. The problem is ofcourse finding the corners of the card.

_________________
- Failure is not an option. It is bundled with the software. -


Report this post
Top
 Profile  
 
 Post subject: Re: Image to Text
Unread postPosted: Sun May 07, 2017 8:38 pm 
Offline

Joined: Sat Dec 22, 2012 2:32 pm
Posts: 834
Doing it from the scratch in BASIC! sounds like an interesting challenge. "Fast enough" could be (roughly) defined as " at least as fast as an manual input".

I think success depends strongly on quality of the input-bmp:

-> has it always a good /precise rectangular alignment, as it would have with sceenshot ?

-> or can it have slight rotations and/or other distortions as it would have with a (free-handed) photo?


Report this post
Top
 Profile  
 
 Post subject: Re: Image to Text
Unread postPosted: Mon May 08, 2017 8:57 am 
Offline
User avatar

Joined: Thu Nov 21, 2013 7:00 pm
Posts: 639
>Doing it from the scratch in BASIC! sounds like an interesting challenge..
I was hoping to stir up enough interest for someone to have a go!
I don't have enough time to do much coding these days, but talking about it is easy.

Assuming a good quallity bitmap and alignment;
The problem is hampered because there are 6 cards on a sheet and you have to know
the location of the four corners of each card.
However, there is no reason why a quick 'cropping' routine (user streching a square over a card)
cannot just crop out each card for the main scanning routine. Then you don't have to find the
corners.

_________________
- Failure is not an option. It is bundled with the software. -


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ]  Go to page 1, 2, 3  Next


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
suspicion-preferred