Correctly implement mean denoiser

Used to have:

```py
imageDenoisedNpArray = imageNpArray - means[color]
imageNoiseNpArray = imageNpArray - imageDenoisedNpArray
```

so:

```py
imageNoiseNpArray = means[color]
```

then we mean the mean...

While should have:

```py
imageDenoisedNpArray = means[color]
```
This commit is contained in:
Benjamin Loison 2024-04-25 15:58:24 +02:00
parent 60a4f78fa6
commit 65708e4977
Signed by: Benjamin_Loison
SSH Key Fingerprint: SHA256:BtnEgYTlHdOg1u+RmYcDE0mnfz1rhv5dSbQ2gyxW8B8

View File

@ -117,7 +117,7 @@ def treatImage(imageFileName, computeExtremes = False, color = None):
case 'tv_chambolle':
imageDenoisedNpArray = denoise(imageNpArray, weight=0.2)
case 'mean':
imageDenoisedNpArray = imageNpArray - means[color]
imageDenoisedNpArray = means[color]
imageNoiseNpArray = imageNpArray - imageDenoisedNpArray
if mean is None:
mean = imageNoiseNpArray