Capture Canon EOS Data

Hi All,

My goal is to capture the values of the settings of my Canon 5D mk2. Speficially: ISO, focus, lens mm, shutter speed and f-stop.

My hardware is: Arduino UNO Circuits at Home USB Host Shield 2.0 Canon EOS 5D mk2

Libraries I'm using are: PTP 2.0 from Circuits at Home USB Host Shield 2.0 from Circuits at Home

I've managed to set properties on the camera but not get them. I thought that I could get a camera property via the function: GetProperty(uint16_t prop, PTPReadParser *parser);

For example, to get the ISO, I would use EOS_DPC_Iso for the property but I'm stumped by the PTPReadParser. I'm not sure which class to instantiate and how to do it properly in the context of what I'm trying to accomplish.

At this point I'm not sure if I'm even approaching this problem from the right angle. Any help is greatly appreciated. Thank you.

I know this topic is 5yrs old, but I have exactly the same question.

Is there anyone who attempted to this?

Kindly, Artur.

That information is in the header of any pictures you take

Could you elaborate?

Download the picture to pc/laptop, right-click and select Properties (there may be several tabs).

Going OT a bit, sorry, but why do digital cameras have ISO numbers? When I dabbled in photography in the 70s it made sense since it was to do with the chemical properties of the film emulsion, and was about how fast or slow it was at reacting to the light.

It's a simulation of ISO speeds. The signals coming from the image sensor are amplified, either in an analog sense, or more likely in a digital sense, to simulate the effect of different film speeds. The effect is very similar: using a high ISO setting means you can use faster shutter/stop down further, but the result is a more grainy/noisy image.

Try this link, lots of info;

why do digital cameras have ISO numbers

PaulRB: It's a simulation of ISO speeds..... The effect is very similar

I was thinking something along those lines, thanks. Karma++

srnet: Try this link, lots of info

Karma-- for cheek.

ShetLand: Karma-- for cheek.

No, you're really the cheeky one for asking in the first place! See item 4 in the forum guidelines. It even warns you about what srnet just did. But I didn't mind answering.

hammy: That information is in the header of any pictures you take

It's in the EXIF data of the JPEG file. (Unless you're not using JPEG)

ShetLand: Going OT a bit, sorry, but why do digital cameras have ISO numbers? When I dabbled in photography in the 70s it made sense since it was to do with the chemical properties of the film emulsion, and was about how fast or slow it was at reacting to the light.

If you think about it, in film days, the higher the ISO, the lower the resolution /higher noise - the crystals in the emulsion for higher ISO/ASA/DIN numbers were larger than for low speed film. The analogy holds for digital - for a more sensitive sensor, you need larger photosites to trap more photons in a given time. If you want to "push" the speed, you add an amplifier, and amplifiers add noise.

Misunderstanding of the OP question :)

I'm controlling camera settings/shutter with a phone. I do not download any picture either to phone or PC :)

I can easily change apperture, shutter speed, ISO, etc... by sending static values (say: "ISO:200"). but the problem is that I can't find any solution to retrieve initial cammera settings so I can display them on the phone screen when the app starts.

The question is actually more complex because as I found out, cammera property values are sent to arduino only when an event occours on the camera itself. Even if I use one of those events, processing event information and retrieving specific values is A WAY beyond my proggramming abilities :confused:

https://www.circuitsathome.com/canon-eos-cameras-principles-of-interfacing-and-library-description/

ShetLand: Karma-- for cheek.

Why ?

I did not know the answer to your question and I believe I found the answer before you did.

I realise it involves less thought time to ask others to do your research for you and a question about digital cameras should be better placed in a specific digital camera forum.

Or save yourself a lot of time and effort by using Google.

Google has been around since 1998.

Become a Canon Dev and use the appropriate SDKs.

Anyone??

TBH. controlling camera remotely, without any report coming back (current settings, or exposure level) is totally pointless :(

philip100: Anyone??

TBH. controlling camera remotely, without any report coming back (current settings, or exposure level) is totally pointless :(

I have already given you the answer. You need to use the developer SDKs. Even then, you'd need an interface such as a mobile phone + app.

I looked into this and the code referenced for the PTP_2.0Master library was fairly old. Many examples were using a depreciated version of Quantum Leaps and I sort of stopped there. I put all the parts together and the basic functions that did not require this library worked fairly well to control the MkII capture, etc. Getting the settings requires calling the EOS parsing function that basically takes all the relevant data out from the received Canon data stream. When I get a bit more time I will try to look at this again. All the code has to be written as a state machine so it takes some thought, and I would like to get an example that does not require Quantum Leaps. It seems like a fun project and I would not mind having the functionality in a portable version. I just ran out of time to keep playing with it for now.

That's what I thought, it's not for my programming skills :(

Thank you so much for your time :) I really appreciate.

I'm working on a camera slider for timelapses, controlled by phone via bluetooth. I got the slider, app and the timelapse controll working perfectly. The only part I'm missing is this.

As for now, I'm forcing camera settings when I open the app (I store latest values in tinyDB). This way I can close app while timelapse is in proggress (to save phone's battery, as the timelapse may take up to few hours) and open it without loosing current settings.

Would be nice to have access to the cameras EV meter which would help me implement a "Holy Grail" (day to night timelapse) automatisation :)

philip100: That's what I thought, it's not for my programming skills :(

Thank you so much for your time :) I really appreciate.

I'm working on a camera slider for timelapses, controlled by phone via bluetooth. I got the slider, app and the timelapse controll working perfectly. The only part I'm missing is this.

As for now, I'm forcing camera settings when I open the app (I store latest values in tinyDB). This way I can close app while timelapse is in proggress (to save phone's battery, as the timelapse may take up to few hours) and open it without loosing current settings.

Would be nice to have access to the cameras EV meter which would help me implement a "Holy Grail" (day to night timelapse) automatisation :)

I also do a lot of photography. I found this out myself. You need the sign up to the Developer SDKs. I thought instead of relying on the EV meter, make your own. Like in a proper light meter with a LUX sensor and a diffused white translucent thingy majig. Could change "focal length" with rectangular cuts outs to match the camera and lens.

EDIT Another problem I found (with the 5D3 at least) was with manual shutter release triggering using the remote port, you couldn't achieve any shorter than around 1/100s shutter speeds. This kinda limited the whole experience of a holy grail. Less stop leeway overall. This is where the SDKs would have meant it could have all be done in camera to allow 1/8000s to the 30s +.