Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

% Exercise 9 (Spatial resolution and interpolation methods) Repeat Ex2 using nearest neighbor, bilinear interpolation, and bicubic interpolation methods. Show the results and the original

% Exercise 9 (Spatial resolution and interpolation methods) Repeat Ex2 using nearest neighbor, bilinear interpolation, and bicubic interpolation methods. Show the results and the original side by side.

% Exercise 10 (Multiplication for masking) Read the grayscale image, cameraman.tif. Generate a new image of the same size in which a rectangular section of 100x100 pixels approximately near the center has all values equal to one, and all other pixels have zero value. Multiply this mask with the original image. display the original image, the mask, and the result side by side. (Note: you can make the 100x100 mask at any location of your choice, near the center).

% Exercise 11 (RGB channels in a color image) Load a color image. Split it into R, G, B channels. Make a new image in which R and G are swapped. Display the original and the new image side by side.

% Exercise 12 (Noise reduction using averaging) Load the grayscale image, cameraman.tif. Generate four new images with salt-and-pepper noise added to the original image. Take the average of these four, and check if averaging reduced the noise. Repeat the experiment using 10 and 20 noisy images and observe the results.

(Note: Convert image data from uint8 to double before applying any arithmetic operations.) (Note: You can calculate the average in a loop. Average of A and B is A/2+B/2; Average of A, B, C is A/3+B/3+C/3; and )

image text in transcribed

image text in transcribed

image text in transcribed

% Exercise 9 (Spatial resolution and interpolation methods) Repeat Ex2 using nearest neighbor, bilinear interpolation, and bicubic interpolation methods. Show the results and the original side by side. % Exercise 10 (Multiplication for masking) Read the grayscale image, cameraman.tif. Generate a new image of the same size in which a rectangular section of 100x100 pixels approximately near the center has all values equal to one, and all other pixels have zero value. Multiply this mask with the original image. display the original image, the mask, and the result side by side. (Note: you can make the 100x100 mask at any location of your choice, near the center). %Exercise 11 (RGB channels in a color image) Load a color image. Split it into R, G, B channels. Make a new image in which R and G are swapped. Display the original and the new image side by side. % Exercise 12 (Noise reduction using averaging) Load the grayscale image, cameraman.tif. Generate four new images with salt-and-pepper noise added to the original image. Take the average of these four, and check if averaging reduced the noise. Repeat the experiment using 10 and 20 noisy images and observe the results. (Note: Convert image data from uint8 to double before applying any arithmetic operations.) (Note: You can calculate the average in a loop. Average of A and B is A/2+B/2; Average of A, B, Cis A/3+B/3+C/3; and ...) % Exercise 9 (Spatial resolution and interpolation methods) Repeat Ex2 using nearest neighbor, bilinear interpolation, and bicubic interpolation methods. Show the results and the original side by side. % Exercise 10 (Multiplication for masking) Read the grayscale image, cameraman.tif. Generate a new image of the same size in which a rectangular section of 100x100 pixels approximately near the center has all values equal to one, and all other pixels have zero value. Multiply this mask with the original image. display the original image, the mask, and the result side by side. (Note: you can make the 100x100 mask at any location of your choice, near the center). % Exercise 11 (RGB channels in a color image) Load a color image. Split it into R, G, B channels. Make a new image in which R and Gare swapped. Display the original and the new image side by side. % Exercise 12 (Noise reduction using averaging) Load the grayscale image, cameraman.tif. Generate four new images with salt-and-pepper noise added to the original image. Take the average of these four, and check if averaging reduced the noise. Repeat the experiment using 10 and 20 noisy images and observe the results. (Note: Convert image data from uint8 to double before applying any arithmetic operations.) (Note: You can calculate the average in a loop. Average of A and B is A/2+B/2; Average of A, B, Cis A/3+B/3+C/3; and ...) % Exercise 1 (Image representation) Load the grayscale image, cameraman.tif. Show it as a 3D surface. Use the mouse to rotate the plot and try to visualize the objects. Show top-left 5x5 pixels as a matrix. % Exercise 2 (2D and Linear Image Coordinates) Load the grayscale image, cameraman.tif. Display values of the first five pixels in the middle row using 2D and linear coordinates. (Note: They should be the same in both cases.) % Exercise 3 (Size of image data and file) Load the grayscale image, cameraman.tif. Assuming that it uses 8-bits per pixel, what will be the total size of data in MegaBytes. Now save this image as a JPEG file on the hard disk and check the filesize. Display both sizes side by side. Why are they different (Ans: Data stored on disk is encoded and compressed; hence the file-size is smaller.)? % Exercise 4 (Spatial resolution and interpolation methods) Load the grayscale image, cameraman.tif. Shrink the spatial resolution to 64x64 using MATLAB's built-in function. Then zoom to the original resolution. Show the original image and the final result side by side. Use nearest neighbor approach both for shrinking and zooming. % Exercise 5 (Gray level resolution) Load the grayscale image, cameraman.tif. This image is quantized using 8 bits. Quantize it using 4 bits, 2 bits, and 1 bit and show all results side by side. Stretch each result in [0, 255) range for viewing. (Note: If you divide integer data by 2 and round down the result, you reduce the quantization by one bit.) % Exercise 6 (Noise reduction using averaging) Load the grayscale image, cameraman.tif. Generate two new images, one with salt-and-pepper noise and the other with Gaussian noise added to the original image. Display all images side by side. % Exercise 7 (Subtraction for visualizing the difference in images) Read the grayscale image, cameraman.tif. Save it as a JPEG file using imwrite() command at quality=10 and load this lower quality version again using imread() command. Call these two images as B and C. Calculate their difference D=B-C. Stretch D to [0, 255] range. Display B, C, and D side by side in a row. % Exercise 8 (RGB channels in a color image) Load a color image fabric.png. Split it into R, G, B channels. Display the color image and all channels as separate grayscale images side by side

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books

Students also viewed these Databases questions