how to extract frames from memory and store it in a folder?????

1 次查看(过去 30 天)
i need to extract frame(obtained from this code below) from memory to a particular folder, so that i cd further process it
vid = videoinput('winvideo',1);
preview(vid);
set(vid,'TriggerRepeat',Inf);
set(vid,'ReturnedColorSpace','grayscale');
vid.FrameGrabInterval = 1;
% Set value of a video source object property. vid_src = getselectedsource(vid);
set(vid_src,'Tag','motion detection setup');
disp(sprintf(' FRAMING START from VIDEO'));
start(vid);
while(vid.FramesAcquired<=50) % Stop after 100 frames
data = getdata(vid,2);
diff_im = imabsdiff(data(:,:,:,1),data(:,:,:,2));
imshow(diff_im);
end
}
for making a folder and storing frames(from memory) to this folder
m tring this code but these errors r found
1) permission is denied for MKDIR 2) undefined function fullfile..
outputFolder = fullfile(cd, 'Test');
if ~exist(outputFolder, 'dir')
mkdir(outputFolder);
end
outputBaseFileName = disp('Image %3.3d.jpg',vid);
disp(outputBaseFileName);
outputFullFileName = fullfile(outputFolder, outputBaseFileName);
plz help so dat i cd store these frame to a folder

回答(0 个)

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by