Abstract

This paper presents an in-depth study and analysis of the colour optimal matching model in art design through the method of Bayesian decision-making and the colour optimal matching model designed and applied to practice. Although Bayesian conditional theory constructs a representation theorem for causal decision theory, eliminating the formal differences between evidence decision theory and causal decision theory and reflecting their common intrinsic form. However, it still does not resolve the conflict between causal and evidential decision theories, but only translates it into a different interpretation of state parsing, and the choice of interpretation still comes from people’s different intuitive understanding of rationality. To address the problem that the colour information of the target image in the traditional recolouring method easily interferes with the recolouring process and affects the colour effect of the resulting image, a new method of recolouring based on the centralization constraint is proposed in the paper. A new method of colour transfer based on random walk image segmentation is proposed. First, an improved random walk image segmentation method is introduced to segment the reference image and the content image to obtain a more reasonable segmentation region, which can enhance the hierarchy of the resulting image. Second, the proposed colour transfer strategy performs feature matching in the corresponding region to achieve colour transfer. Finally, the structure-preserving filter is introduced to further optimize the resulting image to effectively improve the visual effect of the resulting image. Extensive experimental results show that the proposed method can achieve significantly better-quality results than the colour clustering-based colour transfer method. The experimental analysis shows that the newly designed comprehensive objective evaluation index of colour transfer in the paper can effectively solve the problem of the one-sidedness of a single evaluation index and can achieve highly consistent evaluation results with subjective evaluation.

1. Introduction

Looking at the development of human civilization on a longer time scale, the essence is the process of a group constantly understanding and cognizing the world, and such a process is slow and limited over a long period. From the earliest technology of knotting ropes to oracle bone inscriptions, the information encoding ability was very low, to the invention of pen and paper to form writing and drawing, with strong information encoding and storage ability. The Internet has allowed more content photos and videos to be recorded and disseminated, and people have entered an era of rapid production and dissemination of information explosion, in which most people have become the creators and disseminators of information, and the entire human community has more quickly formed an understanding and cognition of the world, thus promoting the development of the entire social economy and the process of civilization. Colour is the most sensitive element that can cause aesthetic pleasure to human beings, and it is also the most important way to present all things [1]. Second, the proposed colour transfer strategy performs feature matching in corresponding regions to achieve colour transfer. Finally, a structure-preserving filter is introduced to further optimize the result image to effectively improve the visual effect of the result image. Being in the colourful nature, people often perceive the world through colours, record their lives, and express their feelings through photos, videos, and paintings. Different colours in life often bring people very different feelings, for example, bright and colourful images can often make people feel relaxed and happy, and images with strong colour contrast can bring people a sense of impact and excitement. Even images with the same content can be edited for different emotional and stylistic expressions through colour [2]. Therefore, from the adjustment of the colour tone of a photo to the colour scheme of artwork, there is a constant need to modify and experiment with the colour of the image. Currently, there are many image-processing software and tools that enable colour editing of images, yet these tools are still difficult for nonexpert users to understand.

Since grayscale images use only one dimension to represent objective things, their limitations are obvious. The picture seen by the human eye from grayscale images often differs greatly from the corresponding real scenario, and many important features of objective things often not well represented in grayscale images. Unlike grayscale images, colour images can represent objective things in three dimensions, and thus can reflect the characteristics of objective things themselves in a more detailed, realistic, and comprehensive way. At present, most of the images involved in people’s lives are colour images, and the rich contents they contain and express are incomparable to grayscale images, and colour images carrying various colour information have been closely integrated with people’s life. Therefore, the colour image enhancement processing based on colour information has more important practical significance.

