MATLAB: Increase edge thickness in binary

edge thicknessImage Processing Toolboxline detection

Hi
I have detected the edges of an image using "bwperim". I want to increase the thickness the edges (such as the sides of a square) to make it more visible. How can I do it using Image Processing Toolbox?
Thanks!
Steven

Best Answer

Have a look at the imdilate function.
Here's a quick example,
BW1 = imread('circbw.tif');
BW2 = bwperim(BW1,8);
BW3 = imdilate(BW2, strel('disk',1));