User avatar
schoolpost
Posts: 107
Joined: Sun Feb 19, 2017 10:47 am
Location: Canada
Contact: Website

USB PTP Camera Control Support?

Fri Jun 18, 2021 8:03 am

Hello,

Has anyone looked into or know how to achieve PTP camera control with the Pico? Lots of interesting applications where you can interface with an old DSLR or new Mirrorless cameras.

USB PTP is such an old and outdated control protocol ( IMO ) but given it is the only standard manufacturer's can work with I don't blame them.

There's one existing library for an Arduino USB host shields and the like but these come off as deprecated and abandoned:
https://github.com/felis/PTP_2.0

Would be nice to get something ported/working on the Pico seeing as it is picking up adoption pretty quickly.

Even a simple example to initiate a still photo capture ( trigger the shutter ) or start/stop a video recording.

I haven't worked with USB Host before, so I'm unsure of what pieces are required to make this happen or what other aspects of the Pico's USB Host capabilities need more maturation before PTP library could be done?

Either way, thought if anything it this could be a thread to facilitate the discussion of this topic.
-Csaba Nagy

Kubas_inko
Posts: 11
Joined: Wed Jul 27, 2016 4:01 pm

Re: USB PTP Camera Control Support?

Tue Sep 14, 2021 4:30 pm

I tried PTP on trinket M0 (samd21) and had absolutely no luck and I don't know why. I pretty much copied the process that the ptp2.0 library uses with SAMD USB library. All I was able to get were descriptors (which were correct). But then, no matter what I tried (PTP container, USB container and other stuff), I never got any data from the camera.

User avatar
HermannSW
Posts: 4507
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: USB PTP Camera Control Support?

Tue Sep 14, 2021 8:40 pm

I came from Arduino side in 2016 with slow low resolution cameras, for camera line following robot.
Rasberry changed everything, for processing more than Pi0 was needed, but Pi3A+ is good enough.
v1, v2, HQ cameras are all fine rolling shutter cameras (v1/v2 aloowing to capture 640x64@665fps/640x75@1007fps!).
But for moving robot analyzing 320x240@204fps frames to control the fast moving robot, I ended up using 26$ Arducam monochrome global shutter camera (experimentally I learned that rolling shutter cameras are unusable in that scenario).

So my question here -- why would you want to connect a camera with Pico?
Even a Pi0 is so much more powerful regards cameras ...
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://github.com/Hermann-SW/raspiraw
https://stamm-wilbrandt.de/en/Raspberry_camera.html

hippy
Posts: 10527
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: USB PTP Camera Control Support?

Wed Sep 15, 2021 12:35 pm

HermannSW wrote:
Tue Sep 14, 2021 8:40 pm
So my question here -- why would you want to connect a camera with Pico?
Why not ?

My understand is that it's more about controlling a physical stills camera via a Pico, though once that's implemented the full scope of capabilities would probably become available.

I am not going to make any guess at to how useful it would be but if it can be done I don't see any good reason for not trying to get it done.

Return to “General”