Remove unnecessary iterativeMean
parentheses and rename addElement
to add
This commit is contained in:
parent
7af96d6bf6
commit
674f87d480
@ -26,10 +26,10 @@ def denoise(imageNpArray, denoiserName):
|
||||
imageDenoisedNpArray = skImageRestorationDenoise(imageNpArray, weight=0.2)
|
||||
return imageDenoisedNpArray
|
||||
|
||||
class iterativeMean():
|
||||
class iterativeMean:
|
||||
mean = 0
|
||||
numberOfElementsInMean = 0
|
||||
|
||||
def addElement(self, element):
|
||||
def add(self, element):
|
||||
self.mean = ((self.mean * self.numberOfElementsInMean) + element) / (self.numberOfElementsInMean + 1)
|
||||
self.numberOfElementsInMean += 1
|
Loading…
Reference in New Issue
Block a user