Computer vision application for improved product traceability in the granite manufacturing industry




Computer vision, Granite, Traceability, Pattern detection, Colour detection


The traceability of granite blocks consists in identifying each block with a finite number of colour bands that represent a numerical code. This code has to be read several times throughout the manufacturing process, but its accuracy is subject to human errors, leading to cause faults in the traceability system. A computer vision system is presented to address this problem through colour detection and the decryption of the associated code. The system developed makes use of colour space transformations and various thresholds for the isolation of the colours. Computer vision methods are implemented, along with contour detection procedures for colour identification. Lastly, the analysis of geometrical features is used to decrypt the colour code captured. The proposed algorithm is trained on a set of 109 pictures taken in different environmental conditions and validated on a set of 21 images. The outcome shows promising results with an accuracy rate of 75.00% in the validation process. Therefore, the application presented can help employees reduce the number of mistakes in product tracking.


Download data is not yet available.


Dirección General de Política Energética y Minas. (2019) Estadística minera de España 2019. Retrieved from mineraanual-2019.pdf.

Qi, C. (2020) Big data management in the mining industry. Int. J. Miner., Metall. Mater. 27 [2], 131-139.

Anh Vo, S.; Scanlan, J.; Mirowski, L.; Turner, P. (2018) Image processing for traceability: A system prototype for the Southern Rock Lobster (SRL) supply chain. Proceedings of the International Conference on Digital Image Computing: Techniques and Applications (DICTA), 1-8. Retrieved from

Araújo, M.; Martínez, J.; Ordóñez, C.; Vilán, J.A. (2010) Identification of granite varieties from colour spectrum data. Sensors (Basel). 10 [9], 8572-8584.

Underwood, E.E. (1973) Quantitative stereology for microstructural analysis. microstructural analysis. Springer, Boston, M.A., (1973).

Underwood, E.E. (1986) Quantitative fractography. Applied metallography. Springer, Boston, M.A., (1986).

Russ, J.C.; Neal, F.B. (2016) The image processing handbook (7th ed.). CRC Press, Boca Raton, F.L., (2016).

Serra, J. (1982) lmage analysis and mathematical morphology. Academic Press. Cambridge, M.A., (1982).

Iglesias, C.; Martínez, J.; Taboada, J. (2018) Automated vision system for quality inspection of slate slabs. Comput. Ind. 99, 119-129.

Martínez, J.; López, M.; Matías, J.M.; Taboada, J. (2013) Classifying slate tile quality using automated learning techniques. Math. Comp. Model. 57 [7-8], 1716-1721.

López, M.; Martínez, J.; Matías, J.M.; Vilán, J.A.; Taboada, J. (2010) Application of a hybrid 3D-2D laser scanning system to the characterization of slate slabs. Sensors (Basel) 10 [6], 5949-5961.

Ozkan, F.; Ulutas, B. (2016) Use of an eye-tracker to assess workers in ceramic tile surface defect detection. Proceedings of the International Conference on Control, Decision and Information Technologies (coDIT).

Hanzaei, S. H.; Afshar, A.; Barazandeh, F. (2017) Automatic detection and classification of the ceramic tiles’ Surface defects. Pattern. Recogni. 66, 174-189.

Sioma, A. (2020) Automated control of surface defects on ceramic tiles using 3D image analysis. Materials (Basel) 13 [5], 1250.

Hocenski, Z.; Matic, T.; Vidovic, I. (2016) Technology transfer of computer vision defect detection to ceramic tiles industry. Proceedings of the International Conference on Smart Systems and Technologies (SST). 301-305.

Samarawickrama, Y.C.; Wickramasinghe, C.D. (2017) Matlab based automated surface defect detection system for ceremic tiles using image processing. Proceedings of the National Conference on Technology and Management (NCTM). 34-39.

Avci D.; Sert, E. (2021) An effective Turkey marble classification system: Convolutional neural network with genetic algorithm -wavelet kernel- extreme learning machine. Colloq. Traitement. Signal. Imag. 38 [4], 1229-1235.

Panda, G.; Satapathy, S.C.; Biswal, B.; Ramesh, B. (2028) Microelectronics, electromagnetics and telecommunications. Proceedings of the International Conference on Micro-Electronics, Electromagnetics and Telecommunications (ICMEET). Retrieved from

López, M.; Martínez, J.; Matías, J.M.; Taboada, J.; Vilán, J.A. (2010) Functional classification of ornamental stone using machine learning techiniques. J. Comput. App. Math. 234 [4], 1338-1345.

