원시데이터 수집 시스템
선정목록으로

Color detection of printing based on improved superpixel segmentation algorithm

간접 관련 산업용 섬유 · (17) 스펀본드 부직포 (3) 자동차 인테리어 소재(24) 패션(코오롱FnC)

기본 정보

저자
  1. Hongwu Zhan — College of Mechanical Engineering, Zhejiang University of Technology, HangZhou, 310014, China|||Key Laboratory of Special Purpose Equipment and Advanced Processing Technology, Ministry of Education and Zhejiang Province, Zhejiang University of Technology, HangZhou, 310023, China
  2. Yuhao Shou — College of Mechanical Engineering, Zhejiang University of Technology, HangZhou, 310014, China|||Key Laboratory of Special Purpose Equipment and Advanced Processing Technology, Ministry of Education and Zhejiang Province, Zhejiang University of Technology, HangZhou, 310023, China
  3. Liying Wen — College of Mechanical Engineering, Zhejiang University of Technology, HangZhou, 310014, China|||Key Laboratory of Special Purpose Equipment and Advanced Processing Technology, Ministry of Education and Zhejiang Province, Zhejiang University of Technology, HangZhou, 310023, China
  4. Fang Xu — College of Mechanical Engineering, Zhejiang University of Technology, HangZhou, 310014, China. fangx@zjut.edu.cn|||Key Laboratory of Special Purpose Equipment and Advanced Processing Technology, Ministry of Education and Zhejiang Province, Zhejiang University of Technology, HangZhou, 310023, China. fangx@zjut.edu.cn|||College of Mechanical Engineering, Zhejiang University of Technology, HangZhou, 310014, China
  5. L.B. Zhang — College of Mechanical Engineering, Zhejiang University of Technology, HangZhou, 310014, China|||Key Laboratory of Special Purpose Equipment and Advanced Processing Technology, Ministry of Education and Zhejiang Province, Zhejiang University of Technology, HangZhou, 310023, China
DOI
10.1038/s41598-024-74179-w
저널
Scientific Reports
발행년도
2024
발행기관
Nature Portfolio
피인용수
1
라이선스
cc-by-nc-nd
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1038/s41598-024-74179-w
토픽
Color Science and Applications
OpenAlex ID
W4403240743

평가 내용

관련도
간접 관련
사업분야
산업용 섬유 · (17) 스펀본드 부직포
부 분야
(3) 자동차 인테리어 소재, (24) 패션(코오롱FnC)
R&D 측면
분석·모델링
확신도
0.70
근거 용어
color detection, printing quality control, superpixel segmentation, machine vision, defect detection
판단 근거
본 논문은 인쇄물의 색상 결함을 실시간으로 탐지하기 위한 머신 비전 알고리즘을 다룹니다. 이는 코오롱인더스트리의 산업용 부직포(17)나 자동차 인테리어 소재(3), 패션 원단(24) 제조 공정 중 품질 검사(Quality Inspection) 시스템의 자동화 및 정밀도 향상에 응용될 수 있는 기술입니다.
R&D 활용 포인트
섬유 및 산업용 부직포 제조 공정에서 제품의 색상 균일성 및 인쇄/코팅 결함을 실시간으로 모니터링하는 자동 검사 시스템 구축에 활용 가능합니다.
평가 입력
본문 64,543자 중 30,032자 발췌

초록

초록이 없습니다.

본문 64,543자

