CHDK PTP interface - page 100 - General Discussion and Assistance - CHDK Forum

CHDK PTP interface

  • 1241 Replies
  • 487870 Views
*

Offline reyalp

  • ******
  • 14080
Re: CHDK PTP interface
« Reply #990 on: 12 / June / 2013, 01:10:02 »
Advertisements
Quote
DNG header is an option like raw and jpeg. This is independent from the CHDK menu DNG option, and at the protocol level, independent of whether raw is requested.
I've started implementing this in chdk changeset 2861 chdkptp changeset 352

This is very much work in progress, but it does produce a valid DNG file with -f=6

I still think this is the right direction.

Some things left to do
* fix the module load / unload stuff, currently raw and dng must be enabled in menu
* add option to the create_dng_header so it doesn't pad or allocate space for the thumb, force version
* handle sub-images on the client, by padding the data to full size
* create thumbnail on the client
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: CHDK PTP interface
« Reply #991 on: 12 / June / 2013, 10:47:30 »
I still think this is the right direction.
I'm sorry if I caused the impression that I'm objecting against this rework. I'm fine with the changes.
BTW
On a semi-related note, the whole business of having the remotecap have it's own butchered variant of raw_savefile called from capt_seq also bothers me. raw_savefile does more than just saving, it's involved in bracketing, shot histogram, curves etc.  Not all of those make sense for remotecap, but it's an ugly duplication.
I agree, I just wanted to spare changing another source file when I did that. Wasn't even sure about which calls to keep in that function.
On a separate note, you can correct my comments and variable names in case they're confusing or inappropriate (there are quite a few misspelled words / sentences in the CHDK source, I suspect that they are not corrected due to respect :) ).

*

Offline reyalp

  • ******
  • 14080
Re: CHDK PTP interface
« Reply #992 on: 12 / June / 2013, 13:12:03 »
I'm sorry if I caused the impression that I'm objecting against this rework. I'm fine with the changes.
No, you didn't. I just meant it still seems ok after I started coding it. Sometimes ideas that sound good in theory end up being ugly when you actually try to implement them.
I agree, I just wanted to spare changing another source file when I did that. Wasn't even sure about which calls to keep in that function.
Ok, that makes sense. I will look at integrating it in raw_savefile, though there's some weird cases there too.
Quote
On a separate note, you can correct my comments and variable names in case they're confusing or inappropriate (there are quite a few misspelled words / sentences in the CHDK source, I suspect that they are not corrected due to respect :) ).
Probably more lazyness than respect ;) I did change notlastchunk to morechunks, because negatives in variable names make my head spin...
Don't forget what the H stands for.

send PTP commands over usb?
« Reply #993 on: 15 / June / 2013, 13:11:21 »
If this question is in the wrong place, please forgive me.

I want to sent PTP over USB to control focus, zoom, ISO, etc. My plan is to use an Arduino host shield over USB. Is that possible?   I am planning to shoot time lapse by controlling various camera settings over USB.

I could do all this with pre2007 powershots, but not since then.  I want to use a modern camera like the S100 for the increased ISO.

If there is a better place to ask this question, just let me know.


Re: send PTP commands over usb?
« Reply #994 on: 15 / June / 2013, 13:14:23 »
I want to sent PTP over USB to control focus, zoom, ISO, etc. My plan is to use an Arduino host shield over USB. Is that possible?   I am planning to shoot time lapse by controlling various camera settings over USB.
Yes - its very possible.  Although you might be able to do everything you need with a CHDK script and save yourself a lot of work.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: send PTP commands over usb?
« Reply #995 on: 15 / June / 2013, 19:35:01 »
I want to sent PTP over USB to control focus, zoom, ISO, etc. My plan is to use an Arduino host shield over USB. Is that possible?
Yes - its very possible.

Could you suggest a beginning point to investigate how to use PTP with CHDK? This thread is four years old, but I can't find any tutorials or detailed instructions anywhere.

What CHDK build is recommended for this? What is the best source of information on how to pursue this?

Thanks!

Re: send PTP commands over usb?
« Reply #996 on: 15 / June / 2013, 19:49:17 »
Could you suggest a beginning point to investigate how to use PTP with CHDK?
http://chdk.wikia.com/wiki/PTP_Extension

Quote
This thread is four years old, but I can't find any tutorials or detailed instructions anywhere.
Technically,  this thread has been running for four years. The information in the recent posts is current.

Quote
What CHDK build is recommended for this? What is the best source of information on how to pursue this?
The latest build of the dev trunk is usually best - but there is a dedicated build for dev testing as well.
http://chdk.setepontos.com/index.php?topic=6231.0
reyalp will probably chime in shortly with some good suggestions so I'll defer on posting further ...
« Last Edit: 15 / June / 2013, 19:52:01 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14080
Re: send PTP commands over usb?
« Reply #997 on: 15 / June / 2013, 19:58:15 »
Could you suggest a beginning point to investigate how to use PTP with CHDK? This thread is four years old, but I can't find any tutorials or detailed instructions anywhere.
In addition to the wiki page waterwingz linked, here are some other useful references

The canonical reference for the protocol is in ptp.h:
http://trac.assembla.com/chdk/browser/branches/release-1_1/core/ptp.h (1.1 stable)
http://trac.assembla.com/chdk/browser/trunk/core/ptp.h (1.2 trunk)

Documentation of PTP specific lua functions and issues http://chdk.wikia.com/wiki/Lua/PTP_Scripting

I maintain an example client application which can be found at: https://www.assembla.com/spaces/chdkptp/wiki

Another user has previously implemented at least some of the protocol for Arduino http://chdk.setepontos.com/index.php?topic=6969.0

Quote
What CHDK build is recommended for this?
The 1.1 stable build should work fine. The 1.2 trunk should also work, but doesn't currently add any additional PTP functionality.
Don't forget what the H stands for.


Re: CHDK PTP interface
« Reply #998 on: 15 / June / 2013, 21:03:36 »
Thanks, waterwingz and reyalp! I'm digging into it right now.

Tom

*

Offline reyalp

  • ******
  • 14080
Re: CHDK PTP interface
« Reply #999 on: 17 / June / 2013, 02:53:40 »
I've made some progress on the chdkptp side of the remote capture stuff.  As of changeset 374, chdkptp supports sub-images with dng. The area outside the requested range is filled with whitelevel.

I've changed the syntax of the remoteshoot command a bit, so you can now request the dng header and raw as separate files or combined into a DNG.
-jpg  get jpeg, default if no other options given
-dng get raw data, dng header, combine into a valid dng file
-raw get raw framebuffer data. ignored if -dng is present
-dnghdr get dng header as a standalone file, ignored if -dng is present

One oddity I noticed is that the jpeg code will sometimes return a zero size chunk as the last chunk. This isn't specifically a problem by itself, but I'm not sure how it crops up.
Don't forget what the H stands for.

 

Related Topics