imageAnalysis = getImageAnalysis();
analyzer = getImageAnalyzer();
Log.d(TAG, "set image analyzer");
imageAnalysis.setAnalyzer(imageAnalyzerExecutor, analyzer);
// Apply declared configs to CameraX using the same lifecycle owner
cameraProvider.bindToLifecycle(this, cameraSelector, preview, imageCapture, imageAnalysis);
@SuppressLint("UnsafeExperimentalUsageError")
@NotNull
private ImageAnalysis.Analyzer getImageAnalyzer() {
return image -> {
//analyze image with tensor flow here
Log.d(TAG,"try to analyze image");
};
}
@NotNull
private ImageAnalysis getImageAnalysis() {
return new ImageAnalysis.Builder()
.setTargetAspectRatio(AspectRatio.RATIO_4_3)
.setBackpressureStrategy(ImageAnalysis.STRATEGY_KEEP_ONLY_LATEST)
.build();
}
--
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/04312aa0-fd8e-458b-ab69-54e1730ec66a%40android.com.
Thanks for your reply yes I'm calling image.close, (I know I haven't added it in this snippet) when I add the image analysis I get the behaviour I've described above so the UI becomes almost unresponsive and the message below the emulator (hold X to rotate camera) flashes constantly like the preview view is being constantly refreshed or redrawn
--
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/7a5e60f4-6805-49b4-b965-e7ec2b0249e8%40android.com.
I think this is probably a bug of the emulator. Can you try to run on real devices and see if there are still issues ?
On Mon, Jan 13, 2020 at 2:16 PM 'martin seal' via Android CameraX Discussion Group <camerax-d...@android.com> wrote:
Thanks for your reply yes I'm calling image.close, (I know I haven't added it in this snippet) when I add the image analysis I get the behaviour I've described above so the UI becomes almost unresponsive and the message below the emulator (hold X to rotate camera) flashes constantly like the preview view is being constantly refreshed or redrawn
--
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-developers+unsub...@android.com.
tried on a real device and your right it seems ok, camera doesnt seem to be refreshed (tell by the focusing) and the analyzer is printing like it should, and the ui seems responsive, strange but many thanks
On Monday, January 13, 2020 at 7:20:00 AM UTC, Scott Nien wrote:
I think this is probably a bug of the emulator. Can you try to run on real devices and see if there are still issues ?
On Mon, Jan 13, 2020 at 2:16 PM 'martin seal' via Android CameraX Discussion Group <camerax-d...@android.com> wrote:
Thanks for your reply yes I'm calling image.close, (I know I haven't added it in this snippet) when I add the image analysis I get the behaviour I've described above so the UI becomes almost unresponsive and the message below the emulator (hold X to rotate camera) flashes constantly like the preview view is being constantly refreshed or redrawn
--
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/7a5e60f4-6805-49b4-b965-e7ec2b0249e8%40android.com.
--
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/e1b5ce25-6ea6-483e-85a3-a2ec51722cf5%40android.com.