Coder Social home page Coder Social logo

LivePreview about python-gphoto2 HOT 8 CLOSED

jim-easterbrook avatar jim-easterbrook commented on July 3, 2024 1
LivePreview

from python-gphoto2.

Comments (8)

scoob-x13x avatar scoob-x13x commented on July 3, 2024 1

Yes but when i Calling gp_camera_capture_preview() then i always take a picture and the mirror is always going up and down. In piggyphoto there is an attribute called _leave_locked and when its True the mirror is flipped up and is locked. Then i can be is a loop and can display the image

from python-gphoto2.

jim-easterbrook avatar jim-easterbrook commented on July 3, 2024

I assume piggyphoto is calling the gp_camera_capture_preview() function to get a preview. If so, you can do that with python-gphoto2, then use gp_file_get_data_and_size() on the returned file to get the image data, then display it in a preview window of your choice (Qt, Tk, OpenGL, etc.).

from python-gphoto2.

jim-easterbrook avatar jim-easterbrook commented on July 3, 2024

I assume that's a camera configuration setting (gp_camera_get_config & gp_camera_set_config). All I know about libgphoto2 is what's in its documentation, and python-gphoto2 just provides a Python interface to that API.

from python-gphoto2.

scoob-x13x avatar scoob-x13x commented on July 3, 2024

In libgphoto2 gp_camera_capture_preview() takes 3 parameters in python-gphoto2 it only takes 2 parameters.
The parameters are
camera - a Camera
file - a CameraFile
context - a GPContext

The file parameter is missing is that a mistake in python-gphoto2?

from python-gphoto2.

jim-easterbrook avatar jim-easterbrook commented on July 3, 2024

No, it is not a mistake. The CameraFile is an output parameter that is allocated and returned by the function, as described in the README.

from python-gphoto2.

hollesse avatar hollesse commented on July 3, 2024

@jim-easterbrook is it possible to get like a video stream as a live preview?

from python-gphoto2.

jim-easterbrook avatar jim-easterbrook commented on July 3, 2024

Not with libgphoto2. I'd post a link to the libgphoto2 documentation but the web site is currently unavailable. I'm not aware of any libgphoto2 function that can stream anything.

from python-gphoto2.

bitcraft avatar bitcraft commented on July 3, 2024

from python-gphoto2.

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.