Image FilteringViews:4times
![]() Perform several different types of image filters to help make measuring easier VMS has the ability to perform several different types of image filters to help make measuring easier. This can be done using the filter_image(IMAGE InputImage, INTEGER FilterType, INTEGER Radius, IMAGE OutputImage) function. The parameters for the function are as follows:
There are 7 total filters that can be used with this function. Below are the 3 most commonly used ones and what they are used for. Smoothing FilterThe smoothing filter runs a moving average filter over every pixel in an image. Every pixel is replaced with the average of its surrounding pixels. The size of the filter is specified by the radius parameter. The smoothing filter is especially useful when trying to eliminate noise in an image. The downside to this filter is that edges are smoothed out as well. Median FilterThe median filter works similarly to the smoothing filter, but rather than replacing every pixel with the average of its surrounding pixels, it will replace it with the median value. This is especially useful for reducing sparse amounts of noise such as scratches. The median filter has the added benefit of usually preserving edges. Contrast FilterThe contrast filter works by highlighting any areas in an image where there is a sharp edge. This filter is useful when attempting to highlight edges, especially when the intensity of the background is unknown or variable. This filter is also very useful for defect detection.
|