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.

КОМЕНТАРІ • 11

  • @juliusfucik4011
    @juliusfucik4011 Рік тому +4

    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.

    • @NERDfirst
      @NERDfirst  Рік тому +4

      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!

    • @juliusfucik4011
      @juliusfucik4011 Рік тому

      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.

  • @JediMocro
    @JediMocro 7 місяців тому

    Heel vet! Ben echt blij dat je video's blijft maken. Ga zo door!

    • @NERDfirst
      @NERDfirst  7 місяців тому +1

      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!

  • @logicweaver7152
    @logicweaver7152 8 місяців тому

    Your content is top notch. Eagerly awaiting for more.

    • @NERDfirst
      @NERDfirst  8 місяців тому

      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.

  • @md.uzairahmed7774
    @md.uzairahmed7774 3 місяці тому

    Sir, please make more hardware slash robotics videos

    • @NERDfirst
      @NERDfirst  3 місяці тому

      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?

  • @KevinStaude
    @KevinStaude Рік тому +1

    Nice! I love those Python math optimization videos. I think they will be helpful with some Project Euler problems.

    • @NERDfirst
      @NERDfirst  Рік тому

      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.