3. Image capture
If you want to capture an image, e.g. take a photo after clicking a button, and the device can be positioned horizontally or vertically, make sure that the display surface and the captured image have the same orientation.
imageCapture = new ImageCapture.Builder()
.setTargetRotation(previewView.getDisplay().getRotation())
.build();
We'll save the image. This code will normally be executed when a button is clicked.
Indicate the name and location where the image will be saved. In this case, it will be in the images directory ( DIRECTORY_PICTURES ) :
String file_path = getExternalFilesDir(Environment.DIRECTORY_PICTURES) + "/pic.jpg";
ImageCapture.OutputFileOptions outputFileOptions = new...
Exclusive to subscribers. 97% yet to be discovered!
Already subscribed? Log in!
Image capture
Article included in this offer
"Signal processing and its applications"
(
150 articles
)
Updated and enriched with articles validated by our scientific committees
A set of exclusive tools to complement the resources
Bibliography
- (1) - - https://developer.android.com/reference/ android/hardware/camera2/Camera Characteristics
- (2) - TURING (A.M.) - Computing Machinery and Intelligence....
Exclusive to subscribers. 97% yet to be discovered!
Already subscribed? Log in!