codingmasterRS Posted October 1, 2010 Share Posted October 1, 2010 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. Quote Link to comment Share on other sites More sharing options...
DarkMantis Posted October 1, 2010 Share Posted October 1, 2010 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. Quote Link to comment Share on other sites More sharing options...
codingmasterRS Posted October 1, 2010 Author Share Posted October 1, 2010 Okay I will look into it, in the meantime anyone else if you could post suggestions. Oh and PS it is processing images in the background as a cron style process so it needs to do it for that. Quote Link to comment Share on other sites More sharing options...
ialsoagree Posted October 1, 2010 Share Posted October 1, 2010 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. Quote Link to comment Share on other sites More sharing options...
codingmasterRS Posted October 1, 2010 Author Share Posted October 1, 2010 How about code which will read an interpret pre printed digits located in a certain spot? Anyone know of PHP code which can do that? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.