
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
RMotion
Author
Documentation
Require the lib, instantiate the main object and print default options:
irb(main):001:0> require 'rmotion' => true irb(main):002:0> m=Motion.new => #Motion:0xb74d14a0 irb(main):003:0> m.show? => true irb(main):004:0> m.write? => false irb(main):005:0> m.fft? => true
http://www.youtube.com/watch?v=HNL-2pNkuSo&feature=player_embedded
show, write and fft are the most important options. When show is true the video analyzed is also displayed in a window. You can set write to a string (a filename) to save the video analyzed to a file! Both displayed and saved video will have motion detection markings on it, like the video i just showed to you.
fft manages how the video frames are processed (fast fourier transform or direct): i recommend to set it always true, except in case your cpu isn't fast enough to follow the stream in realtime. Soon i'll post an in-depth analysis of what's the difference between fft=true and fft=false.
irb(main):006:0> m.fill? => true irb(main):007:0> m.rect? => false irb(main):008:0> m.point? => false
Next group of options is about output frames: fill default true behaves like the previous video, rect draws rectangles around moving objects and point draws instead a small circle centered on the object. Let's see them! Note that i can swap them live!
http://www.youtube.com/watch?v=0LQIt0XiWqE&feature=player_embedded
irb(main):012:0> m.threshold_fft? => 1.0 irb(main):013:0> m.threshold_direct? => 8.0 irb(main):014:0> m.threshold_distance? => 9.0 irb(main):015:0> m.threshold_group? => 20
threshold_fft and threshold_direct values influence what is recognized as noise and what as an object. Note that they are used in a mutually exclusive way: if fft is true then threshold_direct won't affect result. Same for fft as false and threshold_fft. Play with those value to fit your enviroment (light, object speed..).
threshold_distance and threshold_group also have a role on recognizing objects: an object is a group of al least group cells distant each other no more than distance. So you can choose min size of objects and spread of cells. Cells are a group of pixel determined dynamically on camera resolution, so don't worry about it.
FAQs
Unknown package
We found that rmotion demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.