Is there a way to access picture data and process it before its written to card? - General Help and Assistance on using CHDK stable releases - CHDK Forum

Is there a way to access picture data and process it before its written to card?

  • 3 Replies
  • 4256 Views
Advertisements
Hello

Im interested in evaluating a picture, some kind of motion detection, but instead of writing the picture to card, i would like to get access to the picture to evaluate the direction in witch an object has moved
after that, for instance trigger a led to send the data to a controler.

Im thinking in some stand aloen auto guiding for a telecope.

any ideas if this could be possible? how?

thanks
Geert

Yes, you can monitor the live-image 'viewport' just like motion-detection does.
You would find the location with maximum luminance and, assuming it is a start point-object, monitor a very small area around it on subsequent scans.

The telescope tracking error will presumably be small so there is no need to monitor the entire viewport.

Of course, you have to study and understand the existing motion-detection code.



David

Hello David
Thanks for your quick answer.
To do such viewport monitoring, should y setup a develloping environment or can it be done justs using the scripting language?


*

Offline reyalp

  • ******
  • 14080
This should probably be done in C. You could read the live view in lua with peek(), but it's not very efficient.

Unless your camera is looking through a decent telescope (rather than piggybacking on top of it), the live view will only see the brightest objects, and will have fairly poor angular resolution. The live view is also pretty noisy in low light.

Depending on what kind of sample rate you want, you could also take actual exposures and work from the raw buffer instead of the live view. Part of this would have to be done in C, because the raw buffer is not likely to be valid when script is running. See the shot_histogram code for an example of where this would go.

This thread: http://chdk.setepontos.com/index.php/topic,4918.msg48429.html#msg48429 might also be of interest.
Don't forget what the H stands for.


 

Related Topics