.TH "MPSImageErode" 3 "Mon Jul 9 2018" "Version MetalPerformanceShaders-119.3" "MetalPerformanceShaders.framework" \" -*- nroff -*- .ad l .nh .SH NAME MPSImageErode .SH SYNOPSIS .br .PP .PP \fC#import \fP .PP Inherits \fBMPSImageDilate\fP\&. .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBMPSImageErode\fP filter finds the minimum pixel value in a rectangular region centered around each pixel in the source image\&. It is like the \fBMPSImageAreaMin\fP, except that the intensity at each position is calculated relative to a different value before determining which is the maximum pixel value, allowing for shaped, non-rectangular morphological probes\&. .PP .nf for each pixel in the filter window: value = pixel[filterY][filterX] + filter[filterY*filter_width+filterX] if( value < bestValue ){ result = value bestValue = value; } .fi .PP \fBA\fP filter that contains all zeros is identical to a \fBMPSImageAreaMin\fP filter\&. The center filter element is assumed to be 0, to avoid causing a general lightening of the image\&. .PP The definition of the filter for \fBMPSImageErode\fP is different from vImage\&. (MPSErode_filter_value = 1\&.0f-vImageErode_filter_value\&.) This allows \fBMPSImageDilate\fP and \fBMPSImageErode\fP to use the same filter, making open and close operators easier to write\&. The edgeMode property is assumed to always be MPSImageEdgeModeClamp for this filter\&. .SH "Author" .PP Generated automatically by Doxygen for MetalPerformanceShaders\&.framework from the source code\&.