CHDKPTP - PC Remote Control Performance Analysis - page 37 - RAW Shooting and Processing - CHDK Forum supplierdeeply

CHDKPTP - PC Remote Control Performance Analysis

  • 465 Replies
  • 85443 Views
*

Offline reyalp

  • ******
  • 13432
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #360 on: 02 / October / 2012, 23:46:46 »
Advertisements
SUGGESTION: it might be a good idea to queue commands (scripts) // additionally have a queue depth level option that shows the "ERROR a script is already running" only when queue is full.
Rejected. The client is responsible for managing what scripts are running and only sending a new one when the previous one is finished. The entire button control interface needs to be reworked at some point. That could include queuing button presses locally, but the whole thing might end up using a message script instead.
Quote
Also "WARNING a script is already running" may be less dire.
It's supposed to be dire.

Quote
QUESTION.  I am wondering what's available and possible for the CHDKPTP GUI.  It would be very useful if I can adapt it for my application.
Yes, it was made specifically with this kind of thing in mind. The existing gui is little more than a proof of concept.
Quote
  While waiting for the lens to arrive, I would like to customize it ... for example... add buttons & link scripts, change window format, change size of the small liveview and its position, add a reticle, etc.
All these things are possible, assuming a willingness to learn and write Lua code.
Quote
Is there source available?
Yes, all of chdkptp is open source, under either GPL or Lua (MIT like) license.
Quote
Is there a linker script available that I can do a "hello world" compile of the source?
The entire GUI is written in Lua using IUP http://www.tecgraf.puc-rio.br/iup/ and CD http://www.tecgraf.puc-rio.br/cd/, none of the things you've described require rebuilding the C code.

Because the gui is written in lua, you can modify it on the fly from the console with !
For example, you could do
Code: [Select]
!d=iup.dialog{title="hello world",rastersize="200x100",iup.button{title="bye",action=function() d:destroy() end}};d:show()

If you do want to build from source, the README.TXT describes what you need.
Don't forget what the H stands for.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #361 on: 03 / October / 2012, 09:25:04 »
@reyalp

PART 1 -- CHDKPTP CUSTOMIZATION

Quote "none of the things you've described require rebuilding the C code."

Nice -- that is exactly the answer I was looking for // kind of you to supply the Hello World code snippet -- that is very powerful // someone made some good choices on the CHDK project near the beginning ... you?  I did (broadly) read the links and all this led me to examine gui.lua and gui_live.lua.  Since my most urgent customization is the user-adjustable cross-hair centered in the liveview ("canvas" I assume, in CD parlance) I mentioned before, can you confirm that CD is capable of providing this functionality without relying on other resources?  In other words, I take it you've already linked in the necessary libs with the C code to do this, correct?  Fundamentally then, I expect I would create buttons/dialogs in the style of gui.lua, use CD line drawing calls, and interact with (draw on top of) the canvas you created in gui_live.lua (m.icnv?).  Is this on the right track?  Can you think of other pointers that could help me with this specific requirement?

PART 2 -- LIVEVIEW GOES DARK PROBLEM

This may have drifted past you in the sea of text ... could you please look at it?  See "Description" and sample screen shots here:
http://chdk.setepontos.com/index.php?topic=8613.msg91516#msg91516

It is related to the sv= parameter set high in shoot and liveview going dark after shoot.  In a nutshell ... the problem only affects the camera liveview // JPGs and CR2s are exposed correctly regardless of liveview bright or dark condition.

*

Offline srsa_4c

  • ******
  • 4426
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #362 on: 03 / October / 2012, 17:02:23 »
@SticK
I have prepared a test build which should be able to discover what kind of file operations happen after shooting. It's based on my test branch, but has some modifications to record some debug info into files.
Beware! If you decide to install it, replace diskboot.bin and the modules found in the chdk/modules folder on the card. If you go back to the previous (1.1) test version, you need to replace the diskboot.bin and the modules, again. If you mix up 1.1 modules with 1.2 diskboot.bin or vice versa, the camera will probably crash.

