Skip to content

sonyxperiadev/CameraTest

Repository files navigation

CameraTest application

Test application used to learn the Camera2 API and investigate the behaviour of different Android camera stacks.

This application consists of multiple independent modules.

Multi Camera

The Camera2 API allows multiple cameras to be opened simultaneously, which this module allows the user to do. Each open camera runs a TEMPLATE_PREVIEW repeating request outputting into a TextureView.

Parallel Capture

Within a single camera session, multiple requests can be issued, e.g. a repeating request for (low-resolution) preview and a normal request to capture a high-resolution image.

This module runs a TEMPLATE_PREVIEW repeating request and allows the user to take a picture at maximum resolution (TEMPLATE_STILL_CAPTURE) with a button press without interrupting this preview session.

Additionally, it allows using the Camera2 API Reprocessing feature to be used. In this case, instead of using a JPEG surface, a PRIVATE surface will be used to capture the image; this image will then be handed down to be reprocessed into a JPEG image.

Zero Shutter Lag (ZSL)

The Camera2 API supports ZSL through constantly capturing high-resolution images (TEMPLATE_ZERO_SHUTTER_LAG), and reprocessing only images to be kept. This mode of operation is exercised by this module.

High Speed Capture

If a Camera Device supports the CONSTRAINED_HIGH_SPEED capability, it supports a special operating mode to capture at high frame rates (>= 120 fps). This module uses this mode to preview and/or record at high frame rates. Preview and recording always share the frame rate.

Camera device, resolution and frame rates are chosen by the user if there are multiple choices. Recorded videos are saved in CameraTest_HighSpeed.mp4 in the DCIM folder. This function requires the WRITE_EXTERNAL_STORAGE permission.

Actuator Test

This module allows the user to manually set the focus distance, or to sweep it from infinity to macro and back.

A camera device needs to have the MANUAL_SENSOR capability, a positive minimum focus distance (a movable lens) and the ability to manually control the lens position. If multiple such devices are available, the user gets to choose.

Currently, the device must also support a 1280x720 resolution.

Test Mode

This module is used for testing.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published