Filter an image with a 5-by-5 filter containing equal weights (often called an averaging filter) using imfilter .
Apply different Gaussian smoothing filters to images using imgaussfilt . Gaussian smoothing filters are commonly used to reduce noise.
Read the three visible color channels of the LANDSAT image of the Little Colorado River.
Deblur an image using blind deconvolution. The example illustrates the iterative nature of this operation, making two passes at deblurring the image using optional parameters.
Filter a truecolor image using imfilter . A truecolor image is a 3-D array of size m -by- n -by-3, where the last dimension represents the three color channels.
Create filters using the fspecial function that can be used with imfilter. The fspecial function produces several kinds of predefined filters, in the form of correlation kernels. This
Use histogram equalization to adjust the contrast of a grayscale image. The original image has low contrast, with most pixel values in the middle of the intensity range. histeq produces an
Perform decorrelation stretching to three color bands of an image. A color band scatterplot of the images shows how the bands are decorrelated and equalized.
Increase the contrast in a low-contrast grayscale image by remapping the data values to fill the entire available intensity range [0, 255].
Plot the transformation curve for histogram equalization. histeq can return a 1-by-256 vector that shows, for each possible input value, the resulting output value. (The values in this
Specify gamma when adjusting contrast with the imadjust function. By default, imadjust uses a gamma value of 1, which means that it uses a linear mapping between intensity values in the
Use a guided filter to smooth an image, reducing noise, while preserving edges. The example uses two pictures of the same scene, one taken with a flash and the other without a flash. The version
Remove salt and pepper noise from an image using an averaging filter and a median filter to allow comparison of the results. These two types of filtering both set the value of the output pixel to
You can use morphological opening to remove small objects from an image while preserving the shape and size of larger objects in the image.
Use masked filtering to increase the contrast of a specific region of an image.
Filter a region of interest (ROI), using the roifilt2 function to specify the filter. roifilt2 enables you to specify your own function to operate on the ROI. This example uses the imadjust
Apply multiple box filters of varying sizes to an image using integral image filtering. Integral image is a useful image representation from which local image sums can be computed rapidly. A
Work with thermal images, demonstrating a simple segmentation. Thermal images are obtained from thermographic cameras, which detect radiation in the infrared range of the
Dilate an image using the imdilate function. The morphological dilation operation expands or thickens foreground objects in an image.