/Image-Processing

CME 4412 Introduction to Image Processing Projects

Primary LanguageMATLAB

Image Processing

Gül Eda Aydemir - Contact with me! :)

www.linkedin.com/in/gul-eda-aydemir

guledaaydemir@gmail.com

CME 4412 Introduction to Image Processing

Using the image Rose1024.tif obtain the subsampled versions of the image as given given in the presentation, i.e. obtain the images of 512x512, 256x256, 128x128, 64x64 and 32x32 rose images.

Spatial Resolution Result

Perform thresholding on moon.bmp image to obtain the corresponding result in the presentation.

Tresholding Result

Use Ctskull-256.tif image to obtain different quantization levels of the image starting from 8 bits (original skull image), 7 bits, 6 bits, 5bits, 4 bits, 3 bits, 2 bits, and single bit images.

Intensity Level Resolution Result

Use power law transformation with c=1 and γ = 0.6, 0.4, and 0.3 to obtain resulting images on fractured_spine.tif image

Power Law Transformation

Write a Matlab function output = stretch(input, T1, T2) that will perform the pixel transformation shown in figure given below.

Stretch Transformation Graph

Use your stretch function to increase the contrast of the kids.tif image. Choose T1 and T2 so that the output image has a histogram which spans the full range of values from 0 to 255. Display the output image and its histogram.

Write a Matlab function Y=equalize(X) that equalizes the histogram of a given image X. Apply your equalize function to different images.Compare the histograms of equalized and original images.

Compare your function with the built-in histogram equalization function of MATLAB.

Write a Matlab function Y=match(X,Z) that matches the histogram of a given image X to the histogram of a reference image Z. You can use your own equalize() function in your implementation.(*imhist used instead)

Histogram Matching

Try to embed these two functions (equalize and match) in a Matlab GUI.

  • Step 1. Select a function (Histogram Equalize) Step 1

  • Step 2. Browse an image – Show result Step 2

  • Step 3. Select a function (Histogram Matching) Step 3

  • Step 4. Browse an image Step 4

  • Step 5. Browse a referance image - Show Result Step 5

Generate a filter mask using the following code:

radius=3; filter=ones(radius,radius)/(radius*radius);

Perform spatial filtering with the above generated template and display the output image. Change radius to 5 or 7, and use the newly generated masks to filter the original image. Compare the difference between different outputs.

Spatial Filtering with Changing Radius

Generate another filter mask using the following code:

base_filter=[0 0 0 0 0;1 1 1 1 1;0 0 0 0 0;-1 -1 -1 -1 -1;0 0 0 0 0]; angle=0; filter=imrotate(base_filter,angle,'crop');

Perform spatial filtering with the above mask and display the output image. Change angle to 45, 90 and 135. Use the newly generated masks to filter the original image. Compare the difference between different outputs.

Spatial Filtering with Changing Angle

Download the two_cats.jpg image and store it.

  • Load the image data.
  • Use a spatial filter to find and display the horizontal edges of the image.
  • Use a spatial filter to find and display the vertical edges of the image hint: read the MATLAB documentation on fspecial

Step_c

  • Add the horizontal edge image to the vertical edge image to yield the following results:

Step_d

Result 1 of Sobel Operators Codes :

result_1

  • See if you can reproduce the following result, which is the edge magnitude map for for this image. Result 2 of Laplacian Codes

result_2

Special thanks to, Özlem Öztürk.