projekty
/
imago.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
save figures from matplotlib
[imago.git]
/
imago_pack
/
linef.py
diff --git
a/imago_pack/linef.py
b/imago_pack/linef.py
index
2e40fca
..
ab7c95d
100644
(file)
--- a/
imago_pack/linef.py
+++ b/
imago_pack/linef.py
@@
-66,11
+66,8
@@
def run_ransac(image):
line2 = [line_to_points(line2, 0), line_to_points(line2, width - 1)]
return [sorted(points), sorted(points2)], line, line2
line2 = [line_to_points(line2, 0), line_to_points(line2, width - 1)]
return [sorted(points), sorted(points2)], line, line2
-
-
def find_lines(image, show_image, logger):
"""Find lines in the *image*."""
def find_lines(image, show_image, logger):
"""Find lines in the *image*."""
- # TODO refactor into smaller functions
logger("preprocessing")
show_image(image, "original image")
logger("preprocessing")
show_image(image, "original image")
@@
-100,20
+97,8
@@
def find_lines(image, show_image, logger):
draw.line(line_from_angl_dist(line, image.size), fill=(120, 255, 120))
show_image(image_g, "lines")
draw.line(line_from_angl_dist(line, image.size), fill=(120, 255, 120))
show_image(image_g, "lines")
- return lines, l1, l2, bounds, hough # TODO
-
-def combine(image1, image2):
- """Return a list of points that are present in both images."""
- im_l1 = image1.load()
- im_l2 = image2.load()
-
- on_both = []
- for x in xrange(image1.size[0]):
- for y in xrange(image1.size[1]):
- if im_l1[x, y] and im_l2[x, y]:
- on_both.append((x, y))
- return on_both
+ return lines, l1, l2, bounds, hough # TODO
def line_from_angl_dist((angle, distance), size):
"""Take *angle* and *distance* (from the center of the image) of a line and
def line_from_angl_dist((angle, distance), size):
"""Take *angle* and *distance* (from the center of the image) of a line and