Sort peak candidates by intensity before starting supression.

This commit is contained in:
Andrew Mark
2015-03-12 04:39:18 +01:00
parent bc52e4a411
commit ff29d2ccd1
+2 -1
View File
@@ -72,7 +72,8 @@ def hough_line_peaks(hspace, angles, dists, min_distance=9, min_angle=10,
hspace_t = hspace > threshold
label_hspace = measure.label(hspace_t)
props = measure.regionprops(label_hspace)
props = measure.regionprops(label_hspace, hspace_max)
props = sorted(props, key= lambda x: x.max_intensity)[::-1]
coords = np.array([np.round(p.centroid) for p in props], dtype=int)
hspace_peaks = []