Jump to content

webcam survilance?


Guest j1n
 Share

Recommended Posts

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

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 up

whenever someone opened the door or something...

Sorry that I couldnĀ“t help !

- Helge -

Link to comment
Share on other sites

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 :idiot:

Link to comment
Share on other sites

  • 2 years later...

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 by jesus2099
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...