Giter Site home page Giter Site logo

Comments (3)

welcome avatar welcome commented on May 27, 2024

Thanks for opening this issue, a maintainer will get back to you shortly!

In the meantime:

  • Read our Issue Guidelines, and update your issue accordingly. Please note that your issue will be fixed much faster if you spend about half an hour preparing it, including the exact reproduction steps and a demo.
  • Go comprehensively through our dedicated FAQ & Troubleshooting section.
  • For any quick questions and typos, please refrain from opening an issue, as you can reach us on Gitter community channel.

from vidgear.

abhiTronix avatar abhiTronix commented on May 27, 2024

Hello and thank you for sharing your great work. I was testing the code provided in the video stabilization library and bumped into something weird at this line :

vidgear/vidgear/gears/stabilizer.py

Lines 283 to 286 in 3572ef3

save this transformation

self.__transforms.append([dx, dy, da])

calculate path from cumulative transformations sum

I checked the size of the self.__transforms variable and noticed that it keeps increasing throughout the video. If you use a camera for live-streaming and let it run for a long time, it will consume and eventually exhaust the memory. I tried to fix it by changing it to a queue and removing the first item at the end of each frame, but it worsened the final result. I wanted to ask you if this was intentional or a bug.

@naserpiltan Thanks for sharing this insight. Yeah, it was intentional. In stabilizer, Once we have estimated the motion(rigid (Euclidean) transformation), we decompose it into x and y translation and rotation (angle). We store these transformation values in an array so we can change them smoothly. Also, we find the trajectory of motion by cumulatively adding the differential motion estimated.

But I agree, storing all transformation throught is not necessary or logical but instead storing them w.r.t to our window size is the better way to handle them. So I'll see if it can be replaced with deque or something similar, and let you know.

from vidgear.

abhiTronix avatar abhiTronix commented on May 27, 2024

@naserpiltan There's no immediate solution for this issue as transformations cannot be simply deleted from queue, as we require cumulative sum of all transformations. I'll see this problem later.

from vidgear.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.