Ordered Dithering - Computerphile

  Рет қаралды 128,803

Computerphile

Computerphile

5 жыл бұрын

How do we represent multiple greys with simple black or white pixels? Dr Bagley joins the dots!
Error Diffusion Dithering: COMING SOON
How JPEG Works: • How JPEG Works
/ computerphile
/ computer_phile
This video was filmed and edited by Sean Riley.
Computer Science at the University of Nottingham: bit.ly/nottscomputer
Computerphile is a sister project to Brady Haran's Numberphile. More at www.bradyharan.com

Пікірлер: 214
@basilg5523
@basilg5523 5 жыл бұрын
For what he's talking about, what he does for work/life/whatever, his shirt makes sense...
@matchrocket1702
@matchrocket1702 5 жыл бұрын
You beat me to it.
@omereli1062
@omereli1062 5 жыл бұрын
I have just wanted to comment that...
@mrroobarb
@mrroobarb 5 жыл бұрын
lol totally!
@jmp01a24
@jmp01a24 5 жыл бұрын
Would been nice if he put the same level of thought into his examples.
@jaredmeit6127
@jaredmeit6127 5 жыл бұрын
This channel has the most useful graphics and editing. It doesn't go unnoticed. Great work!
@RadioactivFly
@RadioactivFly 5 жыл бұрын
I'm very disappointed they didn't dither the video at any point.
@aleksandersuur9475
@aleksandersuur9475 4 жыл бұрын
I suspect you can't, if you try to apply lossy compression to dithered image the results are poor.
@diophantine1598
@diophantine1598 3 жыл бұрын
@@aleksandersuur9475 Just goes to show a generalised compression algorithm does not always compress other already compressed things well. Meh.
@gsittly
@gsittly 2 ай бұрын
Like in the Floyd-Steinberg video?
@technodaz
@technodaz 5 жыл бұрын
"you stop seeing the individual pixels and you just see the kind of average" It's amazing how they do that yet one single dead pixel on a monitor would not bother you until you notice it, once your brain knows it's there, it's the only thing it focuses on when watching anything.
@kpunkt.klaviermusik
@kpunkt.klaviermusik 5 жыл бұрын
When all colors are changing except that of 1 Pixel, you will see it.
@guidad542
@guidad542 5 жыл бұрын
@@kpunkt.klaviermusik Pretty much this. Basically you normalize the information and while part of it will be lost, the main attributes will still be there. Having one pixel stand out WILL annoy you
@angelorf
@angelorf 5 жыл бұрын
Ordered dither doesn't necessarily create large dots; it depends on the pattern in which the checking values in the matrix are laid out.
@konstantinkh
@konstantinkh 5 жыл бұрын
Yeah. I was just about to say, there are definitely other, arguably better dithering patterns. There are also some nifty statistical, non-ordered models that can produce more organic looks, but they're just a bit more advanced.
@scotttroyer
@scotttroyer 5 жыл бұрын
By the power of grayscale!
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
You can do it in colour, too.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
@@busimagen Whoosh right back atcha.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
@@busimagen Some people see everything in choler ...
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
@@busimagen Figured out what “whoosh” means, yet?
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
@@busimagen Yes, Fuad. That is the reason why it is funny.
@MarcRidders
@MarcRidders 5 жыл бұрын
When I was young I used characters to dither images on a daisy wheel printer, a.k.a. ASCII-art.
@black_platypus
@black_platypus 5 жыл бұрын
The optical technique he describes uses AM dithering (amplitude modulated, meaning the spots were on a fixed raster, but varied in size), whereas on a screen, you're using FM (frequency modulated), where you set the points further apart or closer together to make the result look brighter or darker
@ratlinggull2223
@ratlinggull2223 5 жыл бұрын
Woah there's that thing too? FFT really links images to audio more than I thought.
@black_platypus
@black_platypus 5 жыл бұрын
Hehe, yeah Looks like we need to wait for "unordered"(?) dithering to fully appreciate the difference. In the end here, all the pixels were clumped together (who needs that? O.o)
@germansnowman
@germansnowman 5 жыл бұрын
Benjamin Philipp In fact, FM screening is also used in printing, though not as commonly as AM screening. I still remember the FM hype in the prepress/printing industry in the late 1990s. Also, I love the dithering method used for the original Mac, which was applied to both its 1-bit screen and its print output.
@rich1051414
@rich1051414 5 жыл бұрын
In 24-bit color, grayscale can only be drawn in 8-bit, fyi :) In 32-bit color, instead of using 10-bit color, 8-bit color is still very common, with the left over byte being used as an alpha channel. During the 16-bit color days, alpha was usually done with a SINGLE bit. That is when the dithering he is talking about was put into effect. On the original unreal tournament in 16-bit color software rendering mode, all alpha was dithered 1-bit.
@pottuvoi2
@pottuvoi2 5 жыл бұрын
Also the alpha channel of framebuffer modes is really rarely used as transparent surfaces do not write into it or need it to work. Some ps2 games used it as a way to bypass some limitations as the hardware didn't have proper support for multitexturing. First rendered masking information into destination alpha and then when you rendered something on that location again you could read the previously set result and uses it's alpha for blending the new pass. (This was used for things like masking reflections on puddles on roads or building windows and such.)
@ze_rubenator
@ze_rubenator 5 жыл бұрын
Have you played Return of the Obra Dinn? In my opinion it has stunning 1-bit grapics, of course with lots of dithering.
@matsv201
@matsv201 5 жыл бұрын
I'm still mad that he didn't make it 3-bit color ;)
@SteelSkin667
@SteelSkin667 5 жыл бұрын
I was about to comment about that. I learned a lot about dithering just by reading Lucas' dev log.
@ze_rubenator
@ze_rubenator 5 жыл бұрын
@@SteelSkin667 Me too. I never thought such a "basic" concept could be so difficult to work out.
@danieljensen2626
@danieljensen2626 5 жыл бұрын
I wanted to mention that as well, but couldn't remember what it was called. I remember watching a video about how he put an insane amount of work in to get the dither to look nice in 3d with the player controlling the camera angle.
@pixelflow
@pixelflow 5 жыл бұрын
The nice thing he did beyond just dithering was really smart line drawing, including inversion in the shadow areas!
@fenixsyrell
@fenixsyrell 5 жыл бұрын
I love that Steve is wearing a grayscale shirt for this video. Perfect.
@RWBHere
@RWBHere 5 жыл бұрын
It's a bit like the argument about the two-coloured dress, a few years ago. In one view (e.g. 5:01), his shirt looks blue, and from the front (e.g. 5:07) it looks greyscale.
@cube2fox
@cube2fox 5 жыл бұрын
The camera which shows him from the front seems to be oversaturated, which probably makes the shirt look blue.
@cube2fox
@cube2fox 5 жыл бұрын
@Zero Cool Oh no
@user-vn7ce5ig1z
@user-vn7ce5ig1z 5 жыл бұрын
Dithering is one scenario in which having poor eyesight is better.
@diophantine1598
@diophantine1598 3 жыл бұрын
Or high res. I think the added special resolution makes up for the slight loss in grayscale.
@mark63424able
@mark63424able Жыл бұрын
Dithering can be applied to depth-based shadows in 3D graphics to create semi-transparent shadows. Due to the nature of depth-based shadows, each fragment in the scene is either in shadow or not in shadow which is fine for shadows cast by opaque objects (mountains, buildings, people...) or cut-out transparent objects like foliage however things like smoke and clouds only partially block light. You can use dithering to clip fragments in the shadowcaster pass according to the opacity of the shadow-casting fragment.
@JacobSmith_emjds
@JacobSmith_emjds 5 жыл бұрын
That's ingenious. I would never have come up with this process in a thousand years.
@Angeljazmin12
@Angeljazmin12 5 жыл бұрын
...Summed up a whole semester of Videoinformatics into 10 minutes. This world would be a much better place if there were more teachers like Dr Bagley.
@ronnetgrazer362
@ronnetgrazer362 5 жыл бұрын
Nice intro! You might have started off with an episode about stippling, hatching and cross-hatching and their programmatic implementations, because these types of lithographic shading by hand preceded their photographic counterparts. From Voronoi diagrams and weighting you could segue into importance sampling and its applications. The maths to this is a lot more accessible though, so it makes sense to start where you did. I'm hoping there's a lot more to come on this subject in later episodes!
@blendonator
@blendonator 5 жыл бұрын
The fact he is wearing a dithered shirt is awesome 😉
@azurevylot4958
@azurevylot4958 10 ай бұрын
You can also add Snow. In areas of whiteness, you can use what's called "black" snow. Which is black with the transparency of the random number generated for snow. Snow = 255 * RND per each pixel. In the form of grayscale. Or color layers or other uses. Like "Blur Snow" Blur on that pixel to the transparency value of the random number generated by 255 * RND
@KuraIthys
@KuraIthys 5 жыл бұрын
Yeah, dithering is one of those tricky things. It does give you the illusion of more shades (or even new colours if you dither two colours together; say red and blue) but it comes at a cost. You're basically gaining more shades at the expense of resolution. (how much resolution loss depends on the dithering method and the nature of the image, but there's always some.) And, if you push the effect too far, the illusion of it somewhat breaks. I remember using a 5 pixel fixed dither pattern on Miiverse when that was a thing. For a completely fixed pattern (the most advanced dithering methods don't use fixed patterns) it worked really well, and gave very good results. The pattern is essentially a plus sign, with the central pixel being the first to light up, and the ones around the edge lighting up one by one. Because of the shape, this pattern interlocks in a pattern that doesn't create a horizontally aligned grid, and that makes the repetition less obvious. With 5 pixels you get 5 shades out of it if you mix two colours. (two solid colours plus 3 intermediaries.) In principle if you had say 4 base colours/shades you could do more complex things than merely mixing two shades together, but the logic behind that would probably get rather convoluted.
@Dr904
@Dr904 11 ай бұрын
Dithering is also often applied on monitors by quickly switching back and forth between two colors. For example. “8bit + FRC” is a common method to make an 8bit panel display 10bit colors on it with this type of back and forth flickering.
@christoffer4862
@christoffer4862 7 ай бұрын
That little square or window in which you perform your algorithm is called the Bias.
@valentinpedersen6144
@valentinpedersen6144 5 жыл бұрын
thank you so much! had a hard time wrapping my head around dithering, before i saw this video
@raykent3211
@raykent3211 5 жыл бұрын
I hope we'll get on to random and fractal methods. For the example given which has all input values midway, 128, making the binary decision based on random numbers in range rather than the table he has gives equiprobabilty for thé mid value and proportionally for others. It avoids moiré.
@stefanotorelli3688
@stefanotorelli3688 5 жыл бұрын
This video remember me... when I was young.... When I was fourteen I was creating a x86 Assembly program to convert Gray scale images into B/W with dithering...
@indianakernick3788
@indianakernick3788 5 жыл бұрын
I initially thought that you'd have to scale the image by 0.5x and select a 2x2 pattern based on the scaled image pixels. The method described in the video is way smarter!
@cmdlp4178
@cmdlp4178 5 жыл бұрын
There are dithering-matrices with bigger size, which do not have "big dots". You need to carefully select the matrix. Computing the treshold for a k by k (k = 2ⁿ) dithering matrix with the best possible "balance": reverse_bits(interleave_bits(x, x^y), 2*n) x^y: xor of x and y interleave_bits(x, x^y): the bits of x and x^y alternating, the lowest bit is the lowest of x, the second is the lowest of x^y, the third is the second of x, and so on. reverse_bits(A, N): reverse the bits so that the lowest bit of A gets swapped with the Nth lowest bit of A...
@taf8903
@taf8903 2 жыл бұрын
01:24 - I've never heard the word "naive" used in this context, but I will definitely be using it more in the future.
@User36282
@User36282 2 жыл бұрын
Awesome video. Very clever way to work it out.
@Kavukamari
@Kavukamari 5 жыл бұрын
this is awfully convenient did computerphile see me googling dithering all week long?
@CoolerQ
@CoolerQ 5 жыл бұрын
Neither of the thumbnails at the end of the video are linked anywhere.
@randall172
@randall172 5 жыл бұрын
they will be when they are released.
@JustASnack
@JustASnack 5 жыл бұрын
Very well explained! Would be cool if you followed this up with a video of dithering in audio next :)
@izamanaick
@izamanaick 3 жыл бұрын
brilliant video! super helpful
@intron9
@intron9 5 жыл бұрын
please enable the auto subtitles
@minijimi
@minijimi 5 жыл бұрын
Right, this is going to be my Saturday morning programming project.
@eartheartbaratheon791
@eartheartbaratheon791 5 жыл бұрын
I can see he's all around apple fan, which seems a bit odd for a computer geek. Maybe you could make a video with him discussing why he's choosing those products over other? I've seen discussions but I think we'd all be interested in his take on it.
@ratlinggull2223
@ratlinggull2223 5 жыл бұрын
@moo you forgot the biggest thing about Windows: video games.
@tomgidden
@tomgidden 5 жыл бұрын
Apple is popular among “computer geeks”, for many of the reasons given by @moo above. macOS gives a lot of power to a developer while still providing a very usable environment for real-life tools, like email, web, calendar, office tools and so forth. Plus, a lot of the time a programmer (especially an academic) will be using remote (Unixy) servers for their actual work, so it makes no difference (to the work) what terminal they’re using. However, contrary to what @moo says, a lot of developers do use Windows. While I’m an Apple user (and can’t stand Windows) I can’t deny that Microsoft’s development tools are _excellent_. So nowadays, given a random developer, it’d be tough to guess whether they use Windows, Mac, Linux or something else. What you _can_ probably say is that they adamantly ONLY use that platform... regularly switching between different UIs, keyboard shortcuts and even keyboard _feels_ is tough.
@mariajosemota1050
@mariajosemota1050 8 ай бұрын
I recommend, emulation: Queijo shader preset to RetroArch, various package. Graphic filters with CRT effects.
@talelkraiem4757
@talelkraiem4757 4 жыл бұрын
thanks sir , We learned something new from you
@tomasql
@tomasql Жыл бұрын
Superb shirt choice for this video.
@yuechenzhao2346
@yuechenzhao2346 10 ай бұрын
thanks, this is great explanation!
@j7ndominica051
@j7ndominica051 5 жыл бұрын
This and error diffusion is noise shaping towards higher frequencies. If the input color matches a palette entry, no quantization error is added, and no pattern occurs. Dithering would be addition of independent noise that is always there even for pure black/white.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
Technically, “dithering” is any kind of variation around a true value. Thus, addition of noise would be best described as “noise-based dithering”.
@marty34534
@marty34534 3 жыл бұрын
Awesome video! Thank-you so much :)
@RWBHere
@RWBHere 5 жыл бұрын
That's only a step away from how yellow is simulated on an RGB screen. Thanks for the superb simplified explanation.
@josephmoore4764
@josephmoore4764 5 жыл бұрын
That's even more of an optical trick because your eye only has receptors for three colors. Yellow is just what you see when Green and red cone cells are excited. The trick is to get two pixels close enough that your eye can't tell the difference in position
@rufioh
@rufioh 5 жыл бұрын
So, could you simulate more colour depth on a screen by dithering the pixels on a higher resolution screen? And if you display things at high enough refresh rates, could you also simulate higher colour depth?
@iwikal
@iwikal 5 жыл бұрын
Yes. In fact, that's what many screens do. It's common for displays marketed as having 8 bits per channel to actually have 7 or even 6 bits, and use a mixture of spatial dithering like they describe in this video, and temporal, which is when you move the pattern around with each new frame to make it even less noticeable.
@Carewolf
@Carewolf 5 жыл бұрын
@@iwikal I don't any computer monitors doeing spatial dithering, but temporal dithering is quite common with many TN panels only having 6bit per colors, and then switching between how the last 2 bits are rounded make the average 8bit correct.
@Friedeggonheadchan
@Friedeggonheadchan 5 жыл бұрын
Next up Floyd-Steinberg, Error diffusion and finally Blue noise
@hanflingch
@hanflingch 5 жыл бұрын
Nah, just skip the first two and go directly towards TPDF shaped blue noise dithering :D
@Carewolf
@Carewolf 5 жыл бұрын
Or they could do better ordered dithering first. The ended up with a terrible algorithm for higher dithered color resolution, no one uses that, we the bayer-matrix.
@charlibiris
@charlibiris 5 жыл бұрын
What type of dithering is his shirt? 3:45
@joshinils
@joshinils 5 жыл бұрын
I’d like to have seen the threshold example with the dithering to see what a difference it makes. Maybe with a lower resolution
@JobvanderZwan
@JobvanderZwan 5 жыл бұрын
I've been wondering for a few years now: what if we used colored dithering on Retina displays to fake a more gradual color range than the actual steps a display has available? Could we perhaps even widen the gamut?
@SouravTechLabs
@SouravTechLabs 5 жыл бұрын
10:24, I would love Sean to add those video links to the description...
@KnakuanaRka
@KnakuanaRka 5 жыл бұрын
Two major questions I have about this information: 5:32 First off, these thresholds seem off. Imagine dithering a brightness of 1 with this; the 0 pixel would be on, creating a brightness of 64, when 0 would obviously be more fitting. Since you want to differentiate whether 0 or 64 would be closer, the threshold should be set at 32 instead of 0, and the other pixels should also go up by 32. Second, at 9:16, that “clumpiness” you see in higher-level threshold dithering is perfectly preventable if you redistribute the thresholds within your matrix so that they are more evenly distributed.
@johnredberg
@johnredberg 5 жыл бұрын
Hey Sean, great video as usual! Unfortunately -- well, at least w.r.t. cases like this -- KZbin has gotten rid of annotations. Meaning we can't watch the "error diffusion dithering" video by clicking that preview frame. That's a pity! I assume your publication strategy involves unlisted videos. Seems we need to have the link in the description from now on. Or alternatively, no more teasers at the end ;-)
@Computerphile
@Computerphile 5 жыл бұрын
Hi, sorry it's not finished yet or if have let you all have a preview link! >Sean
@AlexiiNoir
@AlexiiNoir 5 жыл бұрын
What algorithm do you use for halftone dithering at 8:59?
@OlafDoschke
@OlafDoschke 5 жыл бұрын
You already announced error diffusion. Ideally, you'd use a hilbert curve to do that. Not sure if JPEG does that.
@dreammfyre
@dreammfyre 5 жыл бұрын
The original Macintosh had some great dithering, shame he didn't draw some example from that.
@JosephDavies
@JosephDavies 5 жыл бұрын
Indeed. The patterns commonly used there are quite distinctive and I was hoping for a discussion on how they worked. Perhaps a follow-up video?
@simpletongeek
@simpletongeek 5 жыл бұрын
It's a variation of Floyd Steinberg dithering with different values, optimised for 1 bit lores mac display. Edit: Bill Atkinson dithering algorithm. Tanner Helland also has Image Dithering webpage comparing eleven algorithms.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
The original 32-Bit Color QuickDraw from 1988 or 1989 implemented high-quality, but slow, dithering. Then QuickTime added a faster pattern dither for playing back an approximation of full-colour movies on limited-colour displays.
@Frosty-oj6hw
@Frosty-oj6hw 5 жыл бұрын
It's worth pointing out that this method is also commonly used in a lot of monitors to fake having a higher colour range than they really have. Typically this is used in what called TN panels, this type of panel used in a monitor will often boast 8bit colour depth but in reality they have 6bit + 2bit dithering built into the hardware. So even if your PC can output 8bit colour or more, the monitor is limited to this technique to fake the full range. This is why the "colour reproduction" in TN panels is very bad. If you want true colour which is much more accurately represented in a monitor then you need to buy monitors that are some variant of IPS, they're more expensive but can do true 8 bit and true 10bit colour which looks a lot better, and important if you're doing design work.
@eliasnunez5218
@eliasnunez5218 5 жыл бұрын
Where does this guy get his shirts? very appropriate to the occasion.
@Nilguiri
@Nilguiri 5 жыл бұрын
Interesting. Thanks.
@ratlinggull2223
@ratlinggull2223 5 жыл бұрын
The heck. I was searching for resources on dithering. This is no Floyd-Steinberg, but still can't believe the massive coincidence.
@amirrezaghafoori7593
@amirrezaghafoori7593 4 жыл бұрын
great explanation thank U
@azurevylot4958
@azurevylot4958 10 ай бұрын
Ok, use CONTRAST ÷ 4, or CONTRAST = 25%. This will blend your dither out. Like a small brush on a charcoal painting. Calculated shading. 😉
@amphetaminehamster
@amphetaminehamster 5 жыл бұрын
Oh god those squares are trippy
@TheTurnipKing
@TheTurnipKing 5 жыл бұрын
An attempt to use spacial resolution to emulate colour depth, in principle
@doctortroels
@doctortroels 5 жыл бұрын
8:26 That tradeoff is for halftone, not for ordered dithering in general.
@circuitdotlt
@circuitdotlt 5 жыл бұрын
This needs a followup.
@shadynasty6393
@shadynasty6393 7 ай бұрын
Amazing ty
@BradCozine
@BradCozine 5 жыл бұрын
7:38 Isn't that a quote from Mel Brook's "History of the World, Part 1"? LOL
@sieltan5618
@sieltan5618 Жыл бұрын
Is there a video on the method of converting newspaper images to black and white that he mentions?
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
4:10 No, you are filtering out the high frequencies -- that is what a low-pass filter does. This leaves only the average of the on-off mixture, which is a greyscale.
@koutsrem5458
@koutsrem5458 5 жыл бұрын
Nice
@JossWhittle
@JossWhittle 5 жыл бұрын
4:28 that dramatic zoom.
@IntrinsicPalomides
@IntrinsicPalomides 5 жыл бұрын
Looks like a BBC Micro in the background there! we actually have one at work for people to play with :)
@TheGREATdEEPs
@TheGREATdEEPs Ай бұрын
Thanks ❤
@punstress
@punstress 2 жыл бұрын
Ah, now I get it. I just have to figure out how to code it now.
@feldinho
@feldinho 5 жыл бұрын
shirt checks out
@FlashMeterRed
@FlashMeterRed 4 жыл бұрын
Wish I could program now. Or at least follow the coding of graphical programs. Is there graphical dithering that doesn't use ordered arrays? like say: a program that compresses images by seeking out all connected pixels of random overall shape that have intensity change < x, across R, G, B or B/W (working on each independently). So dithering of random shapes can be calculated to an average across that shape, eg there's something nearly L-shaped in the red channel of.... 98 pixel size where all the R pixels have nearly the same intensity (ie. small x), which corresponds to 7 of the 98 pixels being on - it needs to calculate where across the whole L those pixels need to be turned on, taking account of the average intensity of R in all neighbouring random shapes (to avoid later edge effects - ie if the patch next door is less intense, don't put an R pixel right next to it). Perform the same thing on each RGB and B/W (contrast? brightness?) channels with whatever average shapes show up in each channel as having change in intensity < x, and averaging across those shapes, so the final image ends up with less information to store. Change x to bigger and you get a lower quality, smaller image (without effecting pixel density), smaller and you get gradually back to the original.... ... In fact could probably be stored as vector graphics... am I describing converting to vector graphics? I might be stupid.
@notfound-bk5wn
@notfound-bk5wn 2 жыл бұрын
Thank u you just save my midterm exam😭
@frankharr9466
@frankharr9466 5 жыл бұрын
I can see how the concept of LPI would map to this.
@rice-stuffedoctopus7786
@rice-stuffedoctopus7786 5 жыл бұрын
Better to use Bayer matrix. It's scalable and easy to code.
@y2ksw1
@y2ksw1 5 жыл бұрын
Yeah, years of studies and a second of genius!
@dragoncurveenthusiast
@dragoncurveenthusiast 5 жыл бұрын
why not use add normally distributed random values to the pixels before rounding to black and white? then you wouldn't get such big blocks of black and white, but a more distributed pattern of white and black. I haven't thought this through completely, but my instincts tell me you could balance the spatial vs the colour resolution by varying the standard deviation of the normal distribution from which you draw the random values.
@dragoncurveenthusiast
@dragoncurveenthusiast 5 жыл бұрын
I've tried it with some code I quickly threw together in Matlab. It works! For the images I looked at, a std deviation of 10-15% of the colour range (from black to white) seems to look best, but it differs slightly for different images. This very probably exists already. I can't be the first person to think of this.
@jamesyeoman794
@jamesyeoman794 5 жыл бұрын
So, are there any practical applications outside of grayscale? For example, would applying dithering to the different colour channels to get dithered RGB be practical at all?
@Gummibrandur
@Gummibrandur 5 жыл бұрын
Yes, this works on rgb images, the practical application is that you now need less bits to store the image, this is useful in image compression
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
@@Gummibrandur It’s a lousy way to do image compression, though.
@shawn2736
@shawn2736 5 жыл бұрын
In printing, you have to dither your image in the 4-color process to produce 4 different print images. Scaling up the filters is useful for "halftone" design elements.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
@@shawn2736 That’s not “dithering”. That’s “screening”.
@sandwich2473
@sandwich2473 5 жыл бұрын
I remember comics would use the same technique for colours.
@bepstein111
@bepstein111 5 жыл бұрын
Okay but where does the grid of 64,128,192,0 come from? Am I missing something?
@dielfonelletab8711
@dielfonelletab8711 5 жыл бұрын
Where was the money shot? Applying the filter to the video?
@Vaaaaadim
@Vaaaaadim 5 жыл бұрын
Why not try it in a probabilistic way? If the pixel value is x, ranging from 0-255, generate a random number r ranging from 0-255, and set the pixel white if r < x, and black if r >= x.
@Carewolf
@Carewolf 5 жыл бұрын
That is error diffusion and the next video according to the video comment.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
@@Carewolf No, that’s not error diffusion. Error diffusion involves keeping track of the error between the true pixel value and what you have actually displayed, and accumulating (“diffusing”) that into subsequent pixels. Hence the name.
@Carewolf
@Carewolf 5 жыл бұрын
@@lawrencedoliveiro9104What you describe sounds exactly like unordered dithering like Floyd-Stein. There is standard dithering technique that just uses random rounding and that way like ordered dithering avoids having to track the error-values around, but it might have another name. Edit: Yes, you were right, error diffusion is calculating the error and spreading it around. Random dithering is what you suggested in the first comment
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
@@Carewolf Floyd-Steinberg is one of many algorithms under the category of “error-diffusion”. It’s not the only one.
@davidcurry5239
@davidcurry5239 5 жыл бұрын
Ordered dithering? Didn't realise you were in government.
@DrSteveBagley
@DrSteveBagley 5 жыл бұрын
Naah, its all about which pixels you leave set and which remain unset… ;)
@jhonbus
@jhonbus 5 жыл бұрын
100% perfect.
@the_niss
@the_niss 5 жыл бұрын
Perfect shirt for this topic
@MaverickJeyKidding
@MaverickJeyKidding 5 жыл бұрын
I wonder how many times this guy's shirt got dithered
@starrmayhem
@starrmayhem 5 жыл бұрын
what if you cheese the system 064 128 | 065 129 192 000 | 193 001 then you just get a white image, any way to fix this
@SMWssaamm
@SMWssaamm 5 жыл бұрын
wondering how this translates to multi-color dithering
@nihonam
@nihonam 5 жыл бұрын
now I see checkerboard ghost ))) and will he speak on different dithering algorithms?
@tenseikenzx-3559
@tenseikenzx-3559 5 жыл бұрын
Dr Bagley's shirt is relevant to this video
@DrSteveBagley
@DrSteveBagley 5 жыл бұрын
'I always dress for the occasion…'
@raglanheuser1162
@raglanheuser1162 4 жыл бұрын
after this video i feel its time to return to the obra dinnn
@leifmessinger
@leifmessinger 5 жыл бұрын
Why aren’t laser engravers grayscale?
@harrkev
@harrkev 5 жыл бұрын
Why not mention of the method of adding random noise before quantization? That method works MUCH better than anything that you did.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
No it wouldn’t. Or, to be more precise, it might work in other situations (e.g. audio), but not here.
@Kotfluegel
@Kotfluegel 5 жыл бұрын
I would have naively generated a random number for each pixel and only switched it to white, if the generated number is larger than the greyscale value.
@mrmimeisfunny
@mrmimeisfunny 5 жыл бұрын
Are you going to do Floyd-Steinsberg next?
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
That’s one of many different error-diffusion algorithms.
@dipi71
@dipi71 5 жыл бұрын
Floyd-Steinberg, yes please. Takes me right back to some lovely ST-high and monochrome Mac pixel art.
@DonaldSleightholme
@DonaldSleightholme 5 жыл бұрын
would like a video of how a music file actually works 🤔🤷‍♂️
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
Do you mean an audio file or a MIDI file?
@Tridd666
@Tridd666 5 жыл бұрын
George Costanza had a kid?
@davef21370
@davef21370 5 жыл бұрын
Wouldn't 50% be 127?
@Hagledesperado
@Hagledesperado 5 жыл бұрын
4:48 Yes. Classical off-by-one error.
@hymnsfordisco
@hymnsfordisco 5 жыл бұрын
If you consider 255 to be the maximum value of 100%, then 127 would be about 49.8%. don't think it's possible to have a perfect 50% value if also including a "zero", if storing bits
@Hagledesperado
@Hagledesperado 5 жыл бұрын
Although if you consider 0 to be the first value and 255 to be the 256th value, then 127 is the 128th value and slap bang in the middle. :)
@Carewolf
@Carewolf 5 жыл бұрын
@@Hagledesperado No, there are 128 values below 128 (0-127), but only 127 values above it (129-255)
@Hagledesperado
@Hagledesperado 5 жыл бұрын
​@@Carewolf Ok, fair point. So the mid point is between 127 and 128. And I guess that's why a signed byte goes from -128 to 127. Zero ruins everything.
@lyuboslavilov
@lyuboslavilov 5 жыл бұрын
And you never put gs dithering effect on the video itself 🤔
Bootstrapping with T-Diagrams - Computerphile
15:49
Computerphile
Рет қаралды 165 М.
Endianness Explained With an Egg - Computerphile
10:46
Computerphile
Рет қаралды 139 М.
The child was abused by the clown#Short #Officer Rabbit #angel
00:55
兔子警官
Рет қаралды 24 МЛН
버블티로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 109 МЛН
A brief discussion of Dithering
10:25
theosib
Рет қаралды 6 М.
Multi Programming - Computerphile
12:30
Computerphile
Рет қаралды 79 М.
Why did the PlayStation 1 have so much Dithering? | MVG
11:05
Modern Vintage Gamer
Рет қаралды 270 М.
Audio Dithering 101 - What is Dither?
14:50
Pro Audio Files
Рет қаралды 66 М.
Dithering on the Sega Genesis with Composite Video
10:30
Displaced Gamers
Рет қаралды 266 М.
Have You Been Pwned? - Computerphile
10:59
Computerphile
Рет қаралды 478 М.
When Worse Graphics Are Actually BETTER
6:04
Techquickie
Рет қаралды 565 М.
I Made a Graph of Wikipedia... This Is What I Found
19:44
adumb
Рет қаралды 2,6 МЛН
Error Diffusion Dithering - Computerphile
6:16
Computerphile
Рет қаралды 78 М.
Dithering on the Sony PlayStation
12:10
Displaced Gamers
Рет қаралды 396 М.
Моя супер находка для велосипеда #находки #wildberries #топ
0:14
Batman in traffic sportbike public ##funny #foryou #shorts #prank #bike #moto #scary
0:40
EXiAN BATMAN / Dont Touch My Bike
Рет қаралды 18 МЛН
БАССЕЙН ДЛЯ АВТО ЗА 25 000 000 ТГ 🌊🚖
11:44
Ерболат Жанабылов
Рет қаралды 118 М.
#рек #automobile #авто #обзор #машина #топ #mercedes
0:52
Анастасия Адаева
Рет қаралды 1,9 МЛН