Motion Detection



  1. Install your camera using the provided Hawking Camera installation disk.  Sorry, I do not have an open source alternative to this Windows-only installation program.  The installer will search for cameras directly attached (via wired cable) to your network and it will allow you to set up the wireless settings such as the SSID, WEP keys, etc.
  2. For a quick and simple GUI, run the HawkingCameraPanel main program: "java -jar jhawkingcam.jar net.sf.jhawkingcam.HawkingCameraPanel"
  3. To archive images, run the CameraArchiver main program.  It takes the name of a property file on the command line.  The property file can be on the CLASSPATH, in which case it is automatically located, or you can give the full pathname to the property file: "java -cp jhawkingcam.jar net.sf.jhawkingcam.CameraArchiver camera.properties"


The camera.properties file can contain the following properties:

  • archiveFilenamePattern - string defining filename for saved images may use ${host} for camera ip or host name, ${month} for two digit month, ${day} for two digit day in month, ${monthName} for full month name, ${hour} for 00-23 hour or day, ${minute} for two digit minute of the hour and ${second} for two digit second in the minute. Any directories in the pattern will be created using File.mkdirs() if they don't exist already.
  • captureInterval - time between image captures in milliseconds, defaults to 1000ms
  • hostname - ip address or host name of camera
  • password - password to log in to camera
  • username - username to log in to camera home page
  • resolution - camera resolution to use: P640, P320 or P160, defaults to P640
  • motionDetector - true to only capture images when motion is detected (requires Java Advanced Imaging API - JAI), defaults to true
  • preMotionBuffer - number of milliseconds worth of images to store before motion starts (limited to memory size), default to 10000
  • postMotionBuffer - number of milliseconds worth of images to store once motion has stopped, defaults to 10000
  • motionTimeout - number of milliseconds of "quiet" before we decide there's no motion anymore, defaults to 10000
  • rotation - angle in degrees to rotate the image.  This is useful if you need to mount the camera upside down.  Set rotation=180 in this case
  • motionThreshold - percentage difference between a frame and the previous frame in order for motion to be detected