Geraldo Neto
Geraldo Neto

Reputation: 4030

Android CameraX multiple Analyzers

Is it possible to add multiple ImageAnalysis.Analyzer instances (use cases) at the same time using CameraX API?

For instance:

You need to run an Object Detector and Barcode Detector simultaneously.

Thanks in advance!

Upvotes: 3

Views: 742

Answers (2)

Ahmad
Ahmad

Reputation: 76

Setting an analyzer function replaces any previous analyzer. Only one analyzer can be set at any time.

Setting an analyzer will signal to the camera that it should begin sending data. The stream of data can be stopped by calling clearAnalyzer()

Upvotes: 0

Gerry
Gerry

Reputation: 1233

Only one analyzer could be registered at any time. You might have to chain your analyzers in your app with its own image copies, probably in different threads.

Upvotes: 3

Related Questions