Floyd-Steinberg Algorithm
for (x = 0; x < width; x++) {
for (y = 0; y < height; y++) {
P(x,y) = trunc(I(x,y) + 0.5)
e = I(x,y) - P(x,y)
I(x,y+1) += a*e;
I(x+1,y-1) += b*e;
I(x+1,y) += g*e;
I(x+1,y+1) += d *e;
}
}
Previous slide
Next slide
Back to first slide
View graphic version