Replace all occurences of bresenham with line

This commit is contained in:
Johannes Schönberger
2013-04-27 17:56:51 +02:00
parent 980aff5bdb
commit 2b505a33bd
3 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -29,10 +29,10 @@ image[-100:-10, 10:-10] = 1
image[10:-10, -100:-10] = 1
# foreground object 2
rs, cs = draw.bresenham(250, 150, 10, 280)
rs, cs = draw.line(250, 150, 10, 280)
for i in range(10):
image[rs + i, cs] = 1
rs, cs = draw.bresenham(10, 150, 250, 280)
rs, cs = draw.line(10, 150, 250, 280)
for i in range(20):
image[rs + i, cs] = 1
+4 -4
View File
@@ -142,10 +142,10 @@ def hog(image, orientations=9, pixels_per_cell=(8, 8),
centre = tuple([y * cy + cy // 2, x * cx + cx // 2])
dx = radius * cos(float(o) / orientations * np.pi)
dy = radius * sin(float(o) / orientations * np.pi)
rr, cc = draw.bresenham(int(centre[0] - dx),
int(centre[1] - dy),
int(centre[0] + dx),
int(centre[1] + dy))
rr, cc = draw.line(int(centre[0] - dx),
int(centre[1] - dy),
int(centre[0] + dx),
int(centre[1] + dy))
hog_image[rr, cc] += orientation_histogram[y, x, o]
"""
+2 -2
View File
@@ -71,10 +71,10 @@ class TestSkeletonize():
image[10:-10, -100:-10] = 1
# foreground object 2
rs, cs = draw.bresenham(250, 150, 10, 280)
rs, cs = draw.line(250, 150, 10, 280)
for i in range(10):
image[rs + i, cs] = 1
rs, cs = draw.bresenham(10, 150, 250, 280)
rs, cs = draw.line(10, 150, 250, 280)
for i in range(20):
image[rs + i, cs] = 1