Quote from: philmoz on 05 / February / 2013, 02:54:47There is a performance hit when displaying the cell difference value in MD.Timings on my G1X:10x10 grid - grid display takes <10ms, cell diff takes 30ms.20x20 grid - grid display takes 10-20ms, cell diff takes 130ms.Does this slow dow the actual motion detection though? As the display is usually showing "0", I can think of some obvious ways (using a little memory) to only update when a value has changed. Not sure its worth it though - when I get around to updating the wiki (per my first post in this thread) on tuning I'll make a note of the perfomance hit.
There is a performance hit when displaying the cell difference value in MD.Timings on my G1X:10x10 grid - grid display takes <10ms, cell diff takes 30ms.20x20 grid - grid display takes 10-20ms, cell diff takes 130ms.
Unless I've got this code wrong somewhere this would also prove that the camera is doing pre-emptive task switching (at least on my cameras) - md_draw_grid doesn't sleep while it's generating the display.
What about a detection method that averaged the Y values from each of the 4 viewport buffers, at each sampled location, instead of just using what we hope is the 'most recent' buffer?
Quote from: philmoz on 05 / February / 2013, 16:42:01What about a detection method that averaged the Y values from each of the 4 viewport buffers, at each sampled location, instead of just using what we hope is the 'most recent' buffer?I had a similar thought on the weekend - just check all four buffers. Wasn't sure what that would do the the processing load and memory needed though.I assume you meant to get separate averages per grid box per buffer and check each for a change ? Not to average all four buffers and then check for a change?
Update : just noticed that your measured 50 mSec average response time for your G12 matches my predicted average response time. That might just be luck - I need to do some more modelling to understand what's happening here.
4 viewport buffers
I was thinking of just averaging all four buffers into one value each cycle so no additional memory would be required. Additional processing time would be required - need to test it to see how bad it would be (probably similar to calculating R or B).
Not sure why the G1X is faster - probably has something to do with the refresh rate of the viewport data from the sensor.
Just a note: the buffer count used to be 3, even in earlier DIGIC 4 cameras. CHDK doesn't currently know the number of buffers.
Incidentally, I found this old forum thread interesting : Those 100ms lightning motion detection models, which are they?
Started by Barney Fife « 1 2 » Completed and Working Scripts
Started by knorke Creative Uses of CHDK
Started by mrShrimp LUA Scripting
Started by mellow-yellow Script Writing
Started by Kestrel1978 General Help and Assistance on using CHDK stable releases