Color Segmentation and Blob Detection in Video Images CS4631 Project 2

advertisement
Color Segmentation and Blob Detection
in Video Images
CS4631 Project 2
Due in class Tuesday March 16
March 2, 2004
1
Overview
For this project you are to process video images (provided to you as an AVI
file) in order to generate another AVI file. You should identify pixels of specific
colors in the input AVI, then mark them in the output AVI so that it is obvious
to someone watching the AVI you have found them.
You should also identify bounding boxes for the largest blob of each of the
three colors you detect.
2
Getting the Code
http://www.cc.gatech.edu/~tucker/courses/irp/files/project2.zip
Unzip the distribution and look at the README file for some intial hints
on how to get started.
3
Details
You are to create a program named handin that accepts the following command
line arguments:
handin INPUT.avi OUTPUT.avi OUT.txt START FRAME TOTAL FRAMES
We will compile your code and run it with this command line to check that
your code generates a good output AVI. The distribution includes an example program example.cc that almost does everything you need. The example
program marks green dots on bees bright green.
1
We will provide on the class website a copy of the AVI you are to work with.
This AVI will include pink, blue and orange objects. You should be able to
identify, and mark these three different colors.
Mark pink pixels bright red (e.g. 255, 0, 0 in RGB color space); mark blue
pixels bright blue, and mark orange pixels yellow.
For each of the three colors, you should find the smallest rectangle (bounding box) that encloses all the pixels of that color in a connected region. By
“connected region” I mean that there is a path from each pixel to every other
pixel of that color through pixels of that color.
You should find the largest bounding box for each of the three colors. It
does not matter if the boxes overlap. You should draw the boxes on the output
AVI. Bounding boxes should be drawn in “pure white” (255,255,255).
4
Deliverables
You should hand in paper copies of your writeup, code, and configuration file to
Steve Marlowe by 5PM Friday. Also, email Steve your code and configuration
file. He will compile it and test it. Please name your code handin.cc and your
configuration file colors.txt. colors.txt should be human readable.
5
Using External Code
It is permissible to include code in handin.cc that you did not write. However,
you must cite the source of that code (give credit where credit is due), then go
beyond what is possible to do with that code – you must make the system more
capable than it would be with just the external code (faster or better).
6
The Writeup
The writeup should be about one page or two. Please provide enough information in the writeup that someone could reproduce your work. In particular, be
sure to address the following questions: How do you distinguish between the
different colors? Where does your program have difficulties, if at all? How did
you select the numbers in your configuration file? How do you find the blobs?
7
Evaluation
Your project will be evaluated on how well your program identifies the various
colors and finds blobs. For instance, are non-blue things marked blue, or blue
things not marked blue? This is, of course, a little bit subjective. You will also
be evaluated on the quality of your writeup and the quality of your code.
2
Download