Skip to content

Commit 97ace55

Browse files
committed
Merge pull request #75 from knoxdw/master
removed augmented assignment in ocropus-gpageseg
2 parents 7c6116b + 3954297 commit 97ace55

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ocropus-gpageseg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,9 @@ def compute_line_seeds(binary,bottom,top,colseps,scale):
260260
t = args.threshold
261261
vrange = int(args.vscale*scale)
262262
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)
264264
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)
266266
tmarked = maximum_filter(tmarked,(1,20))
267267
seeds = zeros(binary.shape,'i')
268268
delta = max(3,int(scale/2))
@@ -276,7 +276,7 @@ def compute_line_seeds(binary,bottom,top,colseps,scale):
276276
y1,s1 = transitions[l+1]
277277
if s1==0 and (y0-y1)<5*scale: seeds[y1:y0,x] = 1
278278
seeds = maximum_filter(seeds,(1,int(1+scale)))
279-
seeds *= (1-colseps)
279+
seeds = seeds*(1-colseps)
280280
DSAVE("lineseeds",[seeds,0.3*tmarked+0.7*bmarked,binary])
281281
seeds,_ = morph.label(seeds)
282282
return seeds

0 commit comments

Comments
 (0)