Open baker12 opened 7 years ago
Can you run the command "gphoto2 --capture-image --debug" please ? Thanks
looking at the output it seems like a permission/udev error with libusb. I can run the commands using sudo but when I run hpis I get
ok can you run :
gphoto2 --list-all-config and attach the output here please ?
I'm creating the GPCanonCamera class and I'll need theses infos to complete the class.
Thanks
Here it is!
Hi, I've just commited some updates to support Canon Camera. But I don't have any idea of how it works. Please update, test and tell me what you get ;)
Beware that I've renamed the target to "camera-toolbox".
Got it compiled, but my output is:
1 cameras detected Seg Fault
I'm not too familiar with C/C++ debuggers at the moment to see if I can specifically find where the seg fault happens
Ok I think that the problem is with the detection of the camera. Please update & try again ;)
1 cameras detected. Open camera : "Canon Digital Rebel XT (normal mode)" at port "usb:001,009" Error : "Unable to get single config manufacturer: Bad parameters" Error : "Unable to get manufacturer widget : Bad parameters" [9;15]pi@raspberrypi:~ $
ok let's try again ;)
Getting closer! Just had a black screen with an arrow with those errors listed in the file. The last 2 lines are from when I hit escape on the pi
Ok so it seems to work :+1: Hit Enter from the keypad to activate the liveview (I don't know if your camera support it). Hit Return (normal enter key) to capture a photo See https://github.com/rlamarche/camera-toolbox#keyboard--mouse-control for more controls
You also can control the camera from webservices. The api is documented here in swagger format : https://github.com/rlamarche/camera-toolbox/blob/master/swagger.yaml
For example go on url http://[Rpi IP address]:8080/api/v1/status
Just an observer here, really excited to see all this Canon compatibility work happening here! Keep up the good work y'all! Looking forward to taking a spin with it in the coming weeks!
Am I supposed to be seeing images on screen? The camera starts taking pictures (not sure if that's considered live mode) but I see no image on screen
Copy/Paste from Terminal:
pi@raspberrypi:~ $ QT_QPA_EGLFS_FORCE888=1 QT_QPA_EGLFS_PHYSICAL_WIDTH=24A_EGLFS_PHYSICAL_HEIGHT=341 ./camera-toolbox [9;0]1 cameras detected. Open camera : "Canon Digital Rebel XT (normal mode)" at port "usb:001,011" Error : "Unable to get single config manufacturer: Bad parameters" Error : "Unable to get manufacturer widget : Bad parameters" Error : "Unable to get single config cameramodel: Bad parameters" Error : "Unable to get camera model widget : Bad parameters" Start camera thread Start liveview decoder thread QFontDatabase: Cannot find font directory /usr/local/qt5pi/lib/fonts. Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig. QFontDatabase: Cannot find font directory /usr/local/qt5pi/lib/fonts. Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig. QFontDatabase: Cannot find font directory /usr/local/qt5pi/lib/fonts. Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig. QFontDatabase: Cannot find font directory /usr/local/qt5pi/lib/fonts. Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig. QFontDatabase: Cannot find font directory /usr/local/qt5pi/lib/fonts. Note that Qt no longer ships fonts. Deploy some (from http://dejavu-fonts.org for example) or switch to fontconfig. Error : "Unable to get single config autofocusdrive: Bad parameters" Command failed Command failed Stop liveview decoder thread Stop camera thread
Does the command gphoto2 --capture-preview
working ?
It is required to work because the liveview use this command.
You can activate liveview with this command :
curl --request POST http://[Pi IP]:8080/api/v1/liveview/start
Then open a browser and go to this url :
http://[Pi IP]:8080/api/v1/liveview.mjpg
To see liveview in realtime.
Then stop liveview with :
curl --request POST http://[Pi IP]:8080/api/v1/liveview/stop
I am able to do the command and what not but all I get is a small square on the screen
Ok so maybe the liveview is not starting, I'll double check the code
I've added some informations. Please check that you have started the liveview. If you can describe exactly the steps you did ;)
Thanks
So I rebuilt the entire application just in case something wasn't linking right then SCP'ed it over to the Pi Then SSHed into the Pi and ran your app. Opened a second Terminal and SSHed as well so I could run the curl commands. I can start the liveview but the only way I can stop it is by closing out of camera-toolbox. curl stop doesn't even do it
@ecurtin have you by any chance tried it? I know my Canon is a little outdated (Digital Rebel XT) not sure how much newer yours is or not to see if it's just a compatibility issue with mine. I know the gphoto docs says it should, but you never know.
@baker12 in your last test, it seems that an image is sent to the browser but not in the expected format.
Please re-test and go on the url : http://..../api/v1/preview.jpg
This will download the image and send it to me. I'll inspect it. Thanks
Still getting the same error. I even went and did a find command for "preview.jpg" while it was running so I have no idea where in the local directory it is stored to get you a pic
Which error are you talking about ? To get the preview, launch the following command :
curl http://..../api/v1/preview.jpg > preview.jpg
Sorry. Didn't realize fully what you meant.
Here is the Console output:
however it looks like it's not saving properly. I get a thumbnail of what it's supposed to be on the pi, but that's it.
Ok I downloaded the preview.jpg
and it seems that it is incomplete.
But the starting of the file is a jpeg :
file preview.jpg
preview.jpg: JPEG image data, Exif standard: [TIFF image data, little-endian, direntries=9, manufacturer=Canon, model=Canon EOS DIGITAL REBEL XT, orientation=upper-left, xresolution=160, yresolution=168, resolutionunit=2, datetime=2017:01:05 19:53:38]
Resolution : 160x168 ... strange.
It seems that there is only exif data
I added code to handle possible error while getting file data & size. But I don't expect that there is an error because you get a preview ... incomplete.
When you run the command :
gphoto2 --capture-preview
What are you getting ? a file ? can you send it to me please ? I want to know if the bug if from libgphoto2 or my tool. Thanks.
Thanks !
This file is only 12k and also has EXIF data without jpeg data. I think that you should open an issue on libghoto2 project. They are very reactive.
Just opened up a case on the libgphoto2 page. Will let you know as soon as I hear something!
And 2 months later still no update from them. :/
It detects the right camera but I have a feeling I broke something with gphoto2/libgphoto2 since I get the same error as shown below
Will let you know if I get gphoto back working again
Thanks again for your help!