Question: 1 . 3 . 7 Shuffle Figure 5 : An image and its shuffled counterpart. Shuffling works this way: Divide the image into 1 6

1.3.7 Shuffle
Figure 5: An image and its shuffled counterpart.
Shuffling works this way: Divide the image into 16 equally sized image blocks and give each block a number (from
1 to 16). Then pick a pair of image blocks and swap it's R, G and B values. Here, we use pairs of image blocks as
follows: (1,16),(2,15),(3,14), and so on. Repeat choosing and swapping process until all image blocks are swapped.
You need to define and implement the following function to do this DIP.
/* Shuffle an image */
void Shuffle(unsigned char R[WIDTH][HEIGHT],
unsigned char G[WIDTH][HEIGHT],
unsigned char B[WIDTH][HEIGHT]);
The shuffled image should look similar to the figure shown in Figure 5(b):
Please enter your choice: 7
"Shuffle" operation is done!Load a PPM image
Save an image in PPM and JPEG format
Change a color image to Black & White
Make a negative of an image
Color filter an image
Sketch the edge of an image
Shuffle an image
Flip an image vertically
Mirror an image horizontally
10: Add Border to an image
11: Test all functions
12: Exit
please make your choice:
Save the image with name 'shuffle' after this step.
 1.3.7 Shuffle Figure 5: An image and its shuffled counterpart. Shuffling

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!