Press here to go back

Computational Neuroscience 0368.3013.01

given by Prof. H. Yeshurun

Exercise #2 - Final Project.
Do you have more questions ? try FAQs.

Project definition:
Your task is to construct a system for artificial vision, for the detection of simple objects.
Your system should be a rough approximation of V1. It means that the images are processed by a set of oriented edge detectors of various sizes and orientation, and their output is used for further calculations. Stereo estimation could be carried out by the algorithms we have presented, as well as by straight forward correlation.
The input will be two series of pictures (left and right eye / camera). Each picture may contain rectangles, triangles and circles. Each one of the object may move on every axis: x  (horizontal) y (vertical) and z (depth). Object may also rotate around its center. The movement of an object may be a combination of the above. An object first appears either by moving into the frame boundaries (xy movement)  or from 'infinity' depth (disparity = 0): appearing as a pixel which gradually grows.  In every frame only one new object may appear. In each picture there will be no more than 7 object. Each series will contain a maximum of 30 objects. Objects never overlap.
An object does not move faster than 30 pixels/frame on x axis and y axis, and rotates no faster than 15 degrees/frame.  The disparity of an object may range between 0 and 10. The disparity change from a (left/right) pair of picture to the following pair will be not greater than 2 pixels/frame.
The output file should contain a list of the objects, sorted by time of first appearance. For every objects the following details are needed:

• Time of appearing (frame index).
• Type (rectangle / circle / triangle).
• A list of the (x,y,z) coordinates of the center of the object for all picture that contain it. If an abject touches the boundaries of the picture, or is partially outside the picture, consider the center of what is seen of the object.
For exact format of input and output files, please see cns00bEx2.zip.

The language of your implementation may be Matlab, ANSI  C and ANSI  C++ . For other platforms, please ask.
The project should be compiled, linked and executed under libra. It should be compatible with the g++ compiler.
If you are using Matlab at home, make sure you have the 'images' toolbox, and preferably use version 5.0 or higher. This will make your life much easier. If you are editing your matlab file using emacs editor you may want to use the "matlab.el" file (at cns00bEx2.zip ) which colors your code and adds some features to your editor.
Procedural issues:

• The final date for submitting  the exercise is  1.9.00.
• You may work in groups of 3, 2 or one.
• Army duty between 21 june and the deadline, of 3 days or more, gives you  10 days extension for the submission of the exercise. If you work with other(s), you all get this extension. Please enclose an official document stating the dates of the reserve duties.
Files an permissions:
• The source files should be placed at the library ~/cns00b/  , at the (libra) home directory of one of the members of the group. (note that the name includes zero - zero and NOT Oh - Oh).
• The permissions of this sub directory and all the files in it should enable reading to the checkers - (drwxr-xr-x both for the sub directory and for each of you files).  Please refer to the UNIX chmod command with the 755 or o+r option.
• The group member, whose directory includes the project, should send an email to odeds@math.tau.ac.il after the project is done, in place, and ready to be checked. This email should include the exact same content as the id file. The subject field of this  email should be: "Project Submission".
• This  directory should include exactly the files detailed below. No additional files such as executables, object files, bitmaps and sub directories  are permitted.
1.  The MATLAB source files or the C / C++ source files, including the header files.
2. A makefile (Relevant only if you right using C / C++). makefile is a standard descriptive file for the project. Once written, the UNIX command line 'make' should compile and link the project and leave the output executable file in the same directory. To enable this, the name of the makefile should be 'makefile'. Please refer to the UNIX manual for a detailed description of the makefile. A sample a makefile may be found in cns00bEx2.zip.
The result of the compilation & linkage should be an executable file named cns.
Make sure to use only relative path names to ensure that the project can be compiled in other directories as well. Through the checking procedure, the entire directory will be copied to the checkers account and will be compiled there. A good idea to check this requirement will be to open a parallel directory in one of the other group members and to try to make (= compile and link) and execute the project there. After the project is done and tested, no object files or executables should be left in the cns00b directory.
3. An id file. The id file is a plain text file. It should include one line per each group member. This line should include the following fields: <login> <id> <full name>. Exactly one white space should separate each two fields. Please see a sample id file in cns00bEx2.zip. This file will be read by an automatic program and thus should comply exactly with the definitions. It should not include any additional information. Please use plain text editors (NOT word processors) or the UNIX echo command to create this file.
4. An output ASCII - text file named "output.txt"  of your program when run on the example input files in cns00bEx2.zip.

Documentation.
The documentation should describe the entire project.  It should be clear and built of nicely separated sections. Its length should be no more than 2 two sided pages. The documentation should include the following parts:

1. Header - including the same information as in the id file.
2.A list of all the files in the project, and a short description of each one of them.
3.A general description of the project logic and the application flow.
4.A list of all the methods and algorithms used, together with a short explanation why they were chosen. The documentation file should NOT include the code itself.
You should submit your documentation to the mailbox of Oded Schwartz (3rd floor, Schriber building).
No printout of your source code is needed.

Input / Output
The MATLAB main file name should be cns.m . If you use C/C++ the executable file name should be cns.
Your program should read it's input from the sub directory "./cns00b/input/".  In this sub directory there will be the image files "Left1.bmp", "Right1.bmp", "Left2.bmp" etc. There will also be a file named "info.txt" containing the number of pairs of images.
One may assume that the input to the program is legal.
Sample input files may be found in cns00bEx2.zip.
Note: You should check your application with relevant input files, covering as many cases as you can think
of. You may use the given sample files to test your application, but keep in mind that other input files will be used in the final check.

Programming Guidelines
1. Functionality. Each function should perform one thing. This thing should be the function name. Functions should be short and clear. Any repeated code parts should be concentrated in functions.
2. Documentation. The code should be clear. Therefore, short comments should appear in various places, such as preceding functions or complicated blocks, when defining variables, etc. If there are assumptions regarding the input / output of the functions, they should appear too.
3. Naming. A significant part of the documentation resides in the code itself. This should be done by proper name choosing. The names of the variables and functions should imply their role.
4. No compilation errors or warnings are permitted.
5. Obviously, no run time errors are acceptable.