Calibration of vision system, set correct attidude of sensor to workpiece