A method of using image-based tube top circle detection, the method comprising: receiving, from at least one camera, a series of images of a tray, the tray comprising a plurality of tube slots, each tube slot configured to receive a sample tube, the series of images of the tray being acquired via the at least one camera; extracting, using a processor, a region of interest patch from one of the series of images, the ROI patch comprising a target tube top circle and having boundaries constrained by two dimensional projections of a plurality of different types of tube top circle centers according to heights and diameters of a plurality of different types of sample tubes; calculating, using the processor, an edge gradient magnitude map of the extracted ROI patch; characterized in that constructing, using the processor, a three dimensional map of a circle parameter space, where each location in the 3D map corresponds to a circle parameter having a center location and a diameter; accumulating, using the processor, weighted votes in the 3D map from edge points in the edge gradient magnitude map along gradient directions of each of the edge points; determining, using the processor, one or more locations in the 3D map as a circle candidate when the accumulated votes in the 3D map are equal to or greater than a predetermined threshold; and selecting, using the processor, the determined circle candidate having the greatest accumulated votes as the target tube top circle; selecting the determined circle candidate having the greatest accumulated votes as the target tube top circle further comprises: determining (i) whether the center of the circle is equal to or less than a predetermined distance threshold of a center of another circle candidate; and (ii) whether an area of the circle candidate and an area of the other circle candidate have an overlap equal to or greater than a predetermined overlap threshold; when both (i) and (ii) are determined to be true, eliminating the circle candidate or the other circle candidate having the smaller diameter from being a circle candidate and if the diameters are equal, eliminating the circle candidate or the other circle candidate having the smaller amount of accumulated votes from being a circle candidate; and when either (i) or (ii) is determined to be false, ranking the circle candidate with other circle candidates according to the amount of accumulated votes. receiving, from at least one camera, a series of images of a tray, the tray comprising a plurality of tube slots, each tube slot configured to receive a sample tube, the series of images of the tray being acquired via the at least one camera; extracting, using a processor, a region of interest patch from one of the series of images, the ROI patch comprising a target tube top circle and having boundaries constrained by two dimensional projections of a plurality of different types of tube top circle centers according to heights and diameters of a plurality of different types of sample tubes; calculating, using the processor, an edge gradient magnitude map of the extracted ROI patch; characterized in that constructing, using the processor, a three dimensional map of a circle parameter space, where each location in the 3D map corresponds to a circle parameter having a center location and a diameter; accumulating, using the processor, weighted votes in the 3D map from edge points in the edge gradient magnitude map along gradient directions of each of the edge points; determining, using the processor, one or more locations in the 3D map as a circle candidate when the accumulated votes in the 3D map are equal to or greater than a predetermined threshold; and selecting, using the processor, the determined circle candidate having the greatest accumulated votes as the target tube top circle; selecting the determined circle candidate having the greatest accumulated votes as the target tube top circle further comprises: determining (i) whether the center of the circle is equal to or less than a predetermined distance threshold of a center of another circle candidate; and (ii) whether an area of the circle candidate and an area of the other circle candidate have an overlap equal to or greater than a predetermined overlap threshold; when both (i) and (ii) are determined to be true, eliminating the circle candidate or the other circle candidate having the smaller diameter from being a circle candidate and if the diameters are equal, eliminating the circle candidate or the other circle candidate having the smaller amount of accumulated votes from being a circle candidate; and when either (i) or (ii) is determined to be false, ranking the circle candidate with other circle candidates according to the amount of accumulated votes. determining (i) whether the center of the circle is equal to or less than a predetermined distance threshold of a center of another circle candidate; and (ii) whether an area of the circle candidate and an area of the other circle candidate have an overlap equal to or greater than a predetermined overlap threshold; when both (i) and (ii) are determined to be true, eliminating the circle candidate or the other circle candidate having the smaller diameter from being a circle candidate and if the diameters are equal, eliminating the circle candidate or the other circle candidate having the smaller amount of accumulated votes from being a circle candidate; and when either (i) or (ii) is determined to be false, ranking the circle candidate with other circle candidates according to the amount of accumulated votes.