Guest j1n Posted December 17, 2004 Share Posted December 17, 2004 Hi everyone! I'm trying to making a survilance script for webcamwindows in autoit.In my first attemt i made a script which scanned every 16 pixels in an area to a array which i then compared my next scan to. I was thinking of adding some variation routine to it (since webcam pics arent very stable) but I dont think its even possible to do it this way. The way i want to solve it is by scanning small areas lets say 15x15 pixels and comparing areas instead of pixels but i cant figure out a smart way of using checksum to compare diffrent areas with variable diffrence. Any of you have any bright ideas how to solve this? regards /J btw here is the paperprogramming of how i first intented to solve it. (not working code just my thinking) var $colarray[256] Func motionFound() ;Start logging ;sleep(5000) Endfunc Func motionstop() ;Stop logging Endfunc Func Scanpix() $n = 1 for $i = 1 to 320 step 16 for $j = 1 to 240 step 16 if PixelGetColor( $i , $j ) = $colarray[$n] then motionstop() else $colarray[$n]=PixelGetColor( $i , $j ) motionFound() endif $n = $n + 1 next next EndFunc Link to comment Share on other sites More sharing options...
Helge Posted December 17, 2004 Share Posted December 17, 2004 You could try PixelChecksum, though I think it might be too sensitive.It would probably only be useful in a completely dark room, which would be lighen upwhenever someone opened the door or something...Sorry that I couldnĀ“t help !- Helge - Link to comment Share on other sites More sharing options...
DarkNecromancer Posted December 17, 2004 Share Posted December 17, 2004 Well couldn't you add in some kinda of error limit?? like have it like after scanning the whole picture it can have a max of say 5 errors or having the new scan not match the old scan?? to help account for the inconsistancies???? and if it goes over the 4-5 errors or what ever have it notify you or whatever?? also i dont know much about the image aspect to autoit but couldn't you have to deal with the hex code and have it account for some veriable in color codes?? i dont know just some ideas. Hope i understood your problem Link to comment Share on other sites More sharing options...
jesus2099 Posted January 23, 2007 Share Posted January 23, 2007 (edited) Well couldn't you add in some kinda of error limit?? like have it like after scanning the whole picture it can have a max of say 5 errors or having the new scan not match the old scan?? to help account for the inconsistancies???? and if it goes over the 4-5 errors or what ever have it notify you or whatever??also i dont know much about the image aspect to autoit but couldn't you have to deal with the hex code and have it account for some veriable in color codes?? i dont know just some ideas. Hope i understood your problem I think every checksums would be different between two images. And two checksum are either identicals or not identicals.If they are almost the same, it doesn't mean the datas from which they are computed are almost the same. It would be coincidence. Edited January 23, 2007 by jesus2099 Link to comment Share on other sites More sharing options...
Psibernetic Posted January 23, 2007 Share Posted January 23, 2007 perhaps check 4 sets of series of 4 pixels, and if at least 2 sets of pixels are different then consider it a change...or sumthing such as that, but I kno my webcam flickers horribly so this wouldnt work for mine..ut maybe youy can work from that [sup]Psibernetic[/sup]My Creations:X-HideSecuracy Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now