Biatu Posted June 16, 2013 Share Posted June 16, 2013 (edited) I was trying to find a good way to read barcodes, but there were not many I could find without going through the pain of recompiling, or spend +$299 for just reading. Makes use of: -WebcamDS_UDF by frank10 -_WinAPI_ClearConsole by rover -FastFind by FastFrench, frank10 Note, this requires java so far, and this script is not yet optimized. It currently supports the following barcodes: -Aztec Code (Full support as far as i can see!) -Code 128 (ISO 15417, seems to only support 12 digits.) -Code 39 (ISO 16388, Seems to be limited to, 0-9, aA-zZ, 5 digits.) -Code 93 (Mostly A-Z, 0-9, Special Characters act odd) -Databar -Data Matrix(ISO 16022, seems to be fully supported) -ITF 14 -PDF417 -QR Code -UPC-A -UPC-E -EAN 14 (Reads as Code 128) Tested with Microsoft HD 5000 Webcam. Used Zint Barcode generator, DL License, Various random other barcodes for testing. Latest Version (2013.06.16): http://www.mediafire.com/download/15ykljpfbsbzfox/BarcodeReader.7z Edit: Updated URL Enjoy Edited June 19, 2013 by Biatu mesale0077 1 What is what? What is what. Link to comment Share on other sites More sharing options...
Zedna Posted June 16, 2013 Share Posted June 16, 2013 (edited) It can't be downloaded without sign-in. I think it will be better to upload it somewhere else ... Edited June 16, 2013 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Zedna Posted June 16, 2013 Share Posted June 16, 2013 Can't Seems to edit my 1st post : There are some limitations on this forum for users with only few posts. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
cardinalse Posted August 26, 2013 Share Posted August 26, 2013 Why not use some free version of barcode reader on google? Link to comment Share on other sites More sharing options...
Biatu Posted September 2, 2013 Author Share Posted September 2, 2013 (edited) Why not use some free version of barcode reader on google? This one is free, opensource, and you can use autoit to parse the information. I already built a decoder that read the PDF-417 barcode on the back of a driver's license. it was of use to me, might be of use to someone else that wants to do something with the data. I have no reason to improve this program either...unless that is someone finds it useful. :/ Edited September 2, 2013 by Biatu What is what? What is what. Link to comment Share on other sites More sharing options...
Lakes Posted September 3, 2013 Share Posted September 3, 2013 Too many hoops to jump through with mediafire, upload to dropbox or similar filesharing please. 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
alankam58 Posted September 5, 2013 Share Posted September 5, 2013 cannot download from mediafire, please upload to other filesharing. thank you Link to comment Share on other sites More sharing options...
Myicq Posted September 5, 2013 Share Posted September 5, 2013 Do you have any kind of instructions on how to make it actually output something ? I get the webcam image, point to a supported code (datamatrix) and nothing happens ? I do not have the mentioned drivers license with PDF417 code... I am just a hobby programmer, and nothing great to publish right now. Link to comment Share on other sites More sharing options...
mesale0077 Posted September 5, 2013 Share Posted September 5, 2013 okey but webcam udf dont work why? Link to comment Share on other sites More sharing options...
Biatu Posted September 28, 2013 Author Share Posted September 28, 2013 DropBox Link: https://www.dropbox.com/s/ex4lwibeeo78juj/BarcodeReader.7z okey but webcam udf dont work why? What do you mean? I would need to know what the issue is. Do you have any kind of instructions on how to make it actually output something ? I get the webcam image, point to a supported code (datamatrix) and nothing happens ? I do not have the mentioned drivers license with PDF417 code... The app works by taking various snapshots, then piping that data into the zxing java applet. The information should be shown on the console window. I will run some tests and try some different barcodes to see if there are any bugs i missed What is what? What is what. Link to comment Share on other sites More sharing options...
Biatu Posted May 1, 2015 Author Share Posted May 1, 2015 okey but webcam udf dont work why?Sorry for extremely late reply but the reason the webcam udf dont work is because its coded to open the webcam in 1280x720 with a 24bpp What is what? What is what. Link to comment Share on other sites More sharing options...
TouchOdeath Posted May 11, 2015 Share Posted May 11, 2015 Do you have any kind of instructions on how to make it actually output something ?Looks pretty cool but ^^ Link to comment Share on other sites More sharing options...
TouchOdeath Posted May 11, 2015 Share Posted May 11, 2015 Do you have any kind of instructions on how to make it actually output something ?Looks pretty cool but ^^ Link to comment Share on other sites More sharing options...
Qwerty212 Posted July 7, 2015 Share Posted July 7, 2015 Thanks a lot for sharing it with us. I need to take a look at it because I need to use the built in webcam of a tablet as qr reader inside one aplication. Greets from Barcelona Link to comment Share on other sites More sharing options...
Qwerty212 Posted August 26, 2015 Share Posted August 26, 2015 I have edited the code from Biatu for my pourposes and I would like to share it with you.Maybe someone could find it necessary.Some of the changes are:-In my app I don't want to have a huge webcam screen (just a little region where the code will be readed), but without zooming or loosing resolution.-I do not need to change between cameras, I'm always going to use the same video device, so the selection combobox is gone-I'm going to decode the codes with a dll calling (I don't know if it works faster than the java solution) This is a ripped version of my script:expandcollapse popup#include <Misc.au3> #include <Memory.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiComboBox.au3> #include ".\Data\WebcamDS_UDF.au3" #include <Constants.au3> #include <ScreenCapture.au3> #include <GUIConstants.au3> Global $camnumber = 1;in my case I do not need to cange between cameras, I'm always going to use the rear camera of a tablet pc ;the camera index starts by 1. If you have a laptop with one built-in camera and an external usb camera you have to set the desired ;one changing te value of this variable. Global $UserDLL = DllOpen("user32.dll") Global Const $QR = @ScriptDir & '\Data\temp.bmp' Global $msg Opt("MustDeclareVars", 1) _WebcamDS_Init() Global $hGUI = GUICreate("QR Reading", 300, 300);;set gui size according to the size of the codes that you are going to read GUISetState() _WebcamDS_RenderWebcam($camnumber, 0, $hGUI, 0, 640, 480, 16) ;The third parameter can be a zero (the image of the webcam will be cropped, so the size of the window needed to decode codes doesn't need ;to be as big as the full resolution of the camera) ;_WebcamDS_RenderWebcam($camnumber, 0, $hGUI, 0, 1280, 720, 24);if you have an hd cam then you might better use this resolution AdlibRegister("Snapper", 500) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE GUIDelete() _WebcamDS_ReleaseObjects(1) DllClose($UserDLL) FileDelete($QR) Exit EndSelect WEnd Func Snapper() _ScreenCapture_CaptureWnd($QR, $hGUI, 0, 0, -1, -1, False); we take a picture of the gui with the video stream only. It increases the performance Local $hDll = DllOpen(@ScriptDir & '\Data\QRCodeDecodeDll.dll') Local $Ret = DllCall($hDll, 'ptr', 'QRCodeDecodeImageFile', 'str', $QR, 'int*', 0) If $Ret[0] Then Local $data = BinaryToString(StringToBinary(_WinAPI_GetString(DllStructGetData(DllStructCreate('ptr', $Ret[0]), 1), 0), 1), 4) ConsoleWrite($data & @CRLF) DllCall($hDll, 'none', 'QRCodeFree', 'ptr', $Ret[0], 'int', $Ret[2]) EndIf DllClose($hDll) EndFunc ;==>Snapper Func _Exit() _WebcamDS_ReleaseObjects(1) DllClose($UserDLL) FileDelete($QR) Exit EndFunc ;==>_ExitThe dll that does the decoding comes from here: http://www.aipsys.com/sdk-download/by-platform/sdk-for-microsoft-windows.htmlThere is an dll for every kind of code, so, in my aplication I only need the qr dll. If you need more than one then you have to try some other solutions.All credits must go to this thread in a russian autoit forum: http://autoit-script.ru/index.php?SESSIONID=2371sci0hqd9s8v3fslf429fh5&topic=10872.msg71688#msg71688 (I don't know if he is the same Yashied from here, anyway thanks!) Greets from Barcelona QR.zip Biatu 1 Link to comment Share on other sites More sharing options...
Biatu Posted September 3, 2015 Author Share Posted September 3, 2015 I have edited the code from Biatu for my pourposes and I would like to share it with you.Maybe someone could find it necessary.Some of the changes are:-In my app I don't want to have a huge webcam screen (just a little region where the code will be readed), but without zooming or loosing resolution.-I do not need to change between cameras, I'm always going to use the same video device, so the selection combobox is gone-I'm going to decode the codes with a dll calling (I don't know if it works faster than the java solution) This is a ripped version of my script:expandcollapse popup#include <Misc.au3> #include <Memory.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiComboBox.au3> #include ".\Data\WebcamDS_UDF.au3" #include <Constants.au3> #include <ScreenCapture.au3> #include <GUIConstants.au3> Global $camnumber = 1;in my case I do not need to cange between cameras, I'm always going to use the rear camera of a tablet pc ;the camera index starts by 1. If you have a laptop with one built-in camera and an external usb camera you have to set the desired ;one changing te value of this variable. Global $UserDLL = DllOpen("user32.dll") Global Const $QR = @ScriptDir & '\Data\temp.bmp' Global $msg Opt("MustDeclareVars", 1) _WebcamDS_Init() Global $hGUI = GUICreate("QR Reading", 300, 300);;set gui size according to the size of the codes that you are going to read GUISetState() _WebcamDS_RenderWebcam($camnumber, 0, $hGUI, 0, 640, 480, 16) ;The third parameter can be a zero (the image of the webcam will be cropped, so the size of the window needed to decode codes doesn't need ;to be as big as the full resolution of the camera) ;_WebcamDS_RenderWebcam($camnumber, 0, $hGUI, 0, 1280, 720, 24);if you have an hd cam then you might better use this resolution AdlibRegister("Snapper", 500) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE GUIDelete() _WebcamDS_ReleaseObjects(1) DllClose($UserDLL) FileDelete($QR) Exit EndSelect WEnd Func Snapper() _ScreenCapture_CaptureWnd($QR, $hGUI, 0, 0, -1, -1, False); we take a picture of the gui with the video stream only. It increases the performance Local $hDll = DllOpen(@ScriptDir & '\Data\QRCodeDecodeDll.dll') Local $Ret = DllCall($hDll, 'ptr', 'QRCodeDecodeImageFile', 'str', $QR, 'int*', 0) If $Ret[0] Then Local $data = BinaryToString(StringToBinary(_WinAPI_GetString(DllStructGetData(DllStructCreate('ptr', $Ret[0]), 1), 0), 1), 4) ConsoleWrite($data & @CRLF) DllCall($hDll, 'none', 'QRCodeFree', 'ptr', $Ret[0], 'int', $Ret[2]) EndIf DllClose($hDll) EndFunc ;==>Snapper Func _Exit() _WebcamDS_ReleaseObjects(1) DllClose($UserDLL) FileDelete($QR) Exit EndFunc ;==>_ExitThe dll that does the decoding comes from here: http://www.aipsys.com/sdk-download/by-platform/sdk-for-microsoft-windows.htmlThere is an dll for every kind of code, so, in my aplication I only need the qr dll. If you need more than one then you have to try some other solutions.All credits must go to this thread in a russian autoit forum: http://autoit-script.ru/index.php?SESSIONID=2371sci0hqd9s8v3fslf429fh5&topic=10872.msg71688#msg71688 (I don't know if he is the same Yashied from here, anyway thanks!) Greets from BarcelonaQR.zipVery good. Dll is definately better. However at the time of coding this, I was looking for a way to use a dll from zxing to decode all kinds of barcodes I throw at it, but I couldn't find a way to implement the Dll calls, nor a way to work without a temporary file. So I used java as a fallback. What is what? What is what. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now