the.dza
Posts: 8
Joined: Sun Aug 23, 2020 9:45 pm

Rasberry pi 4 tether to Canon 5D Mark III to automatically display image

Sun Aug 23, 2020 9:52 pm

Hey everyone!

Excited to start my path to using a raspberry pi and I finally have a business use for it!

my wife is a photographer and shoots in a studio where we have a monitor. She really wants to be able to see the images as she takes them and show them on a monitor versus the small screen on her camera. I am trying to find a bit of software or some sort of script that would automatically display the image that my wife shoots on the screen that would be connected to this raspberry pi. I would connect the camera via USB to the pi and then the pie display via HDMI to the display. What complicates matters is that she shoots in raw so the images are fairly large and I would like to display them relatively quickly on the monitor. I don't necessarily want to download the image to the pi cuz they are fairly large and I know that the camera can have a setting where it shoots both JPEG and RAW so maybe there's an option to only send a JPEG to the pi? I've tried to install gphoto2 and but can't seem to find how it works in the way I need it to (i.e. I don't need remote control of the camera).

Any help would be appreciated!

Daniel

bweasels
Posts: 5
Joined: Sat Aug 01, 2020 6:01 pm

Re: Rasberry pi 4 tether to Canon 5D Mark III to automatically display image

Tue Aug 25, 2020 3:55 pm

Hey from ~30 seconds of googling, I don't think that there are any pre-built programs to do this, but I've been learning about raspberry pi + image stuff for a little bit, so here's a potential workflow that could work? I think you'll be doing a little bit of path-finding, but this as an end product would be really cool! Hopefully it works well!

1) There seems to be something similar to gphoto2 that is made to transfer files as they are taken on the camera (https://github.com/piphoto/piphotoclient)
2) Have the raspberry pi constantly monitor the output folder for new files (you can create a clock based loop to keep monitoring the folder for new files)
3) I believe that the io package (https://docs.python.org/3/library/io.html) should allow you to only read part of a file, so if Canon prepends the JPEG on the Raw file, then you can just ask the pi to read in the n bytes that include the JPEG and ignore the rest, saving processing time, but this doesn't fix the transfer time problem... (I am confident that this is possible)

2/3 alternative) Still using io, you can create a BytesIO object which looks at a file, which is being streamed to. So if you have piphotoclient copy the captured canon images over to the same file (CanonRaw.raw) , and set the BytesIO object to read CanonRaw.raw, it will read the bytes as they stream in. And if Canon prepends the JPEG to the raw file, then you can tell ByesIO to only read the first n bytes of the jpeg, and ignore the rest (I am less sure if this path is possible, because I am still a novice with streams, but y'kno give it a shot!)

4) Display in a UI - Tkinter seems to be the de-facto standard, but I'm partial to Kivy because it *~looks so pretty~* once you get the hang of it. Tkinter has a easier learning curve though.

One thing that really helped me with image manipulation/processing was using the Thread package in python - because the pi runs at a slow clock speed relative to a computer, you really need to take advantage of all 4 cores, so handing the monitoring and JPEG stripping off to its own core will definitely help with image work, and leaving the UI in a separate thread allows it to still be smooth and responsive.

