Extending the ImageAnalysisConfig, can we already or are there any plans to support it?

313 views
Skip to first unread message

Iain Stanford

unread,
Aug 14, 2019, 11:18:10 AM8/14/19
to Android CameraX Discussion Group
Hi

I'm basically looking into the viability for CameraX and image analysis of the preview images returned by the Camera.

So far, I've had some success getting it all setup, but initially I noticed there wasn't really any ability to control the camera settings when using an ImageAnalysisConfig builder. So the preview it was scraping was locked to default settings, returning something like 16ish FPS on my current device, and no ability to alter AE, frame duration, or even turning the torch on/off.


However I discovered that if I spin up a PreviewConfig at the same time, and alter the camera settings in *that*, then the Image Analyzer would suddenly start getting better frame rates.

Similarly, if I used the Camera2Config.Extender on the PreviewConfig to set AE to (60,60) target FPS, turn the Torch on etc, then the camera settings would all work fine, and the ImageAnalyzer would start scraping frames at 60 fps :thumbsup:


Is this all by design? Are we expected to use a PreviewConfig to alter the camera settings for an ImageAnalyzer or is there plans to allow using Camera2Config.Extender (or any other extenders) on ImageAnalysisConfig instances too so we can run image analysis without the dependency on preview builders?

Cheers!
-Iain

Vinit Modi

unread,
Aug 15, 2019, 8:58:54 PM8/15/19
to Iain Stanford, Android CameraX Discussion Group
Hi Iain,

Thanks for the outreach and feedback. Some follow up questions/comments:
  • Which device(s) were you trying this with? 
  • Can you share your use case with us? Typically we anticipate that the preview use case is running alongside image analyzer 
Separately we are working on a camera control class where things like AE, AF, etc. would reside. Thanks!

Vinit

--
You received this message because you are subscribed to the Google Groups "Android CameraX Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camerax-develop...@android.com.
To view this discussion on the web visit https://groups.google.com/a/android.com/d/msgid/camerax-developers/c4b36f8a-8a97-4963-a2af-28b055b5fc2e%40android.com.

Iain Stanford

unread,
Aug 16, 2019, 3:16:11 AM8/16/19
to Android CameraX Discussion Group, ia...@epichealth.io
Hi

I was just running it on my Moto G6+ device, it has support for [60,60] AE but the default seemed to only produce around 16fps.

So my use case is certainly very niche, but basically were using the camera to image process but not actually display what the camera can see. Specifically, we were using it to produce a PPG signal from the camera lens where by we only show the preview during the "setup" phase for the user to understand whats going on, but after this the preview is no longer displayed to the user.

I was wondering if there would be any performance costs with having the preview running alongside and not being displayed? Would in theory we get a better FPS from the the image analyzer (or have more processing time available to us) if CameraX was only outputting data to an ImageAnalyzer?

CameraControl class sounds good, would all the Camera2 properties be available there? (TorchMode, SceneMode, SensorDuration, SensorSensitivity etc?)

Vinit Modi

unread,
Aug 16, 2019, 6:51:14 PM8/16/19
to Iain Stanford, Android CameraX Discussion Group
Hi Iain,

Speaking to the team there should not be a slowdown in FPS when just using image analysis, can you please file a bug in the public issue tracker and we can update you there? 
Android Public Tracker > App Development > AndroidX (Support Library) > Camera

Thanks much!
Vinit

--
You received this message because you are subscribed to the Google Groups "Android CameraX Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camerax-develop...@android.com.
Reply all
Reply to author
Forward
0 new messages