With the development of multimedia technology and artificial intelligence, an important value of intelligent technology lies in the ability to give people different services and capabilities. In this paper, we hope to find certain paths to empower ordinary users with design through in-depth research on the intelligent synthesis of graphics, so that the public, who do not have a sense of design aesthetics and do not understand design principles, can also create aesthetically pleasing graphic content, forming – some fields more interesting and efficient information delivery [3]. For example, the content shared by individuals in social media, in addition to the traditional nonoverlapping synthesis form of text and pictures, can realize the overlapping synthesis form of graphics and text, such as become a beautiful poster style. Designers often waste a lot of time in repetitive and monotonous basic layout and colour mixing work in the design process. If the intelligent automatic synthesis algorithm of graphics and text is adopted, the generated results only need to be confirmed or fine-tuned by the designer, which can greatly release the designer’s energy and let the design practitioners focus on more valuable creative creation. Intelligent synthesis of graphics has a vast economic value. In the field of Internet media placement, the traditional process based on designers producing works and then placed can no longer meet the actual demand. Get feedback through continuous fine delivery, automatically generate graphic delivery according to the feedback, and then deliver in the cycle, which can maximize the value of industrial delivery.

One of the important attributes of colour is to maintain the clear legibility of the target. Especially in graphic composition work, where text is rendered on an image, a clear contrast between the colour of the text and the background colour it covers is required for the readability of the text. The relevant properties of readability and contrast in human-computer interaction systematically studied in the paper, which states that at least 27 units of luminance difference in the Celia space need to be maintained to facilitate the distinguishability of the front and back backgrounds, a number that the authors subsequently update to 30 units of luminance difference in the paper as a recommendation for the distinguishability of text on an image. In the human visual system, two different systems deal with contrast in the form of luminance and chromaticity, and human visual sensitivity is stronger in luminance variation than in hue and saturation variation [3]. In this era, most people have become the creators and disseminators of information, and the entire human group has formed an understanding and cognition of the world more quickly, which has promoted the development of the entire social economy and the process of civilization. It is generally believed that readability is related to the visual ability of the reader and that the difference in luminance of the front background colour is the most critical factor when the size of the typeface is sufficient, higher luminance differences usually have better readability, but maximizing luminance differences can also lead to extremes of white and black; for this reason, Matsuda also defines harmony in the saturation-luminance space, in the case of maximizing contrast Harmony is also suggested: the colour in the black region of the figure satisfies the harmony at the same time as the contrast is increased [4]. A method based on depth image comparison is proposed to generate semantic-level dense point pairs for the migration of visual attributes (e.g., colour, hue, texture, and style). The joint optimization of semantic-level point pair matching at the depth feature layer and local colour migration at the image pixel level is extended to one-to-many colour migration, which can effectively avoid the possible image content mismatch due to one-to-one migration and thus improve the quality of the re-colour results [5]. It should be noted that all these methods based on reference map style conversion require a reference image as an additional input, which needs to be provided by the user or generated by other algorithms [6].

The method introduces the singular value decomposition (SVD) algorithm as well as the translation, rotation, and scaling matrices required for colour mapping using the content image and the reference image covariance, and then the result image is obtained after several matrix operations [7]. The histogram matching technique is used for colour transfer. This method first uses the histogram matching technique to complete the colour matching between the content image and the reference image and then designs a gradient-holding model to make the colour-matched result image have similar gradient information of the content image [8].

The recolouring method based on the main colour plate shows outstanding advantages in both the colouring effect and the convenience of the method itself, but there are still some problems to be solved [9]. First, the current methods solve the two problems of image expert colour palette extraction and layer decomposition separately, without end-to-end joint processing. Second, the images generated by the existing methods still have a partially distorted and unnatural appearance, which needs further improvement. Third, the existing methods require users to edit the primary colour palette colours for image recolouring but do not provide some suggestions and recommendations for user colour editing, which is more important for nonexpert users. Fourth, the method based on mathematical optimization is time-consuming and serious, which it difficult to achieve the real-time required by users and greatly reduces the user experience. In this paper, the existing primary colour palette-based image recolouring method will be designed and improved to address the aforementioned four problems.

3. Bayesian Decision Algorithm Design for Colour Difference

The decision theory based on Bayes’ theorem, which chooses subjective probabilities in the interpretation of probabilities and follows the principle of expected utility maximization, is called classical Bayesian decision theory, or classical decision theory for short [10]. In guiding people to make decisions, evidential decision makers suggest choosing the most efficient behaviour because, in the view of decision makers, to obtain the desired outcome, they must find the evidence corresponding to the outcome, and only seeing the evidence can make them believe that the desired outcome will occur. Causal decision makers, however, believe that the value of behaviour should be determined based on its ability rather than judged by evidence and that the relationship between the decision maker’s desired outcome, and this ability is a causal one.

Consider a classification problem in which, if there exist possible category labels, that is, , a sample misclassified as with a true label of . The resulting loss denoted as in . The expected loss resulting from classifying sample a based on the posterior probability is then obtained as the conditional probability on sample .

Our objective is to find a discriminant criterion : such that the overall risk is minimized:

We call the aforementioned overall Bayes risk. If for each sample α, if h can make the conditional risk take the minimum value, then it can be concluded that Bayes risk will also be the minimum overall risk. Thus, Bayes decision rule (BDR) can be obtained:

At this point, it is said that is the Bayesian optimal classifier, and relatively, the overall risk is called Bayesian risk. Observing the aforementioned definition, the best performance that can be achieved by a classifier can be reacted by , that is, the theoretical upper limit of the model accuracy that can be produced by machine learning.

It is easy to see that if one wants to use the Bayesian decision criterion to minimize decision risk, one first needs to obtain the posterior probability P(Ca); however, in practice, this is usually more difficult to obtain directly. Images with strong colour contrast can bring shock and excitement. Even images of the same content can be edited to achieve different emotional transmission and style presentation. From this perspective, we aim to achieve as accurate an estimate of the posterior probability as possible under the condition of a limited number of training sample sets. In practice, there are usually two strategies:

With the continuous iterations of colour transfer techniques, the resultant images have received a qualitative leap ineffectiveness [11]. However, the improvement of the effect depends to some extent on the application of image preprocessing or postprocessing techniques. For example, for colour transfer based on global feature matching, the resultant image of colour transfer after white balance preprocessing and gradient-holding postprocessing has better visual effects; for colour transfer based on local feature matching, the introduction of techniques like image segmentation can make the resultant image of colour transfer have more reasonable colour mapping. It can be shown that image preprocessing and postprocessing techniques play a crucial role in colour transfer, and the following is a brief introduction of the common preprocessing and postprocessing techniques in colour transfer, as shown in Table 1.

Gradient maintenance is initially used to ensure that the resulting image has highly consistent gradient information with the original image. Since the colour transfer result image needs to be consistent with the content details of the content image and at the same time be like the colour of the reference image, the gradient model is developed as a mathematical model that can make the gradient of the colour transfer result image consistent with the gradient of the content image and at the same time keep the colour of the resulting image highly like that of the reference image. This gradient maintenance model can eliminate to some extent the noise, artifacts, and false borders introduced in the colour transmission process. However, the problem of excessive smoothing is difficult to circumvent and is less suitable for images with more complex detailed information.

A filter is a frequency selection tool that can filter out useless frequency components of a signal (image, audio, etc.) while retaining useful frequency components, for example, by filtering out interference noise. Thus, filters can be used to weaken the effect of interference noise in the image signal. For colour transfer optimization, a structure-holding filter designed, which can eliminate noise while ensuring that the structure and colour characteristics of the resultant image are not weakened and can better improve the quality of the colour transfer resultant image.

Most of the layout comfort comes from the long-established visual habits, and the aspect ratio of some objects, which is beyond the visual habits of age and culture, such as the proposed aesthetically comfortable square ratio (1 : 1), root-square 2 ratios (1 : 1.414), golden ratio (1 : 1.618), root-square 3 ratio (1 : 1.732), and double square ratio (1 : 2). Let the elements in the image and the image itself be as close as possible to the ratio that has aesthetic comfort then use the closest comfortable ratio to calculate the difference of the ratio, and finally weigh the sum [12]. Colour images carrying various colour information have been closely integrated with people’s lives. Therefore, colour image enhancement processing based on colour information has more important practical significance. Because of the graphical synthesis in this paper, the recognition result of the image is prescribed, while the comfortable ratio of the text and the depiction of this place is not the same, in the text element, because of the writing habit and the horizontal symmetry of the human eye, the acceptable comfortable ratio is instead between the aspect ratio of 1 : 4 and 1 : 10, as shown in Figure 1.

In actual training, the network found that for individual colour recommendation results, it encountered difficulties in gradient backpropagation after using the scoring network to obtain scores. This is because the colour recommendation network predicts the classification results, while the scoring network accepts a single recommended colour value. If only the optimal colour predicted by the colour recommendation network is taken for loss calculation and network training, it is difficult to make the network converge. To solve the problem of gradient transfer and use the calculation results of the loss function to effectively update the parameters of the colour prediction network, this paper proposes to use the entire predicted colour classification probability distribution for weighted harmony and readability loss calculation. Specifically, the loss calculation is performed assuming that each classified colour is used as a recommended colour with a recommendation probability equal to the predicted probability of the classification. The colour distribution that best reflects the combined evaluation ranking of readability and theme colour harmony on that text block is noted as p. This section expects the prediction distribution of the network to approximate the aforementioned optimal distribution and therefore optimizes its relative fullness to minimize it. When α and β are fixed, the optimal distribution is fixed, and approximating the optimal distribution is equivalent to minimizing the cross-first. If the evaluation network in this section can accurately model the harmony and readability scores, the optimal evaluation ranking distribution of colour is calculated using this score, whereby the total loss is redefined as follows:

Laboratory colour space is a device-independent colour model that represents how colours are displayed, and using this feature allows colour conversion between different devices. Laboratory colour space can represent colours other than RGB colour space, and all human perceptible colours can be represented in laboratory colour space. In addition, the colour distribution in the RGB model is uneven, and the proportion of blue-green is larger than that of yellow-red, while the laboratory colour space can represent a wide and uniform colour gamut, which is more conducive to the processing of digital images, as shown in Figure 2.

Biological studies have shown that what can attract human interest are often salient regions that can be significantly different from other regions so many scholars have designed salient region detection algorithms based on image contrast. This contrast can be expressed in terms of colour, size, shape, texture, and so on, for example, a bright moon in the night sky or a red flower in a green leaf [13]. Become an aesthetic poster style. In the design process, designers often waste a lot of time in repetitive and monotonous basic typesetting and colour matching work. If the intelligent automatic synthesis algorithm of graphics and text is used, the generated results only need the designer’s confirmation or fine-tuning, which can greatly release the design and teacher’s energy. In addition to this, local regional differences can also cause human visual dwell, which is the local contrast of an image. For example, region-based contrast analysis is to get the significance value of each region by defining its difference in brightness, hue, and so on from the surrounding regions. In the process of image saliency analysis and detection, it is important to consider both global as well as local contrast to achieve better results.

In the process of image saliency study, it found that there is a spatial aggregation of saliency regions and people prefer the regions located in the centre of the image. Therefore, in many studies, the spatial location of the target is considered, and objects located in the central region are assigned greater saliency values. However, the hypothesis based on centre preference also has some limitations for both the size and spatial distribution of targets. In addition, there is another class of assumptions based on the idea of background-first, which believes that the edge regions of an image can be used as background regions and the saliency map can be obtained by calculating the difference between each region and the background region. In practical application, the saliency map generated by these two methods can be fused to improve the robustness of the algorithm.

4. Design of Colour Optimal Matching Model for Art Design

The algorithm flow of Zhang’s camera calibration method is shown in Figure 3, first, by taking a number of calibration plate images with different calibration plate planes and camera plane poses to determine the corresponding point extraction method, theoretically taking two can complete the calibration algorithm, but in order to reduce the error and noise sampling point, interference generally need to collect more than 15 different poses images and then to determine the correspondence between two-dimensional pixel coordinate points and three-dimensional real. In this paper, we use the improved tessellation Susan algorithm, subpixel algorithm and corner point sorting algorithm described in section 3 to determine the correspondence points between 3D spatial points and 2D image points and then use these correspondence points to obtain the single-response matrix by the maximum likelihood method to obtain the camera internal parameters , , , , and solve the external rotation matrix and translation vector by equation (6) and the camera internal parameters.

The camera can directly establish the direct coordinate correspondence between the object point and the image point by first setting the coordinates of the physical three-dimensional space standard point, which is captured into the two-dimensional point of the image by the photographic optical system and then complete the calibration. In contrast, the three-dimensional spatial point of the light projected by the projector optical system cannot be determined directly and needs to be captured into a two-dimensional spatial point with the help of a camera, and the two-dimensional spatial coordinates are converted to three-dimensional physical space by calibration to determine [14]. We use a pinhole model for the camera, the projector and the camera optical structure are similar, the projector projection process can be approximated as the inverse process of the camera imaging process, we can use a similar calibration model for this.

Then the projector projects a specific structured light or template pattern to the projection target plane, the camera acquires the target image and obtains the corresponding structured light or template corresponding points, and uses the parameters already obtained by calibration to convert the coordinates of the camera image corresponding points to the corresponding three-dimensional space corresponding points, to obtain the correspondence between the projection image and the three-dimensional space to complete the calibration equipment [15]. This method depends on the accuracy of camera calibration, but it is simple and easy to obtain the correspondence points, and the second method is used to obtain the correspondence points because the research content of this paper needs to obtain the coordinate conversion relationship between the projector and the camera.

The difference between two images is measured by similarity, for example, the similarity of features, the similarity of structure, and so on, and the image quality is analysed qualitatively by objective data. The difference between two images is measured by perception, that is, relying on human visual perception as well as human subjective awareness [16]. At this stage, the assessment of colour transfer quality evaluation also carried out at both objective and subjective levels, that is, using objective evaluation indexes and subjective evaluation methods to evaluate the colour transfer result images [17]. Therefore, several single objective evaluation indexes and subjective evaluation methods are briefly introduced in the paper, and a brief analysis is made to summarize the problems of one-sidedness among them. Moreover, to address the problems of the aforementioned indicators, a comprehensive evaluation index of colour transfer based on colour difference and improved structural similarity is proposed in Section 3 of the paper, as shown in Figure 4.

The evaluation of image quality is also an extremely important aspect in the field of image processing and has received close attention from scholars. The image quality depends to a large extent on the performance of the image acquisition equipment, the noise interference in the transmission process and the reliability of the image processing method, and so on, and the images under different processes should be evaluated using a more appropriate image evaluation method under the corresponding process. Usually, the evaluation of image quality needs to be considered from two aspects.

In this section, two objective evaluation metrics that are very important in image colour reproduction experiments are first analysed: peak signal-to-noise ratio and structural similarity. The peak signal-to-noise ratio is generally used to evaluate whether the image quality of an image has improved after a series of processing compared with the original image [18]. Only seeing evidence can convince them that the desired outcome will occur. However, causal decision-makers believe that the value of behavior should be determined according to its own ability rather than judged by evidence, and the relationship between the expected result of decision-makers and this ability is a causal relationship. The higher the peak SNR value, the lower the distortion of the image quality obtained after processing, that is, the higher the peak SNR, the closer the output image is to the original image, but the peak SNR does not reflect the subjective feeling of the naked eye well, and the usual value range is between 20 and 40 dB.

Therefore, another objective evaluation index in this section is structural similarity, which is more complicated to calculate, but it can make up for the shortcomings of peak SNR and reflect the subjective perception of the naked eye, and its value ranges from 0 to 1. Such correlations contain information about the characteristics of the image content structure in the visual environment [19]. When calculating the structural similarity of two images, we first construct a local visual window, second calculate the objective index of structural similarity of pixels in the visual window, then move the visual window one pixel at a time, and finally traverse each pixel of the whole image until the local structural similarity of all positions is calculated [20].

