This article has not yet been rated on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||
|
Is this pseudo code correct? I think it should be:
pixel[x+1][y]Â := pixel[x+1][y] + 7/16 * quant_error pixel[x-1][y+1]Â := pixel[x-1][y+1] + 3/16 * quant_error
...
otherwise we set all the neighbors to low values âPreceding unsigned comment added by 71.231.1.193 ( talk ⢠contribs) 21:51, 17 February 2007
pixel[x][y]Â := newpixel /* not pixel[x][y] + newpixel */
216.191.144.135 (
talk) 22:10, 4 August 2010 (UTC)
Ideally, should the FSD algorithm round the quantization errors to the nearest integer, or not? Or doesn't it matter at all? Shinobu 15:57, 4 September 2007 (UTC)
Yes, I see. That means that as the destination levels get higher and higher, the rounding will matter less and less. In real applications, the levels could be {0, 255} or even {0, 65535}. Of course you could also save 16 times the errors if space allows and do the bit-shift later. Shinobu 23:40, 5 September 2007 (UTC)
I propose we move this article to error-diffusion dithering, because I will be adding a few other error-diffusion dithering algorithms here that could not stand on their own as separate articles, but are clearly related to Floyd-Steinberg in the sense that they too use an error-diffusion process. Shinobu 23:44, 5 September 2007 (UTC)
According to some sources, Floyd-Steinberg dithering is not dithering, but dithering plus noise shaping, being the noise shaping part the important one. The quantization noise is moved to high frequencies where our eye is more sensitive.-- 80.24.18.223 ( talk) 08:05, 27 May 2008 (UTC)
Using this to reduce color from 16 bits to 8 bits:
find_closest_palette_color(oldpixel) = (oldpixel + 128) / 256
Isn't this going to create 257 colors including 0 and 256, if the old colors are from 0 to 65535? If the '/' is simple truncation, of course. âPreceding unsigned comment added by Rachel2046 ( talk ⢠contribs) 00:19, 10 June 2009 (UTC)
Is it normal that the reference value used to determine the error is a value modified by diffusing the previous errors rather than the actual "source" value? I know that would prevent doing the dithering in-place (because you have to keep the original value somehow), but I heard error was always calculated from the theoretical value, not intermediary stuff...
That would make the pseudocode such:
for each y from top to bottom for each x from left to right pixel[x][y]  := sourcepixel[x][y] for each y from top to bottom for each x from left to right oldpixel  := pixel[x][y] newpixel  := find_closest_palette_color(oldpixel) pixel[x][y]  := newpixel quant_error  := sourcepixel[x][y] - newpixel pixel[x+1][y ] := pixel[x+1][y ] + quant_error * 7/16 pixel[x-1][y+1] := pixel[x-1][y+1] + quant_error * 3/16 pixel[x ][y+1] := pixel[x ][y+1] + quant_error * 5/16 pixel[x+1][y+1] := pixel[x+1][y+1] + quant_error * 1/16
Medinoc ( talk) 20:18, 26 January 2015 (UTC)
I can't find it anywhere. I'd like to see how they presented this originally. Dicklyon ( talk) 22:00, 4 September 2021 (UTC)
This article has not yet been rated on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||
|
Is this pseudo code correct? I think it should be:
pixel[x+1][y]Â := pixel[x+1][y] + 7/16 * quant_error pixel[x-1][y+1]Â := pixel[x-1][y+1] + 3/16 * quant_error
...
otherwise we set all the neighbors to low values âPreceding unsigned comment added by 71.231.1.193 ( talk ⢠contribs) 21:51, 17 February 2007
pixel[x][y]Â := newpixel /* not pixel[x][y] + newpixel */
216.191.144.135 (
talk) 22:10, 4 August 2010 (UTC)
Ideally, should the FSD algorithm round the quantization errors to the nearest integer, or not? Or doesn't it matter at all? Shinobu 15:57, 4 September 2007 (UTC)
Yes, I see. That means that as the destination levels get higher and higher, the rounding will matter less and less. In real applications, the levels could be {0, 255} or even {0, 65535}. Of course you could also save 16 times the errors if space allows and do the bit-shift later. Shinobu 23:40, 5 September 2007 (UTC)
I propose we move this article to error-diffusion dithering, because I will be adding a few other error-diffusion dithering algorithms here that could not stand on their own as separate articles, but are clearly related to Floyd-Steinberg in the sense that they too use an error-diffusion process. Shinobu 23:44, 5 September 2007 (UTC)
According to some sources, Floyd-Steinberg dithering is not dithering, but dithering plus noise shaping, being the noise shaping part the important one. The quantization noise is moved to high frequencies where our eye is more sensitive.-- 80.24.18.223 ( talk) 08:05, 27 May 2008 (UTC)
Using this to reduce color from 16 bits to 8 bits:
find_closest_palette_color(oldpixel) = (oldpixel + 128) / 256
Isn't this going to create 257 colors including 0 and 256, if the old colors are from 0 to 65535? If the '/' is simple truncation, of course. âPreceding unsigned comment added by Rachel2046 ( talk ⢠contribs) 00:19, 10 June 2009 (UTC)
Is it normal that the reference value used to determine the error is a value modified by diffusing the previous errors rather than the actual "source" value? I know that would prevent doing the dithering in-place (because you have to keep the original value somehow), but I heard error was always calculated from the theoretical value, not intermediary stuff...
That would make the pseudocode such:
for each y from top to bottom for each x from left to right pixel[x][y]  := sourcepixel[x][y] for each y from top to bottom for each x from left to right oldpixel  := pixel[x][y] newpixel  := find_closest_palette_color(oldpixel) pixel[x][y]  := newpixel quant_error  := sourcepixel[x][y] - newpixel pixel[x+1][y ] := pixel[x+1][y ] + quant_error * 7/16 pixel[x-1][y+1] := pixel[x-1][y+1] + quant_error * 3/16 pixel[x ][y+1] := pixel[x ][y+1] + quant_error * 5/16 pixel[x+1][y+1] := pixel[x+1][y+1] + quant_error * 1/16
Medinoc ( talk) 20:18, 26 January 2015 (UTC)
I can't find it anywhere. I'd like to see how they presented this originally. Dicklyon ( talk) 22:00, 4 September 2021 (UTC)