Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

do 5 slides for the slideshow use images from Google and cite the images as a co

ID: 3595827 • Letter: D

Question


do 5 slides for the slideshow use images from Google and cite the images as a comment on matlab

ECE 72: Introduction to Electrical and Computer Engineering Tools Project 2: Digital Video Slideshow Due: 11/7/17 by 2:00 PM You will prepare a MATL also create a video from the slide show. The video will show the slides, one after the other, from beginning to end. The video will be stored in an MPEG-4 file (having a filename of the form *.mp4). You will also prepare a document that explains the story of vour video AB program that generates a slide show. Your program will

Explanation / Answer

MATLAB CODE:

%save any 5 imgs img1,img2,img3,img4 and img5 (all in jpg formats)

%in the same directory as these three files

%and run the main function() for slideshow

slideshow.m file:

%slideshow function adds a slide to the timed slideshow

function slideshow(varargin)

global indx

global imgNameList

imgNameList = char('img1.jpg','img2.jpg','img3.jpg','img4.jpg','img5.jpg');

indx=indx+1;

if indx> length(imgNameList)

    indx=1;

end

a = imgNameList(indx,:);

imshow(a);

drawnow;

....

%save the code in video.m file and run function video() from command line

%to create a video of type mp4

video.m file:

myVideo = VideoWriter('myfile.mp4');

myVideo.FrameRate = 2; % Default 30

open(myVideo);

imgNameList = char('img1.jpg','img2.jpg','img3.jpg','img4.jpg','img5.jpg');

for ii = 1:length(imgNameList)

   img = imread(imgNameList(ii,:));

   writeVideo(myVideo,img)

end

close(myVideo);

....

%save the code in main.m file and run function main() from command line

%this will create a timed slideshow of the imgs

main.m file:

clc;

clear;

global indx

indx=0;

showTimer=timer('TimerFcn',@slideshow);

set(showTimer,'ExecutionMode','fixedRate');

set(showTimer,'Period',0.5) %% 2 sec delay

set(showTimer,'TasksToExecute',5)

start(showTimer)

....