gphoto / gphoto2

The gphoto2 commandline tool for accessing and controlling digital cameras.
GNU General Public License v2.0
705 stars 116 forks source link

focus on Nikon Z7 not working #435

Open gosi-at opened 3 years ago

gosi-at commented 3 years ago

Describe the bug

gphoto2 is able to capture a image from the Nikon Z 7 but the image is not in focus.

Name the camera gphoto2 --auto-detect Model Port

Nikon Z7 usb:002,003

libgphoto2 and gphoto2 version gphoto2 2.5.23 gcc, popt(m), exif, cdk, aa, jpeg, readline libgphoto2 2.5.25 standard camlibs (SKIPPING lumix), gcc, ltdl, EXIF libgphoto2_port 0.12.0 iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi, gcc, ltdl, EXIF, USB, serial without locking

To Reproduce Steps to reproduce the behavior:

Autofocus seems enabled on camera: gphoto2 --get-config autofocus Label: Autofocus
Readonly: 0 Type: RADIO Current: On Choice: 0 On Choice: 1 Off END

but running "/usr/bin/gphoto2 --force-overwrite --capture-image-and-download" takes the picture without focus.

debug file is attached. debug.log.zip

Thanks for looking into it.

foosinn commented 2 years ago

Same issue here with a Nikon z6. Even when --set-config-value=autofocus=On is set

msmeissn commented 2 years ago

can you check gphoto2 --get-config focusmode this is the one what determines if autofocus is executed

foosinn commented 2 years ago
Label: Focus Mode
Readonly: 1
Type: RADIO
Current: AF-C
Choice: 0 Manual
Choice: 1 AF-S
Choice: 2 AF-C
Choice: 3 Unknown value 8013
END

After switching the Z6 to video mode it seems to work. New output:

Label: Focus Mode
Readonly: 1
Type: RADIO
Current: Unknown value 8013
Choice: 0 Manual
Choice: 1 AF-S
Choice: 2 AF-C
Choice: 3 Unknown value 8013
END

Choice: 3 Unknown value 8013 should be AF-F

foosinn commented 2 years ago

Update: Switching to Video mode seems to work for me

gitphoex commented 6 months ago

I am facing the same issue at the moment. I have to use AF-S. And it is not working. Was there any further investigation done on this issue?

foosinn commented 6 months ago

Double check that your in video mode and AFS-A (Auto) or Continues

gitphoex commented 6 months ago

Unfortunately, I will have to use AF-S. I can't use video mode. So as a workaround, I tried using --set-config autofocusdrive=1 and gp_camera_set_single_config from the library. this appears to be working for me. Tested with Nicon Z6ii.