Rapid standardization of rock color determination is a crucial aspect of geological research. Current methods primarily rely on expert visual description, Munsell color chart comparison, and spectral analysis, which fall short of meeting the demands for rapid and accurate rock color identification and digital standardization during extensive indoor and outdoor core observations. This paper proposes a computer vision-based intelligent rock color recognition method. Based on the Codes for names and colors of rocks in the petroleum geology (SY/T 5751—2012), a standard database containing 112 rock colors is constructed. Three algorithms—color thresholding, edge detection, and GrabCut—are designed to accurately segment target rock regions. Digital analysis, including color feature extraction, is performed on coordinate-based and gridded images to calculate the color vector of the rock image. Addressing the challenge of accurately identifying similar color systems, a weighted multi-feature fusion color matching algorithm is designed, incorporating evaluation indicators such as cosine similarity, Euclidean distance, RGB component differences, and brightness factor, significantly improving the system’s ability to identify similar hues. A visualized intelligent rock color recognition system is developed using Python programming language and the PyQT6 framework, achieving digital quantitative identification of rock colors and improving recognition accuracy and efficiency. The results show that the system’s identification results for 35 rock samples are highly consistent with the Munsell color chart interpretation results, with the consistency of hue (H), value (V), and chroma (C) reaching 91.43%, 85.71%, and 71.43%, respectively. The system also shows complete consistency in the identification of independent test samples, verifying the correctness of the core algorithm logic, and the average identification time can reach the millisecond level.
LiuH, RenY L, LiX,et al .Connotation and prospect of intelligent recognition technology for cores[J].Acta Petrolei Sinica,2024,45(8):1296-1308.(in Chinese)
MaW, LiS, ZhaoX P,et al .Portable intelligent lithology identification via deep learning of mesoscopic rock images[J].Journal of Basic Science and Engineering,2024,32(4):911-925.(in Chinese)
WuC W, YangH, XiaJ X,et al .Study on prediction of soil organic matter based on digital image color extraction[J].Spectroscopy and Spectral Analysis,2019,39(4):1222-1228.(in Chinese)
WangQ, YangJ, HuoF C,et al .Lithology identification method of rock thin section images based on MobileViT[J].Geological Bulletin of China,2024,43(6):938-946.(in Chinese)
ZhangX, QiaoJ H, ZhangH Y,et al .Color evaluation of color image based on color space[J].Chinese Journal of Liquid Crystals and Displays,2023,38(11):1490-1502.(in Chinese)
ZhangQ Y, YangJ, LiJ G,et al .Research on quantitative identification of rock color using spectral technology[J].Spectroscopy and Spectral Analysis,2023,43(6):1905-1911.(in Chinese)
YueZ Q .Digital image based numerical methods for mechanical analyses of geomaterials with actual meso-heterogeneity[J].Chinese Journal of Geophysics,2022,65(1):108-118.(in Chinese)
ChenF S, ShenY, ZhouC C,et al .Review of unsupervised learning gait recognition[J].Journal of Frontiers of Computer Science and Technology,2024,18(8):2014-2033.(in Chinese)
JingW L, LiB H, YangS L,et al .Method and application of homogeneous digital core permeability prediction based on TensorFlow[J].Journal of China University of Petroleum(Edition of Natural Science),2021,45(4):108-113.(in Chinese)
ChengG J, WeiJ J .Application of color quantization algorithm based on K-Means in rock image preprocessing[J].Journal of Xi’an Shiyou University(Natural Science Edition),2019,34(3):114-119.(in Chinese)
LiH S, LiY Y, YaoY M,et al . Application for calculating novel rock oil content proportion based on the HSV color model[J].Digital Technology & Application,2022,40(12):53-55.(in Chinese)
LiC F, HanJ X, PanX D,et al .Lithology dataset of remote sensing image in Changbaishan volcano based on semantic segmentation[J].Acta Petrologica Sinica,2025,41(4):1442-1453.(in Chinese)
ZhangY, LiM C, HanS .Automatic identification and classification in lithology based on deep learning in rock images[J].Acta Petrologica Sinica,2018,34(2):333-342.(in Chinese)
XuS T, ZhouY Z .Artificial intelligence identification of ore minerals under microscope based on deep learning algorithm[J].Acta Petrologica Sinica,2018,34(11):3244-3252.(in Chinese)
ChenJ, ZhangY D, LuT .Rock-like crack detection via pixel differential convolution neural network[J].Journal of Wuhan Institute of Technology,2023,45(1):81-86+100.(in Chinese)
DengN E, XuH, ZhouW,et al .Research progress and development trends of intelligent recognition of rock minerals based on deep learning[J].Journal of Chengdu University of Technology(Science & Technology Edition),2025,52(1):64-93.(in Chinese)
XiongF, LiaoY F, CaoW T,et al .Study on automatic recognition of rock lithology based on convolutional neural network and deep transfer learning[J].Safety and Environmental Engineering,2023,30(4):26-34.(in Chinese)
[37]
LuW, ZhangZ Q, NguyenM .A lightweight CNN-transformer network with Laplacian loss for low-altitude UAV imagery semantic segmentation[J].IEEE Transactions on Geoscience and Remote Sensing,2024,62:4405720.
National Energy Administration of the People’s Republic of China . Codes for names and colors of rocks in the petroleum geology:SY/T 5751—2012 [S].Beijing:Petroleum Industry Press,2013.(in Chinese)
[40]
Rock-Color Chart Committee,National Research Council(US) .Rock-color chart[EB/OL].[2025-10-15].
FengY X, GongX, XuY Y,et al .Lithology recognition based on fresh rock images and twins convolution neural network[J].Geography and Geo-Information Science,2019,35(5):89-94.(in Chinese)
[43]
ArchanaR, JeevarajP S E .Deep learning models for digital image processing:A review[J].Artificial Intelligence Review,2024,57(1):11.
ChengT, GuanL J, ZhengX Y,et al .Visible light vegetation extraction of hue saturation and lightness color model[J].Bulletin of Surveying and Mapping,2022(2):116-120.(in Chinese)
[46]
ZhangY H, LiZ B, HanX .Rock cutting image recognition based on color and texture feature fusion[J].Journal of Physics:Conference Series,2024,2901:012026.
[47]
MinaeeS, BoykovY, PorikliF,et al .Image segmentation using deep learning:A survey[J].IEEE Transactions on Pattern Analysis and Machine Intelligence,2022,44(7):3523-3542.
LongJ W, LiJ H, ZengS F .Adaptive multi-threshold image segmentation algorithm[J].Journal on Communications,2025,46(8):241-255.(in Chinese)
[50]
JardimS, AntónioJ, MoraC .Image thresholding approaches for medical image segmentation - short literature review[J].Procedia Computer Science,2023,219:1485-1492.
[51]
SunR, LeiT, ChenQ,et al .Survey of image edge detection[J].Frontiers in Signal Processing,2022,2:826967.
[52]
PangS Z, ThioT H G, SiawF L,et al .Research on improved image segmentation algorithm based on GrabCut[J].Electro-nics,2024,13(20):4068.
[53]
PandaS K, JenaA K, PandaM R,et al .Speech emotion recognition using multimodal feature fusion with machine learning approach[J].Multimedia Tools and Applications,2023,82(27):42763-42781.
[54]
ZhangY C, ShenZ R, JiaoR S .Segment anything model for medical image segmentation:Current applications and future directions[J].Computers in Biology and Medicine,2024,171:108238.
[55]
HarrisC R, MillmanK J, van der WaltS J,et al .Array programming with NumPy[J].Nature,2020,585(7825):357-362.
ZhuJ, LiuB,Chaomurilige,et al .Image feature weighting via object color[J].Journal of Nanjing University(Natural Sciences),2016,52(1):167-174.(in Chinese)
ZhaoB G, ZhaoD H, DongZ G,et al .Evaluation and analysis of optical camouflage efficiency based on cosine similarity[J].Laser Technology,2022,46(2):260-266.(in Chinese)
LiB T, SunM Y, ZhangJ,et al .Topology identification method for multi-ring distribution networks based on deep neural networks and Euclidean distance[J].Power System Protection and Control,2025,53(5):123-134.(in Chinese)
ZhangX J .The research of freeze-thaw rock damage characteristics based on a modified k-means clustering algorithm[D].Xi’an:Xi’an University of Science and Technology,2016.(in Chinese)
YeC, LiuZ, WuG Y,et al .Hierarchical conversion algorithm of color signal from CIELAB space to Munsell system which based on structure correlation analysis[J].Chinese Journal of Liquid Crystals and Displays,2016,31(6):626-633.(in Chinese)
[66]
RazaliM, IsmailM A M, YusoffI N,et al .Analysis of rock mass surface colour using CIELAB and Munsell chart[J].IOP Conference Series:Earth and Environmental Science,2022,1091:012048.
LiuJ Z, DuW Y, DongC,et al .Intelligent classification and recognition of rock samples based on color space and deep residual network ResNet-50[J].Science Technology and Engineering,2023,23(29):12628-12637.(in Chinese)