projekty
/
imago.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ransac
[imago.git]
/
imago_pack
/
linef.py
diff --git
a/imago_pack/linef.py
b/imago_pack/linef.py
index
667442c
..
ccf209e
100644
(file)
--- a/
imago_pack/linef.py
+++ b/
imago_pack/linef.py
@@
-38,22
+38,15
@@
def transform(image, hough, show_image):
im_h2 = filters.high_pass(im_hough, 96)
show_image(im_h2, "second high pass filters")
im_h2 = filters.high_pass(im_hough, 96)
show_image(im_h2, "second high pass filters")
- im_h2 = filters.components
2(im_h
2)
+ im_h2 = filters.components
(im_h2,
2)
show_image(im_h2, "components centers")
return im_h2
show_image(im_h2, "components centers")
return im_h2
-def find_lines(image, show_image,
verbose
):
+def find_lines(image, show_image,
logger
):
"""Find lines in the *image*."""
# TODO refactor into smaller functions
"""Find lines in the *image*."""
# TODO refactor into smaller functions
- if verbose:
- def logger(m):
- print >> sys.stderr, m
- else:
- def logger(m):
- pass
-
logger("preprocessing")
show_image(image, "original image")
logger("preprocessing")
show_image(image, "original image")
@@
-77,10
+70,10
@@
def find_lines(image, show_image, verbose):
im_h3 = filters.high_pass(im_hough2, 120)
show_image(im_h3, "third high pass filter")
im_h3 = filters.high_pass(im_hough2, 120)
show_image(im_h3, "third high pass filter")
- im_h3 = filters.components(im_h3)
+ im_h3 = filters.components(im_h3
, 1
)
show_image(im_h3, "half centers")
show_image(im_h3, "half centers")
- logger("finding the
grid
")
+ logger("finding the
lines
")
lines_m = hough2.all_lines_h(im_h3)
lines = []
lines_m = hough2.all_lines_h(im_h3)
lines = []