Sorry if you have already thought this stuff through - I just stumbled upon your post, and got excited, because I think it is a very cool project. I hope this helps! (and all of my googling terms and workflow is very python centric, but I'm not sure what language you plan to use)

User avatar
thagrol
Posts: 6130
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Rasberry pi 4 tether to Canon 5D Mark III to automatically display image

Tue Aug 25, 2020 11:30 pm

I'm not sure what you want is readily available.

I do have a half finished but unpublished project around that used pytthon and gphoto2 in combination with a small circuit on the hotshoe to detect how long since the last picture was taken then download the new images. Worked on my old EOS 400D. SHould work on a 5D MArk III but that's at your risk not mine.

There was an issue with gphoto2 I couldn't find a way around though: while gphoto2 was controlling/fetching images from the camera that's all the camera could do. That's why the code waits for the camera to be idle for a few seconds.

I guess I can dig it out and stick it on github if it would be of interest.

Not sure whether it would have to be GPL'd or not given the gphoto2 dependancy but if not I'd be putting my usual "non-comercial" requiremetn on the code. Non commercial in the sense that you wouldn't be allowed to use my code in a commercial product not in the sense that your wife couldn't use it with her camera in the course of her business (if she is a commercial photographer).
I'm a volunteer. Take me for granted or abuse my support and I will walk away

All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides

aBUGSworstnightmare
Posts: 3890
Joined: Tue Jun 30, 2015 1:35 pm

Re: Rasberry pi 4 tether to Canon 5D Mark III to automatically display image

Wed Aug 26, 2020 4:58 am

So you want to mimik an Wireless File Transmitter WFT-E7, right?
Cameras 'DIGITAL' port is this just a USB or Canon proprietery? If it's a USB interface showing up as a MSD then you should be able to use a Pi Zero W as a bridge. But ... I think it's more than one USB device once connected to a host because I simply googled 'eos 5D mark iii remote control-diy'. This brings you to an app called DSLR controller ...

User avatar
thagrol
Posts: 6130
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Rasberry pi 4 tether to Canon 5D Mark III to automatically display image

Wed Aug 26, 2020 10:50 am

As promised, the code is here: https://github.com/thagrol/camera-pi

Warts and all. No documentation except the sparsely commented python source code. No guarantee what so ever. Use entirely at your own risk.
I'm a volunteer. Take me for granted or abuse my support and I will walk away

All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides

the.dza
Posts: 8
Joined: Sun Aug 23, 2020 9:45 pm

Re: Rasberry pi 4 tether to Canon 5D Mark III to automatically display image

Sun Sep 06, 2020 12:45 am

Thanks everyone for your suggestions. Unfortunately I'm a complete noob so I don't trust myself to be able to handle the suggestions you are all suggesting. I'm not great with coding and can't even figure out how to load ubuntu on a card to run on my pi 4. Looks like I've found a program called darktable which will do what I need it to do but I can't figure out how to get around being required to have a SSH with my ubuntu one account.

THanks again for your suggestions but I'll try to find something a bit more for a newbie like me.

the.dza
Posts: 8
Joined: Sun Aug 23, 2020 9:45 pm

Re: Rasberry pi 4 tether to Canon 5D Mark III to automatically display image

Sun Sep 06, 2020 12:45 am

thagrol wrote:
Wed Aug 26, 2020 10:50 am
As promised, the code is here: https://github.com/thagrol/camera-pi

Warts and all. No documentation except the sparsely commented python source code. No guarantee what so ever. Use entirely at your own risk.
Thank you for the effort. I may come back to this at some stage!

User avatar
dickon
Posts: 2113
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, in Towcester

Re: Rasberry pi 4 tether to Canon 5D Mark III to automatically display image

Sun Sep 06, 2020 9:08 am

Canon used to do an addon for the 5D Mk. 2 that had a wifi interface in it that it could use to upload photos in real-time. I assume they do something similar for the mk. 3. I'd use that rather than a USB cable, shoot in raw+small-JPEG more, and have a watcher script on the pi which simply displays the last JPEG seen on the screen. Use an SSD for storage as they're much more reliable than SD cards and you should be good.
As it is apparently board policy to disallow any criticism of anything, as it appears to criticise something is to criticise all the users of that something, I will no longer be commenting in threads which are not directly relevant to my uses of the Pi.

User avatar
neilgl
Posts: 3670
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near The National Museum of Computing

Re: Rasberry pi 4 tether to Canon 5D Mark III to automatically display image

Mon Sep 07, 2020 8:38 pm

Can you use EOS Utility on a PC/laptop to show and download images? (Sorry no pi version of that exists).

User avatar
thagrol
Posts: 6130
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Rasberry pi 4 tether to Canon 5D Mark III to automatically display image

Mon Sep 07, 2020 9:10 pm

neilgl wrote:
Mon Sep 07, 2020 8:38 pm
Can you use EOS Utility on a PC/laptop to show and download images? (Sorry no pi version of that exists).
Unless the 5D is different to Canon's two and three digit models or a more recent version of EOS Utility than 2.14.20.0 supports it the answer to that is likely no. My experience with several Canon DSLRs is that EOS Utility can download pictures but that has to be triggered manually and the camera has to be tethered via USB.

When remote shooting (i.e. controling camera from the PC) the image gets download but AFAIK there's no "photo just taken so download it" option.

Canon appear to see that as something only a Pro would need, and Pros are believed to be able to afford the WiFi accessory to do the file transfer.
I'm a volunteer. Take me for granted or abuse my support and I will walk away

All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides

jonasstax
Posts: 2
Joined: Tue Sep 08, 2020 1:24 am

Re: Rasberry pi 4 tether to Canon 5D Mark III to automatically display image

Tue Sep 08, 2020 1:45 am

There are a number of Canon camera hacks which don't modify the existing software.

You could try the following forums:

Magic Lantern Forum:
https://www.magiclantern.fm/forum/

CHDK Forum:
https://chdk.setepontos.com/
CHDK PTP interface
https://chdk.fandom.com/wiki/PTP_Extension
http://chdk.setepontos.com/index.php/topic,4338.0.html

Google Search:
CHDK tethering to raspberry pi 4
Canon 5D tethering to raspberry pi 4

User avatar
neilgl
Posts: 3670
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near The National Museum of Computing

Re: Rasberry pi 4 tether to Canon 5D Mark III to automatically display image

Tue Sep 08, 2020 8:08 am

Looks like it is possible, I don’t have 5Diii to test.
https://support.usa.canon.com/kb/index ... =ART134425
On my ipad I use Camera Connect With a 70D over WiFi.
On laptop, with USB to camera, EOS Utility 2 works with 70D and EOS Utility 3 works with 90D. I can then connect the laptop to a 40 inch TV via HDMI

User avatar
thagrol
Posts: 6130
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Rasberry pi 4 tether to Canon 5D Mark III to automatically display image

Tue Sep 08, 2020 11:21 am

Fair enough. Seems I need to update myself and possibly my software.
I'm a volunteer. Take me for granted or abuse my support and I will walk away

All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides

Return to “Advanced users”