본문 펼치기
## OPEN # Color detection of printing based on improved superpixel segmentation algorithm Hongwu Zhan <sup>1,2</sup> , Yuhao Shou <sup>1,2</sup> , Lidu Wen <sup>1,2</sup> , Fang Xu <sup>1,2</sup> <sup></sup> & Libin Zhang <sup>1,2</sup> We propose an improved superpixel segmentation algorithm based on visual saliency and color entropy for online color detection in printed products. This method addresses the issues of low accuracy and slow speed in detecting color deviations in print quality control. The improved superpixel segmentation algorithm consists of three main steps: Firstly, simulating human visual perception to obtain visually salient regions of the image, thereby achieving region-based superpixel segmentation. Secondly, adaptively determining the superpixel size within the salient regions using color information entropy. Finally, the superpixel segmentation method is optimized using hue angle distance based on chromaticity, ultimately achieving a region-based adaptive superpixel segmentation algorithm. Color detection of printed products compares the color mean values of post-printing images under the same superpixel labels, outputting labels with color deviations to identify areas of color differences. The experimental results show that the improved superpixel algorithm introduces color phase distance with better segmentation accuracy, and combines it with human visual perception to better reproduce the color information of printed materials. Using the method described in this article for printing color quality inspection can reduce data computation, quickly detect and mark color difference areas, and provide the degree of color deviation. Keywords Improved super-pixel segmentation, Visual saliency, Color printing, Color difference detection With the advancement of modern printing technology, printed products exhibit unprecedented levels of color richness and subtlety. The color performance and color consistency of printed images have always been key factors in quality assessment, while traditional manual color inspection methods suffer from inefficiency and poor accuracy <sup>1</sup> . Similarly, color detection methods relying on colorimeters and spectrophotometers are limited by their costly equipment, operational complexity, and lack of real-time capability, hindering their ability to provide timely feedback alongside printing processes. The application of machine vision technology has made real-time color inspection of color printed images a practical reality. By integrating machine vision with image processing techniques, color defects occurring during the printing process can be promptly detected and feedback can be provided to adjust the output devices in real time, thereby enhancing production efficiency and ensuring improved print quality <sup>2</sup> . Currently, there have been numerous advancements in research on image quality detection based on machine vision. Ma et al. <sup>3</sup> have utilized a quadratic template matching algorithm to segment the ROI (Region of Interest) in images and detect defect positions using grayscale information. The team led by Li <sup>4</sup> has employed an improved cosine similarity for secondary gradient matching to identify defects in printed labels. Zhang <sup>5</sup> has adopted a Codebook-based background subtraction method to detect foreground and characterize defect locations. Ha Quang Thinh Ngo <sup>6</sup> has employed convolutional neural networks to learn features of scratches, punctures, and uneven fabric surfaces for textile defect detection. In related research, it has been found that machine vision applications for shape defect quality inspection in printed images are more diverse, while studies on color defects in printed materials are relatively scarce. Japanese scholars Ichirou Ishimaru and Seiji Hata <sup>7</sup> were among the first to propose views on shape and color defects in printed images. The research on shape defects focuses more on the shape features of linear defects, while the research on color defects emphasizes color changes and other color features, both of which are crucial for printing quality. Nussbaum et al. <sup>8</sup> utilized color data and characterization datasets of printed materials for color comparison in the quality inspection of newspaper printing. C. Sodergard et al. <sup>9</sup> employed CCD machine vision technology to obtain printing quality tables based on indicators such as color difference, gray balance, dot gain, 1College of Mechanical Engineering, Zhejiang University of Technology, HangZhou 310014, China. 2Key Laboratory of Special Purpose Equipment and Advanced Processing Technology, Ministry of Education and Zhejiang Province, Zhejiang University of Technology, HangZhou 310023, China. <sup></sup> email: fangx@zjut.edu.cn and uniformity, comparing them with standard color tables. The PressSIGN <sup>10</sup> software developed by the British company BodoniSystems integrates density and colorimetric detection functions to inspect the color quality of printed materials. It guides workers in correcting the color standards of printing equipment through multiple stages, including print control strip measurement, solid density adjustment, and curve compensation. These methods are limited by their inability to directly detect defects in printed images. researchers <sup>11</sup> have found that three-dimensional histograms, as complex information-bearing structures of color images, can effectively reflect pixel information. J. Luo <sup>12</sup> used the color distribution in the color histogram of images as input to a classifier neural network, calculating and comparing the output feature vectors to achieve automatic color detection. Considering the time cost of neural network training, researchers <sup>13</sup> extracted color quantities from images in different color spaces, reconstructed them into one-dimensional feature vectors after quantization, and then performed comparisons. Hamdani et al. <sup>14</sup> classified images into eight categories based on the histograms of image color channels and extracted features in multiple color spaces. They then used the PCA algorithm to extract principal components, forming new features to train neural networks for color difference detection. Histogram-based color analysis neglects the spatial relationship of image pixels, and the quantization approach increases the ambiguity of color difference comparison. These methods perform global detection on printed images, only verifying whether color differences exist. Our method, however, can pinpoint the exact location of the color difference and quantify the degree of deviation. Image segmentation enables computers to perceive and understand image information in a way similar to human perception <sup>15</sup> . Image segmentation preserves the relationships between pixels in a region, and similar pixels are segmented together. In the study by Zhang et al. <sup>16</sup>, similar pixels are clustered into the same superpixel to represent local color information, enabling faster detection. Considering the complexity of spectral photometry measurements for colorful patterned fabrics, Nian Xiong <sup>17</sup> proposed an imaging method based on clustering pixels by color similarity to save subsequent detection time. Superpixels, based on low-level image information, enhance the efficiency and stability of color segmentation, maintaining region consistency and stability, effectively improving image processing efficiency <sup>18</sup> . The above content inspired us to propose applying superpixels to printing color quality detection. Regional saliency is the basis for determining the importance of areas within an image, as it contains more information. The identification of salient regions in an image utilizes methods such as regional contrast, for example, color contrast, making the segmented boundaries more stable in terms of color distinction <sup>19</sup> . Additionally, the human visual system exhibits high sensitivity to significant regions <sup>20</sup> . Our proposed improved superpixel algorithm considers human visual perception, performing finer segmentation in visually salient regions. The segmentation size is adaptively determined based on the information entropy of the region and the initial size. Additionally, the clustering process is optimized using the hue angle distance between pixels, resulting in better segmentation outcomes. Our contributions compared to other state-of-the-art approaches are summarized as: 1. An improved Simple Linear Iterative Clustering superpixel algorithm is proposed for color detection in printed images following two new visions: a. Using visual saliency and color information entropy, the image is segmented into regions through super pixel segmentation, with adaptive adjustment applied to salient regions. b. The similarity measure in the traditional clustering process is optimized by incorporating the hue angle distance between pixels, improving label assignment. 2. Color detection in printed images: Based on the improved superpixel algorithm, the superpixel labels and positions of the reference image are obtained. The color information of the corresponding superpixel regions in the test image and the standard image is compared, and superpixel regions exceeding the threshold are marked. The proposed method performs global color detection on the color image and displays the superpixels of the color deviation regions at the corresponding positions in the image. Method The relevant process of the algorithm is shown in Fig. 1. The pre-press image undergoes saliency computation to obtain the saliency map, which segments the foreground and background, resulting in a saliency mask. The original superpixel segmentation algorithm is optimized using the hue-optimized pixel clustering algorithm in Module 1 and the color entropy-based adaptive superpixel size control algorithm in significant regions in Module 2. The improved superpixel algorithm performs superpixel segmentation on the pre-press image, saving the pixel positions and corresponding superpixel label information. For post-press standard images, color correction is performed, and for post-press defect images, color correction and registration are carried out. The post-press standard image is a sample image of a qualified print. Pixels at corresponding positions in the post-press image are obtained based on superpixel labels, and the color mean in the LAB color space is calculated for the region. The color difference of the same superpixel block is computed using the color difference formula, and superpixel labels with differences exceeding the threshold are output. The corresponding positions in the post-press image are marked based on the output superpixel labels, and the related color difference information and occurrence positions are saved as a file. Superpixel clustering Since 2009, superpixel technology has been widely applied in the field of computer vision, benefiting from its ability to extract advantageous features to support subsequent tasks. It has found extensive use in various domains such as saliency detection, object detection, semantic segmentation, and image detection. There are Fig. 1 . Workflow diagram of printing color detection method based on improved superpixel segmentation algorithm. numerous types of superpixel segmentation algorithms, including those based on watershed, density, graph theory, clustering, and energy optimization. Research by David Stutz <sup>26</sup> indicates that algorithms based on graph theory, clustering, and energy optimization tend to yield better segmentation results. Graph-based algorithms rely on edge weights in images for segmentation, merging pixels from bottom to top based on color differences, although resulting superpixels may vary in size. Energy optimization segmentation algorithms score highest in boundary recall and under-segmentation rates but exhibit lower uniformity and compactness compared to clustering-based methods.Considering the subsequent need for region color comparison, this paper adopts the mainstream clustering-based algorithm—Simple Linear Iterative Clustering (SLIC) <sup>27</sup> . The steps of the SLIC algorithm are as follows: Step 1: Initialization of Cluster Centers. Determine the number of cluster centers based on the pre-set number of superpixels for image segmentation. Suppose the desired number of superpixels is K and the total number of pixels in the image is N. To ensure that each superpixel is of similar size, set the superpixel size to _N/K_ . Distribute the cluster centers uniformly, with a step size _l_ of _N/K_ <u>.</u> Step 2: Gradient-Based Adjustment of Cluster Centers. Calculate the gradient values of pixels in the Moore ~~�~~ neighborhood of each cluster center. Adjust the position of the cluster center to the pixel location with the minimum gradient value within this neighborhood. This correction ensures that the initial positions of the cluster centers do not fall on image texture locations. Step 3: Similarity Search and Label Assignment. Search within a 2l × 2l region around each cluster center. Construct the Euclidean distance metric using the LAB color space and the spatial positions of the pixels. Compare the similarity between the pixels in the region and the cluster center. Update the cluster center position to the location of the most similar pixel within the region and assign the same label to similar pixels <sup>23</sup> . _dc_ = (1) ( _Li −_ _Lce_ ) <sup>2</sup> + ( _ai −_ _ace_ ) <sup>2</sup> + ( _bi_ _−_ _bce_ ) <sup>2</sup> _dl_ = (2) ( _xi_ _<u>−</u>_ _xce_ ) <sup>2</sup> + ( _yi −_ _yce_ ) <sup>2</sup> + ~~�~~ 2 _<u>dl</u>_ _Nl_ ~~�~~ (3) ~~�~~ 2 _D_ = _<u>dc</u>_ _Nc_ - ~~�~~ Where ( _Li_, _ai_, _bi_ ) are the color values of a pixel i in the region. ( _Lce_, _ace_, _bce_ ) are the color values of the cluster center. ( _xi_, _yi_ ) and ( _xce_, _yce_ ) are the spatial coordinates of pixel i and the cluster center, respectively. _dc_ <u>is the</u> color distance. _dl_ is the spatial distance. _Nc_ represents the maximum color distance in the region. _Nl_ = _N/K_ center. ( _xi_, _yi_ ) and ( _xce_, _yce_ ) are the spatial coordinates of pixel i and the cluster center, respectively. _dc_ <u>is the</u> color distance. _dl_ is the spatial distance. _Nc_ represents the maximum color distance in the region. _Nl_ = _N/K_ represents the maximum spatial distance in the region. Iterate the above Steps 2 and 3, allowing the cluster centers to converge to more optimal positions. Set the number of iterations to _Nd_ . In image detection, the choice of the number of superpixels is crucial for better reflecting image information. The non-uniformity in image sizes necessitates adjusting the value of K. In practice, the size of the superpixels is of greater concern, making the determination of _l_ more direct. The parameter _Nc_ is used to control the influence of color during clustering and can be adjusted for different images. The optimized distance formula _Dd_ is as follows: _Dd_ = ( _dc_ ) <sup>2</sup> + _m_ 1( _dl_ ) <sup>2</sup> (4) ~~�~~ In the formula, _m_ 1 is a weight used to control the relative importance of color similarity and spatial proximity during the clustering process. Calculation of salient map based on convex hull center Print patterns are complex and diverse, including both natural images and artificially created non-natural images, lacking regularity. A bottom-up, data-driven approach to salient object detection is more suitable for print image inspection <sup>28</sup> . This paper uses the saliency region prediction algorithm proposed by Yang et al. <sup>29</sup> to determine the visually salient regions in printed images. Below is a brief description of the implementation process from Ref. <sup>29</sup> . Initially, the image is segmented into superpixels using the SLIC algorithm to capture the underlying structure of the print pattern. Subsequently, the saliency value _Sco_ ( _i_ ) for each superpixel region i in the LAB color space is computed. _−_ <sup>_<u>∥pi −</u>_</sup> 2 _σp_ <sup>2</sup> <sup>_<u>pj∥</u>_</sup> <sup>2</sup> _−_ <sup>_<u>∥pi −</u>_</sup> 2 _σp_ <sup>2</sup> <sup>_<u>pj∥</u>_</sup> <sup>2</sup> (5) _Sco_ ( _i_ ) = - _i̸_ = _j_ _||ci, cj|| · exp_ Where j represents all other superpixel regions, _ci_ is the mean color feature of superpixel i in the color space, _pi_ represents the normalized spatial coordinate mean of the region, and _σ_ _p_ is the weight controlling the spatial position relationship. Using the convex hull that encloses the points of interest, the centroid of the convex hull is taken as the center. This corrects the error caused by the deviation of the target from the image center in the center prior concept and constructs the saliency value _Sce_ ( _i_ ) : (6) _Sce_ = _exp_ _−_ <sup>_<u>||xi</u>_</sup> 2 <sup>_<u>−</u>_</sup> _σ_ <sup>_<u>x</u>_</sup> <sup><u>2</u></sup> _x_ <sup><u>0</u></sup> <sup>_<u>||</u>_</sup> <sup>2</sup> <sup>_<u>i</u>_</sup> 2 <sup>_<u>−</u>_</sup> _σ_ <sup>_<u>x</u>_</sup> <sup><u>2</u></sup> _x_ <sup><u>0</u></sup> <sup>_<u>||</u>_</sup> <sup>2</sup> _−_ <sup>_<u>||yi</u>_</sup> 2 <sup>_<u>−</u>_</sup> _σ_ <sup>_<u>y</u>_</sup> <sup><u>2</u></sup> _y_ <sup><u>0</u></sup> <sup>_<u>||</u>_</sup> <sup>2</sup> 2 _σ_ <sup><u>2</u></sup> _y_ Combining the contrast prior map and the center prior map, the initial saliency map _Sin_ ( _i_ ) is obtained: _Sin_ ( _i_ ) = _Sco_ ( _i_ ) _×_ _Sce_ ( _i_ ) (7) To construct a sparse connectivity graph _Gs_ = ( _V, E_ ) for reflecting the final saliency map, where V is the set of superpixel nodes and E is the undirected link of adjacent superpixels sharing boundaries. The boundary weight _Wij_ of adjacent superpixels is calculated as the smoothness prior, indicating similarity between neighbors, with _σ_ _w_ as the controlling weight: (8) _Wij_ = _exp_ _−_ <sup>_<u>||c</u>_</sup> 2 <sup>_<u>i</u>_</sup> _σ_ <sup>_<u>−</u>_</sup> <sup><u>2</u></sup> _w_ <sup>_cj||_</sup> Define the saliency cost function E(S). By minimizing E(S) and combining graph regularization, salient objects are highlighted, and the background is suppressed: _i_ _E_ ( _S_ ) = <sup>�</sup> _ij_ ( _S_ ( _i_ ) _−_ _Sin_ ( _i_ )) <sup>2</sup> + _λ_ <sup>�</sup> _i_ _ij_ _wij_ ( _S_ ( _i_ ) _−_ _S_ ( _j_ )) <sup>2</sup> (9) where _S_ ( _i_ ) and _S_ ( _j_ ) are the saliency values of regions i and j. Respectively, _λ_ is the regularization parameter. The optimal saliency value _S_ <sup>*</sup> is obtained by setting the derivative to zero. D is a diagonal matrix, and the _j_ <sup>(</sup> <sup>_Wij_</sup> <sup>),</sup> <sup>_µ_</sup> <sup>= 1</sup> <sup>_/_</sup> <sup>2</sup> <sup>_λ_</sup> <sup>,</sup> <sup>_I_</sup> <sup>represents region i:</sup> (10) elements on the diagonal are _dij_ = <sup>�</sup> _S_ <sup>*</sup> = _µ_ ( _D −_ _W_ + _µ I_ ) <sup>_−_</sup> <sup>1</sup> _Sin_ The visually salient regions in the image are obtained, as shown in the third column of Fig. 2. We used the Otsu <sup>30</sup> method, the threshold is automatically calculated by minimizing intra-class variance and maximizing inter-class variance, distinguishing the foreground from the background in the image, resulting in a binary image of the salient regions, as shown in the fourth column of the Fig. 2. The first column shows images from the BSDS500 dataset, and the second column shows the ground truth segmentation images related to the provided dataset. Hue optimization clustering The LAB color space is a uniform and device-independent color space, with its three components L, A, and B representing brightness, the contrast between green and red colors, and the contrast between blue and yellow colors, respectively. Researchers have found that human perception of color exhibits nonlinear characteristics, showing differences in perception towards different color directions and the existence of the critical region for color discrimination by the human eye <sup>31</sup> . Superpixels only consider the Euclidean distance in the LAB color space when merging pixels of similar colors, ignoring the influence of inter pixel hue differences on similarity. Points with the same Euclidean distance in LAB space are often perceived to have more pronounced color differences along the red-green and blue-yellow diagonals compared to non-diagonal positions. When a set of colors transitions across the opposite sides of the color wheel, this change is typically more significant visually <sup>32</sup>, as shown in Fig. 3. Nian Xiong emphasized the importance of hue variations in the distribution of pixels within _j_ <sup>(</sup> <sup>_Wij_</sup> <sup>),</sup> <sup>_µ_</sup> <sup>= 1</sup> <sup>_/_</sup> <sup>2</sup> <sup>_λ_</sup> <sup>,</sup> <sup>_I_</sup> <sup>represents region i:</sup> _S_ <sup>*</sup> = _µ_ ( _D −_ _W_ + _µ I_ ) <sup>_−_</sup> <sup>1</sup> _Sin_ (10) Fig. 2 . Image saliency detection illustration. The first column contains images from the BSDS500 dataset, the second column shows the manually generated saliency segmentation of the corresponding images, the third column displays the saliency detection results obtained by the algorithm, and the fourth column presents the binary saliency map of the saliency image. a sample, suggesting that hue variations have a greater impact than brightness <sup>18</sup> . Therefore, changes in hue have a significant influence on pixel clustering. We improve the SLIC algorithm by incorporating the degree of hue variation into the measurement of pixel similarity during the clustering process. The color wheel, also known as the hue circle, places each color along its edge. The visual color difference between cluster centers and pixels is quantified by measuring their distance on the hue circle. This approach aims to better distinguish pixels with the same distance in the original similarity measurement but with hue differences, thereby improving clustering quality and optimizing segmentation boundaries. By obtaining the green-red and yellow-blue components of cluster centers and other pixels in the LAB color space, the hue value discrepancy is calculated. �� (11) _hce_ = _arctan_ _hco_ = _arctan_ _Ace_ - _<u>Bce</u>_ _Aco_ - _<u>Bco</u>_ In the equation, h _ce_ represents the hue value of the cluster center, Ace is the value of the green-red component of the cluster center in color, and Bce is the value of the blue-yellow component of the cluster center. h _co_ represents the hue value of the non-central pixels in the search space, and likewise, _Aco_ and _Bco_ represent the values of various color components of the non-central pixels. The difference value is quantified based on the angular distance between the hue angles of the two. Since hue angles are circular, with hue representing a full circle, calculating the distance between them directly requires considering two directions. Starting from both the clockwise and counterclockwise directions, the shortest circular distance is obtained as the actual hue angle difference distance. Normalizing this distance ensures that the larger the hue angle difference distance, the larger of hue difference h _d_ between pixels. Fig. 3 . The image shows a 24-tonc color wheel. The color differences are more pronounced at the opposite positions on the color wheel. (12) _hd_ = _ω_ 1 _×_ exp _<u>min</u>_ <u>(</u> _<u>|hco−hce|,</u>_ <u>2</u> _<u>π −|hco−hce|</u>_ <u>)</u> _π_ _π_ Where _ω_ 1 represents the weight for controlling hue difference. By incorporating the difference in hue between cluster centers and non-central pixels into color space and spatial position measurements, a similarity metric formula _Dd_ 2 is formulated for clustering. Parameter _m_ 2 is used to regulate the impact of hue difference. _Dd_ 2 replaces _Dd_ from Eq. (4) to optimize the clustering between pixels. The relevant parameters can be found in Eq. (4) of the paper. _Dd_ 2 = ( _dc_ ) <sup>2</sup> + _m_ 1( _dl_ ) <sup>2</sup> + _m_ 2 (h _d_ ) <sup>2</sup> (13) Enhancing the consideration of spatial proximity importance in the clustering process may weaken color similarity. The introduction of the control parameter _m_ 2 enhances the control of pixel color similarity, which is beneficial for balancing the relative relationship between color and space. The increase in _m_ 2 is proportional to the increase in _m_ 1, with a greater rate of increase needed. Color information entropy adaptive control of salient regions Information entropy is a measure of uncertainty of a random variable. A higher entropy indicates greater uncertainty of the random variable and, consequently, more information contained within it <sup>33</sup> . The richness of colors in an image, as conveyed through color variations, to some extent reflects the amount of information contained in the image. The color entropy can assess the complexity of an image, which is useful in determining the complexity of significant regions of the image content. The richness of region content is determined by the color information contained in significant regions and influences the size of segmented superpixels. Regions with a richer color variety signify richer content, requiring smaller superpixels to cluster pixels with higher similarity. The number of grayscale levels in an image represents the possible colors in the image and is commonly used to describe the color depth or grayscale depth of the Color information entropy adaptive control of salient regions Information entropy is a measure of uncertainty of a random variable. A higher entropy indicates greater uncertainty of the random variable and, consequently, more information contained within it <sup>33</sup> . The richness of colors in an image, as conveyed through color variations, to some extent reflects the amount of information contained in the image. The color entropy can assess the complexity of an image, which is useful in determining the complexity of significant regions of the image content. image. Grayscale levels can effectively reflect the color richness of an image, serving as a measure of color variety in place of the dimension of color space, thereby reducing computational complexity. The expression for region color entropy E is as follows: _i_ =1 _E_ = <sup>�</sup> <sup>_Lh_</sup> _i_ =1 <sup>_pilog_</sup> 2 _p_ <u>1</u> _i_ (14) Where _Lh_ represents the number of grayscale levels contained in the significant region. And _pi_ denotes the probability histogram at the i-th grayscale level, recording the number of times a pixel appears at a certain grayscale value _i_ in the image area and calculating its percentage of the total number of pixels. The less color information in significant regions, the closer E approaches 0. Conversely, the larger the amount of color information, the higher E becomes. The size of significant regions also reflects the required size of segmented superpixels. For significant regions with a smaller area proportion but rich color information, smaller superpixels are needed to display the pixel relationships within the region. Thus, based on the proportion of significant regions to the whole image, the density of significant regions is determined. When the proportion of significant regions is high. The magnitude of superpixel size reduction is appropriately reduced. As the grayscale levels increase, indicating richer content, smaller superpixels are required. The expression for the size of superpixels in significant regions, A, is as follows: <u>256</u> _<u>nω</u>_ <u>2</u> _A_ = ( _r_ + _c_ ) _LhE_ (15) In the equation, n represents the number of pixels in significant regions, r is the number of horizontal pixels in the image, c is the number of vertical pixels in the image, and _ω_ 2 is the weight for controlling the size of superpixels, used to adjust the influence of color information entropy. Considering that in the actual segmentation process, the superpixel size of non salient regions is artificially controlled, we hope that the superpixel size of salient regions can be adaptively adjusted. (16) _ω_ 2 = 5 _·_ _l_ <sup>2</sup> Figure 4 illustrates an adaptive superpixel segmentation of images based on color information entropy combined with significant regions. In non-significant regions, larger superpixels are utilized for segmentation, while in significant regions, finer segmentation is carried out. Improved superpixel segmentation for color difference detection in printing images For the main objects in the printing industry, such as advertisements and posters, the distinction between foreground and background content in printed images is obvious. The foreground area is characterized by rich color contrasts, complex textures, and constitutes the image content. In contrast, the background area primarily consists of solid colors and gradients. The differences between the two areas make the conventional SLIC algorithm inadequate for printing detection. Using the same superpixel size throughout the whole image poses challenges for color representation. Superpixels represent color homogeneity within regions; larger superpixels Fig. 4 . Adaptive segmentation of images based on color information entropy. ( a ) Displays the original image from the BSDS500 dataset; ( b ) shows the SLIC segmentation image; ( c ) depicts the visual saliency map; ( d ) represents the non-significant region segmentation image; ( e ) showcases the significant region segmentation image; and ( f ) displays the adaptive superpixel segmentation image based on color information entropy. may lead to unclear segmentation of foreground content, while smaller superpixels may result in wastage of computational resources for the background. To achieve different superpixel segmentation for different regions of an image, considering the characteristics of human visual attention, the detection accuracy of significant regions is enhanced during the color difference detection process. By obtaining the saliency region M of the image, a fixed superpixel size is set for non-significant regions, and the superpixel size for significant regions is adaptively controlled using color information entropy. Due to the low complexity of non- salient regions, the number of iterations _Nd_ for superpixel calculation in this region can be appropriately reduced to improve the running speed. The improved superpixel segmentation image, _Ga_ ( _x, y_ ), is constructed as follows: _Ga_ ( _x, y_ ) = (1 _−_ _M_ ( _x, y_ )) _Sna_ ( _x, y_ ) + _M_ ( _x, y_ ) _Sya_ ( _x, y_ ) (17) Where, _Sna_ represents the superpixel segmentation image of the non-significant region, _Sya_ represents the superpixel segmentation image of the significant region. _M_ ( _x, y_ ) represents each pixel in the salient region M. _Sna_ ( _x, y_ ) and _Sya_ ( _x, y_ ) respectively indicate the pixel label values in their regions. Minimize the distance between the optimization objective function _E_ 2 for similarity and spatial compactness, assigning pixel labels to the closest cluster center label. (18) This formula calculates _E_ 2 = _Minimize_ <sup>��</sup> _Sya_ ( _x, yDd_ )2. ( _MS_ ( ( _x, yx, y_ ) denotes the label of the superpixel region to which pixel ) _, C_ ( _S_ ( _x, y_ ))) + _ω_ 3( _L_ ( _M_ ( _x, y_ )) _−_ _L_ ( _C_ ( _S_ ( _x, y_ )))) <sup>2</sup> ( _x, y_ ) This formula calculates _Sya_ ( _x, y_ ). _S_ ( _x, y_ ) denotes the label of the superpixel region to which pixel ( _x, y_ ) belongs. _C_ ( _S_ ( _x, y_ )) represents the cluster center, _L_ ( _M_ ( _x, y_ ))denotes the pixel coordinates in the salient region, _L_ ( _C_ ( _S_ ( _x, y_ ) )) signifies the coordinates of the cluster center, and _ω_ 3 is the balancing parameter used to balance similarity and spatial continuity. To determine _Sna_ ( _x, y_ ), replace _M_ ( _x, y_ ) with 1 _−_ _M_ ( _x, y_ ). The label values of _Sna_ ( _x, y_ ) are assumed to be connected to _Sya_ ( _x, y_ ). Different images will yield different segmentation results through superpixel segmentation. Iterative clustering may lead to slight differences even in two superpixel segmentations of the same image. By performing superpixel segmentation on standard printing images and retaining the superpixel labels and color information as templates, the color information of the regions is compared with the template for test images. The differences between them reflect the degree of printing color deviation and spatial positioning during the printing process. To obtain the mean color of each superpixel in the LAB color space, feature vectors E for the standard image and F for the test image are constructed. The vectors E and F are composed of multidimensional vectors represented as _E_ = [ _E_ 1 _, E_ 2 _, ., En_ ] and _F_ = [ _F_ 1 _, F_ 2 _, ., Fn_ ], where each _Ei_ and _Fi_ is a three-dimensional vector representing the mean color under the corresponding superpixel. The _∆E_ color difference formula in the LAB space _Df_ 234 is used to compare _Ei_ and _Fi_ . The difference _Df_ between the two feature vectors is calculated as space _Df_ 234 is used to compare _Ei_ and _Fi_ . The difference _Df_ between the two feature vectors is calculated as follows: <u>1</u> _Ei_ = _Ni_ <sup>_E_</sup> _p_ 1 _∈Ni_ <sup>_E_</sup> 1� _∈Ni_ <sup>_E_</sup> [ _L_ ( _p_ 1) _, a_ ( _p_ 1) _, b_ ( _p_ 1)] (19) _i_ _p_ 2 _∈_ _Ni_ <sup>_F_</sup> _n_ <u>�</u> <u>�</u> _i_ =1 <u>��</u> <u>�</u> _Fi_ = _N_ <u>1</u> _i_ <sup>_F_</sup> _Fi_ = _N_ <u>1</u> _i_ <sup>_F_</sup> _i_ <sup>_F_</sup> <sup>[</sup> <sup>_L_</sup> <sup>(</sup> <sup>_p_</sup> <sup>2)</sup> <sup>_, a_</sup> <sup>(</sup> <sup>_p_</sup> <sup>2)</sup> <sup>_, b_</sup> <sup>(</sup> <sup>_p_</sup> <sup>2)]</sup> (20) _Df_ = _∥E −_ _F_ _∥f_ = _i_ =1 _g_ ( _i_ ) _· ∥Ei −_ _Fi∥f_ <sup>2</sup> (21) _Df_ 2 = _Ei −_ _Fi_ = (22) ( _LEi−LFi_ ) <sup>2</sup> + ( _aEi−aFi_ ) <sup>2</sup> + ( _bEi−bFi_ ) <sup>2</sup> Where _Ni_ <sup>_E_</sup> Where _Ni_ <sup>_E_</sup> <sup>represents the number of pixels in the i-th superpixel of E, and</sup> <sup>_p_</sup> <sup>1 is any pixel within that superpixel.</sup> Similarly, _Ni_ <sup>_F_</sup> <sup>represents the number of pixels in the i-th superpixel of F, and</sup> <sup>_p_</sup> <sup>2 is any pixel within that superpixel.</sup> Similarly, _Ni_ <sup>_F_</sup> <sup>represents the number of pixels in the i-th superpixel of F, and</sup> <sup>_p_</sup> <sup>2 is any pixel within that superpixel.</sup> The term _|·|f_ denotes the norm of the matrix, i is the position in the feature vector, n is the length of the feature vector. _g_ ( _i_ ) is an indicator function which outputs 1 if _Df_ 2 exceeds a given threshold at position i; otherwise, it outputs 0. Based on the values of i, the superpixel labels are determined, and the edges of the corresponding _S_ ( _x, y_ ) are marked to indicate problematic superpixel positions in the image. Experiment Creating datasets and experimental environments The experiments described in this paper were conducted on a device equipped with an Intel Core i7-12700 H processor (14 cores, 2.7 GHz) and 16GB of DDR4 memory. The datasets used include the BSDS500 dataset <sup>35</sup> and a custom dataset consisting of 200 digital printing images. The pre-press images in the printing image dataset were sourced from the open-source websites UNSPLASH and Pexels, both of which provide free commercial images. The printed images were collected using an Epson 12000XL scanner. The image format in color detection can be JPG or PNG, but it must meet the requirement that the tested image and the standard image are in the same image format. This article uses JPG format for both. The algorithms discussed in this paper were implemented in C + + and Python, using Visual Studio 2022 Preview and PyCharm Community Edition respectively. Fig. 5 . Diagram of Inkjet Printing Image Color Difference Detection Results. The top row displays an inkjet printing color defect image (left) and the color difference detection output image (right). The bottom row compares the color difference regions of defect images a, b, and c with the corresponding regions of the standard images e, f, and g, alongside superpixel segmentation highlight images aʹ, bʹ, cʹ. In regions bʹ and cʹ, more detailed comparisons of color differences in significant regions are demonstrated. <u>Label</u> _<u><mark>∆L</mark></u>_ _<u><mark>∆a</mark></u>_ _<u><mark>∆b</mark></u>_ <u>31</u> <u>2.57143</u> <u>3.25155</u> <u>− 21.3447</u> <u>85</u> <u>− 2.27056</u> <u>− 0.2626</u> <u>− 1.28647</u> <u>197</u> <u>− 1.03352</u> <u>− 6.36871</u> <u>− 0.79889</u> <u>402</u> <u>0.694237</u> <u>− 0.14536</u> <u>− 2.76441</u> <u>812</u> <u>− 1.16988</u> <u>− 3.67761</u> <u>− 1.00193</u> <u>1100</u> <u>0.526581</u> <u>− 0.01519</u> <u>− 2.29873</u> Table 1 . Examples of color deviation in superpixel regions. Inkjet printing image color difference detection Algorithm 1 is an improved superpixel segmentation algorithm that optimizes segmentation by introducing salient regions, information entropy, and hue angle distance, resulting in more accurate region color segmentation. The color detection steps for inkjet printed images based on this algorithm are as follows: Step 1: Use the improved superpixel segmentation algorithm to obtain the superpixel label file of the prepress image and interpolate it to match the size of the post-press image, ensuring that each pixel corresponds to a label value. Step 2: Extract the mean color values of the corresponding superpixel regions in both the standard printed image and the test printed image. Step 3: Calculate the color difference using Eq. (22). The human eye’s discernible threshold is set to 6 <sup>34</sup>, and superpixel labels exceeding this threshold are identified. Step 4: Based on the label values, highlight the boundaries of superpixels with significant color differences, as shown in Fig. 5. The color differences in the L, A, and B components of the superpixel regions are outputted, as illustrated in Table 1. Algorithm 1 . Improved superpixel algorithm based on visual saliency and color entropy. The proposed detection method is intuitive and provides a quantitative description of color deviations in printed images. Our method detects and marks the color difference areas in the post-press test image, effectively identifying both significant and subtle color differences. The image is compared at different precision levels based on the importance of each region. Figure 5 shows the detection results, verifying the effectiveness of the method. Our method records the degree of color deviation in the color difference areas. In the printed image shown in Fig. 5, there are 1,211 superpixel regions with color differences. Identifying these regions is beneficial for subsequent color compensation and correction. Table 1 randomly displays some superpixels in the LAB color space. The goal of color difference detection in inkjet-printed images is to identify post-press defect locations visible to the human eye at the maximum discernible threshold, aiding in the control of printing costs. In Fig. 6, it is evident that the color difference in the pink region is difficult to observe with the naked eye, and this area is not detected as a color difference region in (c). By avoiding excessive detection that could lead to increased costs, the color difference detection method proposed in this paper demonstrates accuracy. Figure 7 shows a comparison of the results from the proposed algorithm for color defect detection and the latest algorithm from Ref. <sup>4</sup> for printing defect detection. The algorithm in Ref. <sup>4</sup> has issues with accuracy and incomplete detection for global color image color difference detection. In contrast, our method provides higher accuracy in detecting color difference areas and successfully identifies all observable differences. The algorithm in Ref. <sup>14</sup> only offers a similarity result between the test and reference images, while our method intuitively shows the location and magnitude of the color differences. When detecting a 2000 × 3000 dpi image, our algorithm takes about 5 s, compared to approximately 960 s for pixel-by-pixel detection and around 16 s for the method from Ref. <sup>14</sup> . Our algorithm offers significantly faster detection speeds. Ablation experiment To validate the feasibility and reliability of the proposed algorithm, we conducted experiments to verify both the implementation results of pixel clustering based on hue and the effectiveness of adaptive superpixel segmentation in significant regions using color information entropy. Fig. 6 . Color difference area detection diagram. ( a ) Represents the post-press standard sample, ( b ) shows the post-press defect sample, and (c) displays the color difference detection sample. The middle section between samples ( a ) and ( b ) provides a zoomed-in view of both images, as does the middle section between samples ( b ) and ( c ) for sample ( c ). Fig. 7 . Comparison experiment diagram of color difference detection. ( a ) Shows the color difference image, ( b ) shows the defect detection implemented by the method in Ref. <sup>4</sup>, and ( c ) is the enlarged schematic of the detected color difference area in ( b ). ( d ) Shows the color difference area marked by our algorithm. _Feasibility analysis of hue optimization_ Superpixels are used in print detection and post-processing, where uniformity, boundary compactness, and color reproduction are crucial. This study integrates hue optimization into superpixel segmentation, naming the optimized algorithm OurSLIC, to verify the method’s feasibility and reliability. Considering that hue optimization is an enhancement in the color space, the weight for the correlation between color and spatial position is set to _m_ 1 = 10, and based on empirical formula, _m_ 2 is set to 20. The number of iterations for all experiments is fixed at 10. The optimized superpixel clustering based on the hue angle distance in colorimetry demonstrates a more natural performance in regions with gradient and transitional colors. Figure 8 shows the segmentation results of four superpixel segmentation methods, with images on either side of row (a) representing segmentations with different superpixel sizes and row (b) showcasing a local display of the superpixels. To validate the feasibility of the proposed hue optimization algorithm, the segmented images obtained by the superpixel segmentation algorithm are evaluated on four metrics <sup>26</sup> : Boundary Recall (Rec), Undersegmentation Error (UE), Explained Variation (EV), and Achievable Segmentation Accuracy (ASA), and compared with three other algorithms (LSC <sup>36</sup>, preSLIC <sup>37</sup>, SLIC <sup>27</sup> ). Boundary Recall <sup>38</sup> evaluates the adherence of superpixel boundaries to manually marked boundaries. _FN_ ( _G, S_ ) and _TP_ ( _G, S_ ) represent the number of false negative and true positive boundary pixels in the superpixel segmentation S relative to the ground truth segmentation G, respectively. _TP_ ( _G, S_ ) signifies correct superpixel segmentation, so a higher Rec is better. _Rec_ ( _G, S_ ) = _TP_ ( _G,STP_ )+( _<u>G,SFN</u>_ <u>)(</u> _G,S_ ) (23) Undersegmentation Error (UE) <sup>38</sup> measures the extent of superpixel deviation from the true boundary segmented regions. The ratio of the number of pixels outside the intersection between the superpixel and the ground truth (G) to the number of pixels in the ground truth, where N is the total number of pixels in the image. A smaller _UEBergh_ ( _G, S_ ) value is better. Here, _Sj_ represents a superpixel and _Gi_ represents each ground truth segment. Using argmax returns the index of the corresponding ground truth region, while max only provides a measurement. _Gi_ ���� _Sj −_ _argmax_ _UEBergh_ ( _G, S_ ) = <sup><u>1</u></sup> _N_ _Si_ _|Sj ∩_ _Gi|_ (24) ���� Explained Variation (EV) <sup>26</sup> is used to quantify the quality of superpixel segmentation, independent of benchmark manual annotations, evaluating whether superpixel boundaries can effectively capture color and structure changes in the image. In the formula, _µ_ ( _Sj_ ) represents the average color of superpixel _Sj_ and _µ_ (I) represents the average color of the entire image I. A higher EV(S) indicates better segmentation. _xn_ is the feature value of the nth pixel. _EV_ ( _S_ ) = <u>�</u> _Sj_ <sup>_<u>|Sj|</u>_</sup> <sup>(</sup> <sup>_µ_</sup> <sup>(</sup> <sup>_Sj_</sup> <sup>)</sup> <sup>_<u>−µ</u>_</sup> <sup>(</sup> <sup>_I_</sup> <sup>))2</sup> _xn_ <sup>(</sup> <sup>_I_</sup> <sup>(</sup> <sup>_xn_</sup> <sup>)</sup> <sup>_−µ_</sup> <sup>(</sup> <sup>_I_</sup> <sup>))2</sup> _Sj_ <sup>_<u>|Sj|</u>_</sup> <sup>(</sup> <sup>_µ_</sup> <sup>(</sup> <sup>_Sj_</sup> <sup>)</sup> <sup>_<u>−µ</u>_</sup> <sup>(</sup> <sup>_I_</sup> <sup>))2</sup> (25) ~~�~~ _xn_ <sup>(</sup> <sup>_I_</sup> <sup>(</sup> <sup>_xn_</sup> <sup>)</sup> <sup>_−µ_</sup> <sup>(</sup> <sup>_I_</sup> <sup>))2</sup> Achievable Segmentation Accuracy (ASA) <sup>38</sup> represents the intersection of _Sj_ and the true segments _Gi_, with higher values being better. _ASA_ ( _G, S_ ) = <sup><u>1</u></sup> _N_ _Sj_ _maxGi_ <sup>_{|Sj ∩_</sup> <sup>_Gi|}_</sup> (26) According to Fig. 9, the BSDS500 dataset collected multiple user-annotated boundary maps for 500 natural images. The numbers − 0 and − 4 in the figure indicate the use of coarse and fine annotated boundary maps as benchmark comparison images. The OurSLIC algorithm proposed in this paper outperforms the original Fig. 8 . Local schematic diagram of superpixel segmentation. The first column presents the superpixel segmentation results obtained using the OurSLIC algorithm. The second column shows the segmentation results from the preSLIC algorithm, the third column displays results from the LSC algorithm, and the fourth column provides the segmentation results from the SLIC algorithm. Fig. 9 . The evaluation results of the superpixel segmentation images obtained by different superpixel algorithms under the BSDS500 dataset across four metrics are presented. ( a ) Shows the evaluation results under the Undersegmentation Error (UE) metric for the largest boundary annotation (− 0) and the smallest boundary annotation (− 4). ( b ) Presents the corresponding evaluation results under the Boundary Recall (Rec) metric. ( c ) Displays the corresponding evaluation results under the Achievable Segmentation Accuracy (ASA) metric. ( d ) Illustrates the corresponding evaluation results under the Explained Variation (EV) metric. <u>400</u> <u>600</u> <u>800</u> <u>1000</u> <u>1200</u> <u>1400</u> <u>1600</u> <u>1800</u> <u>2000</u> <u>2200</u> <u>OurSLIC</u> <u>0.91139</u> <u>0.93128</u> <u>0.94134</u> <u>0.95153</u> <u>0.95555</u> <u>0.96012</u> <u>0.96475</u> <u>0.96665</u> <u>0.968787</u> <u>0.968795</u> <u>SLIC</u> <u>0.91109</u> <u>0.93102</u> <u>0.94118</u> <u>0.95142</u> <u>0.95540</u> <u>0.96002</u> <u>0.96473</u> <u>0.966647</u> <u>0.96878</u> <u>0.968788</u> Table 2 . Comparing EV benchmark OurSLIC with SLIC. SLIC algorithm across all four metrics. OurSLIC, based on SLIC, reduces the envelope of differing pixels as the number of superpixels increases, with the metrics of both algorithms converging. When the number of superpixels exceeds 1000, OurSLIC performs better than the preSLIC algorithm, with the advantage becoming more pronounced as the number increases. The LSC algorithm segments images based on local contrast and similarity of pixels, which generates pixels along image edges and textures, and does not strictly follow a given number of superpixels. In actual comparison, the LSC algorithm segments more superpixel blocks, which is less fair compared to the other three algorithms. This characteristic allows it to achieve higher metrics in Fig. 9(a), (b), and (c). However, as the number of superpixels increases, the metrics of the LSC algorithm fall below those of the algorithm proposed in this paper. The LSC algorithm performs far below the OurSLIC algorithm on the EV metric. Superpixel color is a concentrated representation of regional color and is the main criterion in color detection, making the proposed algorithm more advantageous under this metric. Experimental results demonstrate the reliability of hue angle optimization. Table 2 provides supplementary data for Fig. 9(d). Fig. 10 . Adaptive superpixel segmentation based on salient region content. Fig. 11 . The size of superpixel segmentation in significant regions is automatically adjusted based on the size of superpixel segmentation in non-significant regions. _Adaptive segmentation of salient regions based on color information entropy_ In the detection of color differences in printed images, comparing color averages of uniformly sized superpixels can lead to inaccuracies or waste of resources. To enhance the detection accuracy in visually salient regions, it is necessary to partition superpixels more finely in highly colorful and strongly contrasted areas. This experiment verifies that adaptive superpixel segmentation based on color information entropy yields better segmentation performance. Figure 10 displays the segmentation results of two algorithms. The upper row shows the original superpixel segmentation images (left) and the color mean of the segmented superpixels (right). The lower row illustrates the adaptive segmentation images and their superpixel color means. From the three sets of images (a, b, c), it is evident that adaptive segmentation better preserves the color and details of the original image, which is crucial for superpixel-based color difference detection. Figure 11 demonstrates how color information entropy adaptively determines the superpixel size in salient regions for different initial superpixel sizes. In the figure, _l_ represents the initial superpixel step size, which is used to determine the superpixel size of non-salient regions. The step size _i_ for salient regions is adaptively determined based on the formula and is correlated with _l_, changing adaptively with _l_ . Additionally, _i_ adapts based on the richness of color in salient regions and the size of these regions. The partitioning of salient regions can effectively enhance the recognition of color and detail in images by superpixels. To provide objective metrics for comparison, Peak Signal-to-Noise Ratio (PSNR) <sup>39</sup> and Structural Similarity Index (SSIM) [40] are introduced to compare the color mean images obtained by the two algorithms. (27) _PSNR_ = 10 _∗_ log10 _<u>I</u>_ _MSE_ - _<u>MAX</u>_ 2 MAX represents the maximum possible pixel value in the image, which corresponds to the maximum value of the image bit depth. MSE measures the average squared differences between corresponding pixel values in two images _SSIM_ ( _x, y_ ) = <sup><u>(2*</u></sup> <sup>_µ x_</sup> <sup><u>*</u></sup> <sup>_µ y_</sup> <sup>+</sup> <sup>_c_</sup> <sup><u>1)*(2*</u></sup> <sup>_σ_</sup> <sup>_<u>xy</u>_</sup> <sup>+</sup> <sup>_c_</sup> <sup><u>2)</u></sup> (28) ( <sup>_µ_</sup> <sup>2</sup> _x_ <sup>++</sup> <sup>_c_</sup> 1) <sup>*</sup> ( <sup>_σ_</sup> <sup>2</sup> _x_ <sup>+</sup> <sup>_σ_</sup> <sup>2</sup> _y_ <sup>+</sup> <sup>_c_</sup> 2) _µ_ _x_ and _µ_ _y_ mean intensity values of images x and y, representing luminance, while _µ_ <sup>2</sup> _x_ <sup>and</sup> <sup>_µ_</sup> <sup>2</sup> _y_ <sup>refer to the</sup> variance in intensity. _σ_ _xy_ measures the covariance between images. _c_ 1 and _c_ 2 are constants. _µ_ _x_ and _µ_ _y_ mean intensity values of images x and y, representing luminance, while _µ_ <sup>2</sup> _x_ <sup>2</sup> _x_ <sup>and</sup> <sup>_µ_</sup> <sup>2</sup> _y_ In the experiment, the initial superpixel step size was set to _l_ = 12 _._ 5. The results of the color mean image obtained using the SLIC algorithm are represented by PSNR1 and SSIM1. The results from the adaptive segmentation algorithm are represented by PSNR2 and SSIM2. We construct new evaluation metrics, NPSNR and NSSIM, to assess our method. If value greater than 1, it indicates that the proposed algorithm performs better than the traditional SLIC method. _NPSNR_ = <sup>_<u>PSNR</u>_</sup> _PSNR_ <sup><u>2</u></sup> 1 (29) Fig. 12 . Adaptive superpixel segmentation improves image quality, with the weight m, which controls the relative importance of color and spatial position, varying accordingly. Increasing m helps enhance image quality. However, due to the inherent characteristics of the image content, as m increases, the degree of improvement in segmentation quality becomes inconsistent, and the sample distribution becomes more uneven. _NSSIM_ = <sup>_<u>SSIM</u>_</sup> _SSIM_ <sup><u>2</u></sup> 1 (30) A random selection of 100 sample images from the dataset was used for superpixel segmentation quality evaluation. As shown in Fig. 12, the values of NPSNR and NSSIM are generally greater than 1, indicating that our algorithm outperforms the original method in both image quality and texture/detail preservation. The parameter m (from Eq. (13), _m_ 1) controls the relative importance of color and spatial position during clustering. As m increases, the quality of segmentation improves, and the distribution of sample values in the figure shifts upward with increasing m. Conclusion The improved superpixel segmentation algorithm based on saliency and color entropy proposed in this article has better reliability in detecting printing color quality. Replacing pixels with superpixels can reduce the computational load on image data while maintaining color fidelity in line with human visual perception. The detected color difference areas are intuitively reflected in the corresponding locations of the original image, and the resulting color shifts aid in subsequent color compensation and correction. Future work will focus on optimizing the algorithm’s speed and integrating it with additional functionalities. Data availability The data presented in this study are available on request from the corresponding author due to protect the integrity and accuracy of the research. The BSD500 dataset is available online at https://paperswithcode.com/ dataset/bsds500. Received: 8 July 2024; Accepted: 24 September 2024 References 1. Vans, M. et al. Automatic visual inspection and defect detection on variable data prints. _J. Electron. Imaging_ . 20, 013010–013010 (2011). 2. Abdelfatah, E., Abdelmajid, E. & Abdeljebar, M. AI and computer vision-based real-time quality control: A review of industrial applications. _J. Procedia Comput. Sci._ 231, 212–220 (2024). 3. Ma, B. et al. The defect detection of personalized print based on template matching. _IEEE International Conference on Unmanned_ _Systems (ICUS)_ [. 266–271 (IEEE, 2017). (2017). https://doi.org/10.1109/ICUS.2017.8278352](https://doi.org/10.1109/ICUS.2017.8278352) 4. Li, D. et al. Printed label defect detection using twice gradient matching based on improved cosine similarity measure. _Expert Syst._ _Appl._ 204, 117372 (2022). 5. Zhang, L., Chen, M. & Zou, W. A codebook based background subtraction method for image defects detection. in _Tenth international_ _conference on computational intelligence and security_ [. 704–706 (IEEE, 2014). (2014). https://doi.org/10.1109/CIS.2014.154](https://doi.org/10.1109/CIS.2014.154) 6. Ha, Q. T. N. Design of automated system for online inspection using the convolutional neural network (CNN) technique in the image processing approach. _Results Eng._ 19, 101346 (2023). 7. Ishimaru, I., Hata, S. & Hirokari, M. Color-defect classification for printed-matter visual inspection system. in _4th World Congress_ _on Intelligent Control and Automation_ [. 3261–3265WCICA, (2002). https://doi.org/10.1109/WCICA.2002.1020137](https://doi.org/10.1109/WCICA.2002.1020137) 8. Nussbaum, P. & Jon, Y. H. Print quality evaluation and applied colour management in coldset offset newspaper print. _Color. Res._ _Appl_ . 37, 82–91 (2012). 9. Södergård, C., Raimo, L. & Juuso, A. Inspection of colour printing quality. _Int. J. Pattern Recognit. Artif. Intell._ 10.02, 115–128 (1996). 10. Zhang, D. & Tang, W. The new testing and standardized solutions of printing quality—PressSIGN intelligent printing production. in _IEEE International Conference on Intelligent Control, Automatic Detection and High-End Equipment_ . 181–185 (IEEE, 2012). [https://doi.org/10.1109/ICADE.2012.6330123](https://doi.org/10.1109/ICADE.2012.6330123) 11. Chauveau, J. & Paul, D. R. François Chapeau-Blondeau. Multifractal analysis of three-dimensional histogram from color images. _J. Chaos Solitons Fractals_ . 43, 57–67 (2010). 12. LUO, J. Automatic colour printing inspection by image processing. _J. J. Mater. Process. Technol._ 139, 373–378 (2003). 13. Kikuchi, H. et al. Color-tone similarity on digital images. in _Proceedings of The 2012 Asia Pacific Signal and Information Processing_ _Association Annual Summit and Conference._ IEEE, 1–4 (2012). 14. Hamdani, H., Septiarini, A., Sunyoto, A., Suyanto, S. & Utaminingrum, F. Detection of oil palm leaf disease based on color histogram and supervised classifier. _Optik_ . 245, 167753 (2021). 15. Tang, M. Image segmentation technology and its application in digital image processing. in _2020 Int. Conf. Adv. Ambient Comput._ _Intell. (ICAACI)_ . 158-160 [https://doi.org/10.1109/ICAACI50733.2020.00040 (2020). IEEE.](https://doi.org/10.1109/ICAACI50733.2020.00040) 16. Zhang, Y., Pu, J. & Liang, L. On-line detection methods for Printing Image chromatic aberration based on super-pixel. _J. Int. J. Sci._ 4, 67–75 (2017). 17. Xiong, N. in _Multicolored Pattern Segmentation and its Application in Color Quality Control_ . (North Carolina State University, 2023). 18. Zhou, M., Xu, Z. & Tong, R. K. Y. Superpixel-guided class-level denoising for unsupervised domain adaptive fundus image segmentation without source data. _Comput. Biol. Med._ 162, 107061 (2023). 19. Zhang, M. et al. Saliency detection via local structure propagation. _J. Vis. Commun. Image Represent._ 52, 131–142 (2018). 20. Cheng, M. M., Mitra, N. J., Huang, X., Torr, P. H. & Hu, S. M. Global contrast based salient region detection. _IEEE Trans. Pattern_ _Anal. Mach. Intell._ 37 (3), 569–582 (2014). 21. Romero-Zaliz, R. & J. F. Reinoso-Gordo. An updated review on watershed algorithms. _Soft Comput. Sustain. Sci_ . 235–258 (2018). 22. Shen, J. et al. Real-time superpixel segmentation by DBSCAN clustering algorithm. _IEEE Trans. Image Process._ 25, 5933–5942 (2016). 23. Jia, X. et al. Fast and automatic image segmentation using superpixel-based graph clustering. _IEEE Access._ 8, 211526–211539 (2020). 24. Chen, Z., Guo, B., Li, C. & Liu, H. Review on superpixel generation algorithms based on clustering. in _2020 IEEE 3rd International_ _Conference on Information Systems and Computer Aided Education (ICISCAE)_ . 532–537(IEEE, (2020). [https://doi.org/10.1109/](https://doi.org/10.1109/ICISCAE51034.2020.9236851) [ICISCAE51034.2020.9236851](https://doi.org/10.1109/ICISCAE51034.2020.9236851) 25. Sindeev, M., Konushin, A. & Rother, C. Alpha-flow for video matting. Computer Vision–ACCV: 11th Asian Conference on [Computer Vision. 438–452(2012). (2012). https://link.springer.com/chapter/10.1007/978-3-642-37431-9_34#citeas](https://link.springer.com/chapter/10.1007/978-3-642-37431-9_34#citeas) 26. Stutz, D., Hermans, A., Leibe, B. & Superpixels An evaluation of the state-of-the-art. _Comput. Vis. Image Underst._ 166, 1–27 (2018). 27. Achanta, R. et al. SLIC superpixels compared to state-of-the-art superpixel methods. _IEEE Trans. Pattern Anal. Mach. Intell._ 34, 2274–2282 (2012). 28. Wang, L. et al. Learning to detect salient objects with image-level supervision. in _Proceedings of the IEEE Conference on Computer_ _Vision and Pattern Recognition(CVPR)_ . 136–145 (2017). 29. Yang, C., Zhang, L. & Lu, H. Graph-regularized saliency detection with convex-hull-based center prior. _IEEE. Signal. Process. Lett._ 20, 637–640 (2013). 30. Xu, X., Xu, S., Jin, L. & Song, E. Characteristic analysis of Otsu threshold and its applications. _Pattern Recognit. Lett._ 32, 956–961 (2011). 31. Bora, Dibya, J., Anil, K. G. Fayaz, A. K. Comparing the performance of L* A* B* and HSV color spaces with respect to color image [segmentation. https://doi.org/10.48550/arXiv.1506.01472.](https://doi.org/10.48550/arXiv.1506.01472) 32. Hubbard, E. M., Manohar, S. & Ramachandran, V. S. Contrast affects the strength of synesthetic colors. _Cortex_ . 42, 184–194 (2006). 33. Shen, J., Chang, S., Wang, H. & Zheng, Z. Optimal illumination for visual enhancement based on color entropy evaluation. _Opt._ _Express_ . 24, 19788–19800 (2016). 34. Hill, B., Roger, T. & Vorhagen, F. W. Comparative analysis of the quantization of color spaces on the basis of the CIELAB color difference formula. _ACM Trans. Graphics (TOG)_ . 16, 109–154 (1997). 35. Arbelaez, P., Maire, M., Fowlkes, C. & Malik, J. Contour detection and hierarchical image segmentation. _IEEE Trans. Pattern Anal._ _Mach. Intell._ 33, 898–916 (2010). 36. Li, Z. & Chen, J. Superpixel Segmentation using Linear Spectral Clustering. in _IEEE Conference on Computer Vision and Pattern_ _Recognition (CVPR)_ . 1356–1363 (2015). 37. Neubert, P. & Protzel, P. Compact watershed and preemptive slic: On improving trade-offs of superpixel segmentation algorithms. in _22nd international conference on pattern recognition_ [. 996–1001(IEEE, (2014). https://doi.org/10.1109/ICPR.2014.181](https://doi.org/10.1109/ICPR.2014.181) 38. Wang, M. et al. Superpixel segmentation: A benchmark. _Sig. Process. Image Commun._ 56, 28–39 (2017). 39. Tanchenko, A. Visual-PSNR measure of image quality. _J. Vis. Commun. Image Represent._ 25, 874–878 (2014). 40. Hore, A. & Ziou, D. Image quality metrics: PSNR vs. SSIM. in _20th international conference on pattern recognition_ . 2366–2369 [(IEEE, 2010). https://doi.org/10.1109/ICPR.2010.579](https://doi.org/10.1109/ICPR.2010.579) Acknowledgements Funded National Key R&D Plan 2018YBB1309404 Author Unit: Zhejiang University of Technology Special Equipment Manufacturing and Advanced Processing Technology Key Laboratory of the Ministry of Education. Author contributions H. Z. wrote the main manuscript text. Y. S. collected the data and implemented the proposed approach . F. X. guided the manuscript. H. Z., Y. S., L. W., F. X. and L. Z. reviewed the manuscript. All authors discussed the results and approved the manuscript. Funding This research is supported by the National Key Research and development Plan subproject 2018YFB1309404. Declarations Competing interests The authors declare no competing interests. Additional information Correspondence and requests for materials should be addressed to F.X. Reprints and permissions information is available at www.nature.com/reprints. Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain [permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/](http://creativecommons.org/licenses/by-nc-nd/4.0/) [licenses/by-nc-nd/4.0/.](http://creativecommons.org/licenses/by-nc-nd/4.0/) © The Author(s) 2024

