I can now confirm that the RGB values don't come out correctly when the U & V values are treated as unsigned. In particular, the G value almost never moves much above zero. Treating U &V as signed gives much more reasonable values for RG&B.I've also started to notice the camera crashing while running MD testing. Not sure if I'm overloading the display with all my updates? ROMlog attached.
Can you add the camera model and version plus the main.dump for the build.
yikes!The u,v,r,g & b detect will only work if the viewport width is evenly divisible by the number of columns
The curr,prev,buff1,buff2 & points stuff is overkill and not needed. All it needs is the prev array of ints and a diff array of unsigned chars for the draw grid routine. I've tested this and will post updated code tonight. This also uses 7k less memory.
Quote from: philmoz on 30 / January / 2013, 16:25:42The curr,prev,buff1,buff2 & points stuff is overkill and not needed. All it needs is the prev array of ints and a diff array of unsigned chars for the draw grid routine. I've tested this and will post updated code tonight. This also uses 7k less memory.One thing I wanted to try next was to add a "range" variable per grid cell - something to use for storage of a measured "baseline" variation in each cell. Not sure how well it will work but the idea would be to take several readings when first called to determine how much variation is in the background scene and then only trigger when a cell deviated more than that variation (plus the sensitivity value). I guess it could be an added detection mode enabled by a parameter in the function call.
Quote from: waterwingz on 30 / January / 2013, 18:38:31Attached is a re-work of the motion_detector code (trunk version). This include the cell difference display in the top left corner of each cell. It works more reliably in my testing and so far I haven't had any crashes (touch wood).Thanks for the help - I'll look tonight ( 12 hrs from now).
Attached is a re-work of the motion_detector code (trunk version). This include the cell difference display in the top left corner of each cell. It works more reliably in my testing and so far I haven't had any crashes (touch wood).
Quote from: philmoz on 31 / January / 2013, 04:28:15Quote from: waterwingz on 30 / January / 2013, 18:38:31Attached is a re-work of the motion_detector code (trunk version). This include the cell difference display in the top left corner of each cell. It works more reliably in my testing and so far I haven't had any crashes (touch wood).Thanks for the help - I'll look tonight ( 12 hrs from now).Loaded and tested. Can't seem to break it.
Added to trunk, I'll back port to release-1.1 as well.
g=3 -- draw grid (0=none, 1=grid only, 2=changes, 3=both)
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