|
|
@ -49,7 +49,7 @@ for y in range(1, height-1):
|
|
|
|
neighbors.append(image[ny,nx])
|
|
|
|
neighbors.append(image[ny,nx])
|
|
|
|
avg_diff = np.mean([np.abs(pixel - n).sum() for n in neighbors])
|
|
|
|
avg_diff = np.mean([np.abs(pixel - n).sum() for n in neighbors])
|
|
|
|
differences[y,x] = avg_diff
|
|
|
|
differences[y,x] = avg_diff
|
|
|
|
print("image corompu")
|
|
|
|
print("image corompue")
|
|
|
|
# Trouver les pixels corrompus algorithmiquement
|
|
|
|
# Trouver les pixels corrompus algorithmiquement
|
|
|
|
|
|
|
|
|
|
|
|
corrupted_pixels = np.where(differences > 200)
|
|
|
|
corrupted_pixels = np.where(differences > 200)
|
|
|
|