Coder Social home page Coder Social logo

Comments (11)

HazenBabcock avatar HazenBabcock commented on July 23, 2024 1

Ok, thank you for the feedback (and for this project). I will ask on the list and search some more to see if I can find an answer. I'll close this for now, but add a solution later if I find one.

from python-gphoto2.

HazenBabcock avatar HazenBabcock commented on July 23, 2024 1

It looks like the trick to getting the focus to walk in one direction with this camera is to set "Drive Canon DSLR Manual Focus" to "Far 3" (or whatever step you want), then set it to "None", then back to "Far 3", etc.. repeating the desired step, then "None" as many time as desired to get to where you want to go. You also need to wait a half a second or so after entering preview mode, and you need to set the switch on your lens to manual focus (MF) or the camera will refocus before taking the picture.

from python-gphoto2.

benoitguigal avatar benoitguigal commented on July 23, 2024 1

I indeed have a config option called Canon EOS Viewfinder. It is working, below the code I used:

param = 'viewfinder'
widget = gp.check_result(gp.gp_widget_get_child_by_name(config, param))
gp.gp_widget_set_value(widget, 1)

time.sleep(0.5)

for i in range(0, 100):
    param = 'manualfocusdrive'
    choice = 6
    widget = gp.check_result(gp.gp_widget_get_child_by_name(config, param))
    value = gp.check_result(gp.gp_widget_get_choice(widget, choice))
    gp.gp_widget_set_value(widget, value)
    gp.gp_camera_set_config(camera, config, context)
    choice = 3
    widget = gp.check_result(gp.gp_widget_get_child_by_name(config, param))
    value = gp.check_result(gp.gp_widget_get_choice(widget, choice))
    gp.gp_widget_set_value(widget, value)
    gp.gp_camera_set_config(camera, config, context)

from python-gphoto2.

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

I don't have any helpful advice I'm afraid - I've not tried using libgphoto2 to focus a camera. I know from discussions on the gphoto-user mailing list (see https://lists.sourceforge.net/lists/listinfo/gphoto-user) that focusing is often a problem. I suggest asking on that list as there may be a T5i user who can help.

from python-gphoto2.

benoitguigal avatar benoitguigal commented on July 23, 2024

Hello I am trying to focus my CANON 1200D manually. How do you enter preview mode and then drive manual focus ? I tried using camera_file = gp.check_result(gp.gp_camera_capture_preview(camera, context)) but it is a blocking operation so I can't make any subsequent call before leaving the preview. Any help would be appreciated.

from python-gphoto2.

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

Are you able to do it by putting the camera into preview mode manually? I think gp_camera_capture_preview is just an operation to capture a preview image (it also works on cameras without a preview mode such as the 350d). Is it possible to set preview mode via the camera config?

from python-gphoto2.

HazenBabcock avatar HazenBabcock commented on July 23, 2024

On my camera the config option to enter preview mode is "Canon EOS Viewfinder".

from python-gphoto2.

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

I'm glad you got it working. Shouldn't you have a gp_camera_set_config call just after you set the viewfinder param though?

I think you should have error checking on every libgphoto call, not just the ones that return a result. The easiest way to do this is with the "object oriented" interface. For example, replace gp.check_result(gp.gp_widget_get_child_by_name(config, param)) with config.get_child_by_name(param) and replace gp.gp_camera_set_config(camera, config, context) with camera.set_config(config, context).

from python-gphoto2.

benoitguigal avatar benoitguigal commented on July 23, 2024

ok great I will do. Thank you for your help !

from python-gphoto2.

alperenkilic avatar alperenkilic commented on July 23, 2024

Hi guys, time to wake up this issue :)
I am using Canon2000d, need to change AF/MF mode remotely. Is there a way ?

For example when MF is selected, I want to select AF mode by software.

from python-gphoto2.

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

On my cameras AF/MF is a switch on the side of the lens! I don't think I'll be able to help.

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.