Filter löschen
Filter löschen

Why bwboundaries with roipoly change the size of a rectangle?

1 Ansicht (letzte 30 Tage)
Meshooo
Meshooo am 24 Mär. 2014
Bearbeitet: Meshooo am 25 Mär. 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

Antworten (0)

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by