Skip to content

Commit db2774a

Browse files
author
goncalopp
committed
ContrastProcessor bugs
1 parent b2039f3 commit db2774a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

opencv_utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ def _image_processing( self , image ):
3636
s,c= self.scale, self.center
3737
c= int(c*256)
3838
with OverflowPreventer(image) as img:
39-
if scale<=1:
40-
img*=scale
41-
img+= int(center*(1-scale))
39+
if s<=1:
40+
img*=s
41+
img+= int(c*(1-s))
4242
else:
43-
img-=center*(1 - 1/scale)
44-
img*=scale
43+
img-=c*(1 - 1/s)
44+
img*=s
4545
return image
4646

4747
class BlurProcessor( ImageProcessor ):

0 commit comments

Comments
 (0)