I'm working on a project which I need to take images automatically from a DSLR camera and should save it in the raspberry pi's SD card.

There was a tutorial it shows how to save the image into sd card on DSLR camera but that's not what I need because I need to get images saved on the raspberry pi's SD card for future image processing works.

So I should save the picture inside raspberry Pi's SD card. Please show me a tutorial or a guidance to get this done. I'm a complete beginner to this raspberry pi implementations.

I'm using py charm IDE for image processing and Python 2.7

2 Answers 2


If I understand correctly you want your camera to save images to the SD card your pi operating system is on? If you have a canon camera you might be able to use CHDK and change the save path, the best place to find out how to do this would be the CHDK forums: https://chdk.setepontos.com/index.php

Your SD card will have two partitions, one will be 40odd Mb and be for booting, the other will have the rest of your os. I think you'll need CHDK on the boot partition as that's the one the camera will read.

Is there a reason why you couldn't use two SD cards? Connect the cameras card to the pi with a usb card reader? A new card is not a massive cost and a guaranteed solution.



I've done just this using gphoto2. You can run the program from the cli, a gui, and there is also a Python wrapper here. The number of cameras supported is quite large. You can designate where you want the images to be saved to which includes downloading them to say, your raspberry pi.

Install from the command line:

sudo apt install gphoto2

Using the cli the command you need could be as simple as:

gphoto2 --capture-image-and-download

Note that installing the Python lib involves installing some additional libraries. The github page has the install process listed there.

I found the following video on using gphoto2. Note that some of the issues the author notes at the beginning don't seem to be a problem any longer. Additionally, I would follow the instructions for installing the Python library on its github page. Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.