Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

int ddimage_Filter::set uint32_t  threshold,
uint32_t  stride,
uint32_t  pixel_threshold,
uint32_t  block_filter
 

This method allows the runtime modification of any of the ddimage_Filter processing parameters. The threshold, pixel_threshold, and block_filter parameters don't cause a reset of the filter's buffers as they are a minimal impact on the results compared with the change of the stride value. If the stride value changes then the buffers will be reoranized and reinitialized appropriately. If stride changes, all difference buffers are zeroized and some are potentially freed depending on the new stride compared with the old.

Reseting/Updating the internal buffers when stride changes falls into two cases. If stride is greater than the previous stride then no buffers need to be freed. The difference filters are zeroized and the history buffers are set up as the oldest entries in the history buffer array. If stride is less than the previous stride then the oldest history buffer entries are freed and the newest stride number of buffers are kept & copied into the new history buffer array. In addition, all unnecessary difference buffers are freed and the remaining difference buffers are zeroized.

Parameters:
threshold When two images are differenced, if the value of the pixels are greater than threshold then motion occured. If a value of 0 is passed, then any slight difference between pixels will cause motion to be assumed.
pixel_threshold Occationally there is noise in the image, pixel_threshold is the number of pixels in a 4x4 kernel that must exist for the motion pixels to remain. See the more detailed documentation of the Double Difference 4x4 block filtering for more information on this setting. The recommended (inclusive) range of values is 6 - 14.
stride The stride is used to determine which frames will get differenced in the Double Difference algorithm. This setting works by counting over 'stride' number of frames to choose the next frame to be differenced. Assuming we start at index 0, a stride of 2 would cause the differencing of 0 and 2 where there is 'stride - 1' frames in between. 0 -> 1 counts one stride step and 1 -> 2 counts the second stride step. If a stride of 0 is passed, then a stride of 1 will be substituted.
block_filter This chooses one of two methods for the 4x4 block filtering that removes noise pixels from the motion results. The two choices are ddimage_BlockStandard and ddimage_BlockKernel.

Definition at line 331 of file ddimage_Filter.cpp.





Copyright (C) 2002 - 2007 Philip D.S. Thoren ( pthoren@users.sourceforge.net )
University Of Massachusetts at Lowell
Robotics Lab
SourceForge.net Logo

Generated on Sat Jun 16 02:44:33 2007 for phission by  doxygen 1.4.4