Matlab – Spatial Filtering

Filtering is a technique for modifying or enhancing an image. As it name stated, spatial filtering use filter or also know as mask, kernel, template or window. Values of filter sub image are referred to coefficients rather than pixel intensities. Masks are always in odd size such as 3×3, 3×5 or etc. You won’t be able to find the center of the mask if it’s in even size. The process is simply moving the filter mask from point to point in an image. The filter oat each point is calculated using predefined relationship. Continue reading “Matlab – Spatial Filtering”

Matlab – Laplacian Mask

Another part of Digital Image Processing is the Laplacian mask. Laplacian mask contains the coefficients of the Laplacian operator (second order derivatives). When dealing with Laplacian mask,you must be very careful with the difference in sign when combining either by adding or subtract a Laplacian filtered image with another image. Laplacian operator have some effect. It tends to produce image that have grayish edge lines and other discontinuities in brighter intensities, all superimposed on a dark, featureless background. To correct the problem of featureless background, you must add the original and Laplacian filtered image together. Continue reading “Matlab – Laplacian Mask”

Matlab – Dilation and Erosion

In digital image processing, you must understand on dilation and erosion. Dilation adds pixels to the boundaries of objects in an image. On the other hand erosion removes pixels on object boundaries. The number of pixels added or removed from the objects in an
image depends on the size and shape of the structuring element used to process the image. In the morphological dilation and erosion operations, the state of any given pixel in the output image is determined by applying a rule to the corresponding pixel and its neighbors in the input image. The rule used to process the pixels defines the operation
as a dilation or an erosion. Continue reading “Matlab – Dilation and Erosion”