<< Chapter < Page | Chapter >> Page > |
The main purpose of our device is to detect velocity of motions in a movie file, and it is helpful to understand the mechanism in idealized cases. It is too complicated to come up with appropriate algorithms for all possible input data at once, and we want to look at the simpliest cases first. Our choice of data is a simulated movie. Reducing to bare bones, a blank, constant background(noise-free) with a single object moving across the screen is a good start.
Manual coding of movies was done in MATLAB, using matrices of zeros and ones. zeros represents background, and ones represent an object. For simplicity, movies are in grayscale (black for zeros and white for ones).
Looking at above matrix, different shapes can easily be made by arranging the ones in different layouts. We have created square, vertical rectangle, horizontal rectangle, triangle, and circle shapes. Once a desired image with an object is created, the 'getframe' command in MATLAB converts images to frames.
To make a movie of a "moving" object (represented as a group of ones), our program can simply create multiple frames with the group of ones in different locations. One can move most any object in any direction in a reasonable frame size. However, creating a movie with non-axial motion can be very tedious in MATLAB, so we chose motions along the horizontal and vertical axis.
Different velocities can be achieved by varying number of pixels moved over per frame. In other words, within the same number of frames, a movie with a faster object will have its object moved over further across the screen than one with a slower object.
Notification Switch
Would you like to follow the 'Intelligent motion detection using compressed sensing' conversation and receive update notifications?