CS 4330: Computer Vision

Announcements

10/21/2005: a new seminar on Advanced Topics in Computer Vision will be offered next quarter (Winter 2006).

10/20/2005: a few more resources are listed and linked on the main page

Homework/Classwork

Homework 7, due Wednesday 11/30/05 before class

Reading: Chapter 22: Sections 22.1, 22.2, 22.3, 22.6. If you are interested in another popular method that we only discussed very briefly, read Section 22.5 about Support Vector Machines.
Answer the following questions. Be brief and concise in your answers.
  1. What is overfitting?
  2. What is likely to cause more overfitting - a parametric method with a 2-variable parameter or a 2-nearest-neighbor method? Why?
  3. How can it be avoided, independent of the classification method?
  4. What are the definitions of eigenvalues and eigenvectors of a matrix?
  5. We have seen a great many of methods to analyze data - from distance metrics and segmentation criteria to clustering methods, and from dimensionality reduction methods to classification techniques. All of them require us to define some features to operate on - the feature vector. Add three features to the table below and note their properties. You may describe features that we have mentioned already as well as any others that you know of, but they have to have different properties.

    Homework 6, due Wednesday 11/16/05 before class

    Reading: Chapter 17: Sections 17.1, 17.2.1-17.2.3, 17.3.1-17.3.2, 17.5, 17.6 - you can glance over the math, but should be able to make the connection to what we talked about (slides and Greg's tutorial).
    1. Revise your project description and design based on the comments that I sent you individually.
    2. Start programming! I will check on your progress and evaluate against what I asked you to work on in the individual emails that I sent you.

    Homework 5, due Wednesday 11/9/05 before class

    Reading: Chapter 16.
    1. Compare the k-means function you wrote for Homework 4 to the cvKMeans2 function in OpenCV. In particular, state what assumptions the latter makes. What would you have to do to invoke cvKMeans2 for the (3D) HSV color case?
    2. Take a look at the function cvMatchTemplate. How is it related to convolution? Note that your answer should probably differ for the different method arguments. What images or pixel values would show these differences?
    3. Make a detailed plan for your class project. Detailed means down to the level of OpenCV function calls.

    Homework 4, due Monday 10/31/05 before class

    Reading: Chapter 15.
    1. Write a generic k-means clustering algorithm that takes n-dimensional feature vectors and clusters it into k clusters. One parameter to the clustering function is a distance function.
    2. Then, show how to cluster pixels in a grey-level image based on their (1D) intensity values.
    3. Next, cluster pixels of a color image based on their (3D) HSV color. You can convert from RGB to HSV color space with the cvCvtColor(src, dst, CV_RGB2HSV) function.
    4. Lastly, search Google Images for red, green, blue, and yellow, respectively, and store 10 pictures each (thumbnail resolution is sufficient). Calculate a coarse histogram for the Hue channel of each of these images (5-10 bins) and run k-means clustering on the (normalized) histograms as feature vectors.

    Homework 3, due Monday 10/24/05 before class

    This homework is an extension to Programming Assignment 7.7 (page 164 in your textbook). Pick any image and convolve it with a constant kernel (average) with three different methods:
    1. OpenCV's cvFilter2D convolution function,
    2. OpenCV's Get2D/Set2D methods, and
    3. with raw data access through IplImage->imageData. The data in IplImage is row-major with an aligned row length of IplImage->widthStep. So: imageData[row*widthStep+col] is the pixel at (row, col).
    All three methods should produce the same result. But they will take different amounts of time. Measure the time with clock() (include <time.h>) or some other function. You may ignore border effects and just process the inside of the image. Now show that repeated application of this filter approximates a Gaussian. You can, for example, find an error measure by summing up the squared difference between an appropriate Gaussian-filtered image and the repeatedly-averaged image.

    Homework 2, due Wednesday 10/19/05

    Assignment 7.1 (page 164 in your textbook).

    Homework 1, due Monday 10/17/05

    Build a little image editor! Pop up a window with an image loaded from disk and add two slidebars. The first slidebar or an alternative key press select one of six functions. The name of the selected function is shown in the image (cvPutText). The second slidebar controls one function parameter, if there is one required for the function. A click-and-drag mouse motion selects a region in the image, which you can either simply invert, or you can restrict the selected function to that area ("region of interest," ROI). The functions are as follows: OpenCV provides ready-made functions for each of these. For displaying the histogram, you might want to have a look at the demhist example that comes with OpenCV.

    Homework 0

    For the first week, please complete the following tasks. We will troubleshoot very persistent installation problems next week, but please come to class on Wednesday and help each other with the OpenCV installation and with running the examples.
    1. Please read Sections 1.1, 1.3, and 1.4 of your textbook's Chapter 1. Just read it and take notes if you don't understand something, so you can ask in the next lecture.
    2. Download and install OpenCV from http://sourceforge.net/projects/opencvlibrary/. You need just the opencv-doc and opencv-linux or opencv-win packages, depending on your platform. If the installation or testing fails, make sure you check the newsgroup (see below) and other internet resources before giving up. Google, and particularly also Google's Groups search are great tools.
    3. Join the Yahoo OpenCV newsgroup.'
    4. Play with the OpenCV examples in the samples/c subdirectory. Have fun!
    5. If you do not have MS Visual Studio (or gcc etc on Linux) installed, please obtain it from ITACS (or through CS) and install it.

    back to main page for CS 4330

    featuresupportdimensionalityvalue range invariant to
         translationscaleorientation
    gray-level intensitysingle pixel 10..255 (black-white) yesyesyes
    2nd central moment of thresholded binary image entire image 20..(width/2)^2, 0..(height/2)^2 yesnono