Motion Detection - time for a second look ? - page 8 - General Discussion and Assistance - CHDK Forum  

Motion Detection - time for a second look ?

  • 81 Replies
  • 23217 Views
*

Offline reyalp

  • ******
  • 13439
Re: Motion Detection - time for a second look ?
« Reply #70 on: 16 / February / 2013, 19:57:25 »
Advertisements
The test script starts. After a while the screen freezes.  No measured results will be displayed. With grid option the camera tries to draw a grid. After a few seconds freezes the LCD. The AF LED will not be activated.
Maybe a silly question, but did you try disabling the canon firmware AF assist?
Don't forget what the H stands for.

*

Offline msl

  • *****
  • 1276
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Motion Detection - time for a second look ?
« Reply #71 on: 17 / February / 2013, 06:00:06 »
I've done some tests.

AF assist LED on or off makes no difference. MD_tune crashes as described. A shutter half pressed test was ok, whether AF assist LED on or off. set_led(10,1) works fine.

The crashes produce random results. Some times the camera switches to playback mode. Then I can see some script console and md test result fracments. Some times the live view is destroyed (only horizontal lines). The script console will never be displayed. I think there is a issue with the viewport.

msl
CHDK-DE:  CHDK-DE links

Re: Motion Detection - time for a second look ?
« Reply #72 on: 17 / February / 2013, 10:57:26 »
The MD_Tune.bas script will enable the extra AF LED test code as needed (controlled with the new 'md_af_on_time' script function.
Played with this today.  Not a big deal compared to msl's issues but when when you enable shooting in the MD_Tune.bas script,  the timing values displayed do not seem to include the total time to take the shot - it still show just the detection times.

Update : I remember now - you have to adjust the AF on delay (x10ms) [ ] value and then add that offline to get the total MD response time. 

« Last Edit: 17 / February / 2013, 11:13:34 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline nafraf

  • *****
  • 1308
Re: Motion Detection - time for a second look ?
« Reply #73 on: 17 / February / 2013, 17:13:57 »
Some test with A810 100b, I'm seeing the similar problems reported by msl:
- If grid parameter > 0, camera crashes. Sometimes I can see the grid, sometimes camera crashes before drawing grid.

- If grid parameter == 0, script starts, but when motion detected, AF LED turn on and camera crashes.

I tried using *vid_get_viewport_live_fb() implementation using viewport_buffers[] but I got the same results.

Maybe a silly question, but did you try disabling the canon firmware AF assist?
I'm using Program Mode. In canon menu I setup: AF Frame = Center, AF-Point Zoom = Off, Servo AF =Off.

It probably doesn't like something messing with the AF LED with the shutter half pressed.

Can you test this with a script to see if it's the problem?

This script runs without problems:
Code: [Select]
rem AF Test
@title AF Test

do
    press "shoot_half"
    sleep 5000
    rem Turn ON AF LED
    set_led 1 0
    sleep 1000
    rem Turn OFF AF LED   
    set_led 1 1
    release "shoot_half"
until 0


*

Offline philmoz

  • *****
  • 3332
    • Photos
Re: Motion Detection - time for a second look ?
« Reply #74 on: 17 / February / 2013, 17:20:24 »
I've done some tests.

AF assist LED on or off makes no difference. MD_tune crashes as described. A shutter half pressed test was ok, whether AF assist LED on or off. set_led(10,1) works fine.

The crashes produce random results. Some times the camera switches to playback mode. Then I can see some script console and md test result fracments. Some times the live view is destroyed (only horizontal lines). The script console will never be displayed. I think there is a issue with the viewport.

msl
Some test with A810 100b, I'm seeing the similar problems reported by msl:
- If grid parameter > 0, camera crashes. Sometimes I can see the grid, sometimes camera crashes before drawing grid.

- If grid parameter == 0, script starts, but when motion detected, AF LED turn on and camera crashes.

I tried using *vid_get_viewport_live_fb() implementation using viewport_buffers[] but I got the same results.

Maybe a silly question, but did you try disabling the canon firmware AF assist?
I'm using Program Mode. In canon menu I setup: AF Frame = Center, AF-Point Zoom = Off, Servo AF =Off.

It probably doesn't like something messing with the AF LED with the shutter half pressed.

Can you test this with a script to see if it's the problem?

This script runs without problems:
Code: [Select]
rem AF Test
@title AF Test

do
    press "shoot_half"
    sleep 5000
    rem Turn ON AF LED
    set_led 1 0
    sleep 1000
    rem Turn OFF AF LED   
    set_led 1 1
    release "shoot_half"
until 0

What happens if you set 'AF on delay' and 'AF on time' both to 0 in the MD_Tune.bas script?

This disables the AF LED testing and it should now behave like a normal MD script - in fact it is a cut down version of fudgeys fast MD script.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline msl

  • *****
  • 1276
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Motion Detection - time for a second look ?
« Reply #75 on: 17 / February / 2013, 18:07:46 »
What happens if you set 'AF on delay' and 'AF on time' both to 0 in the MD_Tune.bas script?

'AF on delay' has no influence.

 'AF on time' = 0 => The script runs without problems like a normal md script (also with grids & cell values).
 'AF on time' > 0 => described problems (destroyed bitmap overlay & live view -> frozen display -> crash)

msl
CHDK-DE:  CHDK-DE links

*

Offline philmoz

  • *****
  • 3332
    • Photos
Re: Motion Detection - time for a second look ?
« Reply #76 on: 17 / February / 2013, 18:23:04 »
What happens if you set 'AF on delay' and 'AF on time' both to 0 in the MD_Tune.bas script?

'AF on delay' has no influence.

 'AF on time' = 0 => The script runs without problems like a normal md script (also with grids & cell values).
 'AF on time' > 0 => described problems (destroyed bitmap overlay & live view -> frozen display -> crash)

msl

Can you comment out each of the code sections that tests 'camera_info.perf.md_af_tuning' and see which one is causing the problem.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline philmoz

  • *****
  • 3332
    • Photos
Re: Motion Detection - time for a second look ?
« Reply #77 on: 17 / February / 2013, 20:09:27 »
What happens if you set 'AF on delay' and 'AF on time' both to 0 in the MD_Tune.bas script?

'AF on delay' has no influence.

 'AF on time' = 0 => The script runs without problems like a normal md script (also with grids & cell values).
 'AF on time' > 0 => described problems (destroyed bitmap overlay & live view -> frozen display -> crash)

msl

Can you comment out each of the code sections that tests 'camera_info.perf.md_af_tuning' and see which one is causing the problem.

Phil.


The buffer used to store and display the on-screen stats was too small - so I suspect some memory was being corrupted.

Fixed in revision 2580.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)


Re: Motion Detection - time for a second look ?
« Reply #78 on: 17 / February / 2013, 20:31:11 »
The buffer used to store and display the on-screen stats was too small - so I suspect some memory was being corrupted.
I really hate it when that happens to me.  Always wanted to do a C string library that would not allow that - removing the string functions that did not have an "n" in the middle seemed a good start ( strcpy vs strncpy ).
« Last Edit: 17 / February / 2013, 21:53:48 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline nafraf

  • *****
  • 1308
Re: Motion Detection - time for a second look ?
« Reply #79 on: 18 / February / 2013, 04:25:13 »
The buffer used to store and display the on-screen stats was too small - so I suspect some memory was being corrupted.
Thanks!! It's working now.

 

Related Topics