wyolum / TouchSelfie

Open Source Photobooth based on the official Raspberry Pi 7" Touchscreen
79 stars 95 forks source link

it will be amazing if i could use my DSLR #23

Open moyoussry opened 5 years ago

moyoussry commented 5 years ago

as photographer I loved your project it's brilliant how you can send the pic using the API's to my album and the user on his email it will be even cooler if I could use my Canon DSLR I searched about how to connect the DSLR and I have found gphoto2: gPhoto is a set of software applications and libraries for use in digital photography I don't wanna use any other photo booth project because the email feature is gold to me

osbock commented 5 years ago

I'll take a look. It should be possible. The only problem I can see right now is picking the right python binding, and the difficulty of installing it. (building if from source isn't very friendly for users)

moyoussry commented 5 years ago

@osbock I know that the integration may could be hard but possible Well do you have any idea if i connect a usb camera like Logitech web cams will work or what to do to make it work if it's easier than the DSLR

zorruno commented 5 years ago

@osbock , I am happy to help test/assist as needed. I already use an android based booth setup using a usb connected DSLR (not foss unfortunately), and have been testing Touchselfie with a RPi camera

osbock commented 5 years ago

I have a rough hack up and working. The hard part is the preview. For now, I left the pi camera doing the preview and gphoto for pics. I'll check in a branch for you to try out.

USB cameras should be relatively easy. They used to work with cv2_camera.py, but I haven't tried it in a while.

osbock commented 5 years ago

I put up a rough hack in gphoto2-hack. there are some setup notes, but I didn't record them as I went along, so please feel free to add details. Longer term, we'll need to refactor the camera interface. It's almost there but a little messy right now (in the python3 branch)

danielclough commented 4 years ago

Wishing to use my USB Camera or DSLR. I setup TouchSelfie, found this issue, and am checking out the gphoto2-hack branch.

Getting this error:

  File "user_interface.py", line 16, in <module>
    from tkinter import *
ImportError: No module named tkinter

I don't see any obvious solution when I google the error.

danielclough commented 4 years ago

checking out master branch I get this error:

pi@raspberrypi:~/git/TouchSelfie $ ./photobooth.sh 
WARNING |15:45:07| install_key_binding: no action 'send_print'
WARNING |15:45:07| No hardware buttons found, generating software buttons
mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
Traceback (most recent call last):
  File "user_interface.py", line 1152, in <module>
    ui = UserInterface(config,window_size=(SCREEN_W, SCREEN_H),log_level = logging.DEBUG)
  File "user_interface.py", line 336, in __init__
    self.camera = mycamera.PiCamera()
  File "/usr/lib/python2.7/dist-packages/picamera/camera.py", line 431, in __init__
    self._init_camera(camera_num, stereo_mode, stereo_decimate)
  File "/usr/lib/python2.7/dist-packages/picamera/camera.py", line 460, in _init_camera
    "Camera is not enabled. Try running 'sudo raspi-config' "
picamera.exc.PiCameraError: Camera is not enabled. Try running 'sudo raspi-config' and ensure that the camera has been enabled.

which doesn't seem to provide any insight into the tkinter issue.

wyojustin commented 4 years ago

The tkinter issue is python2 vs. python3. Try issuing the command:

$ python3 user_interface.py