mirror of
https://github.com/wassname/scikit-image.git
synced 2026-10-01 12:31:10 +08:00
fix example according to new API
This commit is contained in:
1 parent
e27b798ffa
commit
313bf0ea9a
1 file changed
+4
-4
@@ -126,12 +126,12 @@ best = heapq.nlargest(1, accum)[0]
|
||||
# Estimated parameters for the ellipse
|
||||
center_y = int(best[1])
|
||||
center_x = int(best[2])
|
||||
xradius = int(best[3])
|
||||
yradius = int(best[4])
|
||||
angle = np.pi - best[5]
|
||||
yradius = int(best[3])
|
||||
xradius = int(best[4])
|
||||
angle = best[5]
|
||||
|
||||
# Draw the ellipse on the original image
|
||||
cx, cy = ellipse_perimeter(center_y, center_x,
|
||||
cy, cx = ellipse_perimeter(center_y, center_x,
|
||||
yradius, xradius, orientation=angle)
|
||||
image_rgb[cy, cx] = (0, 0, 1)
|
||||
# Draw the edge (white) and the resulting ellipse (red)
|
||||
|
||||
Reference in new issue
Block a user