Question
Write a MATLAB code Function name: THWg Inputs (1): (char) filename of an image with an even number of rows and columns Outputs (0): None
Write a MATLAB code
Function name: THWg
Inputs (1): (char) filename of an image with an even number of rows and columns
Outputs (0): None
Output files (1): an updated image
You are given an image of a parking lot that only has four spaces; each space is occupied by a car. Color any cars that have any red on them black. Shrink cars down to a fourth their size (half of the rows and half of the columns). Lastly, rearrange the cars in the parking lot. In the top half of the lot, flip the direction of all the cars; then, rotate the entire parking lot a full 90 degrees clockwise.
Store this new image in a file with '_updated' added to the original file name before the file extension.
Notes: You do not need to worry about the parking lines. Put the cars you shrink in the top left of their spot before you rotate the parking lot. The size of the parking lot has not changed in the new image; only the individual cars have become smaller.
PARKING LOT PARKING LOT
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started