Keywords

1 Introduction

Camouflage pattern is an important kind of technique to improve the survivability of the military target [1]. With the rapid improvement of the aerospace stereoscopic imaging reconnaissance and the robot binocular imaging, the battle field imaging reconnaissance is extending from two-dimension to three-dimension. The existing camouflage patterns are two dimensional images. So they can hardly confront the stereoscopic imaging reconnaissance. To design stereoscopic camouflage pattern, using the modern stereoscopic image based on lenticular raster and combined with the digital camouflage pattern is a new technical path. The model of the stereoscopic camouflage pattern is shown in Fig. 1.

Fig. 1.
figure 1

Model of stereoscopic camouflage

2 Parallax Design Principles of Stereoscopic Camouflage Pattern

Parallax design is to determine the location of the pixels in each serial image. Figure 2 shows the sketch map of parallax design principles.

Fig. 2.
figure 2

Parallax design principles

\( xyz \) is the world coordinate system, \( x_{0} y_{0} z_{0} \) is the coordinate system in which the number 0 image of the serial images projects through the lenticular raster. The two coordinate systems are coincident. \( x_{1} y_{1} z_{1} \) is the coordinate system in which the number 1 image of the serial images projected through the lenticular raster with an angle \( \theta \). Point \( O \) is the original point of all the coordinates and the angle between \( z_{1} \) and \( z_{0} \) is \( \theta \). Supposed that coordinate of whatever point \( P \) in the world coordinate system is \( (x_{0} ,y_{0} ,z_{0} ) \) and the coordinate of it in the \( x_{1} y_{1} z_{1} \) is \( (x_{ 1} , {\text{y}}_{ 1} , {\text{z}}_{ 1} ) \), geometric relations is:

$$ \left[ {\begin{array}{*{20}c} {x_{1} } \\ {y_{1} } \\ {z_{1} } \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {\cos \theta } & 0 & { - \sin \theta } \\ 0 & 1 & 0 \\ {\sin \theta } & 0 & {\cos \theta } \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {x_{0} } \\ {y_{0} } \\ {z_{0} } \\ \end{array} } \right] $$
(1)

There are two points \( P(x,y,z) \) and \( P'(x,y,z + H) \). They have the same coordinates in the first two dimensions and have different coordinate in the third dimension. The difference of their depths is \( H \). Define their coordinates in \( x_{1} y_{1} z_{1} \) are \( P_{1} (x_{1} ,y_{1} ,z_{1} ) \) and \( P_{1}^{\prime } (x_{1}^{\prime } ,y_{1}^{\prime } ,z_{1}^{\prime } ) \). According to Eq. (1) we can get that:

$$ \left[ {\begin{array}{*{20}c} {x_{1} } \\ {y_{1} } \\ {z_{1} } \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {\cos \theta } & 0 & { - \sin \theta } \\ 0 & 1 & 0 \\ {\sin \theta } & 0 & {\cos \theta } \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} x \\ y \\ z \\ \end{array} } \right] $$
(2)
$$ \left[ {\begin{array}{*{20}c} {x_{1}^{\prime } } \\ {y_{1}^{\prime } } \\ {z_{1}^{\prime } } \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {\cos \theta } & 0 & { - \sin \theta } \\ 0 & 1 & 0 \\ {\sin \theta } & 0 & {\cos \theta } \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} x \\ y \\ {z + H} \\ \end{array} } \right] $$
(3)

According to Eqs. (2) and (3), we can find the horizontal location of the two points.

$$ x_{1} = \cos \theta \cdot x - \sin \theta \cdot z $$
(4)
$$ x_{1}^{\prime } = \cos \theta \cdot x - \sin \theta \cdot z - \sin \theta \cdot H $$
(5)

Two points \( P(x,y,z) \) and \( P^{\prime } (x,y,z + H) \) in the world space have the same coordinates in the \( x \) axis and \( y \) axis and have the depth difference \( H \) in the \( z \) axis. The parallax of them in image \( x_{1} \,y_{1} \) plane is:

$$ \Delta x = x - x_{1}^{\prime } = \sin \theta \cdot H $$
(6)

Equation (6) shows the relations of different spot layers of the stereoscopic camouflage pattern in one serial image.

3 Stereoscopic Digital Camouflage Pattern Generation Algorithm

The serial images generation algorithm is the key technique of the stereoscopic camouflage pattern. The process of the algorithm is shown in Fig. 3.

Fig. 3.
figure 3

Process of serial image generation algorithm

According to the functions of the steps, the algorithm can be divided into 3 modules. They are Layer Segmentation Module (1), Parallax Adjust Module (2) and Layer Merging Module (3).

3.1 Layer Segmentation Module

The function of the Layer Segmentation Module is to read the original camouflage pattern, split the spots into different layers based on colors, and allocate the layers into different depths. It includes the following steps.

  • Step 1, read the original pattern and turn it into indexed image, save the color map and the color index matrix.

  • Step 2, set the parameter of the stereoscopic camouflage pattern. Set the location of the number 0 layer (The layer in the middle depth of the stereoscopic pattern). Set the minimum parallax (The minimum parallax is, when the depth between the neighboring layers is \( H \), the parallax between the neighboring layers in the neighboring serial images). The minimum parallax between the serial images \( \Delta x_{\hbox{min} } = \sin \theta \cdot H \cdot I/2.54 \) (pixels).

  • Step 3, segment and allocate the spots in different depths [4]. Adjust the color index matrix and the color map, to match the color index number with the depth order of the layers and adjust the location of the colors in the color map at the same time. In the default condition, the order of the layers is in accordance with the brightness of the color.

