Camera orientation - Script Writing - CHDK Forum supplierdeeply

Camera orientation

  • 11 Replies
  • 5049 Views
Camera orientation
« on: 22 / April / 2016, 17:34:40 »
Advertisements
How I can get camera orientation in degrees?
Canon PowerShot SX220 1.01a / CHDK 1.4.1-4599

*

Offline reyalp

  • ******
  • 14080
Re: Camera orientation
« Reply #1 on: 22 / April / 2016, 20:28:43 »
How I can get camera orientation in degrees?
The orientation propcase gives it in 90 degree increments. I'm not aware of any source that gives it with higher precision.
Don't forget what the H stands for.

Re: Camera orientation
« Reply #2 on: 23 / April / 2016, 00:19:07 »
Cameras like the SX50 have an OSD function that shows how level the camera is.  So the info for those models is in there somewhere.

Also, IIRC there is a very old post here on the forum (2008?) that has a video of a similar function implemented in CHDK.  Of course I can never find it when I want it.....
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14080
Re: Camera orientation
« Reply #3 on: 23 / April / 2016, 01:34:26 »
Also, IIRC there is a very old post here on the forum (2008?) that has a video of a similar function implemented in CHDK.  Of course I can never find it when I want it.....
Probably https://chdk.setepontos.com/index.php?topic=1365.0

G7X has the electronic level function, but I haven't investigated how to get the information.
Don't forget what the H stands for.


*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Camera orientation
« Reply #4 on: 23 / April / 2016, 03:53:55 »
Some time ago we have made some experiments with a Lua script. GetISLensEViAaxis and GetISLensEViBaxis could be helpful functions. A great problem was, depending on camera they return different values.

The script ran on the sx220 and sx260 very well.

msl
CHDK-DE:  CHDK-DE links

Re: Camera orientation
« Reply #5 on: 23 / April / 2016, 07:23:53 »
Thank you. That is what I need. But on my cam it print error: 'Lua native calls not enabled'.
Canon PowerShot SX220 1.01a / CHDK 1.4.1-4599

*

Offline msl

  • *****
  • 1280
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Camera orientation
« Reply #6 on: 23 / April / 2016, 07:39:28 »
Go into the CHK menu: Miscellaneous Stuff => Enable Lua Native Calls

msl
CHDK-DE:  CHDK-DE links

Re: Camera orientation
« Reply #7 on: 23 / April / 2016, 07:54:54 »
Thanks, now it works.
Canon PowerShot SX220 1.01a / CHDK 1.4.1-4599


Re: Camera orientation
« Reply #8 on: 23 / April / 2016, 09:09:21 »
Some time ago we have made some experiments with a Lua script. GetISLensEViAaxis and GetISLensEViBaxis could be helpful functions. A great problem was, depending on camera they return different values. The script ran on the sx220 and sx260 very well.
Seems to crash my G10.  The camera just restarts - no ROMLOG is created.

If I get a moment I'll fiddle with it.  Might be that the camera is too old and does not support the necessary event procs.

Edit : resets camera when it calls :
Code: [Select]
    A = call_event_proc("GetISLensEViAaxis")
    B = call_event_proc("GetISLensEViBaxis")
« Last Edit: 23 / April / 2016, 09:31:01 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Camera orientation
« Reply #9 on: 25 / April / 2016, 08:19:21 »
Some questions:
1) I need to edit angle correction every 1-2 minutes. Why is it occur?
2) Is there any way to get pitch angle also?
Canon PowerShot SX220 1.01a / CHDK 1.4.1-4599

 

Related Topics