dilateOut = hexagon.hvx.dilate7x7(Input)
performs 2-D grayscale dilation of the input matrix Input with a 7-by-7
square structuring element for Hexagon® Vector eXtension (HVX).
%% Create a simple binary-style image (uint8)
H = 100; W = 128;
img = zeros(H, W, 'uint8');
% Draw two white squares
img(30:35, 30:35) = 255; % Square 1
img(60:65, 80:85) = 255; % Square 2
To apply dilation to the grayscale image with different kernel sizes, use the hexagon.hvx.dilate3x3, hexagon.hvx.dilate5x5, and hexagon.hvx.dilate3x3 functions.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.