1. An apparatus for identifying a test tube, comprising: an imager for acquiring an optical image of the tube; a microcontroller associated with said imager; a host interface interconnected to said microcontroller; and wherein said microcontroller is programmed to identify the test tube in at least a portion of the optical image by extracting a first region of interest from the image; detecting a first set of features comprising the presence or absence of a cap in the first region of interest by cropping the first region of interest from the optical image, locating a set of points in the first region of interest, and comparing the location of the points against a predetermined standard; extracting a second region of interest from the optical image; detecting a second set of features of the test tube in the first region of interest; comparing the second set of detected features against a predetermined standard; and said microcontroller is further programmed to output information about the test tube through said host interface.