Question: This is strictly Matlab. Please sole this problem without using any trick function like rot90, ' or flip. show a screenshot of matlab also. Please
This is strictly Matlab. Please sole this problem without using any trick function like rot90, ' or flip. show a screenshot of matlab also. Please do not solve if you do not plan on doing that. READ THE WHOLE PROBLEM.
Please note that the name
image
is reserved in MATLAB, so try naming your image variables
something else (like sho
wn above).
As an example of what your program should do to an imag
e, if you wrote:
doge = imread(
'doge.jpg'
);
doge = rgb2gray(doge);
imshow(doge)
rotateDoge = recitation6problem2(doge);
figure
imshow(rotateDoge)
You would see this view of your original image flipped
:

2. [Print and Submit] Write a MATLAB function that takes a matrix as an input, rotates it 180 degrees, and then returns the rotated matrix as an output. As in Problem l, do not any built in functions that rotate matrices (like rot90) or the operator. Instead, use nested loops. Note that, because black and white images are matrices, you can use them as the input to this function, and your function from Problem l! To read an image into a variable, write the following code in a separate script or in the command line: img imread(filename); Where "filename" is a string with the location of an image on your computer. To convert an image from color to black and white, write the following code after using imread: img rgb2gray(img); You can view an image stored in a variable by writing imshow (img)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
