QR Code for launching a native application

To scan barcodes in Android by Intent, see https://github.com/zxing/zxing/wiki/Scanning-Via-Intent To trigger an app from a QR code, yes, you need to register the app to handle the particular custom URL scheme. This is how the same app can respond to clicks on the web: https://github.com/zxing/zxing/wiki/Scanning-From-Web-Pages Look at how it registers to handle URLs here: https://github.com/zxing/zxing/blob/master/android/AndroidManifest.xml

Unity Zxing QR code scanner integration

I was looking for integrating Zxing with vuforia in Unity today. The first thing to do is to download the dll from : https://zxingnet.codeplex.com/ and copy the unity dll into your Plugins folder (which should be in the Assets folder) Then, I managed to found some examples (some of theses is outdated) : http://ydaira.blogspot.fr/2012/09/how-to-decode-qr-codes-using-unity3d.html https://github.com/Redth/ZXing.Net/blob/master/Clients/VuforiaDemo/Assets/VuforiaScanner.cs … Read more

Integrate ZXing QR code scanner without installing BarCode Scanner

Finally I got the answer, As of ADT 14,the resource fields(such as R.id.decode) are no longer constants when defined in library projects So in the ZXing library->android->com.google.zxing.client.android.CaptureActivityHandler.java and DecodeHandler.java Replace both of these classes switch case statements with if-else,and then import this ZXing library into your project.. Rest of the coding of my own project … Read more

How to generate QR code with logo inside it?

You can add your logo it as an Image Overlay like public BufferedImage getQRCodeWithOverlay(BufferedImage qrcode) { BufferedImage scaledOverlay = scaleOverlay(qrcode); Integer deltaHeight = qrcode.getHeight() – scaledOverlay.getHeight(); Integer deltaWidth = qrcode.getWidth() – scaledOverlay.getWidth(); BufferedImage combined = new BufferedImage(qrcode.getWidth(), qrcode.getHeight(), BufferedImage.TYPE_INT_ARGB); Graphics2D g2 = (Graphics2D)combined.getGraphics(); g2.drawImage(qrcode, 0, 0, null); g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, overlayTransparency)); g2.drawImage(scaledOverlay, Math.round(deltaWidth/2), Math.round(deltaHeight/2), null); return combined; … Read more

How do I use the metadataOutputRectOfInterestForRect method and rectOfInterest property to scan a specific area? (QR Code)

I wasn’t really able to clarify the issue with metadataOutputRectOfInterestForRect, however, you can directly set the property as well. You need to the have the resolution in width and height of your video, which you can specify in advance. I quickly used the 640*480 setting. As stated in the documentation, these values have to be … Read more

Android, How to read QR code in my application?

try { Intent intent = new Intent(“com.google.zxing.client.android.SCAN”); intent.putExtra(“SCAN_MODE”, “QR_CODE_MODE”); // “PRODUCT_MODE for bar codes startActivityForResult(intent, 0); } catch (Exception e) { Uri marketUri = Uri.parse(“market://details?id=com.google.zxing.client.android”); Intent marketIntent = new Intent(Intent.ACTION_VIEW,marketUri); startActivity(marketIntent); } and in onActivityResult(): @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == 0) { if (resultCode … Read more

Python – Detect a QR code from an image and crop using OpenCV

Here’s a simple approach using thresholding, morphological operations, and contour filtering. Obtain binary image. Load image, grayscale, Gaussian blur, Otsu’s threshold Connect individual QR contours. Create a rectangular structuring kernel with cv2.getStructuringElement() then perform morphological operations with cv2.MORPH_CLOSE. Filter for QR code. Find contours and filter using contour approximation, contour area, and aspect ratio. Detected … Read more

QR Code possible data types or standards

Basically your text information has to be identifiable for what it is: There is a very good summary here. Contact data – use MeCard, or vCard (much more verbose), e.g.: MECARD:Surname, First;ADR:123 Some St., Town, Zip Code, Country;EMAIL:some_name@some_ip.com;TEL:+11800123123;BDAY:19550231;; Gives: Calendar data – There are two formats about iCalendar (.ics) & vCalendar (.vcs). These formats can … Read more