dokun1 / Lumina

A camera designed in Swift for easily integrating CoreML models - as well as image streaming, QR/Barcode detection, and many other features
https://david.okun.io
MIT License
898 stars 91 forks source link

QRCode box overlay #80

Open aabanaag opened 6 years ago

aabanaag commented 6 years ago

Is it possible to implement an overlay to show where the qrcode is in the camera feed? just like this https://www.appcoda.com/barcode-reader-swift/

Was wondering how can I get the videoPreviewLayer of the camera so I can use transformedMetadataObject

dokun1 commented 6 years ago

Hi @aabanaag - thanks for your comment!

So, funny enough, this existed in a previous pre-release build of Lumina. You can see the source code here.

I think I abandoned this because I got a bit obsessed with implementing the other newer stuff and re-organizing the architecture, and this didn't fit in immediately, especially differentiating between face detection and QR code detection. Also, I didn't see an immediate need for drawing a rect around it as detecting it was more necessary.

However, if there's a need for it, then I can definitely look at putting it back in 👍 let me know your thoughts.

aabanaag commented 6 years ago

well, initially I thought it would be needed as you can basically track the metadata within the camera feed but I think the best way to do it is add toggle for it because just like the native camera of the iPhone it doesn't track the qrcode. :)