1

I was to use the Raspberry Pi3 and iBall camera to scan QR code. I am totally new to this domain. I have 8 years of experience in Embedded C coding. Can anyone let me know how to start, what all things will I need and if there is any free stack available for same in C language?

Your replies will definitely help.

Best Regards

2

For QR Code readers, I have had some success with xZing, its quite fast and can be found here. https://github.com/zxing/zxing

To keep things simple, you just need to pass a raw image and you get the contents of the barcode. The c# example below is gives simple illustration, I'm pretty sure the c/c++ port is just as easy to use.

// create a barcode reader instance
IBarcodeReader reader = new BarcodeReader();
// load a bitmap
var barcodeBitmap = (Bitmap)Bitmap.LoadFrom("C:\\sample-barcode-image.png");

// detect and decode the barcode inside the bitmap
var result = reader.Decode(barcodeBitmap);

// do something with the result
if (result != null)
{
   txtDecoderType.Text = result.BarcodeFormat.ToString();
   txtDecoderContent.Text = result.Text;
}

Code above from https://zxingnet.codeplex.com/

0

Start with a block diagram with the capabilities. Start with taking a photo of the target. For example:

sudo apt-get install fswebcam
fswebcam test.jpg

If successful then you can consider writing a routine in C to pull images for image processing from OpenCV.

I have yet to see free barcode reader source code: if you find this Unicorn, be sure to post a link to it for others.

Unless this is a pedagogical exercise, building this a barcode scanner from a camera is a lot of work when you can simply buy a USB scanner for $20. The capture and decode functionality is baked into the USB scanner. You can either use existing Python evdev to read the characters or 'roll your own' in C. Python was fast and the route that others have successfully and quickly navigated

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.