Git Product home page Git Product logo

Comments (3)

migueledgracia avatar migueledgracia commented on July 4, 2024

Base on what the documentation saids:

    /** 
     * Sets the resolution of the intended target from this configuration.
     *
     * <p>The target resolution attempts to establish a minimum bound for the image resolution.
     * The actual image resolution will be the closest available resolution in size that is not
     * smaller than the target resolution, as determined by the Camera implementation. However,
     * if no resolution exists that is equal to or larger than the target resolution, the
     * nearest available resolution smaller than the target resolution will be chosen.
     *
     * @param resolution The target resolution to choose from supported output sizes list.
     * @return The current Builder.
     */

Base on what I understood, If the camera of the device doesn't support that resolution, the nearest available resolution smaller or grater than the target resolution will be chosen.

Probably the device you'r using might not support that specific resolution and is falling back to the nearest one that it support, which might be 640x480

You might wanna target a much higher resolution
setTargetResolution(Size(4256, 2832))
That did the trick for me

from camera-samples.

zorouyang avatar zorouyang commented on July 4, 2024

Base on what the documentation saids:

    /** 
     * Sets the resolution of the intended target from this configuration.
     *
     * <p>The target resolution attempts to establish a minimum bound for the image resolution.
     * The actual image resolution will be the closest available resolution in size that is not
     * smaller than the target resolution, as determined by the Camera implementation. However,
     * if no resolution exists that is equal to or larger than the target resolution, the
     * nearest available resolution smaller than the target resolution will be chosen.
     *
     * @param resolution The target resolution to choose from supported output sizes list.
     * @return The current Builder.
     */

Base on what I understood, If the camera of the device doesn't support that resolution, the nearest available resolution smaller or grater than the target resolution will be chosen.

Probably the device you'r using might not support that specific resolution and is falling back to the nearest one that it support, which might be 640x480

You might wanna target a much higher resolution
setTargetResolution(Size(4256, 2832))
That did the trick for me

Hi,
Thank you for your reply, which solved my problem.

from camera-samples.

owahltinez avatar owahltinez commented on July 4, 2024

Closing as solved, thanks @migueledgracia !

from camera-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.