Rerunning the Floyd Steinberg algorithm on a image

312 Views Asked by At

I implemented a version of the Dithering algorithm in Python (from Image Processing). The algorithm that I used is the Floyd Steinberg algorithm.

I was wondering how the images would change if I will rerun my algorithm on the same image over and over, repeatedly. I noticed that it didn't change at all:

First iteration:

enter image description here

10th iteration:

enter image description here

First of all, is it the correct behavior or something is up with my implementation? It it's correct, I was wondering why after one iteration, it does not do change to the image at all? Is there some math-explanation behind it?

1

There are 1 best solutions below

0
user16930239 On

Yes, it is the correct behavior.

And the reason why repeating the same algorithm does not change the image is:

This algorithm simplify the image so it try to change the color of the pixel to the nearest color from a small colors set. So if the pixel color becomes equal to a Cor from the small colors set, then it is the nearest color to itself and will remain unchanged.