Kang, H. (2006) Computational Color Technology (1st ed.). Spie Press, Bellingham, WA.

Bianconi, F.; Fernández, A.; González, E.; Saetta, S.A. (2013) Performance analysis of the colour descriptors for parquet sorting. Expert. Syst. Appl. 40 [5], 1636-1644.

Paschos, G. (2000) Fast colour texture recognition using chromaticity moments. Pattern Recognit. Lett. 21 [9], 837-841.

Xiong, N.N.; Shen, Y.; Yang, K.; Lee, C.; Wu. C. (2018) Color sensors and their applications based on real-time color image segmentation for cyber physical systems. EURASIP J Image Video Process. 2018, 23.

Ibraheem, N.A.; Hasan, N.M.; Khan, R.Z.; Mishra, P.K. (2012) Understanding color models: a review. ARPN J. Eng. Appl. Sci. 2 [3], 365-275. Retrieved from

Sebastian, P.; Voon, Y.V.; Comley, R. (2010) Colour space effect on tracking in video surveillance. Int. J. Electr. Eng. Inform. 2 [4], 298-312.

Smith, A.R. (1978) Color gamut transform pairs. Proceedings of the Conference on Computer Graphics and Interactive Techniques ACM SIGGRAPH Computer Graphics. 12 [3], 12-19.

Roger, D.F. (2016) Procedural elements of computer graphics (1st ed.). McGraw-Hill, New York City, New York, (2016).

Bhatia, P.K. (2013) Computer graphics (3rd ed.), I.K. International, Daryaganj, New Delhi, Delhi, (2013).

Shapiro, L.; Stockman, G. (2001) Computer vision (1st ed.), 137-150. Prentice Hall., New York City, New York, (2001). Retrieved from

Nixon, M.; Aguado, A. (2019) Feature extraction and image processing for computer vision (1st ed.), 650. Academic Press, Cambridge, MA, (2019).

OpenCV: The OpenCV reference manual. edn. OpenCV, (2014). OpenCV.

Suziki, S.; Abe, K. (1985) Topological structural analysis of digitalized binary images by border following. Comput. Vis Image Underst. 30 [1], 32-46.

Edwards, C.; Penney, D. (1982) Calculus and analytical geometry (1st ed.), 859-866. Prentice Hall, Upper Saddle River, NJ, (1982).

Ramer, U. (1972) An iterative procedure for the polygonal approximation of plane curves. Comput. Graph. Image Process. 1 [3], 244-256.

Douglas, D.H.; Peucker, T.H. (1973) Algorithms for the reduction of the number of points required to represent a digitalized line or its caricature. Cartographica. 10 [2], 112-122.

Alonso-Villar, E.M.; Rivas, T.; Pozo-Antonio, J.S. (2021) Resistance to artificial daylight of paints used in urban artworks. Influence of paint composition and substrate. Prog. Org. Coat. 154, 106180.

Kondo, N. (2009) Robotization in fruit grading system. Sens. Instrum. Food Qual. Saf. 3 [1], 81-87.

Burgus-Artizzu, X.P.; Ribeiro, A.; Guijarro, M.; Pajares, G. (2011) Real-time image processing for crop/weed discrimination in maize fields. Comput. Electron. Agric. 75 [2], 337-346.

Carew, T.; Ghita, O.; Whelan, P.F. (2003) Exploring the effects of a factory-type test-bed on a painted slate defect detection system. Proceeding of the International Conference on Mechatronics (ICOM). 365-370. Retrived form

Andrew, W.; Hannuna, S.; Campbell, N.; Burghardt, T. (2016) Automatic individual Holstein Friesian cattle identification via selective local coat pattern matching in RGB-D imagery. Proceedings of the International Conference on Image Processing (ICIP) vol. August 2016. 484-488.

Ghita, O.; Whelan, P.F.; Carew, T.; Padmapriya, N. (2005) Quality grading of painted slates using texture analysis. Comput. Ind. 56 [8-9], 802-815.

Ghita, O.; Carew, T.; Whelan, P. (2006) A vision-based system for inspecting painted slated. Sens. Rev. 26 [2], 108-115.



How to Cite

Martínez, J., Rigueira, X., Araújo, M., Giráldez, E., & Recamán, A. (2023). Computer vision application for improved product traceability in the granite manufacturing industry. Materiales De Construcción, 73(351), e323.



Research Articles

Funding data

Ministerio de Ciencia, Innovación y Universidades
Grant numbers PID2020-116013RB-I00