A simple algorithm to speed up repeated summations!
Вставка
- Опубліковано 1 жов 2024
- Need to repeatedly sum up values from sublists which are extracted from a bigger list? You could simply loop through the values each time, but you'll find that doing so gets pretty slow. Today, we look at a simple pre-processing step that saves you a ton of trouble in the long run! Plus, we take a brief look at how this also works in bigger dimensions.
Want to see the code used in the video? Check out this repository: bitbucket.org/...
-----
Want to contribute to the channel? Consider using the "Super Thanks" feature above, or visit my website at nerdfirst.net/... to find alternative ways to donate. Thank you!
-----
Disclaimer: Please note that any information is provided on this channel in good faith, but I cannot guarantee 100% accuracy / correctness on all content. Contributors to this channel are not to be held responsible for any possible outcomes from your use of the information.
This technique has been used for decades in image processing. Converting the image into an integral image allows for very fast summation regardless of the summed over area.
Hello and thank you for your comment! Yes indeed, that was the context where I first experienced it as well. You can really see it shine in a 2D context, but the core thought process is too good to not share!
It is!
I am new to the channel. You have earned a subscriber.
I have implemented these integral images for classification of 14 channel multispectral images.
Nowadays, it is a technique that is no longer needed, because you just throw it all into a CNN and throw lots of computational power at it and achieve better results.
But it is still a valuable technique to learn and it still has many applications, even in the imaging realm.
Those face detectors in phonecard cameras still work using integral images and Viola-Jones feature.
Heel vet! Ben echt blij dat je video's blijft maken. Ga zo door!
Thank you very much, and great to hear from you again! It's been a long time since I've made a video, but I'm always looking for opportunities to go back to it!
Your content is top notch. Eagerly awaiting for more.
Hello and thank you very much for your content! I'm always looking for opportunities to get back into making videos! It's difficult given my schedule but I'll try.
Sir, please make more hardware slash robotics videos
Hello and thank you for your comment! Yeah, I'd love to, this is a topic I enjoy. Got any specific topics you'd like to see?
Nice! I love those Python math optimization videos. I think they will be helpful with some Project Euler problems.
Hello and thank you very much for your comment! Yeah, I particularly love these "pre-processing" ones. Such a simple way to make a bit of code significantly more efficient.