Put a JPEG file into your Current Folder. Type in the following script, using your own JPEG file name
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:13| Question number:12.13
All Answers
total answers (1)
Ch13Ex12.m
%Load image and get size
I1 = imread('photo1.jpg');
[r, c, h] = size(I1);
%Put columns in reverse order
Inew(:,:,:) = I1(:,c:-1:1,:);
%Plot original image and flipped image in a subplot
figure(1)
subplot(1,2,1)
image(I1);
subplot(1,2,2)
image(Inew);
need an explanation for this answer? contact us directly to get an explanation for this answer