We looked at the auditor scissoring is an attempt to
Simulate those extra gray scales. Let's keep it to a gray scales for the purpose of this video just using black and white pixels
There's another approach we can take which is called error diffusion
So what we do and we'll still use black and white to do this we take a picture
Let's start with this one, which has got the value 128 so it's mid gray
We can either say it to be white 255 or black zero so we choose the one which is closer
So in this case 255 is slightly closer than zero. So we've set that to me two, five five now we can calculate
The error in the value we've given it to what it should be. So this should be
128 we said it to be 255. So we've got an error of plus
127 that's how much brighter it is than what we do especially because we've got that piece. It'll be that
Now what we can do is we can say let's make the pixels around it slightly darker than they should be
To compensate for the fact that that one's brighter. So we've got this one pixel, which is brighter
Let's make the ones around it darker
And again when the eye looks a little average of axes and low-pass filter over the image and it will appear
Roughly to be the right brightness all the way over it in this case
We want to make it darker by quite a lot. Now. The question is where do we pass that?
Error on to do we just put it onto the next pixel do we put it onto the pixel before?
We put onto the pixel below it the pixels above it
One of the classic approach is used is what's called?
Floyd Steinberg do the ring and what you do here is you don't modify pixels that have already been set
So you're scanning the image from the top left across each row from left to right?
So the pixels before it you've already set and so you say ooh
I'm going to take the arrow from this and I've got to put some of it into here
Some of it into here some of it into here and some of it into here
So let's start down here a bit. We've set this to be two five five. This is up
527 so we need to split that plus 127 and take all the ones around it down
By some amount. So what the Floyd sign Burke algorithm says is into this pixel here. We'll take
7/16 of the error into this pixel here. We'll take
1/16 of the error into this pixel here. We'll take
5/16 of the area and into this one here it will take
3/16 of the error what this basically means is that this was up by 127
So, what does that the runs around it a total of 127 lower. So our error that we need to pass out is minus 127
so we take
127 divided by 16
multiplied by 7
So this Pixar we're going to bring down by minus 56 this one. We're going to bring down by
1/16 which is roughly 8 and this one is 5/16 which is going to be roughly
40 and this one's going to be 3/16 which is gonna be roughly
24 so these are all - so what we're saying?
Is it for the pixels that surround this one because we were too bright by 127 levels
We're going to make all the ones below it less bright by certain amounts. So let's work out what those values would be
So we take 120 8 here we subtract with 56 from it which gives us the value of 72
So make this pixel to the right
Be 0 but that's going to generate its own error
And so we do exactly the same thing in which would generate an error, which would go here
This was too dark by 72 which means we need to raise this pixel by so much which would make it white
But we also need to raise this pixel this pixel
Which is also that pixel and so on so we could have passed the error out amongst and if we repeat this out
over the whole image we can convert a
Continuous tone image here into a set of pixels that are either black or white
But which are compensating for the error? And so again, we'll give the appearance of
the original gray things
But if you were to zoom in on this you would see that rather than having a regular pattern
It would look a lot more random. You'd have sort of clusters of things actually
These numbers were chosen 3/16 5/16 1/16 7/16 so that for 50% gray you do get that checkerboard pattern
But for other things you get different patterns the advantage of this is that each of the dots
Are a single pixel wide rather than before on the other to the west some were single pixel some got bigger some got smaller here
Everything would end up as a single pixel
So what we've been talking about is spatial diddly
we've been taking the either the error and diffusing out over the image or
Using an order thing over the image to create the dithering you can also do there in time
So some of the plasma televisions and actually some LCDs as well to try and create the gray scales rather than dither
Just in space. They also do that in time
So what they do, is that rather than having the pixel be white all the time
And they're all black all the time to create the space with the other
They have it flashing very fast between the two things
So it looks great because it's flashing
Faster than the eye can see black then white the black then white and black the white black and white black the white
Is it kind of a bit more for the history books this then? It's still you
I mean printers are still black and white printers
Either can put a blob of ink or they can't put a blob of ink put a blob of tone or they can't
with the exception of dye sublimation ones where they can start to mix the colors together in different ratios as they're subliming the
Inks and so on it's still used in television
For example, the camera Shaun's using to film this I think has a 10-bit sensor
But it's recording at 8 bits. And so it'll be due there in gown
That's the high end bits the 9th and 10th bit down to the 8 bits to create some that you can see on
YouTube and so I still use an open you'll go away
At least you haven't asked me about it on it in audio
We said that again and now we're going across here. He's 128 greater than hundred 28. No, so we leave that blank
So now we come down on to line 2 and we do the same thing with the second line here
He's 128 great at 192. No, right? Ok, believe it is 128 greater than 0 yes. Ok, so we get the program to