섹션 본문 82문단 · 36,628자

(제목 없음)

1We propose an improved superpixel segmentation algorithm based on visual saliency and color entropy for online color detection in printed products.This method addresses the issues of low accuracy and slow speed in detecting color deviations in print quality control.The improved superpixel segmentation algorithm consists of three main steps: Firstly, simulating human visual perception to obtain visually salient regions of the image, thereby achieving region-based superpixel segmentation.Secondly, adaptively determining the superpixel size within the salient regions using color information entropy.Finally, the superpixel segmentation method is optimized using hue angle distance based on chromaticity, ultimately achieving a region-based adaptive superpixel segmentation algorithm.Color detection of printed products compares the color mean values of post-printing images under the same superpixel labels, outputting labels with color deviations to identify areas of color differences.The experimental results show that the improved superpixel algorithm introduces color phase distance with better segmentation accuracy, and combines it with human visual perception to better reproduce the color information of printed materials.Using the method described in this article for printing color quality inspection can reduce data computation, quickly detect and mark color difference areas, and provide the degree of color deviation.

21.An improved Simple Linear Iterative Clustering superpixel algorithm is proposed for color detection in printed images following two new visions: a.Using visual saliency and color information entropy, the image is segmented into regions through superpixel segmentation, with adaptive adjustment applied to salient regions.b.The similarity measure in the traditional clustering process is optimized by incorporating the hue angle distance between pixels, improving label assignment.

