Computer vision applications in the industry have been a constant field of research in the academic community. Industrial daily challenges such as object detection, measurement, and quality inspection are examples of situations where some automation could be employed using such techniques. In this paper, a system based on stereo vision and image analysis has been developed to automate a habitual activity present in all machining companies: workpiece referencing in three-axis machining centers. The proposed vision system uses two cameras mounted in the spindle of the machining center to acquire images. All images are processed in custom software to return the position of the workpiece coordinate to the machining worker. Experimental results validate the application of the proposed system in a real CNC machining process.