Not save file? - Script Writing - CHDK Forum

Not save file?

  • 4 Replies
  • 2749 Views
Not save file?
« on: 30 / August / 2016, 05:33:06 »
Advertisements
Is there a way to take a pic and then not save it? Of course, using the new rawop I want to examine the buffer before taking the next pic.  This would help tremendously for sensor analysis, as saving the pics are pointless, only some stats are needed each frame.
« Last Edit: 18 / September / 2016, 13:58:30 by jmac698 »

*

Offline reyalp

  • ******
  • 14125
Re: Not save file?
« Reply #1 on: 30 / August / 2016, 16:06:28 »
Is there a way to take a pic and then not save it? Of course, using the new rawop I want to examine the buffer before taking the next pic.  This would help tremendously for sensor analysis, as saving the pics are pointless, only some stats are needed each frame.
Not currently.

For cameras that have the filewrite hook for CHDK remote capture, all the infrastructure is there, it just needs something to control it from script.

I am open to adding this capability, but the practical benefits are probably small. Using the filewrite hook, all the normal jpeg processing etc is still done. If you use low resolution / quality, the overhead of saving the file is very small.

There are also some issues with the method currently used to block jpeg save, for example some cameras crash if you subsequently switch to play mode. The same is true if you delete the file.
Don't forget what the H stands for.

Re: Not save file?
« Reply #2 on: 06 / September / 2016, 04:44:20 »
I found the saving overhead about 380ms.

Without disabling saving, I would have the overhead for 128 saves and 127 reads to do what I want, which say adds up to an extra 96 seconds.

It would work something like this:
-take first bias
loop 127 times:
  -take bias, stop at raw hook
  -read in previous bias, sum with current raw buffer
  -if last loop, shift right >> 7
  -raw continue, save summed dark
end

The sums will fit in a signed 16bit, and 128 frames should be enough for an almost perfect master bias.

As for saving small jpgs for less overhead, it actually takes a bit longer to make a smaller picture because of the resizing step, which I assume is nothing compared to i/o time, which has a minimum because flash writes a page at a time anyhow and page write times are large even if you're writing one page. At least in a theoretically argument.
« Last Edit: 06 / September / 2016, 04:48:10 by jmac698 »

*

Offline reyalp

  • ******
  • 14125
Re: Not save file?
« Reply #3 on: 06 / September / 2016, 13:33:35 »
I found the saving overhead about 380ms.
But how much of that time is actually writing, vs creating the jpeg in the first place? CHDK currently only has the capability to skip the former. Entirely disabling the jpeg step is likely to be difficult, since it involves a bunch of different canon tasks and the whole shooting process is built around it. Unless Canon left in a "skip jpeg" flag or "capture only" function for development, which is possible.

Quote
As for saving small jpgs for less overhead, it actually takes a bit longer to make a smaller picture because of the resizing step, which I assume is nothing compared to i/o time, which has a minimum because flash writes a page at a time anyhow and page write times are large even if you're writing one page. At least in a theoretically argument.
On some old cameras (digic II era at least) small jpegs were actually slower. I haven't tested on recent ones. You are probably correct that flash block sizes have an impact too.
Don't forget what the H stands for.

Re: Not save file?
« Reply #4 on: 18 / September / 2016, 13:57:09 »
That's neat that you can confirm my theory about small jpgs.  So now that I'm taking hours and hundreds of pics/GB of data in my research, it's taking a really long time to process.  Over an hour just to get stats for 16GB of files.  Now the problem is running out of room.  What I need to do is a preshoot step to let the temp stabilize before taking any pics.

Anyhow I suppose I'll give up my dream of doing this in-camera, thanks for the input.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal