Abstract
Aiming at the problem of localised fading features of ancient ceramic decorations and the presence of noise in the image, a dynamic range extension Retinex with a multi-stage watershed segmentation method is proposed: this method enables complete segmentation of locally faded features. Adjusting the contrast of an image by building a Gaussian filter, part of the noise is removed. Combined with the multi-stage watershed segmentation method, a disk-shaped structural element was applied to eliminate excess noise while preserving the integrity of larger structures. The experimental results show the enhancement of ancient ceramic images by the Retinex method with dynamic range extension. The Accuracy rate of ancient ceramic decorations reached 0.929, indicating that the adverse impact of local fading on feature extraction accuracy has been successfully addressed.
Similar content being viewed by others
Introduction
Ancient ceramics, as an important carrier of Chinese culture, not only carry rich historical and cultural connotations, but also, with their exquisite craftsmanship and unique artistic style, they have become a treasure in the treasure house of human art1,2. However, during the preservation of ancient ceramics, various uncontrollable factors such as immature conservation techniques, environmental changes, and natural disasters3,4 have led to varying degrees of damage, including decorative loss and deterioration5,6. At the same time, in the process of collecting images of ancient ceramics, uneven lighting conditions and the complexity of the shooting environment often cause problems such as noise interference and local fading of ornamentation7,8. In order to promote the digital preservation and inheritance of ancient ceramics, machine vision technology is used to extract ancient ceramic patterns. With its powerful image processing, high-precision measurement, and recognition capabilities, machine vision provides a new solution for this task9,10,11. To ensure that ancient ceramic patterns are not affected by strong reflections and to achieve complete extraction, a dynamic range extension Retinex combined with a multistage watershed segmentation method is proposed.
Decorative fading local features refer to the parts of decorative colour in the image becoming shallow, leading to fuzzy details, resulting in the originally clear decorative pattern lines and details becoming blurred, affecting the recognition and extraction of decorative patterns. For such characteristics, many scholars have conducted extensive research in the field of machine vision and image processing. A series of methods have been proposed to identify and optimize this feature and improve the accuracy of image decoration extraction. Wang J et al.12,13 proposed an effective full convolutional network to process colour microscopic images. The corresponding illumination inhomogeneity is corrected by the feature encoder, decoder, and detail supplement modules. A qualitative and quantitative comparison with some relevant methods on real pathological cell images has obtained excellent performance. Liang D et al.14,15 proposed a multi-label learning model MLLNet, based on CNN, used to identify image distortion in different scenes, transform multi-label classification for image distortion recognition into multiple multi-class classification, and train all relevant classifiers simultaneously using the deep multitasking CNN model, the experiment shows excellent performance of the algorithm on multiple databases and flexible adjustability of the model architecture. Yuan J16,17,18 proposed a multi-scale fusion enhancement method to restore the quality of underwater images, addressing the problem of detail texture degradation caused by light scattering and absorption, and achieving both the enrichment of image textures and improvements in the performance of various underwater applications. V. S. Anila et al.19,20 proposed a low-light image enhancement using an extended ResNet model based on Retinex, for improved image quality, Modifying the existing ResNet50 architecture by adding additional layers, to make it compatible with the current target, training using various optimizers, achieved good generalization and efficiency in model convergence, learning speed, and generalization to new data. Wu Y et al.21,22 proposed an improved algorithm for watershed colour image segmentation, used to avoid over-segmentation and reflected light interfering with the image, by obtaining the component gradients of a colour image in a new colour space and using the maximum interclass variance algorithm to automatically obtain the threshold of the final gradient image for segmentation, the experimental results show that the method can obtain accurate and continuous target contours and suppress the meaningless area produced by reflected light. To sum up, the existing technology has achieved certain results in improving the fading of decorative patterns. However, in response to the problem of reflecting shadows on ancient ceramic ornamentation, complex problems such as fading and blurring of patterns, there are still shortcomings in the existing methods of extracting patterns.
In order to achieve high precision extraction of local dilution features of ancient ceramic ornamentation, independently built an ancient ceramic image acquisition device and obtained the image features of ancient ceramics. The input image is preprocessed into grayscale and double precision and a Gaussian filter is applied to smooth the image. By constructing a linear stretch function, the pixel value range of the image is changed to enhance contrast, thus improving the clarity of detailed parts in the image and making originally indistinguishable decorative details more prominent. Create a disk structure element of radius 2 to eliminate noise and small structures in the image, filling holes at the same time; the Sobol operator is used to extract the edge of ancient ceramic decoration, and the distance transform is used to extract the central marker foreground of the foreground region, and then label the connected components. By defining the region area threshold, compare the area threshold of each connected component with the defined region area threshold size to screen and remove non-conforming connected area components, the reserved connected region component is used for the watershed segmentation method. On this basis, this paper first introduces the dynamic range expansion Retinex algorithm, which effectively enhances the contrast of local details by extending the dynamic range of the image, especially with uneven lighting and faded ornamentation, ability to present information more clearly in areas of ambiguous ornamentation. Then by a multi-stage watershed segmentation method, multiple refinements to handle the segmentation process, avoiding the common over-segmentation problem in traditional watershed algorithms. Against complex backgrounds and blurred outlines, still able to accurately segment the target area, and realize the complete extraction of ancient ceramic patterns. The dynamic range extension Retinex and multi-stage watershed segmentation method proposed in this paper solve the problem of traditional image processing in handling complex patterns. At the same time, it provides a new solution for extracting ancient ceramic patterns with local dilution features and offers powerful technical support for the digital protection and inheritance of ancient ceramics.
Methods
Design of ancient ceramic image acquisition platform
To obtain images of ancient ceramics, an independent ancient ceramic image acquisition platform was constructed. The system mainly includes three parts: A, B, and C, part A is an ancient ceramic image acquisition device, part B is the image analysis part, and part C is the image processing part. The details are shown in Fig. 1.
Figure 1A is an image acquisition platform for ancient ceramics, on which the ancient ceramics are placed. By adjusting the distance of the lens from the ancient ceramics and setting the appropriate magnification, to capture clear and detailed images of ancient ceramics. The light shines on the surface of ancient ceramics. Then the position knob is turned to adjust the lens and ceramics to the correct height, and the Shoot button is pressed to get the ancient ceramic image into the image memory, at the same time, the image is viewed through the display screen of the microscope and the subsequent image analysis and image processing are carried out. Figure 1B shows the images of ancient ceramics. To analyze these images, it should be noted that ancient ceramics have a smooth surface, light to the surface, and some of the patterns on ancient ceramics reflect light, making some of the details difficult to capture on camera. As a result, the information in some key parts of the image presents a partial dilution effect. Figure 1C shows the process of extracting ancient ceramic patterns, including ancient ceramic image enhancement and ancient ceramic image segmentation. Ancient ceramic images can be accurately acquired through the construction of the acquisition platform, its presence is characterized by local dilution of ornamentation, design image enhancement segmentation method, achieve accurate extraction of ancient ceramic patterns.
Analysis of image features of ancient ceramics
In order to study the influence of local information dilution in the extraction process of ancient ceramic patterns, which reduces the precision of complete pattern extraction, the ancient ceramic images are deeply analyzed. Detailed feature analysis is shown in Fig. 2. It is mainly divided into three parts: original image of ancient ceramics, feature analysis, and colour visualization analysis.
A Raw image showing typical ceramic features. Panel B presents the local feature analysis of ancient ceramics (b1 - b3). b1 Background feature affected by shadow and noise. b2 Faded pattern due to surface reflection. b3 Missing pattern from ceramic damage. Panel C presents the visualization analysis (c1, c2). c1 Intensity curve highlighting faded and intact regions. c2 3D visualization of gray scale intensity to localize features.
Figure 2A shows the image of ancient ceramics. Figure 2A includes four parts: missing feature, fading feature, outline of porcelain plate, and background. Figure B(b1-b3) shows the detailed features, observe Figure (b1) for the background features of the ancient ceramic images, the edges of the ancient ceramics are partially shadowed by the light source, and some noise, it needs to be eliminated by image processing, in this paper, the method of filling holes is constructed to extract the contours of porcelain discs. Figure (b2) shows the pattern fading features of ancient ceramics due to uneven lighting during image capture; some of the patterns are not captured by the camera due to the reflection on the surface, therefore, some of the patterns in the image will produce the feature of local dilution. Ancient ceramics have a long history from ancient times to the present day, and environmental factors and inadequate conservation techniques in preservation resulting in the absence of ancient ceramics to a certain extent, the missing features are shown in Figure (b3). Figure C shows the feature visualization analysis, Figure (c1) shows the information curve of the ancient ceramic image profile, the X-axis represents the pixel coordinates, and the Y-axis represents the pixel values. The blue arrow area with concentrated and gently varying gray value distribution is the background information of the ancient ceramic image; the yellow dashed box is the decoration information, the red box is the decoration fading information, the curve is smoother, and the orange box is the missing information. Figure (c2) shows the 3D cloud image of the ancient ceramics, (X, Y) are the pixel coordinates of the ancient ceramics image, and the Z-axis is the grey scale value. The span of the ancient ceramic decoration on the X-axis is about [600,3100], and the span on the Y-axis is about [1400,3800]. Some obvious protrusions in the Figure are the noise of the ancient ceramic image, and the gray value of the faded information area is about 210. The poor quality of the ancient ceramic images, the low contrast between the faded areas of the decoration and the background, and the noise accompanying the images affect the segmentation of the decoration by traditional methods. Consequently, a significance analysis of the extraction effect of decorations in different regions of ancient ceramic images is conducted. In this paper, we choose a non-parametric statistical test with high robustness to accommodate image characteristics with non-normal data distribution and high noise interference, thereby enhancing the reliability and robustness of statistical inference. By characterization, selected Retinex enhanced comparison histogram equalization, capable of separating light components, resolving fading due to reflections, no amplification of noise; Selection of a multi-stage watershed split comparing traditional methods (CLAHE), can close holes automatically, and no clumping artifacts, consequently, the model is more adaptable and robust in dealing with the complex features of ancient ceramic images, such as faded decoration, missing edges, and noise interference.
Local fading feature extraction process of ancient ceramic decoration
In order to accurately extract the ancient ceramic decorations, we propose a local fading feature extraction method, the detailed process of which is shown in Fig. 3 as a flow chart. The method is mainly divided into four parts: A, image input preprocessing; B, dynamic range extension Retinex; C, multi-stage watershed segmentation; and D, ancient ceramic decoration extraction.
Figure 3A shows the input image, after gray-scale and double-precision preprocessing of the input image, Fig. 3B shows the dynamic range extension Retinex, which creates a Retinex function to adjust the three parameters of standard deviation, gain, and offset, and set a Gaussian filter to smooth the image, by building a linear stretch function to adjust the brightness and contrast of ancient ceramic images, change of ancient ceramics image pixels, after linear stretch of image contrast enhancement, are more likely to distinguish between grain and image background. Figure 3C Multi-stage watershed segmentation, adaptive threshold segmentation is carried out on the enhanced image to extract most of the patterns, but there are still some small noises in the image. By constructing a disk structure element with a radius of 2, small noises and incomplete segmented areas are eliminated and filled. The Sobel operator is used to calculate the gradient magnitude of the binary image to identify the edge of the grain, and the distance transformation is used to mark the foreground region and connected components. According to the set area threshold, the large connected components are selected to remove the small regions, the watershed method is constructed to obtain the final segmentation image. Figure 3D shows the extraction of ancient ceramic decoration, due to the uneven light in the shooting process of ancient ceramics, there are shadows on the edge of the ancient ceramics. To solve this problem, the porcelain plate background of ancient ceramics is extracted first, and the final segmentation map of ancient ceramic decoration is obtained by matrix subtraction through the segmented image and the filled porcelain plate map.
The dynamic range extended Retinex method is used to enhance the ancient ceramic image by reducing the impact of local fading features and eliminating noise. Multi-stage watershed segmentation can mark the foreground and background of ancient ceramic images, while filling the incompletely segmented parts with morphological expansion and eliminating redundant noise, so as to realize the extraction of ancient ceramic decoration. Based on Retinex dynamic range extension and multi-stage watershed segmentation, the process design of the local dilution feature extraction method for ancient ceramic decoration was completed.
Construction of the Retinex model for dynamic range extension
In order to highlight the detailed features of the localised faded areas of the ancient ceramic decoration, the dynamic range expansion Retinex method was employed. The method combines the principles of image enhancement and visual coherence, and is able to effectively deal with the problem of uneven illumination and low contrast of decorations in ancient ceramic images, suitable for extracting information about faded ornamentation that has blurred edges and low local contrast. The Retinex model of dynamic range extension consists of three parts. A is a Gaussian filter, and a Gaussian filter is constructed for image denoising processing. B is a linear transformation, and the contrast is linearly transformed by gain and offset to enhance the details of the image. C is a contrast adjustment step, where contrast enhancement makes the details of the image more prominent. The detailed flow chart is shown in Fig. 4 below.
As in Fig. 4A, the width of the image grain features is approximately 114 pixels, at least 228 × 228 kernels are required by Nyquist’s theorem, taking 4 times the safety factor gives 961 × 961 kernels, using separable convolution (splitting a 2D convolution into two 1D computations) reduces the time complexity from O(N2) to O(2 N), and noise suppression and grain continuity are better than 481 × 481 kernels. The input ancient ceramic image is smoothed by creating a Gaussian filter with a Gaussian kernel of 961 × 961, removing high-frequency noise and fine uncorrelated textures from the image. The Gaussian filtered image is then subjected to the calculation of the logarithmic ratio of each pixel value to the mean value of its surrounding region, to separate out the light and reflection components as well as to reduce the effect of light on the image and enhance the grain of the image. Figure 4B shows a linear transformation to construct a linear function and dynamically adjust the three key parameters: standard deviation, gain, and offset, according to the image requirements, enhances image details and highlights localised fading textures in the image, at the same time as adjusting the brightness of the whole image. Figure 4C shows the introduction of linear stretching, where contrast enhancement of the image is achieved by changing the range of pixel values in the image, concentrating the pixel values around 150 to enhance the contrast of the image, at the same time, linear stretching improves the clarity of the detailed parts of the image, making the details of the ornamentation, otherwise more difficult to distinguish, stand out more prominently, it makes the hierarchy of the whole image more distinct and lays a good foundation for the subsequent accurate extraction of decorations in ancient ceramic images. In the final output of the enhanced image, the overall image contrast is high, and the local details of the decorations are clearer, so the originally faded decorative part is enhanced.
The dynamic range extension model is constructed through three main processes: Gaussian filtering, linear transformation, and adjusting contrast. This process eliminates extraneous noise and enhances image contrast, as well as enhancing otherwise faded textures. The dynamic range of Retinex is able to dynamically adjust the enhancement according to the needs of the image.
Retinex is a method of retaining the essence of an image by separating the illuminating and reflecting components of an image and reducing the reflecting component. The dynamic range extension Retinex method performs adaptive enhancement by dynamically adjusting to the image. This results in more effective image enhancement to better preserve image details and edge information. Gaussian filtering is applied to the input image with the following formula:
Among them, \(h(\sigma )\) is a Gaussian kernel with standard deviation \(\sigma\) denotes the convolution operation, I1 is the Gaussian filtered image and I is the original image. Contrast transformations and ratio calculations are performed to separate the light and reflection components, using a logarithmic transformation to calculate the ratio of each pixel value to the average value of its surrounding area. The formula is as follows:
Among them, log() is a natural logarithm; the +1 in the formula is to avoid zero-value problems in logarithmic operations. This operation enhances the reflective component of the image and reduces the light component. The formula for linear enhancement is as follows:
Among them, gain is the amount of gain and offset is the amount of offset. The gain and offset in Eq. (4) are calculated automatically by dynamic range mapping: the pre-segmented region of ornamentation (ROI) is first extracted, linearly mapping 98% of its pixel value range to [0,255].
Coupled multi-stage watershed segmentation approach
A multi-stage watershed segmentation method is created to achieve the extraction of localised fading information of ancient ceramic decorations. The method is based on the gradient map of images to simulate the water flow process. By treating images as terrain, the water spreads from the lowlands to the highlands, and the final result is a different segmentation area. In the treatment of ancient ceramic decoration, the method has good boundary detection capability and region separation effect, especially suitable for image scenes with blurred outlines of grain, uneven lighting, and complex backgrounds. Through a phased approach, it can effectively suppress the common over-segmentation problem in traditional watershed algorithms, and enhance the identification of target areas. The multi-stage watershed segmentation method is divided into four main parts. Part A is for morphological processing, part B is for labelling the foreground, part C is for distance transformation, and part D is for screening the connectivity components. Details are shown in Fig. 5.
As shown in Fig. 5A, the threshold is dynamically adjusted by analyzing the pixel values in the local window. Adaptive thresholding segmentation of enhanced images accommodates uneven lighting or complex backgrounds by separating the foreground from the background. Disc structural elements of radius 2 were constructed for morphology, eliminating excess noise points along with preserving the shape of larger structures and removing connected regions with an area of less than 100. Figure 5B shows the labelled foreground, and the Sobel operator is used to detect the edges of the images after morphology and extract the edge information of the ancient ceramic decorations. Figure 5C shows the distance transform, generating a distance map by calculating the Euclidean distance from each pixel value representation to the nearest background pixel, thus extracting the centre-marked foreground of the foreground region. Figure 5D shows the screening and removal of connected components, marking the connected components in the binary image, with different colours representing different connected components, the smallest effective grain of ancient ceramics occupies at least 220 pixels in the image (approximately 1 mm x 1 mm), set 220 pixels as the area threshold; spots smaller than this threshold are considered noise. The area of each connected component is compared with the set threshold, removing those smaller than 220 and retaining those larger. The screened connected component regions are used for subsequent binary images, and watershed segmentation splits neighbouring foreground regions into separate regions. In the process of morphological processing, the formula is as follows:
Among them, C is a disc structure element of radius 2, \(\ominus\) indicating morphological corrosion and \(\oplus\) morphological expansion. Edge detection is performed on the morphologically processed image.
Among them, Ix and Iy are the gradients of the image in the x and y directions, hx and hy are the horizontal and vertical kernels of the Sobel operator, and G is the output gradient magnitude image. For distance transformations for calculating Euclidean distances for gradient magnitude images, a distance map is generated and the formula for the distance transformation is as follows:
Among them, D(x,y) is the distance from the foreground pixel to the nearest background pixel, xb, and xb are the horizontal and vertical coordinates of the image, respectively, and B is the set of background pixels. Watershed segmentation is performed on the image with the following formula:
Among them, Rl is the region corresponding to the watershed marker and \(\Vert \nabla D(x,y)\Vert\) is the gradient of the distance map.
Environment configuration
For proper operation of the dynamic range extension Retinex with multi-stage watershed splitting, the following environment configurations will be set for the experiments in order to accurately extract the ancient ceramic decorations. The experimental configuration includes four parts: image resolution, hardware configuration, software configuration, and software parameters. The detailed environment configuration is shown in Table 1 experimentally relevant parameters and parameter values.
The resolution of the image used in this paper is 5760px × 3840px, requiring larger memory and computational resources to run the image. The running environment is MATLAB, software integrated with powerful functions such as numerical analysis, matrix calculation, and scientific data visualization, mainly used in the fields of data analysis, image processing, and signal processing23. Origin is a plotting, data analysis software to support a variety of 2D or 3D graphics. In this experiment, the required images and data were acquired by running and debugging the code in MATLAB, transferring the obtained images and data to Origin for visualization, drawing the effect diagram, and more intuitively obtaining the results after dynamic range extension, Retinex and multi-stage watershed segmentation processing.
Evaluation indicators
In order to ensure the accuracy of the experimental results, four enhancement metrics24, namely PSNR, SSIM, RMSE, IFC, and four segmentation metrics25, namely Accuracy, Precision, Recall, and F1-Score, are used to comprehensively evaluate the experimental results.
Enhancement of evaluation indicators: PSNR is a metric used to measure the quality of an image by comparing the difference between the enhanced image and the original image. A higher value of PSNR indicates a higher-quality image. SSIM is a measure of the similarity of two images. It takes into account the brightness, contrast and structural information of an image and is a more comprehensive metric for image quality assessment. RMSE is a measure of the image enhancement error. By calculating the RMSE between the original image and the enhanced image, a smaller RMSE indicates a smaller error. IFC is a measure of the ability of an image enhancement method to retain the original image information during processing, with higher values indicating more retained information and better image enhancement. The formula is as follows:
Among them, MAXI is the maximum of the pixel values of the image and MSE is the mean square error between the images. \(\mu x\) and \(\mu y\) denote the mean of x and y, respectively, \({\sigma }_{x}^{2}\) and \({\sigma }_{y}^{2}\) denote the variance of x and y, respectively, \(\sigma xy\) denotes the covariance between x and y, and c1 and c2 are constants used to stabilize the division operation: c1 = (K1L)2, c2 = (K2L)2. Usually, K1 = 0.01 and K2 = 0.03. L is the dynamic range of the pixel value. M, N denote the length and width of the image, g(i,j) and f(i,j) denote the enhanced image and the original image, respectively. I is the original image, K is a distorted image, N is the noise image, I(I; K) and I(K; I) denote the mutual information between I and K.
Segmentation of evaluation indicators: Accuracy, Precision, Recall, and F1-Score are the main segmentation evaluation metrics and are calculated as follows.
Among them, TP denotes the total number of pixels accurately recognized and segmented as the target object, FN denotes the number of pixels belonging to the target object mistakenly segmented as the background, FP denotes the total number of background pixels mistakenly recognized and segmented as the target object, TN denotes the total number of pixels accurately recognized as the background.
Results
Dynamic range extension Retinex enhancement effect graphs
For a more intuitive analysis of the effect of dynamic range extension Retinex on the enhancement of localised texture fade features, a comparative analysis is carried out between the original images of ancient ceramics and the dynamic range-extended Retinex-enhanced images with different visualizations. The image is divided into two parts, A and B. Part A is the histogram comparison analysis of ancient ceramics, and part B is the profile comparison analysis, the detailed enhancement effect is shown in Fig. 6.
Panels A and B denote the two main parts of Fig. 6: Panel A shows the histogram comparison (a1, a2), and Panel B shows the profile comparison (b1, b2). a1 Histogram of original image shows broad, low contrast values. a2 Histogram after enhancement shows peaked, high contrast values. b1 Profile analysis of unenhanced image shows weak faded features. b2 Enhanced profile shows smoothed contrast and clearer fading.
Figure 6A shows the histograms of the original ancient ceramic image and the Retinex-enhanced image. The solid red line depicts grey value changes, with the x-axis representing grey values and the y-axis representing pixel counts. Figure 6a1 shows the original histogram, where grey values peak near 155, are broadly distributed, and lack significant contrast, resulting in fewer details. Figure 6a2 shows the enhanced histogram, with values concentrated near 150, forming a distinct peak and clearer contrast between background and ornamentation. Figure 6B shows the image profile after dynamic range extension Retinex enhancement, with 4.061 and 5.251 as the baseline of the profile on the x-axis, respectively, forming the contour profile of the ancient ceramic image. Figures (b1) and (b2) show profile curves, with the horizontal coordinates of the profile curves being the pixel coordinates of the image, and the vertical coordinates being the pixel values corresponding to the pixel coordinates. In the Figure, the curve on both sides of the purple dotted line is smooth with small fluctuation, representing the region without decoration in the background of the image, and the curve in the middle of the two purple dotted lines has larger fluctuation, for the region of ancient ceramic decoration. The solid red line in the interval from 5.2 to 6.3 is the area of texture fading, and the texture fading area of the original image is raised, indicating a more pronounced fading of the texture, after enhancement, the image texture fading area is smooth and the texture fading is well improved. The solid blue line indicates a profile line at an x of 5.251, with the area of missing ornamentation changing from smooth to concave, making the difference in detail in the image more pronounced, the curve of the background area in the original image shows a downward trend, indicating that the contrast of the image is not high. By enhancing the curve, it becomes flat, increasing the brightness of the image and enhancing the contrast at the same time. The analysis of the overall histograms and profiles shows that they are enhanced by the dynamic range extension Retinex method, the contrast of the ancient ceramic image is enhanced, the distinction between the background area and the decorated area is more obvious, and the local fading of the decoration is effectively enhanced. The method in this paper combines the advantages of traditional and deep learning methods, separation of reflections by dynamic range extension of the Retinex method, and dramatic increase in contrast of lightened grain.
Multi-stage Watershed Segmentation Effects
The multi-stage watershed segmentation approach is based on hierarchical progressive refinement of the segmentation strategy, which enables effective suppression of over-segmentation, improved recognition, and extraction of localised faded regions under conditions of blurred pattern contours and complex backgrounds. In order to show the effect of the multi-stage watershed segmentation method for extracting localised fading of ancient ceramic decorations, the original method and the method proposed in this paper will be applied to the extraction of ancient ceramic decorations, respectively, and the segmentation effect will be compared. The effect diagram is divided into three parts: Part A shows the result diagrams of the two methods for extracting ancient ceramic ornaments, Part B presents the comparison of the four segmentation indexes of the two methods, and Part C illustrates the comparison of the segmentation effects of the two methods in the local analysis of ornament fading regions. The detailed effect is shown in Fig. 7.
Panel A shows the extracted results (a1, a2). a1 Original method result shows incomplete extraction. a2 Proposed method result captures more complete patterns. B Bar chart comparison of four segmentation metrics (accuracy, precision, recall, F1-score). Panel C shows the localised faded region comparison (c1, c2). c1 Local view with original method shows loss in faded region. c2 Proposed method preserves faded pattern information.
Figure 7a1 and a2 show the resultant images segmented from the enhanced images of ancient ceramics by the original method and the method in this paper, respectively. Figure 7B shows the comparison of the four segmentation evaluation indexes of the original method and the method of this paper for the segmentation of ancient ceramic decorations, the four metrics are Accuracy, Precision, Recall, and F1-Score, all four metrics reflect the quality of the segmentation result, and the larger the value, the better the segmentation effect is. All four metrics of the original method are smaller than the method in this paper, the Accuracy of the method in this paper is 0.928, 0.185 higher than the original method, its Accuracy is 0.933, 0.027 higher than the original method, the Recall is 0.992, 0.191 higher than the original method, and the F1-Score is 0.962, 0.111 higher than the original method, showing the optimization of the original method, multi-stage watershed segmentation method achieves good segmentation results. Figure 7C shows the comparison of the segmentation effect of the original method and the method in this paper on the localised texture fading region, the tattoo in the blue box in the lower right corner is the faded area after zooming in on the two methods of segmentation at a 7:1 scale. Figure (c1) shows the localised texture fading segmentation of the original method, observe a localised magnified image of the original method (in the blue box enlarged at 7:1), missing tattoo information in faded areas, Figure (c2) shows the localised texture fading segmentation of the method in this paper, the method in this paper can more accurately identify and segment the boundary of the fading region, more complete decorative information in faded areas, better preservation of the details of the ornamentation. By comparing the difference between the original method and the method in this paper in the effect of localised texture fading area segmentation, the multi-stage watershed segmentation algorithm proposed in this paper has better segmentation results for the extraction of ancient ceramic decoration, with Accuracy, Precision, Recall, and F1-Score reaching 0.928, 0.933, 0.992 and 0.962, respectively. The multi-stage watershed algorithm improves the segmentation accuracy of ornamentation, as well as preserved detail and ornamentation information. Compared with deep learning methods, the multi-stage watershed segmentation algorithm is more suitable for small-sample scenarios.
Analysis of performance indicators of different enhancement methods
In order to analyze and compare the effects of the dynamic range extension Retinex method on the enhancement of localised fading features in ancient ceramic decoration, the ancient ceramic images were enhanced with dynamic range extension Retinex, two-dimensional adaptive gamma correction, Fourier transform homomorphic filtering and nonlocal mean filtering enhancement, respectively. A comparative analysis of performance metrics is carried out, as detailed in Table 2.
The enhancement metrics are PSNR, SSIM, RMSE, and IFC, respectively. The PSNR reflects the degree of distortion in the image, with larger values indicating lower distortion. The SSIM reflects the similarity between the enhanced image and the original image. The closer the value is to 1, the more similar the two images are. RMSE reflects the degree of deviation of the image; the smaller the value, the higher the quality of the image. IFC reflects the degree of information retention before and after enhancement, with higher values indicating less information loss. In the comparison of the four different enhancement methods, the dynamic range extension Retinex had the highest PSNR and SSIM, the PSNR is 21.82, which denotes the ability to fuse spatial distance with chromatic similarity, make light estimation error lower, effectively suppresses image noise; SSIM is 0.98, it is shown that the method enhances the contrast of the tattoo while at the same time, the overall structural consistency of the image is still well maintained. The RMSE is only higher than the nonlocal mean filtering, with some degree of brightness shift in the enhancement process; however, a better balance is achieved in terms of balancing the enhancement effect with error control. It has the lowest information fidelity and introduces linear stretching in the enhancement process, resulting in a linear transformation of the image pixel values. To extend the grey level range of the image, the larger linear stretching causes a slight loss of information in the image, resulting in lower information fidelity. In summary, the dynamic range extended Retinex enhanced images have better detail retention, high contrast, and structural similarity.
Comparative analysis of different segmentation methods for feature extraction of ancient ceramics
In order to provide a more intuitive comparison the performance of the multi-stage watershed segmentation method proposed in this paper with other segmentation methods in terms of extraction accuracy, the values of the four segmentation evaluation indexes and the comparative analysis of the segmentation results are given. The other two segmentation methods are the Otsu method and the maximum entropy method. This effect analysis comparison chart is divided into two parts, part A is the comparison chart of the four segmentation indexes of the three segmentation methods, Part B shows the result charts extracted by the three methods, as well as the local zoom analysis charts. The detailed effect comparison diagram is shown in Fig. 8.
A Radar chart comparing performance of watershed, Otsu, and max entropy segmentation. Panel B shows the visual comparison of segmentation results for the three methods: b1 Watershed method retains more faded detail. b2 Otsu segmentation misses fine features in faded area. b3 Max entropy shows fragmented or incomplete pattern.
Figure 8A shows a comparison of the four segmentation metrics for the three segmentation methods, with blue folds, orange folds, and yellow folds representing the multi-stage watershed approach, the Otsu method, and the maximum entropy method, respectively. The four metrics are Accuracy, Precision, Recall, and F1-Score, and all four metrics are as large as possible. Among them, the multi-stage watershed approach was the highest in Accuracy, Precision, and F1-score, reaching 0.92854, 0.93345, and 0.96218, respectively. The Recall is only 0.00713 smaller than Otsu’s method and 0.00486 smaller than the maximum entropy method. The recall is relatively low due to the fact that the method in this paper sets a high threshold to accurately extract the ornament, but results in some of the ornament being misclassified as background. Localised fade feature extraction for ancient ceramic decorations is prioritized to ensure the integrity of key features. The method in this paper is significantly ahead in terms of Precision, and Recall is a reasonable tradeoff for small sacrifices. Figure 8B shows a map of the texture extraction results of three different segmentation methods, as well as a map of the faded information region locally zoomed in at 16:1. Figure (b1) shows the multi-stage watershed segmentation method with complete segmentation information in the locally zoomed-in faded information region and full overall information. Figure (b2) shows the Otsu method, with severe missing segmentation and excessive white space in the locally zoomed-in faded information region. Figure (b3) shows the maximum entropy method, with local segmentation of discontinuities in a locally zoomed-in region of faded information. In summary, the multi-stage watershed segmentation method proposed in this paper can well preserve the details of the ornamentation and the ornamentation information. In this paper, the multi-stage watershed segmentation method combined with the dynamic range extension Retinex enhancement method removes irrelevant noise from images of ancient ceramics and improves the contrast of the images. At the same time, the details of the decoration and the local fading information are enhanced, so the precision of the segmentation of the ancient ceramic decoration is well improved. Although modern deep learning methods (e.g., SAM) perform well in generalized scenarios, there are still special challenges with antique ceramic images, for example, professional grain labelling requires archaeologists, and the costs are too high; Surface reflections during shooting cause blurring of grain and limitations of GPU hardware. Compared with this, the method in this paper can be better adapted to ancient ceramic image grain extraction.
Discussion
This paper proposes a local fading feature extraction method for ancient ceramic decoration. The method is based on dynamic range expansion Retinex with multi-stage watershed segmentation. To address the characteristics of ancient ceramic images with noise and localised pattern fading, the method sets a Gaussian filter to smooth the image, adjusting the brightness and contrast of ancient ceramic images by constructing a linear stretching function. The method compares the area of each connected component with a set threshold and filters out smaller components and removing connected components that are smaller than a set threshold, improved accuracy of pattern extraction. Experimental evidence shows that the method proposed in this paper is more complete and accurate in pattern extraction, an Accuracy of 0.92854 was achieved. In this paper, the method enhances the local fading information of the decoration while preserving the detailed information of the decoration, overcoming the problem of localised fading of ornamentation on the extraction of ancient ceramic ornamentation.
The method studied in this paper provides an effective solution for the extraction of localised faded feature images of ornamentation. However, in image segmentation with high-intensity light exposure, extremely severe reflection, and high noise in the image background, existing methods still require further optimization. Subsequent research will focus on improving the accuracy of the algorithm to extract the ornamentation, especially in the harsh environments described above, further improvements of segmentation accuracy and algorithm adaptation are required.
Data availability
The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.
Code availability
Not applicable.
References
Niu, C. & Zhang, M. Using image feature extraction to identification of ancient ceramics based on partial differential equation. Adv. Math. Phys. 2022, 3276776 (2022).
Jin, X., Wang, X. & Xue, C. Nondestructive characterization and artificial intelligence recognition of acoustic identifiers of ancient ceramics. Herit. Sci. 11, 144 (2023).
Hoo, Q. et al. Microstructure and coloring mechanism of iron spots on bluish white porcelain from Jingdezhen of the Song Dynasty. J. Eur. Ceram. Soc. 41, 3816–3822 (2021).
Altimari, F. et al. Comparative life cycle analysis between commercial porcelain stoneware and new ones designed by using volcanic scraps. Sci. Total Environ. 930, 172836 (2024).
Li, X. et al. Maximization of the blue-white contrast of ancient porcelain decorations from Jingdezhen imperial kiln by Co-spinel formation. J. Eur. Ceram. Soc. 44, 6697–6707 (2024).
Ning, X. et al. Tenglong Yuan blue and white texture extraction method based on adaptive gamma correction and K-means clustering segmentation coupled algorithm. J. Aust. Ceram. Soc. 60, 1–11 (2024).
Fan, J. et al. Multi-scale dynamic fusion for correcting uneven illumination images. J. Vis. Commun. Image Represent. 97, 103978 (2023).
Yu, Y. et al. Automatic thresholding method for high-throughput digital polymerase chain reaction fluorescence images with uneven illumination. J. Electron. Imaging 31, 023041–023041 (2022).
Ren, Z. et al. State of the art in defect detection based on machine vision. Int. J. Precis. Eng. Manuf. -Green. Technol. 9, 661–691 (2022).
Wang, B. et al. Extraction and classification of apple defects under uneven illumination based on machine vision. J. Food Process Eng. 45, e13976 (2022).
Zhang, Y. et al. Progress of machine vision technologies in intelligent dairy farming. Appl. Sci. 13, 7052 (2023).
Wang, J. et al. Correction of uneven illumination in color microscopic image based on fully convolutional network. Opt. express 29, 28503–28520 (2021).
Khan, R. et al. Lit me up: A reference free adaptive low light image enhancement for in-the-wild conditions. Pattern Recognit. 153, 110490 (2024).
Liang, D. et al. Deep multi-label learning for image distortion identification. Signal Process. 172, 107536 (2020).
Borkar, T. S. & Karam, L. J. DeepCorrect: Correcting DNN models against image distortions. IEEE Trans. Image Process. 28, 6022–6034 (2019).
Yuan, J., Cai, Z. & Cao, W. TEBCF: Real-world underwater image texture enhancement model based on blurriness and color fusion. IEEE Trans. Geosci. Remote Sens. 60, 1–15 (2021).
Wang, W. & Su, C. An optimization method for motion blur image restoration and ringing suppression via texture mapping. ISA Trans. 131, 650–661 (2022).
Alenezi, F. et al. Reverse gamma correction based GARCH model for underwater image dehazing and detail exposure. Expert Syst. Appl. 232, 120856 (2023).
Anila S. V., Nagarajan G. & Perarasi T. Low-light image enhancement using retinex based an extended ResNet model. Multimedia Tools and Applications, 2024, (prepublish): 1–16.
Li C. & He C. Variable fractional order-based structure-texture aware Retinex model with dynamic guidance illumination. Digital Signal Process., 2025, 161105140-105140.
Yanyan, W. & Qian, L. The Algorithm of watershed color image segmentation based on morphological gradient. Sensors 22, 8202–8202 (2022).
Chandana, K. & Abhijit, M. A Novel Radial Kernel watershed basis segmentation algorithm for color image segmentation. Wirel. Personal. Commun. 133, 2105–2124 (2024).
Altuntas, C. & Tunalioglu, N. GIRAS: an open-source MATLAB-based software for GNSS-IR analysis. GPS Solut. 26, 16 (2022).
Nandhini B. & Sruthakeerthi B. Investigating the quality measures of image enhancement by convoluting the coefficients of analytic functions. Eur. Phys. J. Special Top. 1–11. (2021).
Cai, S., Xiao, Y. & Wang, Y. Two-dimensional medical image segmentation based on U-shaped structure. Int. J. Imaging Syst. Technol. 34, e23023 (2024).
Acknowledgements
This study is sponsored by the projects funded by the National Natural Science Foundation of China under Grant No. 51964022 and the Science and Technology Research Project of Jiangxi Provincial Department of Education “Research on Digital Restoration Methods of Yuan Blue-and-White Porcelain Ornaments with Complex Features”, to which the authors are very grateful. The authors also sincerely thank the editor and the anonymous reviewers for their valuable and useful comments to improve our manuscript.
Author information
Authors and Affiliations
Contributions
Author 1 (Zhijuan Deng): Conceptualization, Methodology, Writing - Original Draft; Author 2 (Dunguo Wu): Data Curation, Writing - Original Draft, Visualization; Author 3 (Mengyao Xia): Software, Writing - Original Draft; Author 4 (Jiao Li): Supervision, Investigation; Author 5 (Xiaoling Zhou): Writing - Review & Editing, Validation; Author 6 (Corresponding Author: Dahai Liao): Conceptualization, Funding Acquisition, Resources, Supervision, Writing - Review & Editing.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
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/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Deng, Z., Wu, D., Xia, M. et al. Localized fading feature extraction method of ancient ceramic decoration. npj Herit. Sci. 13, 505 (2025). https://doi.org/10.1038/s40494-025-02043-9
Received:
Accepted:
Published:
Version of record:
DOI: https://doi.org/10.1038/s40494-025-02043-9










