Question: Matlab code that takes in a file with a scrambled image and following these steps the code outputs a descrambled image. Go to every row
Matlab code that takes in a file with a scrambled image and following these steps the code outputs a descrambled image.
Go to every row and column location in the image and do the following:
Move the current pixel to a new row and column location in the blank image:
If at an even col index, use the formula: newColumn = column/2
If at an odd col index, use the formula: newColumn = (column + 1)/2 + imageW idth/2
If at an a row in top half of image, use the formula: newRow = imageHeight/2+ 1 row
If at an a row in bottom half of image, use the formula: newRow = 3
imageHeight/2 + 1 row Fix the colors in the image:
Multiply all the red and blue pixel values by 3
Set all the green pixel values to 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
