These are from previous years.
Please obtain and use the following software packages:
You may also find the interactive iPython shell useful. There are also several Python IDEs available; DrPython is easy to use and reasonably powerful. You can use the computer science department's machines. If you want to use your own machine, the easiest way is to run Ubuntu or another desktop Linux version. You can either run Linux directly, use one of the Ubuntu-under-Linux versions (e.g., andlinux.org), or install under VirtualBox or VMWare. For Macintosh, your best bet is to start with the SciPy bundle, or maybe to install it via Fink. Images are represented in Python as NumPy arrays (2D arrays). There is a lot of introductory information available on the net on Python, NumPy, and SciPy. Good places to start reading are www.scipy.org and www.python.org. Image File Formats
Exercise 1.1
Exercise 1.2
(Image File Formats)
(10 Point10=1s)
A common image storage format is the PGM format; you can find the specification here:
http://netpbm.sourceforge.net/doc/pgm.html
Write Python functions for reading and writing the binary, 8 bit per
pixel
variant of the PGM format (you should raise an error for any other
input). You can generate sample images with the command:
convert magick:rose rose.pgm Image Compression
Exercise 1.3
Exercise 1.4
(Image Compression)
(10 Point10=1s)
Image compression relies on reducing redundancies. A simple trick for compressing images relies on computing differences between subsequent pixels followed by gzip compression.
First, write a Python script that takes any file as input and outputs
a file that consists of differences between pixels; that is, if the
original file contains the bytes Take graylevel input images and convert them to binary PGM images (you can take color images and convert them with convert image.jpg image.pgm). For 10 images, determine the following: (1) the size of the image in binary PGM format, (2) the size of the image when JPEG compressed with quality 99, (3) and the size of the image when you take the binary PGM image and compress it with gzip -9, and (4) the size of the image when you take the binary PGM image, apply pixel differencing, and then compress it with gzip -9. Explain and discuss your results. Path-Finding
Exercise 1.5
Exercise 1.6
(Path-Finding)
(20 Point20=1s)
Assume you are given an image image. You are given the two points `source' image[xs,ys]==0 and image[xt,yt]==0 .
1=10
Python has several libraries dealing with images. You may find the following code useful for reading images using the PIL library. The PIL library understands a lot of image formats but doesn't output numerical arrays (instead, it outputs an Image object). The code below performs the necessary conversions.
from __future__ import with_statement
Image and Video Processing (SS 2007)
Exercise Sheet 2
to be handed in: 19.06.2007
Connected Components
Exercise 2.1
Exercise 2.2
(Connected Components)
(20 Point20=1s)
In your favorite programming language, program a function that given a binary image computes all connected components of value 1. (Implement the algorithm discussed in the lecture.) Assume the binary image is given as a one-dimensional array and values for height and width. Output the result coded as an image. That is, the function should return an image of the same size as the input image in which each pixel is either 0 (when the corresponding pixel was 0 in the input) or has the label Current Cameras
Exercise 2.3
Exercise 2.4
(Current Cameras)
(5 Point5=1s)
Perform a web- or library-search to answer the following questions regarding cameras sensors: 1=10
Color Spaces
Exercise 2.5
Exercise 2.6
(Color Spaces)
(10 Point10=1s)
Briefly discuss one application for each of the following color spaces: 1=10
Fourier Series
Exercise 2.7
Exercise 2.8
(Fourier Series)
(10 Point10=1s)
Compute the Fourier series of the rectangle signal
Gaussian Smoothing
Exercise 2.9
Exercise 2.10
(Gaussian Smoothing)
(10 Point10=1s)
An
Smoothing for Down-Sampling
Exercise 2.11
Exercise 2.12
(Smoothing for Down-Sampling)
(20 Point20=1s)
An
Fourier transform properties
Exercise 3.1
Exercise 3.2
(Fourier transform properties)
(10 Point10=1s)
In the lecture, we discussed various connections between an image and its Fourier transform. For example, consider
Image Operations
Exercise 3.3
Exercise 3.4
(Image Operations)
(10 Point10=1s)
Implement the image processing operations 1=10
Subsampling
Exercise 3.5
Exercise 3.6
(Subsampling)
(15 Point15=1s)
In the lecture, it has been mentioned that low-pass filters should be applied before subsampling from an image in order to avoid aliasing. 1=10
Rotation with 3 Shears - Theory
Exercise 3.7
Exercise 3.8
(Rotation with 3 Shears - Theory)
(5 Point5=1s)
In the lecture it was discussed that rotating an image can be done by performing
Rotation
Exercise 3.9
Exercise 3.10
(Rotation)
(15 Point15=1s)
Write a program that rotates a given image by an angle
Now test the two methods: take two example images from the course
homepage and rotate them first
by
Morphological Processing
Exercise 4.1
Exercise 4.2
(Morphological Processing)
(5 Point5=1s)
Prove that the following relation between morphological closing and opening holds:
Unsharp Masking
Exercise 4.3
Exercise 4.4
(Unsharp Masking)
(10 Point10=1s)
In the lecture, we discussed the use of the Laplacian operator for the enhancement of image details. How is the discussed procedure related to the following method, called `unsharp masking'?
A negative was contact-copied on to a low contrast film or plate to create a positive. However, the positive copy was blurred. After processing, this blurred positive was replaced in contact with the back of the original negative. When light was passed through both negative and in-register positive, the positive partially cancelled some of the information in the negative. Because the positive was intentionally blurred, only the low frequency (blurred) information was cancelled. In addition, the mask effectively reduced the dynamic range of the original negative. Thus, if the resulting enlarged image is recorded on contrasty photographic paper, the partial cancellation emphasizes the high frequency (fine detail) information in the original, without loss of highlight or shadow detail. The resulting print appears sharper than one made without the unsharp mask. 1=10
Histogram Properties
Exercise 4.5
Exercise 4.6
(Histogram Properties)
(10 Point10=1s)
In the lecture, we discussed several statistical properties of the grayscale histogram of an image in the context of Otsu-thresholding. Show that the following equalities hold (cp. the notation used in the lecture): 1=10
Wavelets Practice
Exercise 4.7
Exercise 4.8
(Wavelets Practice)
(15 Point15=1s)
Write a program that reads an image of even dimensions and performs one level of the Wavelet transform on it, using a the Haar basis Extend the program such that it performs all levels of the transform. If the size of the image is not a power of 2, fill the additional parts with 0. Wavelets Theory
Exercise 4.9
Exercise 4.10
(Wavelets Theory)
(10 Point10=1s)
What is the computational complexity of your routine for the full wavelet transform for images of size
Compare the complexity of the DWT with the one of the FFT. Do you think
that the difference will matter in practice? Exercise 5.1
Exercise 5.2
(Median Filter)
(5 Point5=1s)
Show that the Median Filter for images is not linear. Invariant Features
Exercise 5.3
Exercise 5.4
(Invariant Features)
(15 Point15=1s)
Analyze the behaviour of the three localized features
Choose one features/transformation combination which is not invariant. Can you come up with a modification of the feature that makes it (more) invariant?
Signal Entropy
Exercise 5.5
Exercise 5.6
(Signal Entropy)
(10 Point10=1s)
Calculate the entropy for the following discrete probability distribution resp. signal sequences:
Huffman Codes
Exercise 5.7
Exercise 5.8
(Huffman Codes)
(5 Point5=1s)
Construct a Huffman Code for items (1), (2), and (3) of exercise 5.3.
Hough Transform
Exercise 5.9
Exercise 5.10
(Hough Transform)
(20 Point20=1s)
In the lecture, the Hough Transform for line-finding was explained. Write a program that reads a binary image and uses the Hough Transform to find the best line to match the ''ON'' pixels. Use a ExercisesJune 1Given two images, a big one and a small one, find their best alignment using FFT convolution.June 15Detect blobs in an image by taking local maxima of Laplacian of Gaussian (see also: Blob Detection at Wikipedia).June 29Cluster letters from a page by the following equivalence relation: A ~ B if eroded A is a subset of dilated B and vice versa.July 13Compare Fourier descriptors of hand-drawn curves. (Use the attached Python module to input curves)
|
Old >