Tài liệu

Image processing - Lab 3

Mathematics and Statistics

Problem 1. Zooming and Shrinking by Interpolation

Use the image of Lena used in lab 1 or get it from the attachment with this material

  1. Shrinking the image into half size of the original
  2. Zoom the image into double size of the original
  3. Shrink the image into one third size of the original
  4. Zoom the image into triple size of original

Problem 2. Image Reconstruction by Projection Slice Theorem

  1. Introduction

For this problem, you will implement Fourier Transform technique for the 2D image construction n problem. The goal is to construction the original 32x32 image g(x, y). You are given a set of 180 projections fθxθ size 12{f rSub { size 8{θ} } left (x rSub { size 8{θ} } right )} {} with θ size 12{θ} {} varying from 0 to 179

For each projection fθxθ size 12{f rSub { size 8{θ} } left (x rSub { size 8{θ} } right )} {} is the line integral of g(x, y) along lines at the angle θ size 12{θ} {} with the x-axis

  1. Data Format

Once you load the file lab3_2.mat, you will have the following matrices:

  • img original (32x32): This is the original image.
  • proj (49x180): This is the set of 180 projections, each being a column vector. You are free to choose the number of projections necessary to reconstruct the original image.
  • proj theta (1x180): The angles corresponding to each projection.
  • x theta (49x1): This is the coordinate values of the projected xθ size 12{x rSub { size 8{θ} } } {}-axis. For this specific case, we have 24xθ24 size 12{ - "24" <= x rSub { size 8{θ} } <= "24"} {}
  • Implementation

You are asked to implement Fourier Transform Technique for this image reconstruction, For this method, once you have obtained the Fourier domain samples on polar raster, use linear interpolation to obtain the estimates on the rectangular raster. Then perform inverse FFT to reconstruct the original image

You may want to use the following functions: meshgrid, interp2 (or griddata), pol2cart

Problem 3. Image warping

  1. Loading Data

Get the image from “lab3_pkg.zip” in the attachment

The package includes:

  • A 515x512 with 3 color channels of Lena in Lena.tiff

After loading it by img = double(imread(‘lena.tiff’))/255;

You will have 515x512x3 array

  • The initial mesh in lena-neutral.txt. You may load it using the statement

m = loadmesh(‘lena-neutral.txt’)

loadmesh is the function defined in loadmesh.m which includes the document for the format of the resulting mesh

  • warping.m: main warping image
  • mainwarping.m: starting point of the package
  • Other files: GUI and supporting function, you can have a look at them at home if you are interested
  • Warping

The current code in warping.m just copies the input image precisely. Replace this default with your image warping implementation.

  1. Alter Expression

Use the modifymesh.m function to alter Lena’s expression. You may save the resultant mesh using the savemesh.m function.

We will have the competition for the most beautiful Lena made up

Related documents

All the file including images and Matlab files are here.

Tập tin đính kèm

Đánh giá:
0 dựa trên 0 đánh giá
Nội dung cùng tác giả
 
Nội dung tương tự