Use optic_flow_dots to generate optic flow video files that simulate arbitrary translational and rotational motions of a camera through a cube-shaped environment of dots, similar to the famous starfield screensaver of yore. The sides of the environment cube have arbitrary length 2. Only the dots within a sphere centered on the camera are visible. The purpose of this sphere is to keep the dot density constant in any direction. The diameter of the sphere is also 2. As the camera moves, dots that cross a side of the cube are wrapped. To prevent cyclical looping of the same dots, the wrapped dots are given fresh random coordinates for the dimensions that did not cross the side. For example, when a dot drops out of the backside of the environment (that is, Z<-1), Z is incremented by 2 and X and Y are set to random values between -1 and 1.
The translation and rotation parameters can be constant throughout the video, or dynamically change from frame to frame. See the descriptions of the 'trans_xyz', 'rot_xyz', and 'rot_dpf' parameters in the function's help section for more information on this.
Other features include setting the background color; shape, size, and color of the dots; limited dot lifetime; toggle erasing between frames on and off; and setting the limits of the dot environment to create, for example, groundplanes or fronto-parallel planes of dots.
All settings are controlled using comma-separated name-value pair arguments. See the function's help section for details.
Cite As
Duijnhouwer (2024). optic_flow_dots (https://github.com/duijnhouwer/optic_flow_dots), GitHub. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- FPGA, ASIC, and SoC Development > Vision HDL Toolbox > Video Formats and Interfaces >
- Image Processing and Computer Vision > Vision HDL Toolbox > Video Formats and Interfaces >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Versions that use the GitHub default branch cannot be downloaded
Version | Published | Release Notes | |
---|---|---|---|
1.1.5 | yadu (yet another description update) |
|
|
1.1.4 | changed screen saver to screensaver in desc. |
|
|
1.1.3 | included the words starfield and screensaver in the description for search purposes |
|
|
1.1.2 | Updated the description once more... |
|
|
1.1.1 | updated the description |
|
|
1.1.0 | Added limited lifetime, dot environment range settings (to create ground plane environments, for example), a frame erase toggle, and updated the help file. |
|
|
1.0.1 | Updated the description |
|
|
1.0.0 |
|