How to set modified frames on real time video?
1 view (last 30 days)
Show older comments
I am studying a real time video with my webcam. The idea is to write a text on a piece of paper while it is moving.
The writing code is done, what I need is to visualise my resulting images (there is a while isrunning(video)) It is an augmented reality problem.
How can I set these edited frames over my video?
vid = videoinput('winvideo', 2, 'YUY2_640x480')
% [...]
hImage = image(zeros(imHeight, imWidth, nBands), 'parent', handles.axes1); % all these variables are already setled previously
% begin the webcam preview
preview(vid, hImage);
video = handles.axes1 ; % This is the axes where my video is running
while isrunning(vid);
video_im = getimage(video) ;
% Transform Matrix text-OriginalIamage
video_display(video, video_im, I) ; % Here I do my frame editing. video: handles. video_im: frame. I: variable for my frame editing, not important for this issue
end
In video_display:
Im = cat(3, Im1, Im2, Im3) ; %this is my solution image, the one I need to visualise instead of the original video frame
set(Im, h);%,'Cdatamapping','direct'); % h is my video handle
drawnow
Thank you very much in advance.
0 Comments
Answers (1)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!