Article | REF: H1518 V1

Image capture and analysis on Android

Author: Frédéric LEMOINE

Publication date: March 10, 2024 | Lire en français

You do not have access to this resource.
Click here to request your free trial access!

Already subscribed? Log in!

Automatically translated using artificial intelligence technology (Note that only the original version is binding) > find out more.

    A  |  A

    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...

    You do not have access to this resource.

    Exclusive to subscribers. 97% yet to be discovered!

    You do not have access to this resource.
    Click here to request your free trial access!

    Already subscribed? Log in!


    The Ultimate Scientific and Technical Reference

    A Comprehensive Knowledge Base, with over 1,200 authors and 100 scientific advisors
    + More than 10,000 articles and 1,000 how-to sheets, over 800 new or updated articles every year
    From design to prototyping, right through to industrialization, the reference for securing the development of your industrial projects

    This article is included in

    Signal processing and its applications

    This offer includes:

    Knowledge Base

    Updated and enriched with articles validated by our scientific committees

    Services

    A set of exclusive tools to complement the resources

    Practical Path

    Operational and didactic, to guarantee the acquisition of transversal skills

    Doc & Quiz

    Interactive articles with quizzes, for constructive reading

    Subscribe now!

    Ongoing reading
    Image capture