32. Color detection in printed images: Based on the improved superpixel algorithm, the superpixel labels and positions of the reference image are obtained.The color information of the corresponding superpixel regions in the test image and the standard image is compared, and superpixel regions exceeding the threshold are marked.The proposed method performs global color detection on the color image and displays the superpixels of the color deviation regions at the corresponding positions in the image.

Method

4The relevant process of the algorithm is shown in Fig. 1.The pre-press image undergoes saliency computation to obtain the saliency map, which segments the foreground and background, resulting in a saliency mask.The original superpixel segmentation algorithm is optimized using the hue-optimized pixel clustering algorithm in Module 1 and the color entropy-based adaptive superpixel size control algorithm in significant regions in Module 2. The improved superpixel algorithm performs superpixel segmentation on the pre-press image, saving the pixel positions and corresponding superpixel label information.

5For post-press standard images, color correction is performed, and for post-press defect images, color correction and registration are carried out.The post-press standard image is a sample image of a qualified print.Pixels at corresponding positions in the post-press image are obtained based on superpixel labels, and the color mean in the LAB color space is calculated for the region.The color difference of the same superpixel block is computed using the color difference formula, and superpixel labels with differences exceeding the threshold are output.The corresponding positions in the post-press image are marked based on the output superpixel labels, and the related color difference information and occurrence positions are saved as a file.

