Questions tagged [dithering]

Dither is an intentionally applied form of noise used to randomize quantization error, preventing large-scale patterns such as color banding in images.

Dither is an intentionally applied form of noise used to randomize quantization error, preventing large-scale patterns such as color banding in images. Dither is routinely used in processing of both digital audio and digital video data, and is often one of the last analog stages of audio production to compact disc.

A typical use of dither is: given an image in grey-scale, convert it to black and white, such that the density of black dots in the new image approximates the average level of grey in the original image.

Dithering is also used in image processing, typically consisting of alternating pixel colours to create the illusion of a new colour.

98 questions
2
votes
1 answer

Implementing Ordered Dithering (24 bit RGB to 3 bit per channel RGB)

I'm writing an image editing programme, and I need functionality to dither any arbitrary 24-bit RGB image (I've taken care of loading it with CoreGraphics and such) to an image with 3 bit colour channels, then displaying it. I've set up my matrices…
Tristan
  • 3,058
  • 6
  • 40
  • 68
1
vote
1 answer

Creating 3 color dithering image

Hello I am trying to convert an image from full color image to 3 colors dithering image to convert this image to this one I don't have a clue how to do this, but I assume that I need to first change source image to tri color image (Black - White -…
mohamed elsabagh
  • 352
  • 3
  • 16
1
vote
0 answers

Can I render a dithered pixel moving gradient background for my website using css and js?

I'm reasonably new to coding with css and js so I don't know where to start but I'd like to create a moving gradient background for transitions or something. Is there a way to stylistically dither the gradient like the retro styles of "Obra…
LevelHead
  • 11
  • 1
1
vote
1 answer

Why won't "dithering" on three.js material actually do dithering?

I have a simple material on my object like: THREE.MeshPhysicalMaterial({ roughness:1, color: 0xffffff, dithering:true }) and one simple directional light. Now, i thought the "dithering" would do something like this…
user151496
  • 1,849
  • 24
  • 38
1
vote
1 answer

Dithering (Floyd-Steinberg) only updates part of graphics object in p5.js

I'm trying to implement Floyd-Steinberg dithering in a P5.js sketch by pre-dithering a bunch of circles in a graphics object (in setup) and then drawing them later. However, I keep running into the issue where only part of the circle is dithered,…
erik
  • 3,810
  • 6
  • 32
  • 63
1
vote
3 answers

Floyd Steinberg Dithering Matlab - What am I doing wrong?

I am trying to implement Floyd Steinberg Dithering in MATLAB, using the pseudocode on the Wikipedia page https://en.wikipedia.org/wiki/Floyd%E2%80%93Steinberg_dithering My code is below image = double(imread("dithering.jpg")) ./ 255; levels =…
XDGFX
  • 41
  • 2
  • 9
1
vote
1 answer

Ordered Dithering - Color Values Per Channel

While moving forward with my algorithm for Ordered Dithering I got a problem, mainly I don't really know what col[levels] might be. Here is the pseudocode k - number of color values per channel n - size of the threshold Bayers Matrix My code which…
user8467047
1
vote
2 answers

Understanding image dithering and how they help blending CSM

So I wish to implement dithering as a blend mode between my cascade shadow map splits. I had no idea what they were so I've watched this video to try and understand it.As far as I understand it it's a way to map an image colors to a limited pallet…
Jorayen
  • 1,737
  • 2
  • 21
  • 52
1
vote
2 answers

Bitmap appearance is not looking good, dithering is not working, in Android

I want to use coverflow view in my app. To get the reflection image part i have used the following code - http://www.androidsnippets.com/create-image-with-reflection I have seen lot of forums/discussions about dithering and tileMode, I have tried…
Padma
  • 656
  • 3
  • 11
  • 30
1
vote
1 answer

Metal compute- pixels dependent on other pixels colour

I have recently started to learn the metal framework so I can write some filters for my swift app. I am about to write a metal kernel that dithers a picture based on error diffusion dithering. Each pixel is given a Color and then values are…
carl
  • 121
  • 1
  • 8
1
vote
1 answer

How can I tweak this function to allow dithering?

I wrote the function below. It switches out one color for another. The pictures going in are css sprites with various colors and a white background. So.. sprite 1 might by blue and sprite 2 might be green. The function would be run twice to replace…
John Paul
  • 59
  • 1
  • 2
  • 7
1
vote
1 answer

Floyd-Steinberg implementation Python

I use Floyd-Steinberg dithering in order to diffuse the quantization error after processing an image with KMeans from scipy. The given data is RGB file - both for grayscale and color. The problem is the visualisation - I get no dithering. from PIL…
fgh
  • 169
  • 1
  • 3
  • 15
1
vote
1 answer

Metal fragment shader -- are the color values already quantized to 8 bits?

I'm trying to implement some simple dithering in my Metal fragment shader, to get rid of banding across gradients. It is not working, and I am wondering if it is just a bug or if the color values passed to the shader are already quantized (if…
bsabiston
  • 721
  • 6
  • 22
1
vote
0 answers

Stucky dithering as custom CIKernel does not work

I'm trying to implement Stucky dithering (error diffusion) as a CIKernel but I am a bit lost. I don't find a way to debug the filter (I m new to CIKernel). Here is what I have came up so far, but the kernel does not compile, plus, I wonder how I…
Stéphane de Luca
  • 12,745
  • 9
  • 57
  • 95
1
vote
1 answer

Direct3D11 Pixel Shader Interpolation

I'm trying to create a simple transition between two colors. So a render of a quad with top edge colors being #2c2b35 and bottom color being #1a191f. When I put it through simple pixel shader which just applies colors to the vertices and…
majstor
  • 379
  • 3
  • 14