Localization of the Work Coordinate System Using Computer Vision and Geometric Transformations on Three-Axis CNC Milling Machines
DOI:
https://doi.org/10.4108/airo.9898Keywords:
milling, work coordinate system, repeatability, computer vision, geometric trasnformations, optimizationAbstract
This paper presents a novel methodology for the location of the workpiece coordinate system origin (WCS) on three-axis computer numerical control (CNC) milling machines. The proposed approach uses computer vision techniques to detect geometric features on the workpiece and calculates zero-point coordinates through pixel-based adjustment and coordinate transformation matrices. The method includes a calibration process to align the camera system with the machine’s coordinate reference frames and compensates for displacement between the vision sensor and the tool center point. Experimental validation was carried out on a HAAS VF1 CNC milling machine, comparing the proposed method with traditional probing techniques. The results demonstrate improved repeatability and accuracy in the location of the WCS, with deviations maintained within acceptable industrial tolerances. This approach facilitates faster setup times and improves process automation in intelligent manufacturing environments.
Downloads
References
[1] de Araujo, P.R.M. and Lins, R.G. (2021) Cloud-based approach for automatic cnc workpiece origin localization based on image analysis. Robotics and Computer-Integrated Manufacturing 68: 102090. URL https://doi.org/10.1016/j.rcim.2020.102090.
[2] Chen, Y., Gunraj, H., Zeng, E.Z., Meyer, R., Gilles, M. and Wong, A. (2023) Mmrnet: Improving reliability for multimodal object detection and segmentation for bin picking via multimodal redundancy. In 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW): 68–77. URL https://doi.org/10.1109/CVPRW59228.2023.00012.
[3] Ruijiao Yin, J.Y. (2019) Research on robot control technology based on vision localization. Journal on Artificial Intelligence 1(1): 37–44. URL http://www.techscience.com/jai/v1n1/29010.
[4] Xiong, Z., Chu, Y., Liu, G. and Li, Z. (2001) Workpiece localization and computer aided setup system. In Proceedings 2001 IEEE/RSJ International Conference on Intelligent Robots and Systems. Expanding the Societal Role of Robotics in the the Next Millennium (Cat. No.01CH37180), 2: 1141–1146 vol.2. URL https://doi.org/10.1109/IROS.2001.976322.
[5] Zhu, W., Qin, Z., Wang, P. and Qiao, H. (2013) Model-based work-piece localization with salient feature selection. In 2013 IEEE International Conference on Robotics and Biomimetics (ROBIO): 493–497. URL https://doi.org/10.1109/ROBIO.2013.6739508.
[6] Li, Z., Sato, R., Shirase, K. and Sakamoto, S. (2021) Study on the influence of geometric errors in rotary axes on cubic-machining test considering the workpiece coordinate system. Precision Engineering 71: 36–46. URL https://doi.org/10.1016/j.precisioneng.2021.02.011.
[7] Torres-Medina, Y. (2020) El análisis del error humano en la manufactura: un elemento clave para mejorar la calidad de la producción. Revista UIS Ingenierías 19(4): 53–62. URL https://doi.org/10.18273/revuin.v19n4-2020005.
[8] Soori, M., Arezoo, B. and Habibi, M. (2013) Dimensional and geometrical errors of three-axis cnc milling machines in a virtual machining system. Computer-Aided Design 45(11): 1306–1313. URL https://doi.org/10.1016/j.cad.2013.06.002.
[9] Grisales-Grisales, N., Durango-Idárraga, S., Álvarez-Vargas, C.A. and Flórez-Hurtado, R.D. (2020) Calibración cinemática de una ruteadora cnc usando un modelo cuasi-estático de error y fotogrametría monocular. Revista UIS Ingenierías 19(3): 15–30. URL https: //doi.org/10.18273/revuin.v19n3-2020002.
[10] Báez, Y.A., Rodríguez, M.A., De la Vega, E.J. and Tlapa, D.A. (2013) Factores que influyen en el error humano de los trabajadores en líneas de montaje manual. Información tecnológica 24(6): 67–78. URL https://doi.org/10.4067/S0718-07642013000600010.
[11] Popov, K., Dimov, S., Ivanov, A., Pham, D.T. and Gandarias, E. (2010) New tool-workpiece setting up technology for micro-milling. The International Journal of Advanced Manufacturing Technology 47(1): 21–27. URL https://doi.org/10.1007/s00170-009-2055-2.
[12] XuYi, Ma, L. and Li, Z. (2008) A geometric algorithm for symmetric workpiece localization. In 2008 7th World Congress on Intelligent Control and Automation: 6065–6069. URL https://doi.org/10.1109/WCICA.2008.4592864.
[13] Setti, A., Bosetti, P. and Ragni, M. (2016) Artoolaugmented reality platform for machining setup and maintenance. In Proceedings of SAI Intelligent Systems Conference (Springer): 457–475. URL https://doi.org/10.1007/978-3-319-56994-9_33.
[14] Gu, J., Agapiou, J.S. and Kurgin, S. (2015) Cnc machine tool work offset error compensation method. Journal of Manufacturing Systems 37: 576–585. URL https://doi. org/10.1016/j.jmsy.2015.04.001.
[15] Xu, H.H. and Dai, C. (2014) Research on precision detection and error compensation technology for 3-axis cnc milling machine. Applied Mechanics and Materials 455: 505–510. URL https://doi.org/10.4028/www.scientific.net/AMM.455.505.
[16] Zhang, J. (2018) Research on cnc lathe programming and improving machining accuracy. In IOP Conference Series: Materials Science and Engineering (IOP Publishing), 452: 042050. URL https://doi.org/10.1088/1757-899X/452/4/042050.
[17] Martinova, L., Obukhov, A. and Sokolov, S. (2020) Practical aspects of ensuring accuracy of machining on cnc machine tools within framework of “smart manufacturing”. In 2020 International Russian Automation Conference (RusAutoCon) (IEEE): 898–902. URL https://doi.org/10.1109/RusAutoCon49822.2020.9208079.
[18] Salas-Arias, K.M., Madriz-Quirós, C.E., Sánchez-Brenes, O., Sánchez-Brenes, M. and Hernández-Granados, J.B. (2018) Factores que influyen en errores humanos en procesos de manufactura moderna. Revista Tecnología en Marcha 31(1): 22–34. URL https://doi.org/10.18845/tm.v31i1.3494.
[19] Torres Diaz, C.A. (2019) Matrices y sistemas de ecuaciones lineales. Repositorio Institucional URL https://repositorioslatinoamericanos.uchile.cl/handle/2250/653643.
[20] Barrientos, A., Álvarez, M., Hernández, J.D.,Del Cerro, J. and Rossi, C. (2012) Modelado de Cadenas Cinemáticas mediante Matrices de Desplazamiento. Una alternativa al método de Denavit-Hartenberg (Science Direct), 9, 371–382. URL https://doi.org/10.1016/j.riai.2012.09.004.
[21] Diprasetya, M.R. and Schwung, A. (2022) Homogeneous transformation matrix based neural network for model based reinforcement learning on robot manipulator. In 2022 IEEE International Conference on Industrial Technology (ICIT) (IEEE): 1–6. URL https://doi.org/10.1109/ICIT48603.2022.10002834.
[22] Villamarín, D. (2015) Estado del arte, herramientas y aplicaciones para transformaciones geométricas 3d. In Congreso de Ciencia y Tecnología ESPE, 10: 226–231. URL https://www.researchgate.net/publication/290964976_Estado_del_Arte_Herramientas_y_Aplicaciones_para_Transformaciones_geometricas_3D.
[23] Barrientos, A. et al. (2017) Fundamentos de robótica (Arquitectura e Ingeniería), 2, 211–382. URL https://www.academia.edu/40692152/Fundamentos_de_Rob%C3%B3tica_A_Barrientos_L_Pe%C3%B1in_C_Balaguer_R_Aracil_2ed.
[24] Maldavsky, D. (1977) Teoría de las representaciones: sistemas y matrices, transformaciones y estilos. In Teoría de las representaciones: sistemas y matrices, transformaciones y estilos (Portal Regional BVS), 267–267. URL https://sibi.upn.mx/cgi-bin/koha/opac-detail.pl?biblionumber=96663.
[25] Meraz-Méndez, M., Muñoz-López, L.E., Reynoso-Jardón, E.L. and Corral-Ramírez, G. (2024) Camera calibration procedure for extracting form deviation features in machined parts through computer vision algorithms. Journal of Mechanical Engineering 8(21): 1–e30821111.
[26] Jiao, J., Huang, C., Liu, H. and Zhang, G. (2018) A chinese chessboard calibration method in chessplaying robot by machine vision sensing. In Journal of Physics: Conference Series (IOP Publishing), 1026: 012023. URL https://doi.org/10.1088/1742-6596/1026/1/012023.
[27] Mejia, J.B. and Varona, R.L. (2014) Calibración de cámara termográfica fluke ti-32. Scientia et technica 19(1): 59–66.
[28] Zhang, Z. (2000) A flexible new technique for camera calibration. IEEE Transactions on pattern analysis and machine intelligence 22(11): 1330–1334. URL https://doi.org/10.1109/34.888718.
[29] Yang, C. and Yu, Q. (2019) Multiscale fourier descriptor based on triangular features for shape retrieval. Signal Processing: Image Communication 71: 110–119. URL https://doi.org/10.1016/j.image.2018.11.004.
[30] Bipm, I., IFCC, I. and IUPAC, I. (1995) Oiml 2008 evaluation of measurement data—guide to the expression of uncertainty in measurement. Joint Committee for Guides in Metrology, Bureau International des Poids et Mesures, JCGM 100.
[31] International Organization for Standardization (2008), ISO/IEC Guide 98-3:2008 Uncertainty of measurement - Part 3: Guide to the expression of uncertainty in measurement (GUM:1995). Published (Edition 1, 2008). This standard was last reviewed and confirmed in 2023. Therefore this version remains current.
[32] Srinivasan, H., Harrysson, O. and Wysk, R. (2015) Automatic part localization in a cnc machine coordinate system by means of 3d scans. International Journal of Advanced Manufacturing Technology 81: 1127–1138. doi:10.1007/s00170-015-7178-z, URL https://doi.org/10.1007/s00170-015-7178-z.
[33] Wallace, J. (2010) Ten methods for calculating the uncertainty of measurement. Science & Justice 50(4): 182–186. doi: https://doi.org/10.1016/j.scijus.2010.06.003, URL
https://www.sciencedirect.com/science/article/pii/S1355030610000705.
[34] Khusainov, R., Ziangirova, E. and Davletshina, G. (2020) Estimation of precision parameters of milling machines. In IOP Conference Series: Materials Science and Engineering, 915: 012031. URL https://doi.org/10.1088/1757-899X/915/1/012031.
[35] Singh, K.D. and Singh, P.D. (2023) Machine learning in robotics with fog/cloud computing and iot. EAI Endorsed Transactions on AI and Robotics 2. URL https://doi.org/10.4108/airo.3621.
[36] Zangana, H., Mustafa, R. and Omar, A. (2024) A hybrid approach for robust object detection: Integrating template matching and faster r-cnn. EAI Endorsed Transactions on AI and Robotics 3. doi:10.4108/airo.6858,URL https://publications.eai.eu/index.php/airo/article/view/6858.
Downloads
Published
How to Cite
Issue
Section
Categories
License
Copyright (c) 2025 Manuel Meraz Mendez, Jorge Duarte Loera, Claudia Lerma Hernández

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
This is an open access article distributed under the terms of the CC BY-NC-SA 4.0, which permits copying, redistributing, remixing, transformation, and building upon the material in any medium so long as the original work is properly cited.