%Convert from avi file to BMP file
function noOfFrameImages=ConvertVideo(aviFileName)
%extact frames from video and output them as bmp files
movieObj = aviread(aviFileName);
noOfFrameImages = size(movieObj,2);

for count=1:1:noOfFrameImages
    global imageFileNamePrefix 
    imageFileNamePrefix = 'tif\framedump_';   
    fileName = strcat(imageFileNamePrefix,num2str(count),'.tif');
    imwrite(movieObj(count).cdata,fileName,'tif');    
end

return;