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
4
votes
3 answers

Bayer Ordered Dithering

I'm updating a plugin for Paint.net which i made some months ago, it's called Simulate Color Depth and it reduces the number of colors in the image to the chosen BPP and for a long time it have had dithering included but NEVER ordered dithering and…
Cookies.net
  • 69
  • 1
  • 1
  • 5
4
votes
1 answer

Converting between 24bit RGB and 8bit colors

I'm trying to convert 24bit (8R, 8G, 8B) into 8bit (RRRGGGBB) colors I understand the basic concept of scaling the color bytes down and adding them together (after shifting). i.e. given RGB(255,254,253) I would take 255/32*32 + 254/32*4 + 253/64 and…
Vbomm
  • 53
  • 5
4
votes
0 answers

Algorithm to detect dithered image

I am trying to detect if a g4 compressed Tiff image will produce a good OCR output. Currently, dithered Tiff's yield poor OCR results. Therefore, before I send a Tiff to the OCR engine, I would like to determine if the image is dithered. If a Tiff…
Britt
  • 539
  • 1
  • 7
  • 21
3
votes
1 answer

opencv python image dithering

i wrote a code for image dithering in python , it is working well for some images but for some it is generating unnecessary colors in the white regions . #IMAGE DITHERING BASED ON Floyd-Steinberg METHOD #author : bharath kotari #date…
3
votes
3 answers

My dithering algorithm is super slow

So here's some context. I'm working on this game called ShiftOS which takes place in an OS that starts off as a bare-bones run of the mill 80s operating system with not many features. I'm trying to add a mechanic in where the user has to start out…
3
votes
2 answers

Android view dithering

As you can see from the screenshot below, the "titlebar" is getting these ugly banding lines across the areas with text that extend the entire width of the screen. It's even more noticeable on a real device. Is there any way to work around this?
Jeremy Logan
  • 47,151
  • 38
  • 123
  • 143
3
votes
2 answers

Dithering gouraud-shaded vertex-colored polygons to remove banding

I'm using OpenGL ES on a low-resolution, embedded device. I've applied a vertical color gradient, using vertex coloring, to a large polygon serving as a backdrop to my rendered scene. I can see clear visible banding artifacts in the color…
Hans Sjunnesson
  • 21,745
  • 17
  • 54
  • 63
3
votes
1 answer

How to control the pixel size of the color model of an ErrorDiffusionDescriptor?

I am trying to convert a direct color model image to a bitonal indexed image (1 bit per pixel) and save the indexed image as a BMP. As stated on the Java Advanced Imaging API Home Page: The bit depth of the encoded output is determined by that of…
Daniel Trebbien
  • 38,421
  • 18
  • 121
  • 193
3
votes
1 answer

Dithering (Images) - How Exactly Does It Work?

Am I correct in thinking that dithering an image works in the following way: I have a 2x2 image block consisting of individual pixels (x): x | x ¬¬¬¬¬¬¬ x | x I wish to dither the image via the following values: 3 | 4 ¬¬¬¬¬¬¬ 2 | …
Mus
  • 7,290
  • 24
  • 86
  • 130
2
votes
0 answers

Trying to fix color banding?

I'm trying to get rid of the color banding on my phone. It looks like this right now: Bad right? I followed this tutorial (the part about Pre-Dithering) and it didn't work. That screenshot is after pre-dithering. How can I fix this? Android…
Cole
  • 2,805
  • 9
  • 44
  • 61
2
votes
3 answers

OpenGL gradient banding on Android

I've got a live wallpaper out on the market which uses OpenGL to render some basic shapes and a flat plane. The simple lighting creates a gradient effect across the plane, which looks fine on most devices. The Samsung Galaxy S2 series seems to…
Josh
  • 10,618
  • 2
  • 32
  • 36
2
votes
2 answers

How to implement 1-Bit Dithering using Java?

Recently, our teacher gave us the task to convert a colorful image to a 1-bit image using Java. After a little experimentation I had the following result: BufferedImage image = ... for (int y = 0; y < image.getHeight(); y++) { for (int x = 0; x <…
2
votes
0 answers

Change Ghostscript dithering method when converting pdf to 256 color BMP

I am trying to produce some high quality 8bpp bmp from pdf file with ghostscript. For that purpose, I use the bmp256 device. So far, everything works well and is really fast, but ghostscript use halftoning to dither the image, leading to some uggly…
Blablablabli
  • 174
  • 9
2
votes
1 answer

Dithering in JES/Jython

My goal is to dither an image in JES/Jython using the Floyd-Steinberg method. Here is what I have so far: def Dither_RGB (Canvas): for Y in range(getHeight(Canvas)): for X in range(getWidth(Canvas)): P =…
2
votes
0 answers

Ordered Dithering to 256 colours

I'm trying to ordered dither images in HTML5 canvas down or close to 256 colours every time. I have the dither algorithm working which you can see on my test page (Check the browser console for the colour counts). But I'm having trouble…
neue
  • 93
  • 1
  • 7