5. Analysis of Results

5.1. Performance of Bayesian Decision Algorithm for Colour Difference

To verify the effectiveness of the text colour recommendation network HTCN proposed in this section, the proposed network structure disassembled in this paper and only a part of it is used for colour recommendation, and the results obtained on the test set are shown in Figure 5. Where D indicates that only the local readability evaluation network is used for colour recommendation, H indicates that only the global harmony evaluation network is used for colour recommendation, and D + H indicates that both the local readability and global harmony evaluation networks are used and colour recommendation is performed according to Eq. The accuracy in the figure is obtained by calculating the Euclidean distance between the colour recommendation result and the best colour, using the designer’s design result as the best colour. To facilitate the calculation, this section uses the RGB colour space and normalizes the distance. The values in square brackets in the figure legend are the average accuracy obtained using a threshold value of 0.05 at intervals from 0.05 to 1.

From the figure, the organic combination of local readability and global harmony can effectively improve the performance of colour recommendation, which is also in line with the designer’s guidelines for selecting colours when designing, that is, adjusting ensure that the text is clear and easy to read while ensuring that the text colour is in harmony with the background image. The complete HTCN network, on the contrary, gets the best recommendation results with an average accuracy rate of 74.8% because it also learns aesthetics implicit in the designer’s design choices under difficult scenarios while ensuring local readability and global harmony.

In each figure, the evaluators were asked to read all the letters inside the text segment corresponding to the results of each algorithm, and the time was recorded. For text boxes in which more than 10% of the letters were read incorrectly or could not be identified, the text box text readability was considered to be 0 and the time was invalid, and the text readability rate under various methods could be counted in the experiment, that is, the percentage of readable parts in all textboxes; for each method on the text that can be recognized to read the time spent on statistical analysis, to obtain the average reading time of 20 letters to reflect the degree of readability.

The statistical score of the experimental results, Figure 6, shows that the method proposed in this paper can obtain similar aesthetic harmony as the designer, and in some cases, the text harmony is better than the designer because the colour design of the text is multimodal, and there will not be only one optimal colour combination. For the colour transfer method based on local feature matching, the introduction of similar image segmentation technology can make the result image of colour transfer have a more reasonable colour map. By studying many design works and establishing an aesthetic evaluation of colour themes, the network can find some design guidelines that are not available in the traditional method and will use the design principles of other designers to obtain more harmonious and design-oriented colour recommendations.

After setting the colour of the text in the image, the readability rate of the text changes in an inverse proportion to the reading time of 20 letters, while the other attributes remain the same, where the randomly generated result is the worst choice for readability because there is no basic aesthetic constraint, and it is most likely to produce crossover with the background. The interesting finding is that the theoretically derived text colour readability is better than the learned one because in securing readability, by explicitly enlarging the saturation and brightness difference between image and background colour, it can obtain better readability by rule constraint but relatively lack of overall colour harmony.

6. Analysis of Colour Optimal Matching Application Results

The results of the four groups of experiments shown in Figure 6 are evaluated using the feature similarity degree (FSIM), mean absolute difference MAD, and peak signal-to-noise ratio (PSNR), as well as the newly designed colour, transfer comprehensive evaluation index CSP in the paper. The evaluation results of different indexes are shown in Figure 7. This paper proposes a weighted harmony and readability loss calculation using the entire predicted colour classification probability distribution. Specifically, it is assumed that the colour of each classification is used as a recommended colour, and its recommended probability is equal to the predicted probability of the classification, and the loss is calculated. The larger values of FSIM, PSNR, and CSP in Figure 7 indicate better quality of the resultant images; the smaller values of MAD indicate better results of the resultant images; CSP is a newly designed colour transfer evaluation index in the paper, and the larger values indicate the better overall effect of colour transfer.

