Each cell splits into 4 when the complexity goes over a certain amount, I just had the threshold changing as the loop runs. It resets after a certain amount. I was really just playing around with it, trying new things :)
@@not_estains Yeah, that's how quadtrees are used in video compression. I added the lines so I could see what was being split and what wasn't, I was having fun. Having it only on half of the screen just made it run faster :)
@@stanbwonderfulThat's really interesting, actually. I learned about quadtrees while writing a physics simulation, very cool to learn it has such a widespread application. Thanks for sharing!
Quadtrees are used to break up lists of data into smaller bits which are quicker and easier for the computer to deal with. In this case I'm using quadtrees to do video compression, you used to see this a lot on old digital video clips.
@@nolansomers A while ago I was learning about the boids algorithm (videos on my channel), that's when I learned about quadtrees as a way to speed things up but giving the computer less to work out with each step.
can we get a version where the bottom left and top right are also quad trees, and all the black lines are hidden? i wanna see the division in real time
The output file isn't any smaller than the original file I used, the stupid python script I wrote doesn't work for video compression and it takes ages to render anything. Real programmers who know what they're doing can use algorithms like this in the real world, I'm just having fun learning things :)
Without the outlines it would really just look like crusty jpg compression... I kinda wanna see a video where the full frame is a quad tree instead of two quarters being quad and the other two being normal
If you look at the wikipedia page on quadtrees it should a little animated gif showing how it's used for video compression, that's where I got the idea, I kinda reverse engeneered what I saw. That's as deep as my knowledge of video compressions goes
Yeah, I was just playing around with this one, running the algorithm on different parts of the screen and changing the variables a bit. I think I've got a few more vids on my channel.
Cool! Been wanting to play with quadtrees more and eventually move into octrees. Even the quadtrees im having a difficult time wrapping my head around implementation, but your example shows well ehat it can do.
Proper programmers can and do, I'm still learning and just having fun. Have a look at the quadtree wikipedia page, that's where I got the idea to try it on images.
Probably if you wanted to compress a video with a basic approach you could compress each frame individually, simply start with a very large rectangle covering the whole screen, then find the average color of the pixels in this rectangle, next you calculate how much each pixel deviates from this color squared, then find the average squared value, if the average squared value is greater than a given amount you'll split the rectangle up to down every two iterations and right to left every other iteration otherwise you'll just render the rectangle as the average color, both of the split off rectangles will perform the same calculation as the original one. However, you can also account for the fact that there's a good chance that the image won't be very different from the next image in the video since it is a video as opposed to a series of random images, first compress it in the first frame then just sample random rectangles to do calculations on a second time, if a certain number of the sampled rectangles ended up splitting or re-joining then you'll have to redo the whole quadtree on the frame. You may want to sample rectangles that have been recently altered or are nearby rectangles that have recently been altered.
It's used to partion entities such as those in physics engines to reduce the number of pairwise interactions to compute. For jpg they use Fourier transform and cut the shortest wavelengths I think.
Each cell gets scanned pixel by pixel and a bit of number crunching is done to see how much colour variation there is in that cell. If the colour variation is over a certain threshold it gets split into four smaller cells. If you want to learn more you can give it a search, there's a whole bunch of videos about it here on youtube.
"Steamed Quad Trees" as if this is some official thing that has any value at all. "Look at me guys I put a bunch of red dots on the screen. This is called dotting now! Oh look I put red dots over Steamed Hams so I'll call the video Steamed Dotting"
It is, it goes back to the 70s. It's a pretty common algorithm used in things like image compression, collision detection in 2d games, spreadsheet management; it's handy for basically anything that involves working with data arranged in a 2d grid. Like most CS topics, there's a pretty good, well-cited article on Wikipedia about it, but you could also turn up some good info on it just with Google.
with how bloated Python's standard library is there's probably a whole function somewhere in there specifically made to convert an image sequence to quadtrees (and convert it back to video with an audio track via FFMPEG)
i like how whenever it gets extremely unstable and starts putting pixels everywhere it resets to a low resolution and repeats the cycle again
Each cell splits into 4 when the complexity goes over a certain amount, I just had the threshold changing as the loop runs. It resets after a certain amount. I was really just playing around with it, trying new things :)
@@stanbwonderful cool
@@stanbwonderful what if you made an entire video like this but the entire screen has the filter and the squares don't have borders
@@not_estains Yeah, that's how quadtrees are used in video compression. I added the lines so I could see what was being split and what wasn't, I was having fun. Having it only on half of the screen just made it run faster :)
@@stanbwonderfulThat's really interesting, actually. I learned about quadtrees while writing a physics simulation, very cool to learn it has such a widespread application. Thanks for sharing!
I think I know how to use spin now
Hi! What can you do with this quad trees?
en.wikipedia.org/wiki/Quadtree
Quadtrees are used to break up lists of data into smaller bits which are quicker and easier for the computer to deal with. In this case I'm using quadtrees to do video compression, you used to see this a lot on old digital video clips.
@@stanbwonderfulpretty interesting, I had no idea about quad trees till now.
@@nolansomers A while ago I was learning about the boids algorithm (videos on my channel), that's when I learned about quadtrees as a way to speed things up but giving the computer less to work out with each step.
How can i laugh at this? There's no firetruck!
Well dam you spoiled it
Thank you for saving me a couple minutes I almost watched this whole thing 🧐😒
Well, I'm from Utica and I've never heard anyone mention the 'Albany Algorithm'.
Gosh no, not in Utica...or in Shelbyville
It's an Albany expression.
For the longest time I thought he was saying "Eunucha". Idk how a place could get that name, but I've heard weirder ones.
Sega CD compression be like
could well be :)
now I wanna see steamed hams on the sega cd
Compression
this is how video compression works I imagine
That's what I was aiming for :)
Yes, but also no. But kinda yes.
@@stanbwonderful could i have the link to the program please?
i was about to ask this same exact question
@@NinjaBartender it's a python script I wrote, not a program as such...and I'm kinda crap at this so it's messy as all heck, but I'm learning :)
Looks more like a Utica Algorithm to me…. 🤔
Oooooh I don't know Utica! :o
I'm a dimbulb, took me a while to work out what Utica meant...heard a billion times but never seen it written down :P
oh not in utica no, it’s an albany algorithm
@@xaigamer3129I see...
@@shoebill4902 You know these algorithms are similar to the ones they have at Krusty burger
love how the reset was timed perfectly with "GOOD LORD WHAT IS HAPPENING IN THERE?!"
new aesthetic just dropped
JPG compression?
@@Jabberwockybird ya that's what i meant ya dummy
We got new aesthetic before gta 6
Quadcore
''well seymor we are mosaics''
can we get a version where the bottom left and top right are also quad trees, and all the black lines are hidden? i wanna see the division in real time
I'll see what I can do
Huh the blocks makes me feel like its how youtube's video compression works
The Albany Algorithm is my favorite dance step
POV a bird sits on the dish
> Pablo Picasso liked that
Lovely work, good to see some proper mathematics applied to this. It really legitimizes the field of steaming hams
Zip file for dummies
I wonder how this would look on bad apple
There's all kinds of cool stuff you can get running on a bad Apple :D
no
yes
maybe
sometimes
I have no idea what I'm looking at, but I like it
If the colour differences in a cell are greater than a certain threshold, it splits it into four smaller cells
@@whwhwhhwhhhwhdldkjdsnsjsks6544i still dont get it
this sucks
I don't know what happened to me but since last week i seem to have watched hundreds of variation of "steamed hams"
i wonder if this is a viable compression format id love to see the data output size of this and a video fully encoded all 4 quadrants
The output file isn't any smaller than the original file I used, the stupid python script I wrote doesn't work for video compression and it takes ages to render anything. Real programmers who know what they're doing can use algorithms like this in the real world, I'm just having fun learning things :)
whats the result of the equation
Can you do some apple. Bad apple
why is the compression only in the top left and bottom right corners?
to make it render quicker and so I could see the before and after at the same time
Do it with all 4 corners and with no black outlines for borders
Done, the new files is uploaded on my videos page if you want to look.
Without the outlines it would really just look like crusty jpg compression... I kinda wanna see a video where the full frame is a quad tree instead of two quarters being quad and the other two being normal
I'm working on it, should have that video up soonish...it's taking ages to render :P
And done
ruclips.net/video/nDo-aZMijG4/видео.html
Isn’t this what jpeg compression does?
If you look at the wikipedia page on quadtrees it should a little animated gif showing how it's used for video compression, that's where I got the idea, I kinda reverse engeneered what I saw. That's as deep as my knowledge of video compressions goes
Why does the quality sometimes drop behind those quad trees?
The quality threshold is changing as it loops then it resets and starts over
2:15 uk that one time in may
Can you apply this effect to the entire frame?
Yeah, I was just playing around with this one, running the algorithm on different parts of the screen and changing the variables a bit. I think I've got a few more vids on my channel.
ruclips.net/video/2odCJyeKScs/видео.html
ruclips.net/video/OF3pJb8aBUk/видео.html
ruclips.net/video/nDo-aZMijG4/видео.html
Done :)
Cool! Been wanting to play with quadtrees more and eventually move into octrees. Even the quadtrees im having a difficult time wrapping my head around implementation, but your example shows well ehat it can do.
Yeah, took me a while to get it working, there's a load of tutorials around to help
1:39
Getting pop-up windows on bspwm
Me when internet
Compression
Interesting
love it.
Can you actually do compression with this?
Proper programmers can and do, I'm still learning and just having fun. Have a look at the quadtree wikipedia page, that's where I got the idea to try it on images.
Probably if you wanted to compress a video with a basic approach you could compress each frame individually, simply start with a very large rectangle covering the whole screen, then find the average color of the pixels in this rectangle, next you calculate how much each pixel deviates from this color squared, then find the average squared value, if the average squared value is greater than a given amount you'll split the rectangle up to down every two iterations and right to left every other iteration otherwise you'll just render the rectangle as the average color, both of the split off rectangles will perform the same calculation as the original one. However, you can also account for the fact that there's a good chance that the image won't be very different from the next image in the video since it is a video as opposed to a series of random images, first compress it in the first frame then just sample random rectangles to do calculations on a second time, if a certain number of the sampled rectangles ended up splitting or re-joining then you'll have to redo the whole quadtree on the frame. You may want to sample rectangles that have been recently altered or are nearby rectangles that have recently been altered.
Nice quadratic tree steamin!
Thanks, I steamed it myself...I'm steaming Lindenmayer trees as we speak :)
so thats how they make jpeg compression /c:
Possibly, I'm not sure exactly. I recon there's a whole bunch of different algorithms being used.
It's used to partion entities such as those in physics engines to reduce the number of pairwise interactions to compute. For jpg they use Fourier transform and cut the shortest wavelengths I think.
This reminds me how HEVC compression works.
Supernintendo Chalmers.
I don’t get how this works
do a search on youtube for 'quadtree', there are a bunch of videos that can explain it better than I can.
Steqmed hams but Semour used the golden rotation to cook his roast
Extremely interesting
Can somebody explains to me how this works 😅
How DXT3 compression looks like when zoomed in
what's a quad tree?
it's all to do with breaking things up by dividing them by 4
Guys there was a webcam online thing with the same effect pls help what was it
All the black outlines on characters ate qeirdly thicker on this filter.
This actually reminds me of video compression tbh
That's what I was aiming for! :D
beautiful !!
Aww thanks :)
looking like a jpeg
wow thanks for visualizing video compression by redundancy for me, didnt think id learn this today
RUclips compression algorithm be like
so if i understand correctly, each rectangle can contain either a color or two other rectangles
Each cell gets scanned pixel by pixel and a bit of number crunching is done to see how much colour variation there is in that cell. If the colour variation is over a certain threshold it gets split into four smaller cells. If you want to learn more you can give it a search, there's a whole bunch of videos about it here on youtube.
I use Python but IDK what that quadtrees module, I gotta do this now
There's all kinds of tutorials online, just give it a goog and have fun :)
It would look cooler without the borders
Yeah, agreed...at the time I was just having fun playing around with the code and wanted to be able to see what it was doing when I changed things :)
ruclips.net/video/nDo-aZMijG4/видео.html
Damn
Man i was obsessed with quad trees when i was learning how to program
no firetruck... sad
I'm sorry, I made a terrible mistake, I just hope you can find a way to forgive me :(
2:16 Chalmers is just missing a pupil there
i have no idea whats happening but im here for it
It's just nerd stuff but I'm having fun :)
Matematically correct Steamed Hams
(155)
Bernard
Oh! We are out of Ideas for Steamed Hams!
I didn't say stop.
2:27 Chalmers looks like Alex from A Clockwork Orange.
steamed hams is still alive
"Steamed Quad Trees" as if this is some official thing that has any value at all. "Look at me guys I put a bunch of red dots on the screen. This is called dotting now! Oh look I put red dots over Steamed Hams so I'll call the video Steamed Dotting"
It is, it goes back to the 70s. It's a pretty common algorithm used in things like image compression, collision detection in 2d games, spreadsheet management; it's handy for basically anything that involves working with data arranged in a 2d grid. Like most CS topics, there's a pretty good, well-cited article on Wikipedia about it, but you could also turn up some good info on it just with Google.
@Idran
Wow and look at the result. Really complex and aesthetic the way it creates a bunch of pixelated squares on the screen. How revolutionary.
If you run Steamed Dotting up the flag pole I'll salute!
when you save an image as a jpeg
the description is what got my like
I love you too!
with how bloated Python's standard library is there's probably a whole function somewhere in there specifically made to convert an image sequence to quadtrees (and convert it back to video with an audio track via FFMPEG)
Where's the fun in that? :P