Why bwboundaries with roipoly change the size of a rectangle?

1 vue (au cours des 30 derniers jours)
Meshooo
Meshooo le 24 Mar 2014
Modifié(e) : Meshooo le 25 Mar 2014
Dear all,
Could anyone tell me why the size of rectangle is changed?
x = [4 10 10 4 4];
y = [4 4 10 10 4];
BW = poly2mask(x,y,20,20); %binary image that contains a small rectangle
B = bwboundaries(BW);
b = B{1};
X = b(:, 1);
Y = b(:, 2);
hpoly = roipoly(BW,Y,X);
figure, imshow(BW)
figure, imshow(hpoly)
Any idea will be appreciated.
Best, Meshoo

Réponses (0)

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by