Superpixel clustering

6Since 2009, superpixel technology has been widely applied in the field of computer vision, benefiting from its ability to extract advantageous features to support subsequent tasks.It has found extensive use in various domains such as saliency detection, object detection, semantic segmentation, and image detection.There are numerous types of superpixel segmentation algorithms, including those based on watershed, density, graph theory, clustering, and energy optimization.Research by David Stutz 26 indicates that algorithms based on graph theory, clustering, and energy optimization tend to yield better segmentation results.Graph-based algorithms rely on edge weights in images for segmentation, merging pixels from bottom to top based on color differences, although resulting superpixels may vary in size.Energy optimization segmentation algorithms score highest in boundary recall and under-segmentation rates but exhibit lower uniformity and compactness compared to clustering-based methods.Considering the subsequent need for region color comparison, this paper adopts the mainstream clustering-based algorithm-Simple Linear Iterative Clustering (SLIC) 27 .The steps of the SLIC algorithm are as follows:

7Step 1: Initialization of Cluster Centers.Determine the number of cluster centers based on the pre-set number of superpixels for image segmentation.Suppose the desired number of superpixels is K and the total number of pixels in the image is N. To ensure that each superpixel is of similar size, set the superpixel size to N/K.Distribute the cluster centers uniformly, with a step size l of N/K.

