---
title: 'The magic of adding random noise to black and white images.'
source: 'https://youtube.com/watch?v=kT4p1GXq4HY'
video_id: 'kT4p1GXq4HY'
date: 2026-07-01
duration_sec: 1204
---

# The magic of adding random noise to black and white images.

> Source: [The magic of adding random noise to black and white images.](https://youtube.com/watch?v=kT4p1GXq4HY)

## Summary

This video explores techniques for converting full-color images to pure black and white, moving beyond simple grayscale. It demonstrates the limitations of a single threshold and introduces methods like random noise, ordered Bayer dithering, and blue noise to preserve detail. The video concludes that blue noise offers the best balance of detail and organic appearance for black and white conversion.

### Key Points

- **Naive Threshold** [0:43] — Using a single threshold (e.g., 50%) to convert to black and white loses detail. Different thresholds (25%, 35%, 75%) show varying trade-offs between preserving highlights and shadows.
- **Random Noise Improves Detail** [3:41] — Applying random thresholds to each pixel preserves more detail than a uniform threshold, as it creates shades of gray through pixel density. Comparison shows random noise keeps fine details like the church spire.
- **How Random Noise Works** [5:27] — Random noise pushes some light pixels dark and dark pixels light proportionally to their brightness, creating grayscale-like effects. This is analogous to a palette of grays made from varying black/white pixel ratios.
- **Ordered Bayer Dithering** [7:12] — Bayer dithering uses a repeating pattern (e.g., 2x2 grid) to systematically turn pixels on/off. The 2x2 grid gives 5 shades of gray, while larger grids (4x4, 8x8) produce more detail but with a newspaper-like texture.
- **Recursive Bayer Algorithm** [9:02] — For any 2^n grid, Bayer dithering recursively subdivides and orders pixel flips diagonally to avoid vertical/horizontal lines. The 4x4 grid offers a good balance, revealing brickwork that the 2x2 grid misses.
- **Blue Noise: Best of Both Worlds** [11:43] — Blue noise combines randomness with even distribution (no clumping), providing detail comparable to Bayer dithering but without repeating patterns. It looks organic and is analogous to an iPod shuffle avoiding repeats.
- **Blue Noise vs True Random** [14:31] — Blue noise has evenly spaced variation at small scales (high frequency), unlike true random noise which has hotspots at all scales. When blurred, blue noise goes uniform gray, while true random retains structure.
- **Parker Dithering (Novelty)** [15:22] — The creator invented 'Parker dithering' based on a 3x3 grid with unusual thresholds (e.g., 29%, 1%). It introduces a fun texture but is not optimal due to always-on pixels from low thresholds.

### Conclusion

While naive thresholding is destructive, techniques like Bayer dithering and especially blue noise can convert images to pure black and white while preserving significant detail, offering a creative alternative for artistic or technical applications.

## Transcript

Okay, here we go. How about this one? Any good? This one? I like this
one. This one's got something to it. Sorry, I'm dithering.
This is a video all about how you take a full color image like this
and turn it into a purely black and white image. None of this gray scale
ridiculousness. And a while ago, I did a video which was like self-referential where the
text would describe how many pixels are in that image of the text. There was
a deleted scene about what happens when you go all white or all black using
a threshold. So let's go full black and white. What we can do is just
pick some threshold and above that level of gray we go white and below it
we go black and that's what the slider over here is indicating. I mean that's
not part of the The frame, I'm putting that on afterwards. In fact, the count
up here for the number of black pixels and white pixels, not part of the
image, although spoiler, that's where we're going. The idea with the shot was to demonstrate
the difference between black and white, like real black and white, and what people call
black and white. It's actually gray scale. And I had a lot of fun, put
the code together, we rendered that, and then we cut it. Because do you know,
sometimes you put a lot of effort in for the luxury of cutting it out
of the edit. And it was already a very full video, a video I love.
um underperformed on YouTube what are you gonna do? I liked making it and so
we took that scene out but it always kind of stuck with me I was
like you know what there is something in that how do you take an image
and make it pure black or white and keep as much information as possible we
can try it on this shot as well so here it is okay if you
did naive 50% threshold it looks like this super dark you can still kind
of make me out but uh we've lost basically everything from the background and I
mean, classic log perception of darkness, I guess. Cause if we go up to 75%,
it looks like this. It's just, it's just, the lamp is the only thing that
survives at 75%. And this is 25%. So now the bottom 25% of
brightness from zero to 255 goes down to black. Everything else goes to white. You
get some detail on my face. There's a little bit up over there, but
we're losing a lot there. My head is just vanishing into the wall. I played
around for a while, this specific shot I think 35% is the best threshold.
That's keeping a decent amount of detail here. You can still kind of see the
football's not bad, but like look how severe the shadow is. And this thing, it
looks like there's an object there, that's just the shadow of this. The point is,
if you're trying to get Detail, and you've only got black or white and a
single threshold where you're rounding one way or the other, very hard to keep like
fine detail and darker detail, all that kind of jazz. And it gets even worse
were we to go somewhere that's much more visually interesting. Such as this! Ah, there's
some detail. Now we think the best threshold for this scene is 28.
what you're looking at right now. Everything below 28% brightness is going to black and
above is going to white. It's the best we could do to kind of keep
the detail in the front of the church over there and you can still see
some detail in my face but the top of my head is indistinguishable from the
sky. The spire is gone on the church. To get that back we tried a
threshold of 40 there. That's better but now we've lost so much other detail. So
we think 28% is the best. However, what if we weren't applying
the same threshold to every pixel, but we mix it up a little? And the
result looks like this. Okay, so there's a lot of like static noise going on,
but there's definitely more detail. And check it out, you can see me and you
can see the spire and you can see basically everything. So somehow by applying
randomness, we've put noise into the shot, we've managed to preserve more detail. So
compare this to when we had the 28 threshold, the best from before. So over
on this side, let's say, random noise. Over here, 28 threshold. Huh?
Look at this. Terrible. Different type of terrible. Although actually, if we move the camera
around so the spire goes in and out, you can see that it's, you know,
we're able to keep that separate from the sky by using randomness and we can't
do that with a threshold, at least without losing everything else. So what's the deal
with random noise giving us detail back into our black and white image? Well first
of all I just want to tell you one thing you don't actually need to
know. If we zoom right in on this image down to the pixel level, these
individual pixels are actually little groups of 4x4 pixels.
Because what I did, I scaled everything down to 1k, because we film at 4k,
I go to a quarter the resolution, Then I do all the processing, the black
and whiting, and then we pop it back out again to 4K. And we do
that with a kind of hard edge nearest neighbor technique, which means what look like
pixels are actually little four by four groups of pixels. But if I did this
with true pixels in 4K, by the time we're done, if you're watching it on
an HDTV, you're watching it on a phone, it would all just blur together. So
that's why the true pixels aren't real pixels, but you should be able to see
them. You don't need to know. but I just thought it'd be fun to share.
Speaking of things you don't need to know, you don't need to know this video
is sponsored by Jane Street because their Academy of Math and Programming is now accepting
applications. More about that at the end of the video in the description below. Let's
talk about the noise. What the random thresholds are achieving is taking some of the
pixels in light regions and pushing them dark when they shouldn't be and taking some
pixels in the dark regions and pushing them light. And that's happening random or rather
proportional to how far from being light or dark each pixel is. And what that's
doing is giving us, well, shades of grey. Because if you had to come up
with grayscale colouring from scratch, using only black and white, you'd put together like a
palette of greys like this, where you've got more or fewer black pixels in each
one, so as you kind of lean back and blur your eyes, they become different
amounts of grey. And what the random thresholds are doing is basically this. but in
an ad hoc fashion, because the brighter or darker a region is, the more or
fewer pixels get pushed in the wrong direction. So we're basically hitting all these in
between combinations. The only issue is random noise is of course doing that randomly.
If only there was another way, we could do it systematically. New location where we're
going to try a new filter, which looks like this. It's not bad. I mean,
my head, a little bit disappears into that building, but we're keeping like, look at
the detail in the hanging basket and the background is not bad, but it does
have that weird kind of old school newspaper feel. And that's because it's based on
a repeating pattern. Any dithering scheme that uses repeated pattern, like what we just saw
is called ordered dithering. Specifically, I was using a two by two Bayer. ordered
dithering which gives you five different shades of grey. Well you get all white and
all black and then you get three in the middle where you colour in one,
two or three black pixels and that's it. That's your whole spectrum.
But it kind of works. You just take that, have it as a repeating tile
over the entire size of your image and then use that as your series of
filters and the way you can get it to gradually step up is you just
set them as different thresholds and it works. But the point is they turn on
in that order. But what if we don't want just a two by two repeating
pattern? Oh well, you can go so much better. In fact, Bayer dithering works for
any two to the n by two to the n grid. Allow me to demonstrate.
The secret as such to Bayer dithering is the order in which the pixels flip
from black to white or vice versa. And they fire off in a very specific
order as an area gets brighter and brighter. The first one to go is the
top left, that one there flips first, that's pixel number one. As we get brighter,
then number two fires, then number three, and finally we fill it in with number
four. You might be thinking for a two by two grid, there's not a lot
of ways to do it differently. But if you ever think about it, you could
do it wrong if you fired one and then two underneath, The moment you go
up into a slightly brighter shade of grey, you get weird vertical lines appearing. And
you don't want vertical horizontal lines, which is why we go diagonal and then a
corner and then the other diagonal. By staggering the order in which we go from
white to black or black to white, you are less likely to get weird patterns.
And it's better when you look at it with your human eyeballs and you kind
of average it out into a grey. Things get more complicated though, when we go
to a bigger grid size. Bayer dithering works for any two to the n grid.
So you can basically double it each time to get the next one up. And
what you do is you imagine this as being like four lots of the previous
ones. There's one there, another one there, another one there. And then you do the
same pattern recursively as you scale it up. So of these sub grids,
you always do them in that order. This one, then that one, then that one,
then that one. And then within each one, you do them in this order. So
for example, We're going to do top left for all of them first in this
order. So we do top left there, one, top left there, two, and then three,
and then four. And now we come down to here and we do them in
this order. So there's five, six, seven, eight. Now we're going to do that
one in all of them in that order. So that's now
nine, 10, 11, 12, and finally 13, 14,
15, 16. And you could repeat this and do an 8x8 or 16x16 and so
on. It's a fantastic little recursive algorithm and if you turn the pixels on and
off in this order you get a fantastic range of shades of grey.
But what would that look like back out in the real world? Welcome back to
the scene from before. We're still in the 2x2 Bayer filter and just
Take a little note of what you can and can't see. And ready? Here's the
4x4! Ah, isn't that special? You can see these bricks! Ready? Okay, back to 2x2.
They're gone. 4x4, they're back. You can see all the brickwork over here. Look at
the background and my face. In fact, if we do, we'll do a split screen
as soon as this car comes through. You know what? Do it now! I'm over
here. This is the 2x2 side where that car is just driven through. Ah! Look
at the emotion you can see now. And if you're thinking, well, hang on, if
the 4x4 is this good, imagine the 8x8. Well, here's the 8x8. It's the same.
Here's 16. Up off a point, doesn't make a big difference. So for this scene
at the resolution we're using, the 4x4, what a winner. So there's your two options.
Use completely random thresholds and get a nice organic look, but maybe not... as many
nice separations of grays as we would like or you use something ordered like Bayer
dithering you get loads of nice distinct grays but you get a weird repeating newspaper-esque
look. There are only two options I'm afraid it's not like there's some fantastic third
option in the middle with the best of both of course there is it's called
blue noise instead of using pure random noise you can use blue noise and you
get much better grays And here is blue noise out in the wild. You don't
even know what this scene looks like. All you can see is this dithered version,
but it's not bad. Look how the posts, the posts like you can see they
get darker as you go back. You can almost make out there's like brickwork and
tiles. Just have a look at what detail you can get. We can also compare
this to pure random. Actually, we can do our split screen again. So I'm blue,
blue noise on this side. Random noise on this side, or come with me, round
over here, past producer Nicole with the bounce, because it makes so much difference once
we've given the shot. There's a tree, there you go. Blue noise and random noise.
You be the judge. Right, we all love blue noise, but what actually is it,
and how does it differ from true random noise? If we were to extract our
random thresholds for every pixel and just visualize them going from white to black, it
would look like this. There you go, it's just standard random noise. Blue noise
looks like this, subtly different. So in the true random, your brain is doing
human brain things. It's looking for patterns. You might be spotting some like threads or
filaments in there because real random noise clumps. Like you're gonna have hot spots and
cold spots at every different scale. Whereas blue random noise, that's a lot more like
It was like remember when, well some of you might remember when the iPod Shuffle
came out and it was true random and everyone got upset because they'd occasionally hear
the same song twice in a row? Yes, because that's randomness. You get every possible
string and arrangement in there somewhere including things repeating which is why you get like
bright spots and dark spots. All people wanted was a shuffle and blue noise is
much closer to being a shuffle. You don't just things in randomly you make sure
on average they're all roughly evenly spaced. It's nicely distributed noise and
you can see that if we blur them both because if we blur blue noise
on a small like let's say five pixel radius it goes totally gray whereas true
noise you can still see hot spots and cold spots. There's still some structure in
there because white noise has structure at every frequency is why it's called white noise.
Whereas blue noise only has variation on very small distances, high frequency like blue.
You also get different color audio noise, not going near that. I'm pretty sure it's
the same thing. But the point is, this is not pseudo random, but it's not
true random. It's blue random and it looks a lot better. Isn't blue noise amazing?
It's just incredible detail, but you don't get a repeating pattern. And the reason you
get the best of both worlds is it is still pretty random, but also it
has that same property of bare dithering, whereas the pixels turn on, the
order in which they turn on is very evenly distributed. So if I take this
blue noise and I cycle it all the way from completely black to completely white
and see when the different parts of the filter turn on and, I guess, turn
off, you'll see at the extremes, it's just a bunch of points fairly
evenly distributed, but yet randomish. In fact, if we pause it there, if you told
a bunch of humans arrange themselves in a room randomly, they'd end up standing a
bit like this. Because humans would think random means evenly distributed, but a bit offset.
It's not a grid. And that's exactly what we get here. Blue noise is what
humans think true noise is. But it's not. Blue
noise. If you're thinking, come on, Matt, what about the dithering system you came up
with? Well, who's to think I'm gonna come up with a course I did. And
we'll talk about that in a moment. But first I wanna thank the sponsor of
this video, Jane Street, because their AMP course is accepting applications now.
AMP is Jane Street's Academy of Math and Programming. It's for recent high school graduates
who had some kind of barrier to their education, but they want to pursue an
education in math or computer science. AMP runs from the very end of June right
through to the very end of July, 2026. And over that month, the curriculum will
focus on solving problems involving things like mathematics, computer programming, game theory, and
much more. Not only will Jane Street cover your travel to New York City, your
accommodation, your food and all fees associated with the course, but if you make it
onto AMP, they will also give you a $5,000 scholarship to help you further your
education. To apply for AMP, you don't need any particular background in finance or coding.
You just need to be intellectually curious and have a love of mathematics and computer
science. The deadline for applying for AMP, if you are a high school student or
you know a high school student and you can pass this on to them, is
the 11th of March. So get onto it. It's a huge amount of fun. I
go every year, so you get to see me. I mean, there's a perk. I
just love solving the sorts of puzzles that they have at AMP. In fact, they
gave me one recently that I could have a go at. Imagine you're in a
three-game tennis competition where to be the champion, you have to win two consecutive games.
Your opponents are Jenny, the best tennis player in the club, and Carla, who is
less good. You either have to play Jenny, Carla, Jenny, or Carla, Jenny, Carla. Your
non-tennis challenge is which way around would give you the greatest probability of winning two
consecutive games. I like this puzzle because there is kind of an intuitive way to
look at it, but also you can just work it out. which I did. Here's
all my working. I had a lot of fun doing it. I hope seeing this
really clears things up. All the puzzle details will also be in the description if
you want to try, as will the details for applying to AMP. Thank you so
much. I mean, I know this is not for everyone, but if you are that
high school student or you know someone who is, this could be a life-changing opportunity.
So please do spread the word. Huge thanks to Jane Street for not only running
AMP, but also sponsoring this video. And now for my dithering technique, because I first
came across all of this and got obsessed by it when I watched a bunch
of YouTube videos about the mass behind the video game Return of the Obra
Dinn. And in that game, everything is black and white dithered. Although within each shot,
there's different types of dithering and you move around in 3D, but the dithering works.
It's just incredible. I will link to the videos I watched below if you want
to check them out, but it just got me thinking, oh, you can come up
with different types of dithering. In fact they used new types of dithering for that
video game. So I was like well I'm going to do my own. But what
could I possibly base Parker dithering on? Well I thought what about the
original Parker thing? I used the Parker square. I used a three by three
grid where that's 29%, 1%, 47% etc thresholds. Now
is that a good way to do it? No! In fact I'm now Parker dithered.
And you'll see. So the issue is, because we got some one percenters here,
they're like always white. Because what's going to get below one percent? So you always
get this, if you zoom in, these little pair of diagonal pixels are just always
on. But I think that adds a certain amount of fun texture to a scene.
And it works outside as well. Check it out. There's the tree from before. That's
not a bad amount of detail. If you come over here, other side of producer
Nicole again, you can feel of this. There's your tiles up there. We've got the
posts from before. That guy walking through, it's not bad. Even this shot isn't bad
with the Parker filter, huh? We've got the spire and I think that weird texture,
nice moody element on the graveyard. And while we're here, thank you for visiting my
MySpace page. So that's it. Thanks for watching. Don't forget to like,
subscribe and dither that bell, whatever it is they say. Oh, and I'm still on
tour. Come and see me on tour. That's the highest resolution you will ever see
me in. Full color too.
