Jump to content

Barcode interpreter


codingmasterRS

Recommended Posts

Hi guys, to compliment my ORM.

 

On the multiple choice sheets which are scanned into images and then interpreted with the OMR thier is a barcode (like the ones on stuff you buy from the shops), this barcode contains digits to decide the layout of the sheet and how to run the OMR. How can I get PHP to read and understand the barcode. The barcode is originally generated by PHP and now I need PHP to read it and convert to numbers which then I run against mySQL db to enable the OMR to read correctly.

 

If anyone can suggest a script or method or even a different way to tackle the issue it would be greatly appreciated. Thanks in advance.

Link to comment
Share on other sites

Hmm,

 

This is a good, and interesting one.

 

I'm not sure PHP itself would be able to. However, HTML 5, Javascript and PHP probably would be able to together.

 

Heres why:

 

*HTML 5 : Canvas which has a measure pixels feature. This could measure the amount of pixels the bar code, bar is thick(Just one little black bar).

 

http://w3schools.com/html5/html5_canvas.asp

 

 

 

 

*Javascript : Using the previous example, you could loop through all of the bars and the spaces between them.

 

http://w3schools.com/js/js_loop_while.asp

 

 

 

*PHP : Insert the data into a Database and keep for further notice.

 

http://php.net/mysql_query

 

 

 

URL's just for reference

~~~~

 

I may be wrong about this. But it seems reasonable to me.

 

 

Link to comment
Share on other sites

I'm not sure that PHP can be made to interpret images like this. Perhaps I'm just not familiar enough with image processing in PHP, but I'm not sure you're going to be able to use PHP to convert an image of a barcode with the barcode number into a text number that PHP can understand.

 

It sounds like you need a barcode reader and software that will send the read barcodes to a PHP script as an integer or string.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.