In ImageAnalysis, in images, detect the bounding boxes of barcodes with a ML model or an algorithm of your choice.
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)
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.