MATLAB Answers


Expand the contour of structure

Asked by Rami
on 19 Sep 2013


I would like to create contour of structure in image and need to expand the contour in all directions by 10 pixels. I used edge and imdilate, but got wrong results. Any help or guidance will be appreciable.

[edge_im,th] = edge(image,'sobel'); % Boundary of structure
se = ones(10,10);
dilate_im = imdilate(edge_im,se,'full'); % Dilate boundary by 10 pixels
[expand_im,th]=edge(dilate_im,'sobel'); % Boundary of expansion of aperture

  1 Comment

what is a typical image (please attach)? What is the 'correct' results?


No products are associated with this question.

0 Answers

Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!