mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-10 23:06:35 +08:00
code simplification
This commit is contained in:
@@ -127,11 +127,8 @@ result = hough_ellipse(edges, accuracy=20, threshold=250,
|
||||
result.sort(order='accumulator')
|
||||
|
||||
# Estimated parameters for the ellipse
|
||||
best = result[-1]
|
||||
yc = int(round(best[1]))
|
||||
xc = int(round(best[2]))
|
||||
a = int(round(best[3]))
|
||||
b = int(round(best[4]))
|
||||
best = list(result[-1])
|
||||
yc, xc, a, b = [int(round(x)) for x in best[1:5]]
|
||||
orientation = best[5]
|
||||
|
||||
# Draw the ellipse on the original image
|
||||
|
||||
Reference in New Issue
Block a user