From: Tomas Musil Date: Tue, 25 Dec 2012 21:12:30 +0000 (+0100) Subject: better peak extraction X-Git-Url: http://git.tomasm.cz/imago.git/commitdiff_plain/e3efa906f4d1c8203c88b5129cfa63598dbf3476?ds=sidebyside better peak extraction --- diff --git a/linef.py b/linef.py index dae08e3..4e35781 100644 --- a/linef.py +++ b/linef.py @@ -43,11 +43,11 @@ def find_lines(image, show_all, do_something, verbose): if show_all: do_something(im_hough, "hough transform") - im_hough = filters.peaks(im_hough) - if show_all: - do_something(im_hough, "peak extraction") + # im_hough = filters.peaks(im_hough) + # if show_all: + # do_something(im_hough, "peak extraction") - im_h2 = filters.high_pass(im_hough, 120) + im_h2 = filters.high_pass(im_hough, 96) if show_all: do_something(im_h2, "second high pass filters") diff --git a/makefile b/makefile index db25815..0192f0c 100644 --- a/makefile +++ b/makefile @@ -1,4 +1,4 @@ install: pcf.c - gcc -shared -I/usr/include/python2.7/ -lpython2.7 -o pcf.so pcf.c + gcc -Ofast -shared -I/usr/include/python2.7/ -lpython2.7 -o pcf.so pcf.c clean: rm -f pcf.so diff --git a/pso.py b/pso.py index 9149167..c30bcfd 100644 --- a/pso.py +++ b/pso.py @@ -26,7 +26,7 @@ def move(particle, omega, phi_p, phi_g, v_max, global_best, func_d): def optimize(dimension, boundary, function_d, n_parts, n_turns): pool = multiprocessing.Pool(None) - v_max = 30. + v_max = boundary particles = [particle(dimension, boundary, v_max, function_d) for _ in xrange(n_parts)] gl_best = max(particles)