This project has moved and is read-only. For the latest updates, please go here.

Windows Store App demo from a webcam

Apr 22, 2013 at 7:55 AM
I just started to look into the project and I really like it. I want to build a small app for Windows 8 to scan bar codes from the live preview of my webcam (similar to the way Barcode Scanner app works on Android).

Just wanted to check with the community first: is anyone already busy with a similar idea or do you have any suggestion?
Apr 22, 2013 at 3:29 PM
I have the same problem. First solution it, get each 1 second photo of your webCam, and try to recognize your image, but it' wrong solution. i think.
Apr 23, 2013 at 2:48 AM
I put together a sample code based on the the existing one and a webcam sample from the Windows SDK. Please check it here:

any comment welcome.
Apr 23, 2013 at 6:55 AM
I find this answer, please check it.
Apr 23, 2013 at 9:58 AM
Thanks for the link. I checked it but I prefer my solution: it is working with the preview activated so it is easy for the user to position the bar code in front of the camera.

The sample I posted works on my machine but it really depends on the webcam performances. I think auto focus is a big issue for example.

I just started to experiment with ZXing so I would really appreciate any advice concerning the best way to implement the "live" decoding. On the android application there is an overlay to help the user positioning the sample and there is also a feedback consisting of yellow dots when the engine detects some patterns.
I am thinking to look into that next.
Apr 23, 2013 at 11:21 AM
Edited Apr 23, 2013 at 11:32 AM
Can you say please, how you get frame/image from video stream or perhaps your have idea how to analize video stream from a web cam? I read, than is not possible in win8.

Is there another way than each second get image with CapturePhotoToStreamAsync() method?
Apr 24, 2013 at 1:56 AM
For now and if you are using managed code I did not find any other way than using CapturePhotoToStreamAsync.

Using C++ and as you can see in the media capture sample the solution would be to implement a filter.

But for the purpose of ZXing I think CapturePhotoToStreamAsync way is acceptable. When I tested with a DispatcherTimer I could get a frame every 300ms (YMMV)
Apr 24, 2013 at 5:47 AM
Can you give me example of code with DispatcherTimer, please?