Those 100ms lightning motion detection models, which are they? - page 2 - General Help and Assistance on using CHDK stable releases - CHDK Forum
supplierdeeply

Those 100ms lightning motion detection models, which are they?

  • 40 Replies
  • 27205 Views
Re: Those 100ms lightning motion detection models, which are they?
« Reply #10 on: 09 / April / 2008, 03:06:47 »
Advertisements
And a few days ago I realized (found out) that I was running mine on a 60Hz refresh rate, I didn't know it could go up to 75Hz so I changed that. Might be able to get slightly more accurate readings if/when I test it all again (I probably will, someday).
Maybe but I doubt it. Refresh rates don't really mean anything to LCD's. I am pretty certain your monitor will still run at 60Hz even if you set it to 75Hz. It may allow the graphics card to push data to the LCD faster, but I think the monitor will just buffer it for the next screen draw or something. Also 1/60Hz is roughly  16.7ms and 1/75Hz is about 13.3ms. So you're only gaining a few milliseconds accuracy. Better to leave your LCD at recommended settings. There's been reports of them going bad with higher than recommended refresh rates.

As for MD_Test v3, I don't like it after trying my S5. I'm still trying to visualize how to use the refresh rate for timing. I know it can be done - but how is the problem  ::)

*

Offline mx3

  • ****
  • 372
Re: Those 100ms lightning motion detection models, which are they?
« Reply #11 on: 09 / April / 2008, 07:02:35 »
it seems it is one more topic about "motion detection is too slow?"

I was going to use G (gravitation constant) to check reaction time.
I was going to convert distaance into time.

experiment:

vertically placed distance meter(actually it can be a wall - later it will be possible to measure distance).
at top of it we place object which will cause detection.
then we drop this object.
camera makes shot.
image shows where object is (relative to meter).
we calculate time since detection and shot.
skype: max_dtc. ICQ: 125985663, email: win.drivers(at)gmail, eVB decompiler

*

Offline DataGhost

  • ****
  • 314
  • EOS 40D, S5IS
    • DataGhost.com
Re: Those 100ms lightning motion detection models, which are they?
« Reply #12 on: 09 / April / 2008, 07:42:07 »
I'm going to have a look at the lowlevel stuff again... I noticed that the motion detector uses code which looks much like the code in the histogram. One thing I did notice is that Canon's live histogram is a fluent, high-fps thing. If I read it correctly, the CHDK histogram is updated every spytask tick, the gui is redrawn every 4 spytask ticks. One tick is 20ms, so that should make 80ms refresh or 12,5 fps in the ideal case. I see about 3-4 fps, so I think there's still something to be optimized. I do have to investigate further into the structure of the gui redraw routine and its interaction with / influence on the motion detector, that may be a good location to speed it up. If the histogram calculation routine turns out to be slower than possible, I'll see if I can optimize it and maybe the motion detector along with it.

As far as my eye can see, the Canon histogram updates INSTANTLY . I can see the '20ms' block light on my laptop LCD and on the camera LCD. At that very moment, the histogram skyrockets, so I think it should be possible to have a <40ms response time from the S5. This is all theoretical but it certainly looks doable. By the way, I don't see the 10ms block on my laptop LCD either, so it's probably too slow to display it, and I guess the camera's actual detection speed is lower than 20ms.
On my CRT (75 Hz), I put my camera with the lens (adapter, not the actual lens :p) to the screen so it would touch and 'seal'. I made sure I could *ONLY* see the 10ms block and started my test. I see it in my camera LCD about 70% of the times, so it's response time is either about 10ms, I'm just being lucky or... my monitor doesn't always draw it. At 75 Hz, my monitor response time is 13ms, so in the worst case it's not drawn and in another bad case it's on the screen for a full 13ms.
I did the same test with the 20ms block and I always see it on my camera LCD and histogram.

Anyway, this all requires research and probably lots of coding, so it could be a while.

Edit: by the way, it could be possible that it's already at optimal speed. I forgot to add shutter lag to this calculation, dpreview people tested that lag somehow (I'd like to know how), from half-press to full-press the shutter lag is 50, 80 or 100ms (depending on (which) screen used or not). Maybe this is the real bottleneck and it might not be avoidable. Maybe I can test this by rigging the motion detector so that it will first capture the LCD and then take a picture, and comparing them afterwards. If this is true, I should see the *REAL* activation/detection speed in the LCD dump and the actual image should show that same speed plus shutter lag.
« Last Edit: 09 / April / 2008, 08:13:45 by DataGhost »

*

Offline whoever

  • ****
  • 280
  • IXUS950
Re: Those 100ms lightning motion detection models, which are they?
« Reply #13 on: 09 / April / 2008, 08:50:52 »
Why not use the spytask ticks to determine the shutter lag? Just count the ticks between the full press and hooked CaptSeq. Since you're already at it, probably won't take you more than a few minutes to code and check. By the way, is it indeed 20ms? I'm pretty sure someone mentioned 10ms as a universal keyboard task interval for all known cameras.

Nice idea, using the free fall. I tried it once and found that in practice it is a bit awkward to implement, as in 100 ms a freely falling object moves only 5cm from standstill.
« Last Edit: 09 / April / 2008, 08:56:41 by whoever »


