Find Minimum Value in ROI
This example shows how to calculate the minimum value in an image ROI by using the
Minimum block. By using the minimum value, the model removes indistinct pixels in the image regions.
The model reads the original image and the binary mask comprising the ROI for which the minimum value has to be computed. The original image consists of regions with large image structures that are circular in shape and regions with small, indistinct image structures. The binary mask isolates the indistinct structures from the distinct image structures.
Load the binary mask containing the ROI to MATLAB workspace. The ROI corresponding to indistinct structures have intensity value 1 in the binary mask.
Open the model.
Minimum block to output only the computed minimum, the
Mode parameter of the block is set to
Value. To perform ROI processing, the
over parameter is set to
input. The ROI input to the
Minimum block is a binary image. Hence, the
Type parameter is set to
mask. The block computes the minimum value of the pixels in the original image that lie in the ROI specified by the binary mask.
block replaces pixel values in the ROI with the computed minimum.
Simulate and Display Results
The model outputs a clean image with only distinct image structures.