Comparison: CHDKPTP vs Canon's RemoteCapture - page 5 - RAW Shooting and Processing - CHDK Forum supplierdeeply

Comparison: CHDKPTP vs Canon's RemoteCapture

  • 129 Replies
  • 40523 Views
Re: Comparison: CHDKPTP vs Canon's RemoteCapture
« Reply #40 on: 25 / August / 2012, 20:50:38 »
Advertisements
That will come once the final bricked hardware will be installed and working on the instrument.
I guess you did not understand (or didn't read) the part where reyalp explained what "bricked" means ?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14082
Re: Comparison: CHDKPTP vs Canon's RemoteCapture
« Reply #41 on: 25 / August / 2012, 21:19:11 »
So please don't laugh.  I want to put your sample code into one text file, and I want to send that text file to the camera while CHDKPTP is running, preferably from the CHDFPTP command line, or something equivalent.   How do I do it?

Umm
Quote
You can put the above ! commands in the same file you put contextplus option in
Although if you aren't using the gui, you should make a different file and run that with the -r option, since the contextplus option won't be recognized.

The first two commands only have to be run once per chdkptp session, since they just define functions to use later.

To use the function, you'd just enter
!my_set_tv(1/100)
or whatever at the prompt.

Quote
However, if you are writing more complicated code, you probably don't want to put everything in one line. In that case, you can put it in a .lua file (in the same directory as the other chdkptp .lua files) and then put something like
!require('myfile')
in the settings file. 'myfile' is the name of the file without the .lua extension.

FWIW, chdkptp looks for files called _chdkptpguirc or _chdkptprc in your home directory (or the directory given by the environment variable CHDKPTP_HOME, if set) and runs those automatically when starting with or without the gui respectively. This and much more is described in USAGE.TXT in the chdkptp package.
Don't forget what the H stands for.

*

Offline SticK

  • *****
  • 779
Re: Comparison: CHDKPTP vs Canon's RemoteCapture
« Reply #42 on: 25 / August / 2012, 22:27:32 »
@waterwingz
My interpretation of "bricked" by reyalp .... in short: "(irrecoverably modified not to standard) partially-functional hardware."  Not correct?

@reyalp
My apologies that you had to re-quote, but I can see this more clearly in my present state of mind given some reading and thought.  The bottom line is for what I want to do:
  a) While I am watching the live image in CHDKPTP with contextplus enabled,
  b) From command line, I call a .lua script that I (you) wrote with function parameters (Tv, ISO) then shoot that executes on the camera.  If I can do that, I can start with my comparison testing.
I think you've given me the answer.  I will go on this and see what I can do.  Thanks.

Re: Comparison: CHDKPTP vs Canon's RemoteCapture
« Reply #43 on: 25 / August / 2012, 23:11:41 »
@waterwingz
My interpretation of "bricked" by reyalp .... in short: "(irrecoverably modified not to standard) partially-functional hardware."  Not correct?
I have a 4" thick dictionary in the basement somewhere that I believe probably contains all the adjectives in your interpretation.   For someone simple like me, "bricked" means that your device is dead & broken - suitable only to hold a door open (aka using a brick as a door stop).  Hence my amusement at your statement "That will come once the final bricked hardware will be installed and working on the instrument."  Picture a standard 3"x2"x8" red brick bolted to your system.


Update : I just realized what this discussion most reminded me of :  Wake up Polly Parrot
« Last Edit: 25 / August / 2012, 23:31:39 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline SticK

  • *****
  • 779
Re: Comparison: CHDKPTP vs Canon's RemoteCapture
« Reply #44 on: 25 / August / 2012, 23:32:10 »
@waterwingz .. cute thanks .. nothing like a good pic // I see why you laughed!

@everyone
Little problem ... I have not done anything new, no new code yet.  I just noticed this ...

Mode: VIDEO_STD on PUP.  If I press shoot_half it works, but only once after cold start.  That is, subsequent shoot_halfs, or any other button after that 1st shoot_half, I get ERROR: a script is already running.  Even shutdown doesn't work.  I have to manually restart the camera. 

In CHDKPTP if I change mode to AUTO after PUP, then all's fine .. multiple shoot_halfs, buttons, etc.  If I change mode AUTO to VIDEO_STD, then I am only allowed one shoot_half, and it falls into the same problem.  I restart camera and client to get back in.

If I am in VIDEO_STD and I have not pressed shoot_half, the other buttons like zoom work as they should. 

Thus one shoot_half in VIDEO_STD locks out the GUI.  I absolutely necessary to restart the GUI to clear the problem.

Because I am depending on VIDEO_STD for the SX110 ... can we resolve this problem?


*

Offline reyalp

  • ******
  • 14082
Re: Comparison: CHDKPTP vs Canon's RemoteCapture
« Reply #45 on: 25 / August / 2012, 23:59:58 »
Mode: VIDEO_STD on PUP.  If I press shoot_half it works, but only once after cold start.  That is, subsequent shoot_halfs, or any other button after that 1st shoot_half, I get ERROR: a script is already running.  Even shutdown doesn't work.  I have to manually restart the camera. 
I guess you are using the shoot half button in the gui ? This actually does more than shoot_half, it waits for the camera to be ready to shoot a still, so AF, exposure etc are done. This doesn't work in video mode, the variables it waits for never change, so it just gets stuck.

