MATLAB: I want to smooth the boarder of all white areas in this Binary Image (even the tiny ones). Consider it like smoothing with your hand.

image processingImage Processing Toolbox

Best Answer

In addition of the above links provided by @Walter morphological operations, imdilate and imclose, you may try with the following code also (@Image Analyst related answer, I cant find the link right now).
*Here image_binary is the input binary image, please note you have to manage the tradeoff between original shape changes vs. smoothness.
windowSize=12; % Decide as per your requirements
kernel=ones(windowSize)/windowSize^2;
result=conv2(single(image_binary),kernel,'same');
result=result>0.5;
image_binary(~result)=0;
figure, imshow(image_binary);
Hope it helps!
Related Question