Add documentation for object detector script.

Besides documentation of the code, some minor changes were also made the
the methods. Notably, the ignore_fg_color() now requires HSV color
space; the user should call convert_color_space() themselves if they
want to come from RGB or another color space.