MATLAB: How to create rounded edges of an irregular object? I want to smoothen the corners of this object.

image processingMATLABmatlab 2019a

Best Answer

You can blur the image with imfilter() or conv2():
windowSize = 21; % Bigger for more blurring.
kernel = ones(windowSize) / windowSize^2;
output = imfilter(rgbImage, kernel);