Extract the spots of the camouflage pattern, according to the color the spots, and save them in different layers as shown Fig. 4. Then fill all the pixels of the last layer with the same color of the spots in order to avoid the blank pixel the in the process of parallax adjustment.

Fig. 4.
figure 4

Results of spots segmentation

3.2 Parallax Adjustment Module

The parallax adjustment module adjusts the parallax of the spots in serial images according to the depth order of the layers. It includes the following steps:

  • Step 1, set the serial number \( i \) of the serial image that being processing. Serial number is used to mark the order of angle when the lenticular raster is imaging, the sum total of the serial images is \( n \).

  • Step 2, generate the depth index matrix according to the color index matrix. Change the color index matrix into depth index matrix by adding the color index number of the number 0 layer to the color index matrix.

  • Step 3, set the layer number \( j \) of the layer that being processing. The sum total of the layers \( m \) is the same as the sum total of colors in the camouflage pattern.

  • Step 4, calculate the parallax of the layer \( \Delta x \) in the new serial image, According to the serial image number \( i \) and the layer number \( j \). The parallax of the layer \( \Delta x \) can be expressed as: \( \Delta x = - (i - n/2) \cdot (j - m) \cdot \Delta x_{\hbox{min} } \)

  • Step 5, shift the layer according to the parallax \( \Delta x \). Then judge if the layers of different depth have being finished or not. If not, reset the layer number to process the next layer. If yes, then merge the layers.

3.3 Layer Merging Module

The layer merging module is used to merge the image layers according to the sheltery relation between each layer and generate the stereoscopic camouflage pattern serial image. The layer merging module includes the following steps:

  • Step 1, merge the depth number. Merge the depth matrix and use the layer of bigger index number cover the layer of smaller index number.

  • Step 2, turn the depth index number into color index number. According to the location of the number 0 layer, the depth index matrix minus the number of the color index number of the number 0 layer.

  • Step 3, save serial image as true color image [6], according to the color index matrix and color map. Judge the serial image number is finished or not. If not, reset the serial image number and generate the next serial image. If yes, end the algorithm. The generated serial image samples of stereoscopic camouflage pattern are shown in Fig. 5.

    Fig. 5.
    figure 5

    The generated serial image samples of stereoscopic camouflage pattern

4 Sample Analysis and Measurement

The stereoscopic camouflage pattern samples have been made, by coding the serial images and printing the coded image, then pasting a lenticular raster on it [7]. The parameters of the samples were shown in Table 1.

Table 1. Parameters of stereoscopic camouflage pattern samples

The experimental scheme was shown in Fig. 6 and the devices was shown in Fig. 7. Observers look at the stereoscopic camouflage sample with naked eye at a distance of 2 m and adjust the locations both of the front board and the back board. When the observer gets the same depth feeling of the boards and the stereoscopic camouflage pattern, then measures the distance between the front and back board. This distance represents the depth between the camouflage layers.

Fig. 6.
figure 6

The experimental scheme

Fig. 7.
figure 7

The experimental devices

Three observers measured the depth of the stereoscopic camouflage pattern in the illumination condition of 300–550lx. The results of the stereoscopic camouflage pattern depth measurement were shown in Table 2.

Table 2. The results of stereoscopic camouflage pattern depth measurement

By comparing Tables 1 and 2, it shows that the results of the stereoscopic camouflage pattern measurement fit the theoretical depth very well. Combined the parameters in Table 1, by comparing sample 1 and sample 2, it shows that when the other parameters are the same, the depth between the first and the last layer of the stereoscopic camouflage pattern grows bigger with the growing of the parallax between the serial images. By comparing sample 1 and sample 6, it shows that the parameters of the lenticular raster and the parallax of them are the same, the depth between the first and the last layer of grows bigger with the growing of the number of the layers in the stereoscopic camouflage pattern. The results fit the Parallax Design Principles very well.

5 Conclusion

Stereoscopic digital camouflage pattern is a new kind of camouflage pattern which combined the digital camouflage pattern and the stereoscopic display. The Stereoscopic digital camouflage pattern generation algorithm can be divided into 3 modules. They are Layer Segmentation Module, Parallax Adjust Module and Layer Merging Module. The function of the Layer Segmentation Module is to split the spots into different layers based on colors, and allocate the layers into different depths. The parallax adjustment module adjusts the parallax of the spots in serial images according to the depth order of the layers. The layer merging module is used to merge the layers according to the sheltery relation between each layer and generate the stereoscopic camouflage pattern serial image. The results of the sample depth measurement show that the stereoscopic digital camouflage pattern can produce three-dimensional visual effects. With the action of the layers in different depth, the stereoscopic digital camouflage pattern can disrupt the 3D appearance of the military target.