The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: write images to different folders
Replies: 2   Last Post: Dec 11, 2012 12:42 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 3
Registered: 12/7/12
write images to different folders
Posted: Dec 7, 2012 4:56 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

i'm doing a work in frame extraction from video. i want to save the extracted frames to many subfolders that exists in a particular location(not current directory). I want to save the first 75 extracted frames in subfolder1, the next 75 frames in subfolder2, and so on...
this is the code i have written..

xyloObj = mmreader('F:short\mov1.mpg');

nFrames = xyloObj.NumberOfFrames;
% Read one frame at a time.

for j = 1 : (nFrames/75)
for k=n: n+74
mov(k).cdata = read(xyloObj, k);
mov(k).colormap = [];
imagename=strcat(int2str(k), '.jpeg');
imwrite(mov(k).cdata, strcat('F:xylo\mov1\mov1seg',int2str(j),imagename));



i'm creating subfolders automatically in this code. my frames are getting saved to a single folder.
can someone help me to write the frames to the subfolders i created in this code one after another..

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.