8Step 2: Gradient-Based Adjustment of Cluster Centers.Calculate the gradient values of pixels in the Moore neighborhood of each cluster center.Adjust the position of the cluster center to the pixel location with the minimum gradient value within this neighborhood.This correction ensures that the initial positions of the cluster centers do not fall on image texture locations.

9Step 3: Similarity Search and Label Assignment.Search within a 2l × 2l region around each cluster center.Construct the Euclidean distance metric using the LAB color space and the spatial positions of the pixels.Compare the similarity between the pixels in the region and the cluster center.Update the cluster center position to the location of the most similar pixel within the region and assign the same label to similar pixels 23 .

10(1)

11Where ( L i , a i , b i ) are the color values of a pixel i in the region. (L ce , a ce , b ce ) are the color values of the cluster center.( x i , y i ) and ( x ce , y ce ) are the spatial coordinates of pixel i and the cluster center, respectively.d c is the color distance.d l is the spatial distance.N c represents the maximum color distance in the region.N l = N/K represents the maximum spatial distance in the region.Iterate the above Steps 2 and 3, allowing the cluster centers to converge to more optimal positions.Set the number of iterations to N d .

12In image detection, the choice of the number of superpixels is crucial for better reflecting image information.The non-uniformity in image sizes necessitates adjusting the value of K.In practice, the size of the superpixels is of greater concern, making the determination of l more direct.The parameter N c is used to control the influence of color during clustering and can be adjusted for different images.The optimized distance formula D d is as follows:

13In the formula, m 1 is a weight used to control the relative importance of color similarity and spatial proximity during the clustering process.

Calculation of salient map based on convex hull center

14Print patterns are complex and diverse, including both natural images and artificially created non-natural images, lacking regularity.A bottom-up, data-driven approach to salient object detection is more suitable for print image inspection 28 .This paper uses the saliency region prediction algorithm proposed by Yang et al. 29 to determine the visually salient regions in printed images.Below is a brief description of the implementation process from Ref. 29 .Initially, the image is segmented into superpixels using the SLIC algorithm to capture the underlying structure of the print pattern.Subsequently, the saliency value S co (i) for each superpixel region i in the LAB color space is computed.

15Where j represents all other superpixel regions, c i is the mean color feature of superpixel i in the color space, p i represents the normalized spatial coordinate mean of the region, and σ p is the weight controlling the spatial position relationship.

16Using the convex hull that encloses the points of interest, the centroid of the convex hull is taken as the center.This corrects the error caused by the deviation of the target from the image center in the center prior concept and constructs the saliency value S ce (i) :

17Combining the contrast prior map and the center prior map, the initial saliency map S in (i) is obtained:

18To construct a sparse connectivity graph G s = (V, E) for reflecting the final saliency map, where V is the set of superpixel nodes and E is the undirected link of adjacent superpixels sharing boundaries.The boundary weight W ij of adjacent superpixels is calculated as the smoothness prior, indicating similarity between neighbors, with σ w as the controlling weight:

19Define the saliency cost function E(S).By minimizing E(S) and combining graph regularization, salient objects are highlighted, and the background is suppressed:

20where S (i) and S (j) are the saliency values of regions i and j.Respectively, λ is the regularization parameter.The optimal saliency value S * is obtained by setting the derivative to zero.D is a diagonal matrix, and the elements on the diagonal are d ij = j (W ij ), µ = 1/2λ , I represents region i:

21The visually salient regions in the image are obtained, as shown in the third column of Fig. 2. We used the Otsu 30 method, the threshold is automatically calculated by minimizing intra-class variance and maximizing inter-class variance, distinguishing the foreground from the background in the image, resulting in a binary image of the salient regions, as shown in the fourth column of the Fig. 2. The first column shows images from the BSDS500 dataset, and the second column shows the ground truth segmentation images related to the provided dataset.

Hue optimization clustering

22The LAB color space is a uniform and device-independent color space, with its three components L, A, and B representing brightness, the contrast between green and red colors, and the contrast between blue and yellow colors, respectively.Researchers have found that human perception of color exhibits nonlinear characteristics, showing differences in perception towards different color directions and the existence of the critical region for color discrimination by the human eye 31 .Superpixels only consider the Euclidean distance in the LAB color space when merging pixels of similar colors, ignoring the influence of inter pixel hue differences on similarity.

23Points with the same Euclidean distance in LAB space are often perceived to have more pronounced color differences along the red-green and blue-yellow diagonals compared to non-diagonal positions.When a set of colors transitions across the opposite sides of the color wheel, this change is typically more significant visually 32 , as shown in Fig. 3. Nian Xiong emphasized the importance of hue variations in the distribution of pixels within a sample, suggesting that hue variations have a greater impact than brightness 18 .Therefore, changes in hue have a significant influence on pixel clustering.We improve the SLIC algorithm by incorporating the degree of hue variation into the measurement of pixel similarity during the clustering process.

24The color wheel, also known as the hue circle, places each color along its edge.The visual color difference between cluster centers and pixels is quantified by measuring their distance on the hue circle.This approach aims to better distinguish pixels with the same distance in the original similarity measurement but with hue differences, thereby improving clustering quality and optimizing segmentation boundaries.By obtaining the green-red and yellow-blue components of cluster centers and other pixels in the LAB color space, the hue value discrepancy is calculated.

25In the equation, h ce represents the hue value of the cluster center, A ce is the value of the green-red component of the cluster center in color, and B ce is the value of the blue-yellow component of the cluster center.h co represents the hue value of the non-central pixels in the search space, and likewise, A co and B co represent the values of various color components of the non-central pixels.

26The difference value is quantified based on the angular distance between the hue angles of the two.Since hue angles are circular, with hue representing a full circle, calculating the distance between them directly requires considering two directions.Starting from both the clockwise and counterclockwise directions, the shortest circular distance is obtained as the actual hue angle difference distance.Normalizing this distance ensures that the larger the hue angle difference distance, the larger of hue difference h d between pixels.

Fig. 2.

27Image saliency detection illustration.The first column contains images from the BSDS500 dataset, the second column shows the manually generated saliency segmentation of the corresponding images, the third column displays the saliency detection results obtained by the algorithm, and the fourth column presents the binary saliency map of the saliency image.

28Where ω 1 represents the weight for controlling hue difference.By incorporating the difference in hue between cluster centers and non-central pixels into color space and spatial position measurements, a similarity metric formula D d 2 is formulated for clustering.Parameter m 2 is used to regulate the impact of hue difference.D d 2 replaces D d from Eq. ( 4) to optimize the clustering between pixels.The relevant parameters can be found in Eq. ( 4) of the paper.