How to test:
- Start the camera, go into rec mode, choose a subject with low details (white piece of paper or something), set high compression to lower the file sizes. Disable CHDK RAW.
- Take a picture with every possible image size (L, M1, M2, ...), including single RAW. Then enable RAW+JPEG, and take another picture. After all this, take another picture (after you take a picture, the previous picture's debug info gets saved into a file).
You'll find some files named like DMP_1234.BIN in the root of the SD card. Zip them up, then upload the zip somewhere. You can include the picture files (with the same numbers) too, but those will not be needed hopefully.
The test build is at the usual place. Only use it for this discovery.

Liveview trouble: I still recommend you to use some scripted keypresses or jogdial movements after shoot. As the override is something the camera doesn't expect, you need to force it to "reload" its settings.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #363 on: 03 / October / 2012, 17:27:12 »
Quote "Take a picture with every possible image size (L, M1, M2, ...), including single RAW. Then enable RAW+JPEG"

One clarification ... I expect that your RAW here is Canon native RAW, right?  On the S90, I keep CHDK RAWs disabled all the time.

Quote "I still recommend you to use some scripted keypresses or jogdial movements after shoot."

You asked about this // I did do the keypresses and showed you the results at the top here:
http://chdk.setepontos.com/index.php?topic=8613.msg91526#msg91526


*

Offline srsa_4c

  • ******
  • 4426
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #364 on: 03 / October / 2012, 17:52:05 »
Quote "Take a picture with every possible image size (L, M1, M2, ...), including single RAW. Then enable RAW+JPEG"

One clarification ... I expect that your RAW here is Canon native RAW, right?
Yes.

Quote
You asked about this // I did do the keypresses and showed you the results at the top here:
http://chdk.setepontos.com/index.php?topic=8613.msg91526#msg91526
Since you were able to find a method that restores the liveview brightness, I'd suggest to turn those keypresses, jogdial movements into script commands. Also, try to switch the camera into another mode (Av, Tv), and see whether shoot() has the same effect on liveview.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #365 on: 03 / October / 2012, 17:59:25 »
Quote "Since you were able to find a method that restores the liveview brightness"

No it did not ..  I explained there what I did and that it did not make any difference // please read the post because there is additional useful info there.  Have you tried my function called "myshoot() yourself?  Please try it.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #366 on: 03 / October / 2012, 19:17:14 »
@srsa_4c
Please build me a 100c because I am doing something else on the 101a and don't want to touch it for now.

*

Offline srsa_4c

  • ******
  • 4426
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #367 on: 03 / October / 2012, 21:18:31 »
@srsa_4c
Please build me a 100c because I am doing something else on the 101a and don't want to touch it for now.
Done.
> Set ISO to 1600
 > Fig 1, liveview before shoot
 > !myshoot(0.4, 2.8, 1600, "C:\\CANON_S90\\")
     > JPG Ok, EXIF reads 1600, JPG brightness is same as seen in liveview Fig 1
 > Fig 2, liveview after shoot: Liveview goes dark ==>> gets internally set to ISO 100, but icon remains at 1600
 > If I shoot same again, JPG is exposed correctly, at 1600, but liveview still stays dark
 > When I press SET to do manual ISO reset, 1600 is correctly displayed // Ok, but liveview still dark
 > I have to jog the ISO value to restore the bright liveview, e.g. 1/3 stop (LEFT or RIGHT) liveview goes bright immediately, then back to 1600 and liveview is again as in Fig 1.
::)


*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #368 on: 03 / October / 2012, 23:20:41 »
@srsa_4c
Oh, now I see, said the ...

That must be the biggest misinterpretation of a solution I've experienced I my entire life ... what I described was to demonstrate and attempt to help the CHDK team figure out where the solution in CHDK could be found, isolated or directed to.   Keep in mind, I (or anyone who needs to) will be shooting rapidly the new shoot command (my code which you still have not tried, or at have not admitted to trying after two reminders): View, move specimen, shoot; View, move specimen, shoot; View, move specimen, shoot ; View, move specimen, shoot; etc for hours at stretch ...... and when the display goes dark and I have to brighten it to see where I'm going each time, I could just as well reboot the camera every time before moving my specimen, and it will be faster and have the same effect.  After all, rebooting is a generic solution for *any* FW problem.  So imagine me having to do that last line I described every few seconds operating the instrumentation.  I feel it's as though I had made a tasty apple pie for you guys and got it thrown back in my face! >:(

My words "have to" should have be a dead giveaway!

@reyalp
Please look at this problem.  It really needs a fix // thanks.
« Last Edit: 03 / October / 2012, 23:22:30 by SticK »

*

Offline reyalp

  • ******
  • 13432
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #369 on: 04 / October / 2012, 00:13:17 »
Since my most urgent customization is the user-adjustable cross-hair centered in the liveview ("canvas" I assume, in CD parlance) I mentioned before, can you confirm that CD is capable of providing this functionality without relying on other resources?
You can draw lines on a canvas, that's a core part of CD. If you are going to do this, you need to be able to read and understand the manuals, and on the not infrequent occasions they are ambiguous, you need to experiment until you find the answer. I'll answer questions specific to chdkptp when I can, but I'm not going to do a lot of hand holding for general CD/IUP/Lua stuff.
Quote
This may have drifted past you in the sea of text ... could you please look at it?
I saw it, and did not have an answer, nor time to investigate. Shoot just uses set_sv96, so it's unlikely this is specific to chdkptp code or your shoot function. From your description, it sounds like the camera live view is confused about the current ISO. As srsa said, overrides having side effects isn't unexpected. From a quick test, I don't see anything like you describe on d10, but it doesn't have a true manual mode and uses propset 2 rather than propset 3. You might try twiddling the various ISO propcases (found here http://trac.assembla.com/chdk/browser/trunk/include/propset3.h), or looking for a propcase updated by the menu actions which isn't updated by the overrides.

Does the same thing happen for ISOs lower than 1600 ?
Quote
I could just as well reboot the camera every time before moving my specimen, and it will be faster and have the same effect.
Quote from: srsa_4c
I'd suggest to turn those keypresses, jogdial movements into script commands.
Don't forget what the H stands for.

 

Related Topics