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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!