vignesh prakash
vignesh prakash

Reputation: 11

CameraX Android jetpack ROI

How to implement region of interest in cameraX? In cameraX the particular region should scanned for barcode and text recognition.

Upvotes: 0

Views: 310

Answers (1)

Orcun
Orcun

Reputation: 678

Overall the flow you would need is this:

  1. Implement CameraX with ImageAnalysis use case.
  2. In ImageAnalysis, in images, detect the bounding boxes of barcodes with a ML model or an algorithm of your choice.
  3. Crop the region from the image and send it to your preferred barcode scan library for a result.(Image could be converted to a bitmap and apply cropping on it)
  4. Bonus: If you want, you can pass all image to MLKit and it will return you the barcode string as well as bounding box of the barcodes. Here is a guide for this.

Upvotes: 2

Related Questions