Low level functions - Script Writing - CHDK Forum

Low level functions

  • 5 Replies
  • 3846 Views
Low level functions
« on: 22 / February / 2010, 02:39:27 »
Advertisements
Hello,

I have read the entire wiki and I think that currently it is impossible to access low level functions with scripts, such as reading the captured image or writing into the lcd screen. Is this correct?

The only ways that I had found for somehow read the image is by using the get_histo_range and the md_detect_motion functions. Is there another way?

I have read that this can be done via compiling my own CHDK build. Where can I start?, there were many different build before but the wiki page says that now there is only one, where I can find the source files for that one?

*

Offline fe50

  • ******
  • 3152
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Low level functions
« Reply #1 on: 22 / February / 2010, 03:12:26 »
I have read the entire wiki and I think that currently it is impossible to access low level functions with scripts, such as reading the captured image or writing into the lcd screen. Is this correct?
The only ways that I had found for somehow read the image is by using the get_histo_range and the md_detect_motion functions.
In scripts you have access to the file system with Lua.
Writing directly to the LCD (to the frame buffer) is not a script feature yet.

Quote
I have read that this can be done via compiling my own CHDK build. Where can I start?
--> http://chdk.wikia.com/wiki/For_Developers  ;)
--> http://chdk.wikia.com/wiki/Cardtricks

Quote
there were many different build before but the wiki page says that now there is only one, where I can find the source files for that one?
--> all informations & links are still available from http://chdk.wikia.com/wiki/For_Developers ;)
----> http://tools.assembla.com/chdk/browser/trunk
------> CardTricks also knows the sources...

*

Offline reyalp

  • ******
  • 14126
Re: Low level functions
« Reply #2 on: 23 / February / 2010, 00:13:40 »
In scripts you have access to the file system with Lua.
Writing directly to the LCD (to the frame buffer) is not a script feature yet.
Writing to the screen should be possible with poke, but you might need to replicate some ScreenLock/RefereshPhysicalScreen stuff to make it usable.

You could call these functions using http://chdk.wikia.com/wiki/LUA/LUA_Reference/Native_Function_Calls

edit:
Note that you must build your own CHDK to enable this feature.
Don't forget what the H stands for.

Re: Low level functions
« Reply #3 on: 23 / February / 2010, 00:20:45 »
mmm I did not notice those native calls...

Anyway, I already set up an environment and built CHDK from sources.

By doing that, now I can read the camera sensor raw data in real time and also I can write into the screen. It would be easier if I could do that only with scripts though.

By the way, how powerful is the chip inside these cameras?, is it possible to make some custom image processing in there in real time?

Excellent work guys... CHDK is awesome.


*

Offline reyalp

  • ******
  • 14126
Re: Low level functions
« Reply #4 on: 23 / February / 2010, 01:17:29 »
By the way, how powerful is the chip inside these cameras?, is it possible to make some custom image processing in there in real time?
Not on the main CPU. The digic DSP part obviously can, but we currently have little control of that. The main CPU is an ARM 946ES. On older cameras, strings suggest the max clock speed of 72MHZ, although it's not clear if there are multipliers involved.

On my a540, just reversing all the bytes in the raw buffer, using hand written asm takes ~300 ms.
Don't forget what the H stands for.

Re: Low level functions
« Reply #5 on: 23 / February / 2010, 04:55:22 »

Jon has also posted details and code ...  somewhere ...  for other image-processing functions.

Posted here

« Last Edit: 24 / February / 2010, 06:40:10 by Microfunguy »

 

Related Topics


SimplePortal © 2008-2014, SimplePortal