1. A method for detecting properties of sample tubes, comprising steps of: a. receiving a series of images of a tray from at least one camera; b. extracting a plurality of image patches from each image; c. automatically determining, using a processor, from a first subset of the plurality image patches, each patch corresponding to one of a plurality of slots in the tray, whether each of a plurality of slots contains a sample tube; d. for those plurality of slots that contain a sample tube, automatically determining, using the processor, from a second subset of the plurality image patches, each patch corresponding to the top of the sample tube, whether each sample tube has a cap; and e. for those tubes that do not have a cap, automatically determining, using the processor, from the second subset of the plurality image patches whether each sample tube has a tube-top cup or is a plain tube.