


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Instructions and tasks for homework 1 of the eecs-841 course at the university of kansas. The homework focuses on image processing and analysis, including thresholding, edge detection, and the hough transform. Students are required to write matlab functions and process given images to extract useful information.
Typology: Assignments
1 / 4
This page cannot be seen from the preview
Don't miss anything!



Homework # EECS- Due: Friday, Sept 19 (midnight) Total Points: 13
1. Thresholding and Edge Detection (5 points) Although natural images are highly complex and cluttered, some applications of computer vision allow the subject matter to be much more tightly controlled, resulting in simpler images. One example is automated product inspection, where a factory's final products or components on an assembly line may be moved across a light table to view them in silhouette. In these cases, simply thresholding the image is often enough to locate object boundaries. Better thresholding can be achieved by combining techniques from edge detection. One approach is to use edge detection to choose the threshold values. In this problem, we will explore that approach further. a) (2 points) Write a Matlab function function hist = hist2D(input_values) that accepts a 2xN array (an array with two columns), and produces a 50x50 two-dimensional histogram. Specifically, the program should
Difficulty: Be sure to vectorize your code. Your function should not contain ANY for loops. Also, using any of MATLAB's built-in histogram functions (like histc ) is not allowed. Hint: Check out the useful MATLAB function sparse. Deliverables: the file hist2D.m b) (1 point) Write a Matlab function function im_GM = GradientMagnitude(im, sigma) that returns the magnitude of the gradient of im , where the gradient is defined by the derivative of a Gaussian of standard deviation sigma. The output image im_GM should be the same size as im - use zero-padded border handling to achieve this. Use of conv2 or filter2 is allowed, but use of for loops is not. The use of Matlabʼs built-in edge detection routines are not allowed. Deliverables: the file GradientMagnitude.m c) (2 points) Load the image 'Gears.png', which is available at www.ittc.ku.edu/~potetz/EECS_841/Homeworks/hw1/Gears.png Use the Matlab function hist to plot a (1D) histogram of the intensity values of the image. Save this graph as 'GearsHist1.png'. Now, use GradientMagnitude to compute it's gradient magnitude at sigma = 2. Then use hist2D to compute the histogram of gradient magnitude (y-axis) versus pixel intensity (x-axis). Normalize this histogram so that all values lie between 0 and 1, and save the image as 'GearsHist2.png'. Look at the shape of the histogram in 'GearsHist2.png'. What does this plot tell you about the image that is not obvious from 'GearsHist1.png'? How could you use such a plot to improve the thresholding of 'Gears.png'? Deliverables: the file GearsHist1.png the file GearsHist2.png Answers to the above questions.
2. Images in the Fourier Domain (2 points) Load in the image 'Tiger.png', which can be found at www.ittc.ku.edu/~potetz/EECS_841/Homeworks/hw1/Tiger.png Take it's (discrete) Fourier tranform. Without changing the phase component, change the magnitude so that |F(u,v)| is 1 everywhere. Take the inverse Fourier transform, and save the
like radon is not allowed. You can choose whether to exploit edge orientation information or not. You can choose how to discretize the parameter space. You may choose to vote for small patches rather than points in the accumulator array. c) To find "strong" lines in the image, scan through the accumulator array looking for parameter values that have high votes. Here again, a threshold should be used to distinguish strong lines from weak ones. You may choose whether or how to implement nonmaximal suppression. d) You now have a list of edges that span the entire image. For each line detected by the Hough transform, determine which parts of that line actually correspond to line segments in the image. Save your list of line segments in the output array edges. One approach is to walk each line, marking those locations where the image gradient magnitude passes above threshold and below. You may consider using hysteresis when walking each line. I will test your program on several novel images. You may test your program on whatever image you wish, although the images www.ittc.ku.edu/~potetz/EECS_841/Homeworks/hw1/hough_simple_1.png www.ittc.ku.edu/~potetz/EECS_841/Homeworks/hw1/hough_simple_2.png may be especially helpful. Deliverables: the file FindEdgeSegments.m