QR Decoder

Hello folks,

I recently got my Gadgeteer and immediately was able to at first take an simple image and now even view the “live” video on my lcd-screen. Now I want to take it to the next level and am currently trying to decode a QR-Code. I already tried multiple different solutions but the all fail because either System.Drawing.Bitmap is needed or System.Windows.Media.Imaging.WriteableBitmap, seems, those library aren’t available for the gadgeteer…

Any of you got already experience with this stuff on the gadgeteer or any other advice?

You want to show QR code on screen or want to capture on camera and decode?

And please set your name so we can get to know you better :slight_smile:

Welcome to the community.

Thanks :wink:

I want to decode, image taken from the camera module.

This will be a callange, not impossible but you need a beer and some time. Image processing is complex and processor intensive.

The best way would be by finding an existing C library then you port it to RLP. You can do ti in C# but decoding will be too slow, maybe minutes to decode!

This si very interesting project. It would be great if you can make it happen and share your work back with the community.

This is QR-code generator by the way, the opposite from what you need, http://www.tinyclr.com/codeshare/entry/503

You can get access to the Bitmap in Gadgeteer. Check out http://www.tinyclr.com/forum/topic?id=4368&page=1#msg41572

We’ve used GitHub - zxing/zxing: ZXing ("Zebra Crossing") barcode scanning library for Java, Android before in many contexts and it’s worked very well. I believe it’s the decoder that Google uses.

The C# implementation is pretty solid and it uses its own image class (BinaryBitmap) and is therefore platform agnostic.

Nah, I’m unfortunately not that skilled in c, also I just googled around a little, like I suspected, this isn’n an easy task. I think I’ll first try out Zxing (used it already on Android), I’ll report back :wink: Thanks for the help so far!

So I tried out ZXing, I already figured out how to deal with the bitmap stuff I mentioned previously, now I’m stuck at compilation, in fact the Zxing dll I created by building the downloaded VS project depends on System.Drawing. Unfortunately, this doesn’t seem to be part of the Micro Framework, I just could download it from the Internet but I guess that isn’t quite a solution.
I’m really sorry for asking such noobish questions, but I’m completely new to Windows development (iPhone is more my stuff ;)) and I’m pretty stuck :frowning:

Here’s the error message

Error 2 The type ‘System.Drawing.Bitmap’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘System.Drawing, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’. …\GadgeteerApp4\Program.cs 54 17 GadgeteerApp4

You must copy the code for the DLL into your netmf project and compile it there.

You might need to hunt down any helper functions that convert from System.Windows to ZXing and comment them out to get it to build.

Mhm, still not that easy. Now I get

Warning 10 The project ‘zxing’ cannot be referenced. The referenced project is targeted to a different framework family (.NETFramework)

and in addition this one

Error 7 Unable to copy file “C:\Users\xxx\Downloads\ZXing-2.1\zxing-2.1\csharp\LE\zxing.pe” to “bin\Debug\LE\zxing.pe”. Could not find a part of the path ‘C:\Users\xxxx\Downloads\ZXing-2.1\zxing-2.1\csharp\LE\zxing.pe’. GadgeteerApp4