Methods and systems for detecting properties of sample tubes in a laboratory environment include a drawer vision system that can be trained and calibrated. Images of a tube tray captured by at least one camera are analyzed to extract image patches that allow a processor to automatically determine if a tube slot is occupied, if the tube has a cap, and if the tube has a tube top cup. The processor can be trained using a random forest technique and a plurality of training image patches. Cameras can be calibrated using a three-dimensional calibration target that can be inserted into the drawer.