Optical Digital Imitation Painting Design Based on Self-Adaptive Image Feature

. Based on the study of existing digital imitation camouflage technology, we propose a kind of optical digital imitation camouflage design algorithm which is based on the characteristic of self-adaptive image. Picking main color feature of the background by using K-means clustering algorithm, counting the shape characteristics of each main color spots by separating layers, we generated digital camouflage pattern automatically by segmenting the background region characteristics and fill the background color image according to the statistics expected value. The simulation results show that, the digital camouflage generated automatically is blend well with the background .It keeps the background color and shape features, so has good camouflage effect. This algorithm can also provide the basic algorithm foundation for digital deformation camouflage.


Introduction
Painting camouflage is an important part of military camouflage technique, is also the most commonly used against high technical reconnaissance means.Painting camouflage by reducing the differences in optical image between target and background, then distorting or dividing the shape of the adjacent target, in order to achieve the fusion of adjacent background and target.Digital painting is generated by digital imaging and image processing technology of multicolor block unit of camouflage.Observing near distance, we can find that digital painting unit makes the boundary between different color broken, fuzzy.This phenomenon of painting pattern makes the textural characteristics more complicated.So it is easy to simulate broken background in the nature.Observing far distance, digital units mixed to be a large painting spot because of the space color mixture.This phenomenon of digital pattern makes the target appearance divided and distorted.
At present, the spatial resolution of the human eye is often used as criterion to determine the unit size of digital painting.By analysis the human eye's discernible size in the observation distance, they can determine the pixel size of Digital painting unit [

Algorithm Process of the Digital Imitation Painting
The spot color and shape feature of the battlefield background is the main parameter to design digital painting.By using the color and size of background as a parameter to control the process of generating digital imitation painting can realize digital imitation painting design adapted to adjacent background spot color and shape characteristics.In this paper, the digital imitation painting design method based on the characteristics of the background is based on the analysis of the background image, on the basis of spot color and shape features, we realize the automatic generation of digital imitation painting by comminuting and filling the background image.The algorithm flow chart is shown in Figure 1.According to the functions and results of each processing step in the algorithm, we can divide the algorithm into three main modules: (1) Color features analysis module, (2) Shape features analysis module, (3) Digital imitation painting generation module.

Analysis of Characteristics of the Background Color
Natural background color is rich and colorful.In order to make the painting spot's color adapted to a variety natural backgrounds and construction conditions, we often choose 3~5 kinds of color to be the background's main color to design the painting spots [3].Then we used b a L color space of the K-means clustering algorithm in this paper [4].
Based on K-means color clustering results we analyze the main color feature of the background.We can statistical the chromaticity coordinates of each dominant color according to the main color image of the background, then calculate the probability of occurrence of each main color in the background, and draw the color histogram of the dominant colors background's main color image.
We collected a large number of natural backgrounds, and selected three representative background images.Including image 1 is woodland background, image 2 is the grass background image, and image 3 is desert background, as shown in Figure 2. In the algorithm research, we converted the background image size to 800 x 600 pixels to compare with the results of other studies.We generated background color charts of the 3 background images in Figure 2 by using K-means clustering algorithm to pick the main color of background, and then generated background color images, counted the color features of background image.We generated the main color image of background, counted the color feature of background image (red, green, blue components) as shown in Table 1.We counted the probability of occurrence of all main color in background image, as shown in Table 2.

Analysis of Characteristics of the Background Sharp
After the main spots were separated from the background main color in the image, the description of the spot's shape feature can be used as a basis to distinguish different spots.To describe the shape of spots, we commonly used circumscribed circle diameter, inscribed circle diameter, rectangular degree, circular degree, invariant, eccentricity, etc.Among them, the diameter of circumcircle can effectively reflect the spot size, because it isn't influenced by the shape and the direction of the spots [5] [6].In this paper, we use circumscribed circle diameter of spot as the basis of describing background spot size.To some extent, expectations of spot size in a background image reflect the shape characteristics of the background.Its value will decrease with the increase of the complexity of the background image.We used i x to represent the i'th size which is possible color layer in the background.We use i P to represent the probability of occurrence of the corresponding dimension, then the context of expectations of the E in the spot size can be calculated with formula (1): If we use j E to represent the spots size expectations of the j'th color spots layer which containing n kinds of color in background main color image, the average size of spots in the background of the color image avg E was the average value of the expected value of j E in the color spots layer, namely: Image shape analysis process is as follows, with the background image 1 as an example: First, we stored different color spots in the corresponding layer extraction spot according to color.Then spot layer is converted into a binary image, the spot color pixel value is 1, the spot color pixel values to 0.
Second, we carried out the open-close operation of mathematical morphology on the spot layer using the circular structure of 3×3 units.Due to the large number of small spots were gathered in a main color, the same structure of the region corresponding to the original image in the background, at the same time, because the human eye space color mixing effect, large tracts of adjacent small spots is often regarded as the same.So, a piece of fine adjacent spots can be processing as large spots.Mathematical morphological closing operation can be finely formed adjacent spots connected domain.Actually opening operation calculating the image expended before corroded, it can better maintain the spot characteristics of the image, eliminating the noise and small connected in the image, which can effectively distinguish different spots.
Third, number the spots.In order to count the shape features of the background spots, we numbered and differentiated the spot layers as the basis when counting the shape feature to distinguish different spots.We numbered the spots according to the processed results, using "shuffle" color display the results of spots number.Fourth, the shape feature of statistical background.We calculate the circumscribed circle size according to the spot Numbers, then, count the probability statistics of each spot size, finally, draw distribution histogram of spot size, with the spot size as abscissa, the frequencies of various sizes as ordinate.
Fifth, draw distribution histogram of various spots circumscribed circle size, calculate the expectation of background probability statistics of each diameter size by the type (1, 2), as shown in Table 3.

