Computer Science - The City College of New York
CSC I6716 - Fall 2010  3D Computer Vision

Assignment 1 ( Deadline: Sep 13 before class)

======================================================================

Note: All the writings must be hard copies in print. You also need to turn in your “soft” copies of your assignment by sending me by email attachments. You are responsible for the lose of your submissions if you don’t include  “CSC I6716 ” (exactly) in the subject of your email. Send your source code to me ONLY – please don’t send in your images and executable. Do write your names and IDs (last four digits) in both your hard copy and soft copy submissions.


1. Writing Assignments
 
(1). How does an image change (object size, field of view, etc.) if the focal length of a pinhole camera is varied?
  (2). Give an intuitive explanation of the reason why a pinhole camera has an infinite depth of field.
  (3). In the thin lens model, 1/o + 1/i = 1/f, there are three variables, the focal length f, the object distance o and the image distance i (please refer to Slide # 18 of the Image Formation lecture). If we define Z = o-f, and z = i-f, please describe the physical meanings of Z and z, and show that Z*z = f*f.
  (4). Show that, in the pinhole camera model, three collinear points (i.e., they lie on a line)  in 3D space are imaged into three collinear points on the image plane.
 

2. Programming  Assignments (Matlab preferred - here is a quick matlab tutorial.  You may use C++ or Java if you like, but you will need to bring your  own machine to me in my office hours to run your programs. )

Image formation.  In this small project, you are going to use Matlab to read, manipulate and write image data. The purpose of the project is to make you familiar with the basic digital image formations. Your program should do the following things:

  1. Read in a color image C1(x,y) = (R(x,y), G(x,y), B(x,y)) in Windows BMP format, and display it.
  2. Display the images of the three color components, R(x,y), G(x,y) and B(x,y), separately. You should display three black-white-like images.
  3. Generate an intensity image I(x,y) and display it. You should use the equation I = 0.299R + 0.587G + 0.114B (the NTSC standard for luminance).
  4. The original intensity image should have 256 gray levels.  Please uniformly quantize this image into K levels ( K=4, 16, 32, 64).  As an example,  when K=2 ,  pixels Whose values are below 128 are turned to 0,  otherwise to 255.  Display the four quantized images and tell us  what images still look like the original ones.
  5. Quantize  the original three-band color image C1(x,y) into K level color images CK(x,y)= (R’(x,y), G’(x,y), B’(x,y)) (with uniform intervals) , and display them. You may choose K=2 and 4 (for each band). 
  6. Quantize  the original three-band color image C1(x,y) into a color image CL(x,y)= (R’(x,y), G’(x,y), B’(x,y)) (with a logarithmic function) , and display it. You may choose  a function  I' =C ln (I+1) ( for each band), where I is the original value (0~255) , I' is the quantized value,  and C is a constant to scale I'  into (0~255), and ln is the natural logarithm. Note that when I = 0, I' = 0 too.
  1. Please give your conclusions for this experiment and write them into your paper submissions.
I have provided a piece of starting code for you to use. Questions a and b have been done.  You only need to work on c to g. You may use Prof. Zhu's ID picture for testing your algorithm..