Why bwboundaries with roipoly change the size of a rectangle?

1 次查看(过去 30 天)
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

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by