Generation of Digital Imitation Painting
The generation digital imitation painting is filling the background main color image into a digital imitation painting by the background color and shape features, containing the following two major steps: Step 1, the main color image division of background.According to the shape characteristics of the background image ,the main color image are divided into square area by rows and columns considering the expectations of background image spot size to be digital painting unit size.
Step 2, color filling.Select background image sub domain center pixel as characteristic pixels, and then fill the all area with the pixel color.Generate a digital imitation painting, the result is shown in Figure 4.

Analysis and Comparison
According to the background as shown in Figure 2, using the algorithm in this paper, probability of each main color and digital unit size distribution in a digital imitation painting are shown in Table 4 and shown in Table 5, respectively.We design digital imitation painting, using the main color which picked from the background image.Comparing Table 2 to Table 4, you can see that the main color probability in each painting pattern is consistent with its probability in the corresponding background,the maximum probability of error is 0.00.Painting pattern of the main color corresponds to the corresponding natural background; its main color appears the trend of probability is not the same.So it realizes that the digital painting color features can be self-adaptive to the background.
Comparing Table 3 to Table 5, you can see that the digital painting design unit size is consistent with the corresponding background image, and digital unit size corresponds to the corresponding background image.
For the woodland background image speckle is fine, the smaller digital painting unit size can simulate to the complex background details.For the monotonous desert background, the larger digital painting size can simulate to rocks and loess in the background.At the same time it reduce the increased difficulty of construction and unnecessary waste of time because of the digital spot is too small.Literature [1] put the designed camouflage pattern into the background image and evaluates camouflage effect through the eye observation of the image designed in this paper according to the above methods.
Cut the digital painting patterns and put into the background image, the camouflage effect as shown in Figure 5. Known from the Figure 5, painting pattern which was designed using the digital painting design algorithm in this paper well embodies the characteristics of background details.Its color and shape features adapt to the background well.The fusion is better between painting pattern and background image.In the far distance observation, it can produce the effect of color mixing in space.So it has better camouflage effect.

Conclusion
Based on the study of existing digital imitation painting technology, put forward a kind of optical digital imitation painting design algorithm which is based upon the characteristic of self-adaptive image.The simulation results show that the digital painting generated automatically is blend well with the background .It keeps the background color and shape features, so has good camouflage effect.Compared to the method of digital cell size determined based on human spatial resolution, the main color and the digital unit sizes in this algorithm are determined by the background characteristics.Control conditions change as background complexity change without human intervention.So it makes the digital imitation painting design self-adaptive to the background.This algorithm can also provide the basic algorithm foundation for digital deformation painting.

Fig. 1 .
Fig.1.Flow chart of the digital imitation painting generation algorithm

Tab. 1 .Tab. 2 .
Chromaticity coordinates of the main color in the background Probability of the occurrence of the main color in each background 0.2015 0.2265 0.1655 0.1378

Tab. 3 .
the expectations distribution of background spots circumscribed

Fig. 4 .
Fig.4.Results generated by the digital imitation painting

3 Fig. 5 .
Results generated by three kinds of digital imitation painting 1] [2].However, as a new digital painting pattern, its design is mainly based on the optical image characteristics of background, automatically generated by computer.Its size in the image is pixel.The background image changes with the background selection, the shooting distance, angle and other factors.Resolution size of the human eye is a subjective variable.It can't reflect the spot's characteristics of the background's actual optical image.It can't adapt to the background image of different shooting conditions to play the role of a simulation of the natural background.
Third Edition.Publishing House of Electronics Industry, 20012.6. WISHART D.K-means clustering with outlier detection[C].The 25th Annual Conference of the German Classification Society.Munich: Univisity of Munich, 2001.