Capture images simultaneously on two USB cameras at regular intervals on Android

Asked

Viewed 22 times

-1

Hello I would like some tips on how to develop on Android an application for capturing simultaneous photos at regular intervals, from two USB cameras (MJPEG M12 Lens AR0330 Dual Stereo Micro Mini USB 2.0 Driverless Industrial Camera Module for 3D VR Application) through a simple Timer, for example: every 60 seconds capture 6 images.

  • Hello, welcome to the OS! Please detail your question. With more information it is easier for us to assist you. Are a start aspects like the type of application (whether it is an app or service), camera model, communication protocols, etc.

  • Thank you so much for the tips, I believe it is now clearer and objective

  • So, in summary, your goal is to create a camera app that supports simultaneous capture of two images with timer, correct?

  • yes, exactly that !

1 answer

0

Considering that essentially its goal is to develop a camera app, we start with the references of using external cameras in the development for Android. The system SDK supports the use of USB cameras as explained in this article (in English).

You need to use the API Camera2 to read the camera stream, and at the same time can display that stream in a SurfaceView and, according to your need, make the captures using the same methods of this API. I believe that the tutorials related to the mentioned API should be enough for you to be able to implement this functionality. This Codepath tutorial has some interesting references.

Regarding timing, there are several ways to implement. You can have a service/alarm that, when triggered, starts the camera app, which in turn performs a capture and closes automatically. Or, for example, keep the app open and in your instance, a timer that does this control. Note that in both cases it will be necessary to keep the mobile screen always on, so you will probably need extra permissions, such as the WAKE_LOCK.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.