29Enhancing the consideration of spatial proximity importance in the clustering process may weaken color similarity.The introduction of the control parameter m 2 enhances the control of pixel color similarity, which is beneficial for balancing the relative relationship between color and space.The increase in m 2 is proportional to the increase in m 1 , with a greater rate of increase needed.

Color information entropy adaptive control of salient regions

30Information entropy is a measure of uncertainty of a random variable.A higher entropy indicates greater uncertainty of the random variable and, consequently, more information contained within it 33 .The richness of colors in an image, as conveyed through color variations, to some extent reflects the amount of information contained in the image.The color entropy can assess the complexity of an image, which is useful in determining the complexity of significant regions of the image content.The richness of region content is determined by the color information contained in significant regions and influences the size of segmented superpixels.Regions with a richer color variety signify richer content, requiring smaller superpixels to cluster pixels with higher similarity.The number of grayscale levels in an image represents the possible colors in the image and is commonly used to describe the color depth or grayscale depth of the image.Grayscale levels can effectively reflect the color richness of an image, serving as a measure of color variety in place of the dimension of color space, thereby reducing computational complexity.The expression for region color entropy E is as follows:

31Where L h represents the number of grayscale levels contained in the significant region.And p i denotes the probability histogram at the i-th grayscale level, recording the number of times a pixel appears at a certain grayscale value i in the image area and calculating its percentage of the total number of pixels.The less color information in significant regions, the closer E approaches 0. Conversely, the larger the amount of color information, the higher E becomes.

32The size of significant regions also reflects the required size of segmented superpixels.For significant regions with a smaller area proportion but rich color information, smaller superpixels are needed to display the pixel relationships within the region.Thus, based on the proportion of significant regions to the whole image, the density of significant regions is determined.When the proportion of significant regions is high.The magnitude of superpixel size reduction is appropriately reduced.As the grayscale levels increase, indicating richer content, smaller superpixels are required.The expression for the size of superpixels in significant regions, A, is as follows:

33In the equation, n represents the number of pixels in significant regions, r is the number of horizontal pixels in the image, c is the number of vertical pixels in the image, and ω 2 is the weight for controlling the size of superpixels, used to adjust the influence of color information entropy.

34Considering that in the actual segmentation process, the superpixel size of non salient regions is artificially controlled, we hope that the superpixel size of salient regions can be adaptively adjusted.

35Figure 4 illustrates an adaptive superpixel segmentation of images based on color information entropy combined with significant regions.In non-significant regions, larger superpixels are utilized for segmentation, while in significant regions, finer segmentation is carried out.

Improved superpixel segmentation for color difference detection in printing images

36For the main objects in the printing industry, such as advertisements and posters, the distinction between foreground and background content in printed images is obvious.The foreground area is characterized by rich color contrasts, complex textures, and constitutes the image content.In contrast, the background area primarily consists of solid colors and gradients.The differences between the two areas make the conventional SLIC algorithm inadequate for printing detection.Using the same superpixel size throughout the whole image poses challenges for color representation.Superpixels represent color homogeneity within regions; larger superpixels may lead to unclear segmentation of foreground content, while smaller superpixels may result in wastage of computational resources for the background.

37To achieve different superpixel segmentation for different regions of an image, considering the characteristics of human visual attention, the detection accuracy of significant regions is enhanced during the color difference detection process.By obtaining the saliency region M of the image, a fixed superpixel size is set for non-significant regions, and the superpixel size for significant regions is adaptively controlled using color information entropy.Due to the low complexity of non-salient regions, the number of iterations N d for superpixel calculation in this region can be appropriately reduced to improve the running speed.The improved superpixel segmentation image, G a (x, y), is constructed as follows:

38Where, S na represents the superpixel segmentation image of the non-significant region, S ya represents the superpixel segmentation image of the significant region.M (x, y) represents each pixel in the salient region M. S na (x, y) and S ya (x, y) respectively indicate the pixel label values in their regions.Minimize the distance between the optimization objective function E 2 for similarity and spatial compactness, assigning pixel labels to the closest cluster center label.

39This formula calculates S ya (x, y).S(x, y) denotes the label of the superpixel region to which pixel (x, y) belongs.C (S( x, y )) represents the cluster center, L (M ( x, y ))denotes the pixel coordinates in the salient region, L (C( S(x, y) )) signifies the coordinates of the cluster center, and ω 3 is the balancing parameter used to balance similarity and spatial continuity.To determine S na (x, y), replace M (x, y) with 1 − M (x, y).The label values of S na (x, y) are assumed to be connected to S ya (x, y).Different images will yield different segmentation results through superpixel segmentation.Iterative clustering may lead to slight differences even in two superpixel segmentations of the same image.By performing superpixel segmentation on standard printing images and retaining the superpixel labels and color information as templates, the color information of the regions is compared with the template for test images.The differences between them reflect the degree of printing color deviation and spatial positioning during the printing process.

40To obtain the mean color of each superpixel in the LAB color space, feature vectors E for the standard image and F for the test image are constructed.The vectors E and F are composed of multidimensional vectors represented as

41where each E i and F i is a three-dimensional vector representing the mean color under the corresponding superpixel.The ∆ Ecolor difference formula in the LAB space D f 2 34 is used to compare E i and F i .The difference D f between the two feature vectors is calculated as follows:

42Where N E i represents the number of pixels in the i-th superpixel of E, and p 1 is any pixel within that superpixel.Similarly, N F i represents the number of pixels in the i-th superpixel of F, and p 2 is any pixel within that superpixel.The term |•| f denotes the norm of the matrix, i is the position in the feature vector, n is the length of the feature vector.g (i) is an indicator function which outputs 1 if D f 2 exceeds a given threshold at position i; otherwise, it outputs 0. Based on the values of i, the superpixel labels are determined, and the edges of the corresponding S (x, y) are marked to indicate problematic superpixel positions in the image.

Experiment Creating datasets and experimental environments

43The experiments described in this paper were conducted on a device equipped with an Intel Core i7-12700 H processor (14 cores, 2.7 GHz) and 16GB of DDR4 memory.The datasets used include the BSDS500 dataset 35 and a custom dataset consisting of 200 digital printing images.The pre-press images in the printing image dataset were sourced from the open-source websites UNSPLASH and Pexels, both of which provide free commercial images.The printed images were collected using an Epson 12000XL scanner.The image format in color detection can be JPG or PNG, but it must meet the requirement that the tested image and the standard image are in the same image format.This article uses JPG format for both.The algorithms discussed in this paper were implemented in C + + and Python, using Visual Studio 2022 Preview and PyCharm Community Edition respectively.

Inkjet printing image color difference detection

44Algorithm 1 is an improved superpixel segmentation algorithm that optimizes segmentation by introducing salient regions, information entropy, and hue angle distance, resulting in more accurate region color segmentation.The color detection steps for inkjet printed images based on this algorithm are as follows:

45Step 1: Use the improved superpixel segmentation algorithm to obtain the superpixel label file of the prepress image and interpolate it to match the size of the post-press image, ensuring that each pixel corresponds to a label value.

46Step 2: Extract the mean color values of the corresponding superpixel regions in both the standard printed image and the test printed image.

47Step 3: Calculate the color difference using Eq. ( 22).The human eye's discernible threshold is set to 6 34 , and superpixel labels exceeding this threshold are identified.

48Step 4: Based on the label values, highlight the boundaries of superpixels with significant color differences, as shown in Fig. 5.The color differences in the L, A, and B components of the superpixel regions are outputted, as illustrated in Table 1.The proposed detection method is intuitive and provides a quantitative description of color deviations in printed images.

49Our detects and marks the color difference areas in the post-press test image, effectively identifying both significant and subtle color differences.The image is compared at different precision levels based on the importance of each region.Figure 5 shows the detection results, verifying the effectiveness of the method.

50Our method records the degree of color deviation in the color difference areas.In the printed image shown in Fig. 5, there are 1,211 superpixel regions with color differences.Identifying these regions is beneficial for subsequent color compensation and correction.Table 1 randomly displays some superpixels in the LAB color space.

51The goal of color difference detection in inkjet-printed images is to identify post-press defect locations visible to the human eye at the maximum discernible threshold, aiding in the control of printing costs.In Fig. 6, it is evident that the color difference in the pink region is difficult to observe with the naked eye, and this area is not detected as a color difference region in (c).By avoiding excessive detection that could lead to increased costs, the color difference detection method proposed in this paper demonstrates accuracy.

52Figure 7 shows a comparison of the results from the proposed algorithm for color defect detection and the latest algorithm from Ref. 4 for printing defect detection.The algorithm in Ref. 4 has issues with accuracy and incomplete detection for global color image color difference detection.In contrast, our method provides higher accuracy in detecting color difference areas and successfully identifies all observable differences.The algorithm in Ref. 14 only offers a similarity result between the test and reference images, while our method intuitively shows the location and magnitude of the color differences.

53When detecting a 2000 × 3000 dpi image, our algorithm takes about 5 s, compared to approximately 960 s for pixel-by-pixel detection and around 16 s for the method from Ref. 14 .Our algorithm offers significantly faster detection speeds.

Ablation experiment

54To validate the feasibility and reliability of the proposed algorithm, we conducted experiments to verify both the implementation results of pixel clustering based on hue and the effectiveness of adaptive superpixel segmentation in significant regions using color information entropy.optimization is an enhancement in the color space, the weight for the correlation between color and spatial position is set to m 1 = 10, and based on empirical formula, m 2 is set to 20.The number of iterations for all experiments is fixed at 10.

55The optimized superpixel clustering based on the hue angle distance in colorimetry demonstrates a more natural performance in regions with gradient and transitional colors.Figure 8 shows the segmentation results of four superpixel segmentation methods, with images on either side of row (a) representing segmentations with different superpixel sizes and row (b) showcasing a local display of the superpixels.

56To validate the feasibility of the proposed hue optimization algorithm, the segmented images obtained by the superpixel segmentation algorithm are evaluated on four metrics 26 : Boundary Recall (Rec), Undersegmentation Error (UE), Explained Variation (EV), and Achievable Segmentation Accuracy (ASA), and compared with three other algorithms (LSC 36 , preSLIC 37 , SLIC 27 ).

57Boundary Recall 38 evaluates the adherence of superpixel boundaries to manually marked boundaries.F N (G, S) and T P (G, S) represent the number of false negative and true positive boundary pixels in the superpixel segmentation S relative to the ground truth segmentation G, respectively.T P (G, S) signifies correct superpixel segmentation, so a higher Rec is better.

Rec (G, S) =

58T P (G,S) T P (G,S)+F N(G,S) (23) Undersegmentation Error (UE) 38 measures the extent of superpixel deviation from the true boundary segmented regions.The ratio of the number of pixels outside the intersection between the superpixel and the ground truth (G) to the number of pixels in the ground truth, where N is the total number of pixels in the image.A smaller UE Bergh (G, S) value is better.Here, S j represents a superpixel and G i represents each ground truth segment.Using argmax returns the index of the corresponding ground truth region, while max only provides a measurement.

59Explained Variation (EV) 26 is used to quantify the quality of superpixel segmentation, independent of benchmark manual annotations, evaluating whether superpixel boundaries can effectively capture color and structure changes in the image.In the formula, µ (S j ) represents the average color of superpixel S j and µ (I) represents the average color of the entire image I.A higher EV(S) indicates better segmentation.x n is the feature value of the nth pixel.

60Achievable Segmentation Accuracy (ASA) 38 represents the intersection of S j and the true segments G i , with higher values being better.SLIC algorithm across all four metrics.OurSLIC, based on SLIC, reduces the envelope of differing pixels as the number of superpixels increases, with the metrics of both algorithms converging.When the number of superpixels exceeds 1000, OurSLIC performs better than the preSLIC algorithm, with the advantage becoming more pronounced as the number increases.The LSC algorithm segments images based on local contrast and similarity of pixels, which generates pixels along image edges and textures, and does not strictly follow a given number of superpixels.In actual comparison, the LSC algorithm segments more superpixel blocks, which is less fair compared to the other three algorithms.This characteristic allows it to achieve higher metrics in Fig. 9(a), (b), and (c).However, as the number of superpixels increases, the metrics of the LSC algorithm fall below those of the algorithm proposed in this paper.The LSC algorithm performs far below the OurSLIC algorithm on the EV metric.Superpixel color is a concentrated representation of regional color and is the main criterion in color detection, making the proposed algorithm more advantageous under this metric.Experimental results demonstrate the reliability of hue angle optimization.

