Skip to content

[mlkit-barcode-detection] detectWithStillImage does not detect barcode #34

Open
@kyao-Frndz

Description

@kyao-Frndz

I am using the detectWithStillImage to detect QR codes from local Image sources on android. The image is seen as a Bitmap but returns no response or error.

my implementation code:

import { DetectionEvent, DetectionType, detectWithStillImage, StillImageDetectionOptions } from "@nativescript/mlkit-core";

const image = ImageSource.fromFile(imagePath);

detectQRCode(image: any) {
    const options: StillImageDetectionOptions = {
      detectorType: DetectionType.Barcode,
      barcodeScanning: {
        barcodeFormat: [BarcodeFormats.QR_CODE],
      },
    };

    detectWithStillImage(image, options)
      .then((image) => {
        console.log(image);
      })
      .catch((error) => {
        console.log(error);
      });
  }

Any assistance on this will be appreciated, thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions