Screenshots     Download     Pricing     Documentation     Tutorials     Resources     Contact     Forum     Search  

Movement/Motion Detection

The Movement detection module provides a way to detect image changes as a result of movement. Movement can be an easy way to segment an object of interest from the background.

Any pixel that is different enough in color or intensity is preserved; pixels that have not changed are set to black (default). To change the sensitivity of this comparison increase or decrease the ‘Difference Amount’ within the movement dialog interface.

To create a movement mask (i.e. set changed pixels to white) click to ‘Set Movement to White’.

If you want to show the pixels that are still uncheck the ‘Set Still to Black’.

To prevent still images from being further processed you can chose to stop processing of the image processing pipeline if the movement detected is below a certain percent of the image size or if no movement is detected above a certain threshold. Setting either will stop image processing and continue with the next frame grabbed from the video source. This is particularly useful when streaming the video source to an AVI file where you only want to record images with movement and not still images.

For global movements or large objects use the ‘Stop below Movement Percent’ as this ensure that small image aberrations do not make it through. Often due to overhead lights or specula effects pixels can abruptly change for an instance to a different color/intensity. However, if small movements need to be detected use the ‘Stop below Pixel Difference’ which will stop processing as long as all pixel differences are below the specified amount. With this condition even a single pixel above the specified value will allow the image to continue thought the processing pipeline.

Unchecking both ‘Set Movement to White’ and ‘Set Still to Black’ is a great way to stabilize a still image and remove the flickering effects due to overhead lighting or poor quality cameras.

Note that using a mean filter before the movement detected is often recommended as another way to reduce any abrupt pixel changes. Spurious pixel values will be more common on lower quality cameras so the values you use may need to be updated when changing cameras.

Interface


Instructions

1. Background Image - Select the reference frame to use when comparing frames for movement. The more frames used the more stable the reference image will be but changes are detected slower.
2. Continuous Update - Specify if the reference frame should be continuously updated or stop after the specified number of frames have occurred.
3. Threshold - Specify the pixel difference amount that needs to be exceeded in order for movement to be detected.
4. Technique - Select which type of comparison you want.

RGB Difference - straight linear difference between RGB pixels
RGB Squared Difference - squared difference that helps to better reduce noise
RGB Percent Difference - percent difference between RGB pixels. Since darker pixels contain more noise use the threshold value below to ignore pixel values lower than the specified threshold. The percent mode helps to eliminate white or black background pixel issues.
Intensity Difference - compares intensity only (grayscale comparison)
Color Difference - compares CrCb (chroma) values. Note that color differences are VERY small so you will need to set the difference amount to a very small amount (1 - 3)
Texture Difference - a small window is used to calculate a measure of texture within the window. This amount is also calculated in the background image. The difference of the two is then used as the threshold value. This allows you to tell when a part of an image's texture (i.e. smooth or not smooth) changes. Note that this is less lighting sensitive as the texture measure is relative to the local window.
5. Anti - Auto Adjustment - if your camera does not provide the option to freeze white balance or auto exposure select this checkbox. The current image's lighting will then be adjusted (reversed) to the previous image's lighting parameters to ensure that comparisons are done within the same lighting conditions.
6. Set Movement to White will set any movement detected to white. This can be used to create a movement mask.
7. Set Still to Black will set any non-movement pixels to black.
8. When specifying the RGB Percent Difference black pixels will contain a lot of noise and therefore should be removed. This threshold specifies at what low level pixel values should be ignored when calculating the percent difference.
9. Stop Below Movement Percent specifies how much movement needs to be detected for the module to signal that something has changed in the image. If nothing is detected then the entire image is set to black.

10. Stop Below Pixel Difference specifies that if all pixel difference values are below the specified amount then the image will be considered still even if the percentage of pixels changed exceeds the above percent.

Notes


Ideally to detect movement your camera needs to maintain the lighting conditions from one image frame to the next. You may be able to turn off auto-exposure or auto-shutter speeds by examining your camera options. Select the options button in the main RoboRealm dialog, then one of the Video Capture or Video Format buttons to see if your camera provides a manual override of setting these parameters. You can test the lighting issue by setting the movement detector to use the last 50 previous frames to calculate the RGB difference. Once these settings have been made the current image will eventually go to black assuming no movement is within the camera's view. If you then hold up a white sheet of paper in front of the camera you will suddenly see the entire background change since the white sheet of paper will have caused your camera to shift intensity values. This changing of pixel values moves the pixel intensity outside the "difference amount" and therefore the entire image will appear to have moved. Switching the camera to manual mode will prevent this intensity shift from happening. If you are not able to switch to manual mode select the 'Anti - Auto Adjustment' checkbox which will attempt to undo these lighting changes by your camera.

When using the movement detector you may notice issues with black streaks or spots in the resulting movement mask. These spots are caused by dark background pixels. Ideally to create an appropriate mask (similar to green screen or blue screening) your background should be as planar as possible and not include the color that the foreground will. For example, using a white sheet as a background and then standing in front of the background with a white shirt on will not allow you to segment your white shirt ... the shirt and white background are considered as the same color and therefore no movement will be detected. This also frequently happens for black areas since the absence of light in shadows will cause confusion if your foreground object has any shadows in it.

Variables


MOVEMENT_PIXELS - number of pixels that have changed from frame to frame
MOVEMENT_PERCENT - percent of pixels that have changed from frame to frame

See Also


Optical Flow
Average

Movement Related Forum PostsLast postPostsViews
please help to make face/body folower for DV cam rotation head
Dear Roborealmer, I am planing to build an automation platform that can move left and right (single...
3 months 7 304
Automated Rifle target Scoring
Hi Everyone, I was hoping I could get some ideas thrown around for a project I am working on for a...
4 months 8 2118
Object strobing
If i strobe an object (at a fixed frequency) in a scene, can roborealm mask out the scene leaving only the area of the strobing...
7 months 9 282
Counting cars
I'm trying to count the number of cars entering or exiting a junction, on multiple lanes. I've tried to make a running program...
8 months 4 608
Blob Segmentation and Filtering : Human Targets
Hi, I have been using the movement module to track a single target. It is now my goal to track more than 1 target, starting firs...
9 months 11 1045
roborealm
can any one help me on doing People counting software using vision system?...
9 months 3 396
Object counting
I am a total noob when it comes to RoboRealm and programming in general. But i am eager to learn. I wonder if somebody can point...
11 months 11 1654
first frame
In the movement module the background image of first frame is slected for operation. It appears the first frame seems not to be...
0 months 2 374
Defect detecting in weldings
Steven, I have been testing the software, and it looks that covers my needs.
2 years 6 702
tracking single movments object
question : i want to make a movment tracker... the problem is : when i have one object (person) rob...
2 years 2 827
Motion Detection module
Hi i have a doubt about what modules should i use because am trying to create a pan and tilt camera system driven by people moti...
2 years 2 702
movement
hello, i have been following the movement of an object using roborealm's movement module. given that the movement percent of th...
2 years 2 671
Roboteq module
http://www.roborealm.com/forum/index...
3 years 3 692
Track with Circle Movement
Hi, im new here how to make track an object, car or person with Red Circle i mean something like this see upload 2 Crappy painti...
3 years 4 1339

© 2005 - 2012 RoboRealm. All Rights Reserved. | Contact | Glossary | Privacy | Disclaimer | Link to Us | Resources | Site Map