|
|
Taking a frame from a live video
Hey folks me again,
I'm still working on my project(see "Detecting Braille in an image") and now have a new problem to solve. I have to analyze a Live-Video constantly , take a frame when a Box comes in to view and reaches a certain spot and then analyze it for the Braille(I already have the algorithm for the last part). I can't find any functions or means to tell matlab to take a frame out of a Live Video(not a video previously stored on the pc but a video comming directly from a webcam). Thanks in advance for any suggestions and help.
David
|
|
0
|
|
|
|
Reply
|
David
|
8/15/2010 2:43:03 PM |
|
You can do this with the UpdatePreviewWindowFcn. A good description of how to use this is actually found in the comments in the preview.m file. Search Matlab folder to find this preview.m file.
% create the video object with the desired resolution
vidobj = videoinput('winvideo', 1, info.DeviceInfo(1,1).SupportedFormats{1});
% create a handle to the axes where the image will be displayed
vidRes = get(vidobj, 'VideoResolution');
hImage = image( zeros(vidRes(2), vidRes(1), nBands), 'parent', handles.axes1);
% identify which function is associated with the UpdatePreviewWindowFcn
% video_preview_fcn (see below) is called automatically each time the camera has an i% mage available - you don't need to call this function
setappdata(hImage, 'UpdatePreviewWindowFcn', @video_preview_fcn);
% call preview to start the live image feed
preview(vidobj);
% after you are done with real-time processing, set this function back to null
setappdata(hImage, 'UpdatePreviewWindowFcn', []);
closepreview(vidobj);
%% ----------------------------------------------------------
function video_preview_fcn(obj, event, himage)
% this is called each time the camera makes a new frame available.
% the input arguments are passed automatically. You can add others if you need
% them, but they also have to be included where this function is created (above)
% do all your real-time processing here in this function
% you can get the time-stamp string associated with this image from:
tstampstr = event.Timestamp;
% you get the image in this function from:
im = event.Data;
% you actively need to display the image in this function
set(himage, 'CData', im, 'EraseMode', 'none');
|
|
0
|
|
|
|
Reply
|
Adrian
|
8/22/2010 6:16:04 AM
|
|
|
1 Replies
472 Views
(page loaded in 0.903 seconds)
Similiar Articles: Taking a frame from a live video - comp.soft-sys.matlabHey folks me again, I'm still working on my project(see "Detecting Braille in an image") and now have a new problem to solve. I have to analyze a Live-Video ... still image from video - comp.soft-sys.matlabTaking a frame from a live video - comp.soft-sys.matlab Hey folks me again, I'm still working on my project(see "Detecting Braille in an image") and now have a new problem ... how to get frames from .avi format. - comp.soft-sys.matlab ...i am trying to get frames from a video with the format is .avi. I have tried using the demo rhino, but ntg happen.Please do advice. thanks ... OpenGL video rendering - comp.graphics.api.openglHello, I'm rendering video from a frame grabber connected to an analog ... The video is rendered at 25fps with no > problem. > > My video is 640x960 generated by 2 live ... how to store an avi frame into a bmp file??? - comp.graphics.api ...Taking a frame from a live video - comp.soft-sys.matlab how to store an avi frame into a bmp file??? - comp.graphics.api ...:) :) Do you know how to convert .avi file to ... Selecting a background frame for a moving object differentiation ...Taking a frame from a live video - comp.soft-sys.matlab Selecting a background frame for a moving object differentiation ... Hello Everyone, I am a student who has been ... display video in a GUI - comp.soft-sys.matlabHi, I'm trying to display a video before and after my processing algorithm simultaneously in a GUI. I load the video frame by frame, display one fr... the background subtraction - comp.soft-sys.matlabSelecting a background frame for a moving object differentiation ... If i have a series of frames that make up a video, how can i select the best frame from the lot to use ... How to save files into a specific folder - comp.soft-sys.matlab ...hello, I am working on a dataset of movies, and each set contains 9 videos, so i am willing to save the frames of each video in a separate folder, ca... audio streaming - comp.soft-sys.matlabTaking a frame from a live video - comp.soft-sys.matlab audio streaming - comp.soft-sys.matlab video processing loss of frames - comp.soft-sys.matlab create .avi files ... Take and use a picture from a video frame in Windows Movie MakerInternet Explorer | SkyDrive | Messenger | Windows Live ... You can take a picture of an individual frame from an imported video clip in Windows Movie Maker and then use ... Taking a frame from a live video - comp.soft-sys.matlab | Computer ...Hey folks me again, I'm still working on my project(see "Detecting Braille in an image") and now have a new problem to solve. I have to analyze a Live-Video ... 7/26/2012 3:54:44 PM
|
|
|
|
|
|
|
|
|