@@ -260,9 +260,9 @@ def compute_line_seeds(binary,bottom,top,colseps,scale):
260
260
t = args .threshold
261
261
vrange = int (args .vscale * scale )
262
262
bmarked = maximum_filter (bottom == maximum_filter (bottom ,(vrange ,0 )),(2 ,2 ))
263
- bmarked *= (bottom > t * amax (bottom )* t )* (1 - colseps )
263
+ bmarked = bmarked * (bottom > t * amax (bottom )* t )* (1 - colseps )
264
264
tmarked = maximum_filter (top == maximum_filter (top ,(vrange ,0 )),(2 ,2 ))
265
- tmarked *= (top > t * amax (top )* t / 2 )* (1 - colseps )
265
+ tmarked = tmarked * (top > t * amax (top )* t / 2 )* (1 - colseps )
266
266
tmarked = maximum_filter (tmarked ,(1 ,20 ))
267
267
seeds = zeros (binary .shape ,'i' )
268
268
delta = max (3 ,int (scale / 2 ))
@@ -276,7 +276,7 @@ def compute_line_seeds(binary,bottom,top,colseps,scale):
276
276
y1 ,s1 = transitions [l + 1 ]
277
277
if s1 == 0 and (y0 - y1 )< 5 * scale : seeds [y1 :y0 ,x ] = 1
278
278
seeds = maximum_filter (seeds ,(1 ,int (1 + scale )))
279
- seeds *= (1 - colseps )
279
+ seeds = seeds * (1 - colseps )
280
280
DSAVE ("lineseeds" ,[seeds ,0.3 * tmarked + 0.7 * bmarked ,binary ])
281
281
seeds ,_ = morph .label (seeds )
282
282
return seeds
0 commit comments