I should fix this so it detects video mode, but in the meantime, you can send something like
Code: [Select]
.press('shoot_half');sleep(1000);release('shoot_half') in the console.
to just press shoot_half for a second.
Quote
Because I am depending on VIDEO_STD for the SX110 ... can we resolve this problem?
I'm not sure I understand why you are using shoot_half in video mode. My understanding was that in still mode, when you pressed shoot_half, it would switch to the same viewport resolution as video mode normally has, so you would use that as an alternative to doing your focusing or whatever in video mode. Maybe I misunderstood your posts.

edit:
The shoot half button in the gui is fixed in chdkptp revision 284. I haven't made a new build, but you can replace your existing gui.lua with the one here http://trac.assembla.com/chdkptp/browser/trunk/lua/gui.lua?rev=284 (download link is at the bottom)
« Last Edit: 26 / August / 2012, 00:22:09 by reyalp »
Don't forget what the H stands for.

*

Offline SticK

  • *****
  • 779
Re: Comparison: CHDKPTP vs Canon's RemoteCapture
« Reply #46 on: 26 / August / 2012, 00:35:33 »
OK thanks, understanding what the gremlin is is good enough.  The story of the shoot_half was that you mentioned that someone said a shoot_half would increase the resolution.  I tried it and confirmed it back to you, in fact using the same snippet you sent here because the button push was not long enough to see it on the live view.  As a reminder, I did ask also if I could hold shoot_half pressed in to keep resolution and shoot etc, but if I recall correctly you explained that operations can't be done that way. 

My instrument works somewhat differently from usual camera where focus is done by the electronics driving the lens in a camera in a negative feedback loop.  Here the feedback is human, so in order to focus, it's very simple ... all I need is the 240 line resolution // not even shoot_half.  Therefore I am relying on VIDEO_STD, which gives me a constant 240.  Hence the operation would look like this, hopefully by tomorrow, simulated with the SX110 on the bench:
   PUP -> VIDEO_STD
   observe LIVE and manually focus the instrument (simulated by moving the camera back and forth)
   acquire_image(Tv_1, ISO_1)
   observe LIVE and manually focus the instrument
   acquire_image(Tv_2, ISO_2)
   etc

function  acquire_image(Tv, ISO)
  Mode AUTO
  my_set_Tv(Tv)
  my_set_ISO(ISO)
  shoot
     (the wish here is to behave like RemoteCapture and send the image(s) directly to PC, ie not write to SD card)
  Mode VIDEO_STD
end
 
Thus from what you say and my requirement, I won't press it.  But if I press it by accident, then I have to restart // not a big issue ... just a flag.  If you happen to fix it, let me know.  All's fine for now.

*

Offline reyalp

  • ******
  • 14082
Re: Comparison: CHDKPTP vs Canon's RemoteCapture
« Reply #47 on: 26 / August / 2012, 01:03:05 »
As a reminder, I did ask also if I could hold shoot_half pressed in to keep resolution and shoot etc, but if I recall correctly you explained that operations can't be done that way. 
If switching back and forth to movie mode works for you, that fine, but just for completeness sake:

You need to release the button between shots to set the exposure values, at least if you use the normal exposure control functions like set_tv96_direct etc. However, there's no reason you couldn't have shoot_half held down for however long you need to focus. The fact that normal CHDK script key presses will be released when the script ends makes it more complicated, but there are several possible workarounds
1) Use a message script. Then you can just send it a press and release command when needed. You can also define messages to set exposure values, shoot etc.
2) Use http://chdk.wikia.com/wiki/LogicalEvent functions, e.g
press halfshoot with lua post_levent_to_ui('PressSwOne') and release it with lua post_levent_to_ui('UnpressSwOne')
Things may get confusing in you mix levent keypresses with chdk press()/release() key presses.

Don't forget what the H stands for.


*

Offline SticK

  • *****
  • 779
Re: Comparison: CHDKPTP vs Canon's RemoteCapture
« Reply #48 on: 26 / August / 2012, 01:20:56 »
Correction I meant Mode M, not Mode AUTO.

Quote "However, there's no reason you couldn't have shoot_half held down for however long you need to focus."

That flexibility is great no question.  So .......

Initialize:
PUP -> Mode M
lua post_levent_to_ui('PressSwOne')
   observe LIVE and manually focus the instrument (simulated by moving the camera back and forth)
   acquire_image(Tv_1, ISO_1)
   observe LIVE and manually focus the instrument
   acquire_image(Tv_2, ISO_2)
   etc

function  acquire_image(Tv, ISO)
  lua post_levent_to_ui('UnPressSwOne')
  my_set_Tv(Tv)
  my_set_ISO(ISO)
  lua press("shoot")
     (the wish here is to behave like RemoteCapture and send the image(s) directly to PC, ie not write to SD card)
   lua post_levent_to_ui('PressSwOne').
end

On the right track?  Would anything conflict? If so, it's more elegant I think because it keeps the same mode.


*

Offline SticK

  • *****
  • 779
Re: Comparison: CHDKPTP vs Canon's RemoteCapture
« Reply #49 on: 26 / August / 2012, 09:47:33 »
Quote "You can put the above ! commands in the same file you put contextplus option in. However, if you are writing more complicated code, you probably don't want to put everything in one line. In that case, you can put it in a .lua file (in the same directory as the other chdkptp .lua files) and then put something like
!require('myfile') in the settings file."

This is interesting.  Thus in summary this forces chdkptp to give me access to functions I wrote in myfile.lua, correct?  If that is the case, it's exactly the solution I'm looking for.

FYI ... I am now searching for an S90 on ebay.

 

Related Topics