No BSD License  

Highlights from
avicrop.m

avicrop.m

by

 

19 Mar 2003 (Updated )

Crop avi-files using movie2avi.

avicrop;
% by Patrick Drechsler
% 19-march-2003
% idea by Dr. Walter Federle

function avicrop;

[filename,pathname]=uigetfile('.avi');
file = fullfile(pathname,filename);
movie=aviread(file);
B = figure;
[A,rect] = imcrop(movie(1).cdata);

for i=1:size(movie,2)
output(i).cdata=imcrop(movie(i).cdata,rect);
output(i).colormap=movie(i).colormap;
end;

[pathstr,name,ext,versn] = fileparts(filename);
newmoviename = [name,'_crop',ext];

movie2avi(output,newmoviename,'compression', 'none');
close

Contact us