supplierdeeply

Liveview from Script?

  • 4 Replies
  • 872 Views
Liveview from Script?
« on: 20 / October / 2015, 01:54:55 »
Advertisements
Hi,
I was wondering if there's some way to read the LCD from script. I'm trying to access menus with clicks however I can't be sure where I am in each menu. I thought if I could read a pixel being on, I'd know what item was highlighted. Thanks.

*

Offline reyalp

  • ******
  • 11443
Re: Liveview from Script?
« Reply #1 on: 20 / October / 2015, 15:40:35 »
Not really. You could look at the framebuffers with peek, but this would be very platform specific, and you'd have to decode the colors yourself.

Note that to see what was highlighted with the menu you would want the bitmap (AKA UI overlay) not the live view. The "drawing" code allows you to draw on this, but does not include any functions to read it.

I'd like to add better script support for reading / analyzing the live view at some point, and reading the bitmap should probably be included as well.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 3665
Re: Liveview from Script?
« Reply #2 on: 21 / October / 2015, 19:21:10 »
I'm trying to access menus with clicks however I can't be sure where I am in each menu.
Depending on what you're trying to do, the so-called UI properties could maybe help. See the discussion thread for more info.

Re: Liveview from Script?
« Reply #3 on: 26 / October / 2015, 05:18:07 »
That's great!  Thanks so much.

I'd love to see these working in 1.4, it's better than keypresses; quicker, silent, using standard values for settings,  clearer indications in the camera display, and no confusion about the menu settings getting out of sync with the script values (eg I set iso400 in script but menu was set to auto, when does iso400 display on the lcd and when does the setting return to auto?).

Also under motion detect (http://chdk.wikia.com/wiki/Motion_Detection#Function_:_md_detect_motion) I noticed you can dump the liveview to a file, then you could open that and read it,  but that probably doesn't include the overlay.  I was wondering, if the ptpgui can display the overlay, isn't the code written somewhere to grab it?  However I don't need it now, unless there's menus that can't be controlled by propid.


*

Offline reyalp

  • ******
  • 11443
Re: Liveview from Script?
« Reply #4 on: 26 / October / 2015, 15:39:22 »
was wondering, if the ptpgui can display the overlay, isn't the code written somewhere to grab it? 
We have access to the bitmaps buffers in C code, they just aren't exposed in script.
Don't forget what the H stands for.

 

Related Topics