This indicates that the proposed method can maintain the colour of the reference image while preserving the structure of the content image; in addition, the method also achieves better results in terms of FSIM, MAD, and PSNR scores. The experimental results shown in Figure 7 show that the results of the method are better in terms of colour maintenance of the reference image and structure maintenance of the content image.

Second, the FSIM column data in Figure 7 show that the FSIMs obtained by different methods in the four groups of experiments are the same, with no significant difference. However, comparing (g2) and (h2) in group 1 experiments, (c3) and (h3) in group 3 experiments, and (d4) and (h4) in group 4 experiments shown in Figure 6, it is obvious that the results obtained by the method in the paper (h2), (h3), and (h4) are better than (g2), (c3), and (d4), respectively, in maintaining the content image features. From the data in the MAD column, there are cases where the MAD values obtained by the Li method, Grogan method, and Xiao method are closer to those obtained by the method in the paper, but there are large differences in the resulting images obtained by the three methods. From the PSNR column data, the PSNR value of the resulting image obtained by the Li method also achieves a larger value, however, the colour difference between the resulting image obtained by the Li method and the reference image is larger, and to some extent, it can be considered that the colour transfer is not better. In summary, the FSIM, MAD, and PSNR indexes are not good enough to evaluate the merits of the colour transfer result images.

Let the feature input corresponding to the kth scale be Fx and imitate the target detection algorithm, a set of preset prior bounding boxes are set for each feature point of the feature map. The model achieves the prediction of text boxes by predicting the degree of deviation relative to the centre position and width height of the a priori boxes, and the corresponding confidence level, as shown in Figure 8. Unlike general object detection, the text blocks in the overlapping graphic layout design problem placed by the designer concerning the entire background image, and their size and aspect ratio have unique characteristics related to the text. Therefore, the design about the prior frame needs to consider these characteristics to achieve better prediction results.

In the introduction section of the paper, the problems of the traditional colour transfer method based on colour clustering are analysed, and a new colour transfer scheme is designed to address this problem. It is to calculate the grayscale or colour distance between each pixel and the rest of the pixels. In addition, local regional differences can also cause people’s visual stop, which is the local contrast of the image. This colour transfer scheme is divided into the following processes: first, an improved random wandering image segmentation method is introduced for the segmentation of different regions of the input image. Second, a colour transfer scheme based on optimal transmission theory that maintains the brightness of the content image is used to achieve colour transfer in the corresponding region. Again, a structure-preserving filter is introduced to further enhance the visual ambiance of the resultant image. Finally, many experimental comparative analyses are conducted in the paper, and the results show that the resultant images obtained by the new colour transfer method proposed in this section can achieve better results than the colour clustering-based colour transfer method.

7. Conclusion

The principle of Bayesian decision-making introduced and the problems are pointed out, that is, the complexity of the algorithm is high, and the resultant image often does not retain the hierarchy and details of the original fabric image well. To this end, a new simple and efficient method for recolouring fabric images (SDFR method) is designed by combining significant colour extraction and image decomposition. The simulation results prove that the proposed SDFR method can not only maintain the important features of the original fabric image such as hierarchy and details better than the classical fabric image recolour method but also improve the operational efficiency significantly. The resultant images obtained by the traditional colour transfer method often suffer from the problems of insufficient hierarchy, insufficient feature retention ability, and poor visual effects. In the paper, a colour transfer method that combines image signature and optimal transmission proposed. First, to improve the hierarchy of the resulting image, a significant region detection algorithm based on image signature is introduced. Second, to make the resulting image keep the structural characteristics of the content image and the colour characteristics of the reference image better, a colour transfer strategy that keeps the brightness of the content image designed in the paper using the optimal transfer theory. Extensive experiments show that the new method proposed in the paper can obtain higher-quality result images compared with the traditional colour transfer method. From the objective evaluation results and subjective evaluation results, the new method proposed in the paper can achieve higher-quality colour transfer results compared with the traditional colour transfer method, and the comprehensive effect of the new method greatly improved compared with the traditional method.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This research was supported by the National of Humanities and Social Sciences Financed of China (grant no. 20EH213).