Mask files, sizes, and motion.conf tweaks

The tweaks don’t seem to be having much effect. Even with the lightswitch option set to 80, and the smart_mask_speed set to 10, it’s still pretty wild and windy out there. # Dynamically create a mask file during operation (default: 0) # Adjust speed of mask changes from 0 (off) to 10 (fast) smart_mask_speed 10 … Continue reading “Mask files, sizes, and motion.conf tweaks”

The tweaks don’t seem to be having much effect. Even with the lightswitch option set to 80, and the smart_mask_speed set to 10, it’s still pretty wild and windy out there.

# Dynamically create a mask file during operation (default: 0)
# Adjust speed of mask changes from 0 (off) to 10 (fast)
smart_mask_speed 10

# Ignore sudden massive light intensity changes given as a percentage of the picture
# area that changed intensity. Valid range: 0 - 100 , default: 0 = disabled
lightswitch 80

So it has to be the mask file. The way the mask file works is by using an identically sized image as the webcam and making all areas to be monitored white, and all not to be monitored black. Or is it the other way around? I did this using the gimp and after a couple of false starts it turned out to be pretty easy. Here’s my rough notes:

  1. Make a copy of an existing webcam image to use as the template. This way the dimensions of the image will be correct
  2. Use the Free Select Tool (it looks like the laso) to select an area that you want to be monitored for movement.
  3. Select Bucket Fill. Under the section for Affected Area make sure it’s ticked for Fill Whole Selection. Make sure your foreground colour is white (I kept getting this wrong. It doesn’t matter. Just click on the arrows to reverse foreground/background and do it again).
  4. Click on the area to be filled and it should fill with white.
  5. For the background, go to Select -> Invert, then swap your foreground and background colours. Click on the area you want to be black

You need to save this as a ‘pgm’ file. For some reason a pgm file is huge compared to a jpeg, e.g.

-rw-r--r-- 1 dougie dougie 691254 2011-05-25 14:24 mask1 - 25May2011_1407.54-00.pgm
-rw-r--r-- 1 dougie dougie  12639 2011-05-25 14:26 mask1 - 25May2011_1407.54-00.jpg

although I’m sure it’s possible to reduce the size there doesn’t seem much need at the moment.

Mask File for motion
mask file

Now it’s just a matter of pointing the appropriate option in motion.conf at the mask file and seeing what happens.

Here’s my first attempt:

 

 

motion.conf options

Hmmmm, there are a few options in the motion.conf file I haven’t seen before. Or at least, that I can’t recall having seeing before. These look promising: # Dynamically create a mask file during operation (default: 0) # Adjust speed of mask changes from 0 (off) to 10 (fast) smart_mask_speed 0 # Ignore sudden massive … Continue reading “motion.conf options”

Hmmmm, there are a few options in the motion.conf file I haven’t seen before. Or at least, that I can’t recall having seeing before. These look promising:

# Dynamically create a mask file during operation (default: 0)
# Adjust speed of mask changes from 0 (off) to 10 (fast)
smart_mask_speed 0

# Ignore sudden massive light intensity changes given as a percentage of the picture
# area that changed intensity. Valid range: 0 - 100 , default: 0 = disabled
lightswitch 0

The trouble with creating a mask file is that it assumes the camera stays fixed in the same position, and that’s pretty unlikely. So I’ll try tweaking these settings and see what happens. Far less effort. Currently running at about 1000 images an hour. Let’s see if I can get that down a bit …

 

Time delay of adding caption to photo slideshow

Photos make a great screensaver and the xscreensaver with glslideshow option is what I use. I often use it for ident practice, e.g. plants, birds etc. The image appears randomly on the screen and I think, I know what that is…

At the moment I have various scripts that can create ad-hoc collections of images based on the embedded tags. I also overlay a caption over the images using the convert bit of imagemagick and that works well.

What I want to do is have a time delay so that an image appears for say, 10 seconds, and then a caption appears over it. The filename would be ok. I can control how long the image appears in xscreensaver, and it’s surprisingly easy to train yourself to not-look at the filename or caption, but I’m curious as to whether it’s possible (without too much effort) to add the caption after some time-out period.