Back ground: Image Processing in Matlab
What composes an image?
|Image Storage in Matlab|
picture (row, column, rgb value)
frames(row, column, rgb value, frame)
Acquiring Images From The Webcam in Matlab
|Digitization of the Images|
obj=videoinput(‘winvideo’). Matlab will automatically find the webcam connected to your computer. Once it is an object in your workspace you can edit its settings, such as the number of frames per second, to optimize it for your project.
getframe()are two useful functions for determining if the camera has been positioned properly. The first allows you to see what the camera sees, without collecting any data from it, and the second acquires a single snapshot and stores it as in image.
start(obj)command, the camera will be triggered and will start to collect as many frames as specified by the FramesPerTrigger property. These frames are stored in the camera’s buffer memory. These frames are stored in the 4D array as described above.
getdata()function or the