*

Offline whim

  • ******
  • 2046
  • A495/590/620/630 ixus70/115/220/230/300/870 S95
Re: Those 100ms lightning motion detection models, which are they?
« Reply #14 on: 09 / April / 2008, 09:00:17 »
Quote
as in 100 ms a freely falling object moves only 5cm from standstill.

That depends....since it will accelerate, you could give it a 'head start', maybe ?

wim

*

Offline DataGhost

  • ****
  • 314
  • EOS 40D, S5IS
    • DataGhost.com
Re: Those 100ms lightning motion detection models, which are they?
« Reply #15 on: 09 / April / 2008, 09:07:31 »
As far as I can see, yes. Though keep in mind that I know more about the lowlevel stuff than the inner workings of CHDK (at this moment, anyway). I don't exactly know what the structure is or where the keyboard handler is called, all I know is that two tasks are spawned, spytask and phySw. The latter one is responsible for keyboard handling and does indeed run once every 10ms, but the spytask is responsible for all fancy CHDK thingies like the GUI, histogram, RAW processing etc. The fact that I see less than 12,5fps with a theoretical display-refreshtime of 80ms is enough for me to assume that something is running slow somewhere. Zebra isn't particularly speedy, either.

Also, to correct something: in my previous post I assumed only spytask was fired off, I forgot all about phySw. That's also why I got confused about the 80ms, motion detection should perform far worse if that were the case. MD and scripts in general are handled by phySw.

Also, there's a small problem with measuring ticks, so I probably have to fire off a separate task for that. I can get the camera ticks but their accuracy is 100ms, I believe. I can't depend on the spytask timing to be correct, it could be that the spytask routines need more than 1ms to execute (good example: RAW saving).

Oh and about the small movement from standstill: I thought of that when I was doing my measurements and I thought about it some more today. I think I'm going to use a box on a wire, which I'll drop behind a screen so it can gather speed over 100 cm or so. I might need more distance but I'll see about that later.

*

Offline whoever

  • ****
  • 280
  • IXUS950
Re: Those 100ms lightning motion detection models, which are they?
« Reply #16 on: 09 / April / 2008, 09:11:49 »
That depends....since it will accelerate, you could give it a 'head start', maybe ?

Naturally. Still it all was rather awkward in my experience, and in the end I wasn't confident in the results.  I remember someone built a microprecessor-controlled device with LED's for the purpose. That would be an accurate method.

*

Offline Bg~

  • *
  • 27
Re: Those 100ms lightning motion detection models, which are they?
« Reply #17 on: 09 / April / 2008, 20:06:02 »
I get 170 ms with my A720 IS using the web based tester. The script is MD6 from the linked thread in the OP. I may try others if I get the motivation.


*

Offline whoever

  • ****
  • 280
  • IXUS950
Re: Those 100ms lightning motion detection models, which are they?
« Reply #18 on: 10 / April / 2008, 04:30:41 »
Funny, with the web tester (FireFox 2.0.0.13 win) i'm consistently getting 150-160ms, just as you, guys. And it is an ultra-compact IXUS here, so three quite different models have the same response. Incidentally, with jonnythe's proggy (in those rare instances when it ran properly on my Dell notebook) I was getting 100-120ms, which I then recorded on the "camera properties" page. Obviously, there's quite an error involved. Still, one can safely conclude that the response time is somewhere between 100 and 200ms.

As for the script, I find "MD LightningB.bas" most satisfying -- concise, right to the point. If I remember correctly, it was submitted in "motion detection too slow", someone by nick "anonymous". Well, the script is so succinct that I just quote it:
Code: [Select]
@title MD LightningB
@param a Columns
@default a 6
@param b Rows
@default b 4
@param c Threshold (0-255)
@default c 10
@param d Compare Interval (ms)
@default d 0
@param e Trigger Delay (0.1 s)
@default e 0
@param f Time-out Period (s)
@default f 3600
@param g Pix-Step(speed/accuracy adj)
@default g 6
@param h Measure Mode(1-Y 0-U 2-V)
@default h 1
@param i Direct Shoot (0=N 1=Y)
@default i 1
print " compare interval",d
print " trigger delay   ",e
print " direct shoot    ",i
e=e*100
f=f*1000
while 1
  press "shoot_half"
rem use 205 for DigiII
  do
    get_prop 206 p
  until p=1
  md_detect_motion a, b, h, f, d, c, 1, t, 0, 1, 1, a, b, i, g, e
  if i=0 then click "shoot_full"
rem the next loop is endless if AE lock is activated, use 205 for DigiII
  do
    get_prop 206 p
  until p<>1
wend
end
« Last Edit: 10 / April / 2008, 05:04:15 by whoever »

Re: Those 100ms lightning motion detection models, which are they?
« Reply #19 on: 10 / April / 2008, 04:57:49 »
Deleted
« Last Edit: 22 / April / 2008, 16:19:02 by Barney Fife »
[acseven/admin commented out: please refrain from more direct offensive language to any user. FW complaints to me] I felt it imperative to withdraw my TOTAL participation. Nobody has my permission, nor the right, to reinstate MY posts. Make-do with my quoted text in others' replies only. Bye

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal