Тёмный

Error Diffusion Dithering - Computerphile 

Computerphile
Подписаться 2,4 млн
Просмотров 78 тыс.
50% 1

The smarter way to dither. Dr Bagley takes us through the Floyd-Steinberg error diffusion dithering technique.
/ 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

Опубликовано:

 

8 апр 2019

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 103   
@sixft7in
@sixft7in 5 лет назад
I love how Dr. Bagley wears that shirt for the dithering videos.
@totlyepic
@totlyepic 5 лет назад
...I think it's more likely that the two videos were just recorded on the same day.
@sixft7in
@sixft7in 5 лет назад
@@totlyepic True, but the fact that he wore that shirt for both or each is still funny.
@sixft7in
@sixft7in 5 лет назад
@Zero Cool Oh, I know. Either way it's funny to me, accidental or intentional.
@pseudo_goose
@pseudo_goose 5 лет назад
Aw man, you had to put in a teaser for audio dithering at the end. I hope that's in a video soon!
@azyfloof
@azyfloof 5 лет назад
It was probably in the audio of _this_ video :P
@ChristopherMeadors
@ChristopherMeadors 5 лет назад
I'm definitely here for the audio dithering. There's an excellent Xiph video called Digital Show and Tell, that goes into what dither does for audio. But other than providing a sample code download, it doesn't really go into the how it's implemented.
@kaitlyn__L
@kaitlyn__L 5 лет назад
Me too!
@veggiet2009
@veggiet2009 5 лет назад
It's interesting that I've seen these different styles of dithering, and I've recognized them as different, but I've never considered what made them different.... These videos are fascinating. I'd like more detail about how the algorithms translate to color and to higher bit depths.
@jursamaj
@jursamaj 3 года назад
In color, you'd simply dither each of the color channels (red, green, & blue) separately. For higher bits depths, you just pick values for each pixel value. So instead of black (0) and white (255) for 1-bit, you'd have 0, 85, 170, & 255 for 2-bit. You'd use the same error diffusion after picking the nearest value. Technically, your values don't have to be equally spaced, and the formulae really should account for things like display gamma.
@TimTam69420
@TimTam69420 5 лет назад
I very much hope you asked how they do it for audio. its actually pretty straightforward and would make for an interesting video
@DreadKyller
@DreadKyller 5 лет назад
even with how many colors we have today on most modern devices dithering is still used even with 8-bit colors, if you have a smooth gradient there are points where it moves from being solid 80 for example down to solid 79, and while that's not really noticeable, you can still dither that change to blend the colors together to simulate even more colors in between. Because when zoomed in even 256 options per color channel can still have banding issues, dithering as it zooms in helps remove such banding artifacts.
@user-zz6fk8bc8u
@user-zz6fk8bc8u 5 лет назад
Dithering is still used in generated color images to reduce banding.
@silkwesir1444
@silkwesir1444 5 лет назад
What a great idea, why didn't I think of that. Thanks.
@jerrywatson1958
@jerrywatson1958 5 лет назад
Wow you earned a new sub today! Finally after all these years of seeing this kind of dithering in my (then) Amiga photo creation software and graphics it clicked! How the computer calculates each pixel on the screen. The math is calculated and displayed SO fast it puts me in awe of what designers have done. This helps me in what I am trying to learn to do in Blender and understand lighting.
@lazycrypt6893
@lazycrypt6893 5 лет назад
RU-vid compression sure didn't like the dithering.
@FyberOptic
@FyberOptic 5 лет назад
These videos were so interesting that after the last one I started playing with implementing a color dithering script, just to experiment with it. Dithering is always something I took for granted in programs like Paint Shop Pro over the last few decades, but never really considered how it worked.
@mrsvcd
@mrsvcd 5 лет назад
Thank you for explaining Floyd-Steinberg dithering and now I can understand the notation for it as well.
@tungstikum
@tungstikum 5 лет назад
"Error diffusion dithering" is how I walk home from the pub.
@haulin
@haulin 5 лет назад
It's also my relationship strategy. I don't return to the one I've already done.
@JaccovanSchaik
@JaccovanSchaik 5 лет назад
Wonder what dithering algorithm the shirt uses.
@haulin
@haulin 5 лет назад
Must be a crappy one. I can't work out what was the original image.
@mspysu79
@mspysu79 5 лет назад
Another good video, and a teaser for what Sony used to call "Super BitMapping" using a 20 bit ADC and dithering down to 16 bit for recording on a CD.
@Rocket_Try
@Rocket_Try 3 года назад
Great, thank you so much. Got it working with your explanation on an ESP32 Cam.
@roderik1990
@roderik1990 5 лет назад
Notes that you likely want to add some noise before going through the whole floyd-steinberg process. (of the proper PDF) To prevent noise modulation from being too noticeable. Error diffusion dithering like Floyd-Steinberg, is analogous to noise shaping in audio dithering.
@10100rsn
@10100rsn 5 лет назад
What about half-tone algorithms where there is lpi and angle?
@piteoswaldo
@piteoswaldo 5 лет назад
What's the name of the dither technique that simply sums a white noise to the original image before thresholding?
@NullPointer
@NullPointer 5 лет назад
It's also used today in Deferred Rendered engines to acchieve screen door transparency
@misterhat5823
@misterhat5823 5 лет назад
Dithering down (or reducing bit width) is a different process. A random noise (or triangle wave to cheat) is added to the signal and then it's truncated. This is done instead of rounding or simple truncation.
@pattywu9301
@pattywu9301 2 месяца назад
Thanks for the video really helpful
@user-vn7ce5ig1z
@user-vn7ce5ig1z 5 лет назад
5:00 - That's how PWM works.
@stanrogers5613
@stanrogers5613 5 лет назад
...or PCM (pulse code modulation), where the on/off edges are fixed, which can make some parts of the circuitry easier to manage, but the pattern of pulses is varied (basically a single-bit synchronous encoding of a number). That was how single-bit oversampling worked on many of the early "hifi" CD players, for instance, to move the quantization noise far enough out of the audio frequency range to make filtering easy using lower-order filters (which don't hurt teeth nearly as badly as "brick wall" high-order filter phase shifts).
@KX36
@KX36 5 лет назад
or PFM
@matt4193
@matt4193 5 лет назад
Nice dithered shirt, Dr. Bagley.
@NoHandleToSpeakOf
@NoHandleToSpeakOf 5 лет назад
Animated GIF is limited to 256 colors and they use dithering too.
@superscatboy
@superscatboy 5 лет назад
If keeping the size of a gif to a minimum is a major concern, dithering is your worst enemy :P
@NoHandleToSpeakOf
@NoHandleToSpeakOf 5 лет назад
@@superscatboy True. Multi-meg gifs are rarely problematic these days though
@arsnakehert
@arsnakehert 4 года назад
_Excellent_ choice of shirt
@nsputnik
@nsputnik 5 лет назад
How did you create the dithering example at 4:04? I have been wanting to do this in VDMX. I can do it with still images by bringing a .jpg into Classic Mac OS Photoshop and switching to graysacale and then halftone.
@Sth0r
@Sth0r 5 лет назад
Hey love the stuff you guys and girls make on this channel. what happnes if you do this to the red, the green and the blue layers and rekomebine them?
@decece
@decece 5 лет назад
There's a nice example at: caca.zoy.org/study/part6.html
@themusicicreate
@themusicicreate 5 лет назад
I'd love to learn about audio dithering like he alluded to at the end!
@TheAnarchoX_
@TheAnarchoX_ 2 года назад
We use it to dither lens molds, these lens printer heads have a resolution of a few microns and are rather fault sensitive by applying dithering to the 3d mapping we can eliminate the error of broken printer heads so that we always get a smooth result
@f4614n
@f4614n 5 лет назад
At 4:01 it really shows that video compression was not designed to cope with dithered signals.
@misterhat5823
@misterhat5823 5 лет назад
Very true. It's adding high frequency noise and most compression methods attempt to throw out high frequency signals.
@alexxxcanz
@alexxxcanz 5 лет назад
I’d like a video on Intel Management Engine. About what is it, how does it work and how to disabled it. That would be great!
@forthrightgambitia1032
@forthrightgambitia1032 5 лет назад
A video on line/circle drawing algorithms would be nice.
@benjamimapancake6429
@benjamimapancake6429 5 лет назад
Seconded or rather, seventhed
@roar779
@roar779 5 лет назад
Can someone please tell me what the last sentence was after the big pause? at 5:52
@juschu85
@juschu85 5 лет назад
The export dialog in my music software also gives me a dithering option. So this is probably also dithering over time since you can only hear a single sample at a time. So in that case, the error is just carried over to the next sample, right?
@groszak1
@groszak1 5 лет назад
nope, that leads to high frequencies, in audio dithering they randomize whether to round up or down so that the error is uniformly a noise
@n00dle_king
@n00dle_king 5 лет назад
Such a cool algorithm. Makes me miss school.
@renemunkthalund3581
@renemunkthalund3581 5 лет назад
I would like to have seen dithering in time exemplified on Dr. Bagley. I know it would take some coding, since it's not readily available like Floyd-Steinberg.
@WacKEDmaN
@WacKEDmaN 5 лет назад
i wanna know about audio dithering!
@solemnwaltz
@solemnwaltz 5 лет назад
Nice! Your shirt matches your topic. :D
@karlkastor
@karlkastor 5 лет назад
Isn't 'dithering in time' just Pulse-width modulation?
@misterhat5823
@misterhat5823 5 лет назад
Never thought of that, but essentially yes.
@danieljensen2626
@danieljensen2626 5 лет назад
Sounds like it yeah, but for each pixel in an image.
@raydleemsc
@raydleemsc 5 лет назад
So is Floyd-Steinberg used in audio dithering?
@misterhat5823
@misterhat5823 5 лет назад
No.
@groszak1
@groszak1 5 лет назад
humans perceive audio differently than images so Floyd-Steinberg isn't the best choice for audio dithering, randomizing whether to round up or down gives better results for audio
@3dlabs99
@3dlabs99 5 лет назад
That shirt is perfect for the video :)
@noestreet760
@noestreet760 4 года назад
If these values are based on quadrants, why is the maximum 255, not 256?
@BlankBrain
@BlankBrain 5 лет назад
5:52 Please discuss dithering in audio.
@JamesBrown-oz5bl
@JamesBrown-oz5bl 5 лет назад
of course you'd first multiply and only then divide and you'd want gamma correction in your error values...
@simonmultiverse6349
@simonmultiverse6349 2 года назад
Was your shirt created by a dithering algorithm?
@dreammfyre
@dreammfyre 5 лет назад
Double surnames always makes me think of some dystopian mega-corporation. Maas-Chen Holdings etc.
@TheRumpletiltskin
@TheRumpletiltskin 5 лет назад
PLS DO AUDIO DITHERING!
@NVRMTmotion
@NVRMTmotion 5 лет назад
Just wrote a python program for cropping and printing photos on thermal printers, dithering required, still relevant and fascinating!
@OrangeC7
@OrangeC7 5 лет назад
Me in the previous video: Awww what they didn't show off the dithering on that image! Me in this video: Oh, that's why they didn't show it off
@victorx4648
@victorx4648 5 лет назад
A funny thing - just yesterday I was wondering how those dithering algorithms are working. :)
@AlphaFoxDelta
@AlphaFoxDelta 5 лет назад
Always a pleasure, even if this isnt not my error of expertise, heh
@someone-br9ur
@someone-br9ur 5 лет назад
notch's tweet
@KOrbyPoulpe
@KOrbyPoulpe 5 лет назад
Recently, Dithering have also been heavily used in the game "Return of the Obra Dinn" released in october 2018
@cacheman
@cacheman 5 лет назад
Lucas Pope (the author) did some additional work to make the dithering more stable under movment. He wrote about the technical details in a post on tigsource, which can be easily found through google by searching for something like "lucas pope dithering" #bayermatrix #bluenoise
@rev_lunar
@rev_lunar 5 лет назад
Dithering in time seems like it would be the best solution for static images as it wouldn't compromise image quality, but would require more resources.
@misterhat5823
@misterhat5823 5 лет назад
There's a limited frame rate most display devices can use, so the benefits are less than you might expect.
@KuraIthys
@KuraIthys 5 лет назад
Floyd-Steinberg is a better method on paper, but personally I've always found it to be one of the uglier methods to perform dithering. Guess there's always compromises with stuff like this...
@sogerc1
@sogerc1 5 лет назад
I remember so-so many years ago, when color was a problem for videocards I used to love dithering. Except when looking at pictures of naked chicks ;-)
@michaelcharlesthearchangel
@michaelcharlesthearchangel 5 лет назад
Hm. The moment a voxel-deep hologram shade appears and then fills in. I see some kind of holodithering occurring until less than 2 percent error is maintained. Quantum computers/hyperservers will help us speed up the resolution-- error correction of a quantumFlashplayer playing a holovideo.
@danfg7215
@danfg7215 5 лет назад
black then white then black then white then black then white then black then white then black then white then black then white then black then white then black then white then black then white then...
@cipherxen2
@cipherxen2 3 года назад
His shirt can be dithered
@hillwin10
@hillwin10 5 лет назад
Oh -- we are getting "fancy." Lol.
@preferredimage
@preferredimage 5 лет назад
Cool minecraft shirt bro! ;)
@hrnekbezucha
@hrnekbezucha 5 лет назад
Printers are black and white. A colour printer is four printers in one package, each doing one colour.
@vitalnutrients744
@vitalnutrients744 5 лет назад
130th!
@blazbole3342
@blazbole3342 7 месяцев назад
nice teeth
@blazbole3342
@blazbole3342 7 месяцев назад
space for train
@blazbole3342
@blazbole3342 7 месяцев назад
sry bro. ly
@Eternal_23
@Eternal_23 5 лет назад
Blue noise is answer for everything
@fredericchopin2947
@fredericchopin2947 5 лет назад
Philip Seymour Hoffman
@Muzkaw
@Muzkaw 5 лет назад
It's pixel level ASCII art!
@schatjepatatje767
@schatjepatatje767 5 лет назад
uwu
@SeamusCampbell89
@SeamusCampbell89 5 лет назад
First
@misterhat5823
@misterhat5823 5 лет назад
First down vote.
@superscatboy
@superscatboy 5 лет назад
This is extremely interesting.
@VIVAFPV
@VIVAFPV 5 лет назад
boring
Далее
Ordered Dithering - Computerphile
10:35
Просмотров 128 тыс.
Bootstrapping with T-Diagrams - Computerphile
15:49
Просмотров 165 тыс.
SCRUB: SpaceX Attempt One - Starship Flight Test
9:9:58
What is Big Data? - Computerphile
11:53
Просмотров 211 тыс.
SHA: Secure Hashing Algorithm - Computerphile
10:21
Просмотров 1,2 млн
Sleeping Beauty Paradox - Numberphile
15:45
Просмотров 315 тыс.
Separable Filters and a Bauble - Computerphile
10:41
Просмотров 103 тыс.
What is a Number? - Numberphile
11:21
Просмотров 372 тыс.
Why did the PlayStation 1 have so much Dithering? | MVG
11:05
Multiple Processor Systems - Computerphile
14:52
Просмотров 153 тыс.
Self Compiling Compilers - Computerphile
12:56
Просмотров 158 тыс.
A brief discussion of Dithering
10:25
Просмотров 6 тыс.
The Lightning Algorithm - Numberphile
12:24
Просмотров 541 тыс.