Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
darzon
10
Years of Service
User Offline
Joined: 23rd Oct 2010
Location: Italy
Posted: 10th Jul 2017 13:06

Hi, I need help about qr code.

there is an example here:
https://www.appgamekit.com/documentation/Reference/Image/DecodeQRCode.htm

I create the apk from the example, install it on device. But the app call the device camera software , I dont want it
I dont' want to use the software of the camera

this what i want :
I need to make a simple app on android device that
1) start rear camera device (with not use the camera software of device) .
2) camera see the qrcode printed
3) when recognize it, print on screen the string of qrcode

anyone can help me ?

thank you


Coilwinder
7
Years of Service
User Offline
Joined: 28th Feb 2013
Location: Norway
Posted: 10th Jul 2017 19:15 Edited at: 11th Jul 2017 00:33
I took it upon myself I meant I wanted to test this too (not that I really know what I'm doing, just enough to be dangerous I guess). I was about to give up when I suddenly got a result. It has trouble getting a recognition when the (android) tablet is in (or rotated to) landscape mode, but that's probably just me not knowing how to scale sprites / images when rotating it (aspect ratio was wrong too). Even if I rotated it back to portrait, it wouldn't find the QR code (at least not in my few tests now). If someone can improve this feel free to post, ofc

But if I started broadcasting while holding it in portrait mode, and decoding QR while still in portrait mode, it seems to work pretty well!

I figured the solution to your inquiry was somewhere between your example code, and the documentation example for SetDeviceCameraToImage

Here is a page to generate QR codes to test with.

The frame rate is not very good, very likely from trying to recognize every frame with this method.





EDIT: Clarification and some grammar-ish stuff
Apologies for any typos and strange grammar.
darzon
10
Years of Service
User Offline
Joined: 23rd Oct 2010
Location: Italy
Posted: 11th Jul 2017 17:49
thank you very very much Coilwinder.
so with your code the app don't call the camera software of device . I have understand good ?
I try it and I will you a response soon


thank you
Coilwinder
7
Years of Service
User Offline
Joined: 28th Feb 2013
Location: Norway
Posted: 11th Jul 2017 19:25
Yes that's right. No camera / photo app, just a live view. But with a slow FPS, due to trying to decode every frame. When a code is found, the camera capture is ended.

The code is essentially the same as the one you linked to (DecodeQRCode), I only changed it slightly, as you can see ( I changed the "getCamImage" function, by following the SetDeviceCameraToImage example linked above ).

Actually, it works better than I thought! I zoomed in (enlarged on-screen) the QR image too much, to really get a "good" image capture). That was not necessary. Now that I don't zoom in, nor put the tablet up-close to the monitor, I get a decode pretty quick! Even when rotating the tablet. The aspect ratio is still wrong, but that doesn't seem to be important for decoding QR (I guess that's "simply" a matter of getting the width/height of the sprite correct).
Apologies for any typos and strange grammar.
darzon
10
Years of Service
User Offline
Joined: 23rd Oct 2010
Location: Italy
Posted: 28th Aug 2017 22:25
hi,Coilwinder I return on this post
to ask you if is possibile modify the the script to create a sprite on camera vieport
like all QrCode have
for example like this image I attach
naturally the white is tranparent
thank yout

Attachments

Login to view attachments

Login to post a reply

Server time is: 2020-11-30 14:14:47
Your offset time is: 2020-11-30 14:14:47