A method for detecting properties of sample tubes in a tray, the tray comprising a plurality of tube slots arranged in a matrix of rows and columns, each tube slot configured to receive a sample tube, comprising the steps of: receiving a series of images of the tray acquired by one or more cameras (242, 244), wherein each image comprises a matrix of three rows of tube slots and three columns of tube slots; extracting, using a processor, a plurality of image patches from each image, wherein each of the plurality of image patches is substantially centered on one of a tube slot or a tube top and comprises a matrix of three rows of image patches and three columns of image patches and each image patch corresponds to a location of one of the tube slots in the image; assigning, to each image patch, a first location group including a middle patch group, a corner patch group and a center patch group that defines whether the image patch is from one of: a center of the image, a corner of the image, and a middle edge of the image; selecting, for each image patch, based on the first location group, a trained classifier to use in processing the image patch; automatically determining, using the processor, from the plurality of image patches, whether each tube slot in the tray contains a tube using the trained classifier for each image patch, and further comprising: assigning, to each image patch, a second location group including the center of a image group, a left corner of an image group, a right corner of an image group, a left middle of an image group, a center middle of an image group and a right middle of an image group that defines whether the image patch is from one of: the center of the image, a left corner of the image, a right corner of the image, a left middle of the image, a center middle of the image and a right middle of the image; and selecting, for each image patch, based on the second location group, a trained classifier to use in processing the image patch, wherein, when it is determined that one or more of the tube slots contains a tube, the method further comprises automatically determining, using the processor, from the plurality of image patches, at least one property of each of the tubes contained in the one or more tube slots. receiving a series of images of the tray acquired by one or more cameras (242, 244), wherein each image comprises a matrix of three rows of tube slots and three columns of tube slots; extracting, using a processor, a plurality of image patches from each image, wherein each of the plurality of image patches is substantially centered on one of a tube slot or a tube top and comprises a matrix of three rows of image patches and three columns of image patches and each image patch corresponds to a location of one of the tube slots in the image; assigning, to each image patch, a first location group including a middle patch group, a corner patch group and a center patch group that defines whether the image patch is from one of: a center of the image, a corner of the image, and a middle edge of the image; selecting, for each image patch, based on the first location group, a trained classifier to use in processing the image patch; automatically determining, using the processor, from the plurality of image patches, whether each tube slot in the tray contains a tube using the trained classifier for each image patch, and further comprising: assigning, to each image patch, a second location group including the center of a image group, a left corner of an image group, a right corner of an image group, a left middle of an image group, a center middle of an image group and a right middle of an image group that defines whether the image patch is from one of: the center of the image, a left corner of the image, a right corner of the image, a left middle of the image, a center middle of the image and a right middle of the image; and selecting, for each image patch, based on the second location group, a trained classifier to use in processing the image patch, wherein, when it is determined that one or more of the tube slots contains a tube, the method further comprises automatically determining, using the processor, from the plurality of image patches, at least one property of each of the tubes contained in the one or more tube slots. assigning, to each image patch, a second location group including the center of a image group, a left corner of an image group, a right corner of an image group, a left middle of an image group, a center middle of an image group and a right middle of an image group that defines whether the image patch is from one of: the center of the image, a left corner of the image, a right corner of the image, a left middle of the image, a center middle of the image and a right middle of the image; and selecting, for each image patch, based on the second location group, a trained classifier to use in processing the image patch, wherein, when it is determined that one or more of the tube slots contains a tube, the method further comprises automatically determining, using the processor, from the plurality of image patches, at least one property of each of the tubes contained in the one or more tube slots.