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
0
votes
0 answers

Floyd-Steinberg in python - Faulty output (peculiar patterns)

I am trying to implement floyd-steinberg dithering algorithm in python but I have problems with the final output and I cant find out what is wrong because it's based on the pseudo-code on wikipedia. The function to find closest value: def…
SOFUser
  • 89
  • 6
0
votes
0 answers

Generating a series of slightly random integers in a numpy array

I want to create composite audio test signals in a numpy array. I need the values to be integers rounded to the nearest whole number. Secondly I want to add random noise or dither. You can see below the code I use currently. This should comprise…
Richard
  • 144
  • 1
  • 8
0
votes
1 answer

Drawing pixel circle of given area

I have some area X by Y pixels and I need to fill it up pixel by pixel. The problem is that at any given moment the drawn shape should be as round as possible. I think that this algorithm is subset of Ordered Dithering, when converting grayscale…
Alexii
  • 58
  • 5
0
votes
1 answer

How to flip this PGM gradient 90 degrees? (stored in vectors)

I have been working on implementing a grayscale gradient with different dithering methods, but the task calls for the gradient to be horizontal starting with black on the left. In my attempts to rotate the image horizontally I have…
0
votes
1 answer

General approach to temporal dithering

I'm looking for some input on a general approach to implement temporal dithering in processing. Currently I have a processing sketch which generates a hex file that can be sent to an APA102 LED strip over SPI. The framerate which I would be able to…
Sharky
  • 31
  • 5
0
votes
0 answers

Floyd dithering with KMeans

I am trying to implement Floyd-Steinberg dithering in Python after using KMeans. I realised, that after dithering I receive colours which are not included in the reduced palette, so I modify the image again with KMeans. However, when trying with…
fgh
  • 169
  • 1
  • 3
  • 15
0
votes
1 answer

executing the php command background windows

I am developing a desktop based php application where I need to print the image of a person in Floyd-Steinberg format. I capture the image in RGB format and convert the image to Floyd-Steinberg dithering image. I am using the ImageMagick to convert…
user11016145
0
votes
0 answers

Dithering artifacts in Unity 2D game on mobile device

Dithering can be used to show users a color that is really not there. It also helps to reduce color banding. I took a screenshot of my unity game on my Android mobile device, zoomed-in the PNG in Photoshop. I observed that the whole image (even the…
nipunasudha
  • 2,427
  • 2
  • 21
  • 46
0
votes
0 answers

Ditherin in Python

I'm writing a simple script for Dithering in python 3.4 using pygame and numpy. I already did it in processing without problems but I'm getting bad results with python. This is my script in Python and this are the results I'm getting from pygame…
0
votes
1 answer

BufferedImage disable dithering when reducing color using custom ColorModel?

I'm creating an image with a custom palette (in other words a custom colormodel): BufferedImage img = new BufferedImage(orgImg.getWidth(), orgImg.getHeight(), BufferedImage.TYPE_BYTE_INDEXED, cm); Graphics2D g2 = img.createGraphics(); …
Tinus Tate
  • 2,237
  • 2
  • 12
  • 33
0
votes
1 answer

change PWM duty cycle from within ISR

I have little problems implementing a dither function to upgrade the PWM resolution of my ATmega88 and the leds it's controlling. My thought was, to use a "kind of" floating number, consisting of two uint8_t as "decimal places" so that e.g. "255.31"…
Sim Son
  • 310
  • 1
  • 10
0
votes
1 answer

Ordered color dither

I am currently doing a project where I have to reduce a 24bpp picture to a 3bpp image using a 4x4 ordered dither matrix. However, after doing my dithering processing, my image is only showing up about 1/3 of the way. Does anyone know what I'm doing…
s.gang
  • 131
  • 3
  • 14
0
votes
0 answers

How do I write dithering transperancy shader with grade value?

I need to write a glsl shader that uses dithering for transperancy. I also should be able to give a grade of transperancy. So 0.1 very transperant and 0.9 almost opaque. But I don't know how I would write it. I know how to write a 0.5 transperancy…
user2741831
  • 2,120
  • 2
  • 22
  • 43
0
votes
1 answer

Pixel grid on lighthouse light in Farmville 2 (Samsung Note 2)

I played Farmville 2 on a Samsung Note 2. I noticed a clear grid on every alpha lights. That does not happen on an iPad Retina though. I wonder what is the reason of this. Is it due to the GPU, or is it done by the developer to save device…
0
votes
1 answer

c# image dithering routine that accepts an amount of dithering?

I've been using aforge's floyed-steinberg dithering method, but I noticed that you can't specify the amount of dithering. I'd like to be able to specify an amount between 0 and 100. So that if I ask for 50, it will dither half as much as 100. Or, if…