Adaptive segmentation of salient regions based on color information entropy

61In the detection of color differences in printed images, comparing color averages of uniformly sized superpixels can lead to inaccuracies or waste of resources.To enhance the detection accuracy in visually salient regions, it is necessary to partition superpixels more finely in highly colorful and strongly contrasted areas.This experiment verifies that adaptive superpixel segmentation based on color information entropy yields better segmentation performance.

62Figure 10 displays the segmentation results of two algorithms.The upper row shows the original superpixel segmentation images (left) and the color mean of the segmented superpixels (right).The lower row illustrates the adaptive segmentation images and their superpixel color means.From the three sets of images (a, b, c), it is evident that adaptive segmentation better preserves the color and details of the original image, which is crucial for superpixel-based color difference detection.

63Figure 11 demonstrates how color information entropy adaptively determines the superpixel size in salient regions for different initial superpixel sizes.In the figure, l represents the initial superpixel step size, which is used to determine the superpixel size of non-salient regions.The step size i for salient regions is adaptively determined based on the formula and is correlated with l, changing adaptively with l.Additionally, i adapts based on the richness of color in salient regions and the size of these regions.

64The partitioning of salient regions can effectively enhance the recognition of color and detail in images by superpixels.To provide objective metrics for comparison, Peak Signal-to-Noise Ratio (PSNR) 39 and Structural Similarity Index (SSIM) [40] are introduced to compare the color mean images obtained by the two algorithms.(2*µ x *µ y +c 1) *(2*σ xy+c2) (µ 2 x ++c 1) *(σ 2 x +σ 2 y +c 2) (28) µ x and µ y mean intensity values of images x and y, representing luminance, while µ 2 x and µ 2 y refer to the variance in intensity.σ xy measures the covariance between images.c 1 and c 2 are constants.

65In the experiment, the initial superpixel step size was set to l = 12.5.The results of the color mean image obtained using the SLIC algorithm are represented by PSNR1 and SSIM1.The results from the adaptive segmentation algorithm are represented by PSNR2 and SSIM2.We construct new evaluation metrics, NPSNR and NSSIM, to assess our method.If value greater than 1, it indicates that the proposed algorithm performs better than the traditional SLIC method.

Fig. 1 .

66Fig. 1.Workflow diagram of printing color detection method based on improved superpixel segmentation algorithm.

Fig. 3 .

67Fig. 3.The image shows a 24-tonc color wheel.The color differences are more pronounced at the opposite positions on the color wheel.

Fig. 4 .

68Fig. 4. Adaptive segmentation of images based on color information entropy.(a) Displays the original image from the BSDS500 dataset; (b) shows the SLIC segmentation image; (c) depicts the visual saliency map; (d) represents the non-significant region segmentation image; (e) showcases the significant region segmentation image; and (f) displays the adaptive superpixel segmentation image based on color information entropy.

Fig. 5 .

69Fig. 5. Diagram of Inkjet Printing Image Color Difference Detection Results.The top row displays an inkjet printing color defect image (left) and the color difference detection output image (right).The bottom row compares the color difference regions of defect images a, b, and c with the corresponding regions of the standard images e, f, and g, alongside superpixel segmentation highlight images aʹ, bʹ, cʹ.In regions bʹ and cʹ, more detailed comparisons of color differences in significant regions are demonstrated.

Algorithm 1 .

70Improved superpixel algorithm based on visual saliency and color entropy.Feasibility analysis of hue optimizationSuperpixels are used in print detection and post-processing, where uniformity, boundary compactness, and reproduction are crucial.This study integrates hue optimization into superpixel segmentation, naming the optimized algorithm OurSLIC, to verify the method's feasibility and reliability.Considering that hue

Fig. 7 .

71Fig. 7. Comparison experiment diagram of color difference detection.(a) Shows the color difference image, (b) shows the defect detection implemented by the method in Ref. 4 , and (c) is the enlarged schematic of the detected color difference area in (b).(d) Shows the color difference area marked by our algorithm.

Fig. 6 .

72Fig. 6.Color difference area detection diagram.(a) Represents the post-press standard sample, (b) shows the post-press defect sample, and (c) displays the color difference detection sample.The middle section between samples (a) and (b) provides a zoomed-in view of both images, as does the middle section between samples (b) and (c) for sample (c).

EV

73(S) = S j |Sj|(µ (S j )−µ (I)) 2 xn (I(xn)−µ (I)) 2

)Fig. 8 .

74Fig. 8. Local schematic diagram of superpixel segmentation.The first column presents the superpixel segmentation results obtained using the OurSLIC algorithm.The second column shows the segmentation results from the preSLIC algorithm, the third column displays results from the LSC algorithm, and the fourth column provides the segmentation results from the SLIC algorithm.

Fig. 9 .

75Fig. 9.The evaluation results of the superpixel segmentation images obtained by different superpixel algorithms under the BSDS500 dataset across four metrics are presented.(a) Shows the evaluation results under the Undersegmentation Error (UE) metric for the largest boundary annotation (− 0) and the smallest boundary annotation (− 4).(b) Presents the corresponding evaluation results under the Boundary Recall (Rec) metric.(c) Displays the corresponding evaluation results under the Achievable Segmentation Accuracy (ASA) metric.(d) Illustrates the corresponding evaluation results under the Explained Variation (EV) metric.

P SNR = 10 * log 10 M AX 2 IMSE ( 27 )

76MAX represents the maximum possible pixel value in the image, which corresponds to the maximum value of the image bit depth.MSE measures the average squared differences between corresponding pixel values in two images SSIM (x, y) =

Fig. 11 .

77Fig. 11.The size of superpixel segmentation in significant regions is automatically adjusted based on the size of superpixel segmentation in non-significant regions.

Fig. 10 .

78Fig. 10.Adaptive superpixel segmentation based on salient region content.

Fig. 12 .

79Fig. 12. Adaptive superpixel segmentation improves image quality, with the weight m, which controls the relative importance of color and spatial position, varying accordingly.Increasing m helps enhance image quality.However, due to the inherent characteristics of the image content, as m increases, the degree of improvement in segmentation quality becomes inconsistent, and the sample distribution becomes more uneven.

Table 1 .

80Examples of color deviation in superpixel regions.

Table 2

81provides supplementary data for Fig.9(d).

Table 2 .

82Comparing EV benchmark OurSLIC with SLIC.

참고문헌 37건

  1. Comparing the Performance of L*A*B* and HSV Color Spaces with Respect to Color Image Segmentation arXiv (Cornell University) · Cornell University · 2015 10.48550/arxiv.1506.01472
  2. Alpha-Flow for Video Matting Lecture notes in computer science · Springer Science+Business Media · 2013 10.1007/978-3-642-37431-9_34
  3. Superpixel segmentation using Linear Spectral Clustering 2015 10.1109/cvpr.2015.7298741
  4. The new testing and standardized solutions of printing quality &amp;#x2014; PressSIGN intelligent printing production 2012 10.1109/icade.2012.6330123
  5. Comparative analysis of the quantization of color spaces on the basis of the CIELAB color-difference formula ACM Transactions on Graphics · Association for Computing Machinery · 1997 10.1145/248210.248212
  6. Characteristic analysis of Otsu threshold and its applications Pattern Recognition Letters · Elsevier BV · 2011 10.1016/j.patrec.2011.01.021
  7. Automatic visual inspection and defect detection on variable data prints Journal of Electronic Imaging · SPIE · 2011 10.1117/1.3537837
  8. Visual-PSNR measure of image quality Journal of Visual Communication and Image Representation · Elsevier BV · 2014 10.1016/j.jvcir.2014.01.008
  9. Image Quality Metrics: PSNR vs. SSIM 2010 10.1109/icpr.2010.579
  10. Graph-Regularized Saliency Detection With Convex-Hull-Based Center Prior IEEE Signal Processing Letters · Institute of Electrical and Electronics Engineers · 2013 10.1109/lsp.2013.2260737
  11. A Codebook Based Background Subtraction Method for Image Defects Detection 2014 10.1109/cis.2014.154
  12. INSPECTION OF COLOUR PRINTING QUALITY International Journal of Pattern Recognition and Artificial Intelligence · World Scientific · 1996 10.1142/s0218001496000104
  13. Print quality evaluation and applied colour management in coldset offset newspaper print Color Research & Application · Wiley · 2011 10.1002/col.20674
  14. Automatic colour printing inspection by image processing Journal of Materials Processing Technology · Elsevier BV · 2003 10.1016/s0924-0136(03)00534-x
  15. Contour Detection and Hierarchical Image Segmentation IEEE Transactions on Pattern Analysis and Machine Intelligence · IEEE Computer Society · 2010 10.1109/tpami.2010.161
  16. Compact Watershed and Preemptive SLIC: On Improving Trade-offs of Superpixel Segmentation Algorithms 2014 10.1109/icpr.2014.181
  17. Contrast Affects the Strength of Synesthetic Colors Cortex · Elsevier BV · 2006 10.1016/s0010-9452(08)70343-5
  18. SLIC Superpixels Compared to State-of-the-Art Superpixel Methods IEEE Transactions on Pattern Analysis and Machine Intelligence · IEEE Computer Society · 2012 10.1109/tpami.2012.120
  19. Multifractal analysis of three-dimensional histogram from color images Chaos Solitons & Fractals · Elsevier BV · 2010 10.1016/j.chaos.2010.08.003
  20. Color-defect classification for printed-matter visual inspection system 2003 10.1109/wcica.2002.1020137
  21. Optimal illumination for visual enhancement based on color entropy evaluation Optics Express · Optica Publishing Group · 2016 10.1364/oe.24.019788
  22. Real-Time Superpixel Segmentation by DBSCAN Clustering Algorithm IEEE Transactions on Image Processing · Institute of Electrical and Electronics Engineers · 2016 10.1109/tip.2016.2616302
  23. Superpixels: An evaluation of the state-of-the-art Computer Vision and Image Understanding · Elsevier BV · 2017 10.1016/j.cviu.2017.03.007
  24. Superpixel segmentation: A benchmark Signal Processing Image Communication · Elsevier BV · 2017 10.1016/j.image.2017.04.007
  25. An Updated Review on Watershed Algorithms Studies in fuzziness and soft computing · Springer Nature · 2017 10.1007/978-3-319-62359-7_12
  26. Learning to Detect Salient Objects with Image-Level Supervision 2017 10.1109/cvpr.2017.404
  27. Saliency detection via local structure propagation Journal of Visual Communication and Image Representation · Elsevier BV · 2018 10.1016/j.jvcir.2018.01.004
  28. The defect detection of personalized print based on template matching 2017 IEEE International Conference on Unmanned Systems (ICUS) · 2017 10.1109/icus.2017.8278352
  29. Review on Superpixel Generation Algorithms Based on Clustering 2020 10.1109/iciscae51034.2020.9236851
  30. Fast and Automatic Image Segmentation Using Superpixel-Based Graph Clustering IEEE Access · Institute of Electrical and Electronics Engineers · 2020 10.1109/access.2020.3039742
  31. Image Segmentation Technology and Its Application in Digital Image Processing 2020 10.1109/icaaci50733.2020.00040
  32. Detection of oil palm leaf disease based on color histogram and supervised classifier Optik · Elsevier BV · 2021 10.1016/j.ijleo.2021.167753
  33. Global Contrast Based Salient Region Detection IEEE Transactions on Pattern Analysis and Machine Intelligence · IEEE Computer Society · 2014 10.1109/tpami.2014.2345401
  34. Printed label defect detection using twice gradient matching based on improved cosine similarity measure Expert Systems with Applications · Elsevier BV · 2022 10.1016/j.eswa.2022.117372
  35. Superpixel-guided class-level denoising for unsupervised domain adaptive fundus image segmentation without source data Computers in Biology and Medicine · Elsevier BV · 2023 10.1016/j.compbiomed.2023.107061
  36. Design of automated system for online inspection using the convolutional neural network (CNN) technique in the image processing approach Results in Engineering · Elsevier BV · 2023 10.1016/j.rineng.2023.101346
  37. AI and Computer Vision-based Real-time Quality Control: A Review of Industrial Applications Procedia Computer Science · Elsevier BV · 2024 10.1016/j.procs.2023.12.195