Under the development trend of today’s society, any brand attaches great importance to its outer packaging, and the research and analysis of the design effect of outer packaging has always troubled many brands. The purpose of this paper is to conduct a comprehensive study on the integration of artistic visual elements in the design effect of product packaging through the use of pattern recognition technology. Therefore, this paper proposes an improvement to the feature analysis algorithm of image recognition in pattern recognition technology and understands the specific principle of pattern recognition and improves its specific recognition method. At the same time, in the experiment and analysis part, this paper conducts research experiments on the improved algorithm and explores the performance of the algorithm and the adaptability of the algorithm in the actual packaging design recognition process. The experimental results of this paper show that the improved pattern recognition improves the accuracy of text recognition in packaging by 18% and the accuracy of image noise point recognition by nearly 30%. It can be detected very efficiently in the artistic visual fusion process of packaging design.

1. Introduction

The research purpose of pattern recognition technology is to construct the task of replacing people to complete classification and recognition and to perform the actions that people need to perform, according to the human brain recognition mechanism. It is a machine system that performs automatic information processing through computer simulation. Pattern recognition technology is very important in social life and scientific research and is widely used in many fields. With the rapid development of computer technology, artificial intelligence, and scientific research on thinking, pattern recognition technology is developing to a higher and deeper level. The field of packaging design and its deep integration and development are the inevitable trend of the times [1].

Pattern recognition is a process of discriminating and classifying various things and their changing processes using computers according to the recognition mechanism of the human brain. Packaging design image pattern recognition is an important branch of pattern recognition. With the application of a large number of new equipment in the design, the types of packaging design images are more and more, and only relying on human diagnosis will undoubtedly bring heavy work to the designer. Therefore, it is imperative to study the recognition technology of packaging design images. Because packaging design images have different characteristics from other images, such as more textures, lower resolution, and greater correlation, the reliability of diagnosis should be strictly guaranteed. Therefore, it is necessary to improve and optimize the existing algorithms according to the characteristics of various packaging design images to make them more suitable for the processing of packaging design images.

The innovation of this paper lies in the analysis and understanding of pattern recognition technology. This article fully understands its specific identification methods and identification types. And this paper improves and optimizes the integration of artistic visual elements in the process of packaging design according to it. It enables a more efficient packaging design effect with richer visual elements in the actual packaging design process.

With the rapid development of science and technology, the convenience brought by the change of science and technology has been widely accepted in all walks of life. The application of pattern recognition technology in packaging design has also achieved great success. This also led to more and more people who started to invest in this research. Wang et al. proposed a lightweight convolutional neural network (LCNN) for GIS partial discharge (PD) pattern recognition using three lightweight convolutional blocks. First, they introduced three lightweight convolutional blocks to build LCNN. Then, they searched for the optimal model built from lightweight blocks [2]. Gao et al. introduced an unknown PD type identification method based on an improved Support Vector Data Description (SVDD) algorithm. They improved the traditional SVDD classifier with a tritraining algorithm based on Otsu’s algorithm and a dual threshold setting. The PD samples they collected from different artificial defect models were finally classified by an improved fuzzy c-means clustering algorithm [3]. Aiming at the problem that the growth interface temperature cannot be automatically measured and calibrated during the growth of Czochralski crystals, Zhao and Wang proposed a temperature pattern classification method based on aperture image features and least squares support vector machine. They took the seed stitched aperture image obtained by the digital camera as the input data and extracted the aperture feature through the image processing algorithm [4]. Kaur applied pattern recognition to fingerprint recognition systems, face recognition systems, and speech recognition systems. Efficient genetic algorithms are used in fingerprint recognition, face detection and recognition, and speech recognition. And its efficiency is compared with the traditional method [5]. Borah and Gupta proposed deep learning methods, including feature extraction during training, which have been successful in the fields of pattern recognition and machine learning but require a large number of parameter settings and need to choose from various methods. On the contrary, the algorithm of support vector machines (SVMs) is much simpler [6]. Munavalli and Deshpandeand Kumar designed an artificial neural network to identify learning patterns. They use a three-layer feedforward network to train the patterns (bitmap data). It realized two kinds of identification: mandatory identification and custom identification. The developed ANN model recognizes the pattern even if the applied test pattern differs from the learned/trained pattern [7]. Narayan and Kumar investigated the usefulness of discrete wavelet transform (DWT) based multilevel approximate feature extraction and detailed coefficients obtained from sEMG signals for controlling robotic arm prototypes. DWT is used for denoising as well as feature extraction process. Feature vectors are formed by extracting useful features from third-level approximations and detailed coefficients and are further tested using a support vector machine (SVM) classifier [8]. Iyer and Sharma proposed a home automation system that can be effectively used to control and monitor household appliances via the Internet. Due to its various advantages, home automation is gaining popularity due to its ability to ensure safety and make life easier [9]. The substrate literature has a very good explanation of the key technology pattern recognition technology studied in the article. Some key points of the technology are also explained, but the application of the technology has not been verified by a better experiment, resulting in the article’s persuasiveness being not high enough.

3. Packaging Design Method in Pattern Recognition

3.1. Pattern Recognition Method

Pattern recognition is to use a computer to classify several physical objects with the smallest error rate, so that the recognition results are as consistent as possible with the objective objects, applying pattern recognition to digital image processing technology, that is, using computer to simulate human recognition methods to recognize and classify digital images [10].

3.1.1. Image Pattern Recognition Method

The pattern recognition method is a mathematical statistical method that processes, judges, and categorizes information by means of a computer. The first step in applying a pattern recognition method is to build a pattern space. The so-called model space refers to the multidimensional space composed of many indicators that affect the target when examining an objective phenomenon, and each indicator represents a model parameter. For different objects and different purposes, different pattern recognition theories and methods can be used [11]. Commonly used pattern recognition methods include statistical pattern recognition, syntactic pattern recognition, neural network pattern recognition, fuzzy pattern recognition, support vector machine, and other methods. Pattern recognition is to analyze the distribution characteristics of each pattern in the multidimensional space, divide the pattern space, identify the clustering of various patterns, and then make judgments. It helps people find out laws or make decisions and guide practical work or experimental research.

3.1.2. Selection of Image Acquisition Equipment

The miniature image processing system has the advantages of low cost, flexible application, and easy promotion. In particular, the performance of microcomputers increases year by year, which makes the performance of microimage processing systems continue to upgrade [12, 13]. In addition, the software configuration is rich, making it more practical. Figure 1 shows the composition of a miniature image processing system. The image processing system is mainly composed of image input device, image acquisition card, computer, monitor, and so on. In fact, a simple image processing system is to connect a camera (or scanner) to a PC, and a PC is sufficient for general image processing.

There are generally three types of image digitization devices: ① digital camcorder: It can be connected with the computer through the interface circuit and input the digitized image into the computer under the control of the relevant software. ② Digital camera: The difference between it and the digital camera is that it does not have the ability to acquire images continuously, but the digital camera has the function of acquiring a single image. ③ Scanners: The text, images, and graphics that appear on the paper carrier can be scanned into digital information and directly input into the computer for processing. Therefore, it is not difficult to obtain a digital image at present [14]. The three digitizing devices are shown in Figure 2.

The characteristics of the three existing image acquisition devices are analyzed as shown in Table 1.

By comparison, we choose a digital camera as the image acquisition device. Its resolution meets the requirements of the test accuracy and the characteristics of the job, and the price is acceptable.

Generally speaking, the methods of pattern recognition can be divided into statistical methods, syntactic methods, and artificial neural network methods [15, 16]. The traditional pattern recognition is dominated by the first two methods. It focuses on mathematical methods or computer science aspects of pattern information processing, resulting in statistical pattern recognition based on Bayesian methods and syntactic pattern recognition based on formal linguistics. The former adopts the method of statistical mathematics, expresses the pattern as a vector in the feature space with several characteristic parameters, and uses the decision function to classify. For a specific pattern, select and extract its features, according to the nature of the specific problem, put forward a standard that reflects the quality of the classification, and find the classification method that best meets this standard. The latter looks at pattern structure rather than features. For a pattern recognition system, its basic function is to judge which category the pattern to be processed by the system belongs to. From the input of a pattern that needs to be judged to the system until the system makes a judgment, it mainly includes several links through which information is converted, as shown in Figure 3.

3.1.3. Application Areas of Pattern Recognition Technology

Image is the main source for human to obtain and exchange information, and its application field is expanding to various fields with the continuous expansion of human activities [17]. Its specific application areas are shown in Figure 4.

3.2. Algorithms for Feature-Based Image Analysis

Image features are the most basic properties used to distinguish an image. It can be natural features such as height, length, color, area, etc., or some artificially defined features, such as moments, spatial frequencies, etc. Feature-based detection algorithms can reduce sound decibels and have better adaptability to grayscale changes, image rotation, occlusion, etc. Therefore, feature-based detection algorithms are increasingly used in practical applications.

3.2.1. Algorithm Process

The flowchart of the pixel-based statistical modeling algorithm is shown in Figure 5. First, the qualified sample images are selected from the pictures, and then the gray level statistical modeling is performed on the qualified sample images to obtain a template image. The components that need to be detected are located again, and finally they are matched with the trained template image. If the difference between the gray value of the pixel point of the picture to be detected and the gray value of the corresponding pixel point in the template image is within the preset threshold range, the pixel point is determined to be qualified. Otherwise, it is unqualified [18]. If the proportion of the number of unqualified pixels to the total number of pixels in the area is within the preset threshold range, it can be determined that the image to be tested is qualified.

However, the number of sample images trained and learned will gradually increase, so the gray value of each pixel on the template will also produce a statistically significant range of error fluctuations with the increase in its number. The average image of all the learned templates is the displayed template. When the number of learned template images reaches the specified number, the learning is stopped, and the learning process of the template images ends at this time [19, 20].

The average value and variance of the gray value of a pixel under the n pictures are

In the formula, is the gray mean value, n is the number of sample images, and is the variance. is the ith sample picture.

To make the gray values of the pixel points on the component map all obey the normal distribution, the gray value will have a certain variation law, and its variation interval is

In the formula, the predetermined coefficient is , and the larger the value of , the larger the range of change. When  = 1, the probability of it being within the range is 68%, and when  = 2, the probability of being within the range is 95%.

3.2.2. Graph Search and Positioning Process

The operation mechanism of the whole search and positioning is as follows: the height and width of the template map T are set as hT and bT, respectively, and the height and width of the component map search range window S are set as hS and bS, respectively. Denote Sx,y as the subimage in S to be matched with T and (x, y) as the coordinates of the upper left corner of Sx,y in S [21].

First, the template is uniformly sampled, and the sampling is carried out according to the standard of step size d, and the sequence of sample points extracted is recorded as ql. In the search area window S, the found matching image corresponding to the template image T is denoted as Sx,y. In the search area window S, with a single pixel unit as the step size, the search is performed row by row and column by column, and the similarity between the subimage and the template image is defined as D(Sx,y, T) aswhere is the pixel gray value of the template, mt is the average gray value of the template, and (x,y) is the current coordinate of the template in the search window.

is the variance of all pixel gray values of the template.

m s(x,y) and (x,y) are the average gray value and variance of all points in the search window of the template translated to the current position:

The position where the found similarity value is the largest (at this time, the D(Sx,y, T) value is the largest) is the target position to be found, and the pixel points are searched one by one in the aforementioned manner. Although the target location can be found in the end, the efficiency is low. In view of this, it is considered to use a combination of two steps of coarse search and fine search to determine the target location [22].

Coarse search: In this search stage, set the given step size as , the value of the step size is generally an integer multiple of the pixel length, and the other value can be adjusted according to different actual needs. Usually can take 2 times, 3 times, and 4 times the unit pixel length, where the default value is 4 times [23]. According to the size of the search area and the template image given before, check the time one by one according to the two directions of width and height.

X, Y represent the pixel difference between the search window and the template image in the two coordinate directions. When taking a single pixel as the step size, the area space it needs to check is XY. When the step size is set to , the area space for checking is times the former. Because the unit pixel is not used for the rough search, the position obtained by the search is often not the best, so consider a fine search.

3.2.3. Defect Assessment

The target component image to be detected is matched with each pixel of the template image that has been learned and acquired. If the difference between the gray value of the pixel point of the detected target image and the gray mean value of the pixel point in the corresponding position of the template image is within the preset threshold, the pixel point is judged to be qualified. Otherwise, it is judged to be unqualified, and the formula iswhere G(x,y) represents the gray value of the target component image at point (x,y). The gray value of the template image at point (x, y) is represented by F(x,y), and R(x,y) is the gray value difference between the two at this point. The obtained difference is binarized according to the requirements of formula (3):

When the proportion of unqualified pixels in the entire target component image is less than the preset threshold (80% under normal circumstances), the image is judged as qualified; otherwise, it is unqualified.

3.2.4. Minimum Risk Bayesian Classifier

Given a set of designs that belong to two classes (qualified designs and defective), the individual characteristics of each class follow a normal distribution. In industry reality, for packaging design, false negatives (FM) have greater losses than false positives (FA), so a minimum risk classification Bayesian classifier was introduced to separate the two classes.

It represents a collection of design categories. According to the Bayesian formula, the posterior probability is X, where represents the i-th class.

The conditional risk is

Loss in case of defect:

For the pass/fail binary case, the decision boundary should satisfy the formula:

Therefore, the decision function is written as

the risk of diagnosing a qualified solder joint as qualified is 0, and the risk of diagnosing a defective solder joint as a defect is also 0, so can be directly set. Since the risk of judging defective solder joints as qualified solder joints is much greater than the risk of judging qualified solder joints as defective solder joints, taking , then:

In the case of binary classification, the classifier is essentially a machine that calculates the value of the decision function and makes classification decisions based on the calculated results.

3.3. Packaging Design with Diversified Visual Elements

In packaging design, there are various forms of expression of graphics, and the expression methods are also rich and colorful. According to the composition characteristics of the graphic elements of Zhuang Brocade, the author focuses on the expression of decorative graphics in packaging design and how to use the formal beauty rules of decorative graphics to create design. The artistic visual elements form a full sense of decoration and, through a variety of ways of expression, can endow the packaging design with distinctive visual effects.

3.3.1. Direct Application

Chinese traditional graphics are the product of thousands of years of culture, are rich in meaning, can convey information of different eras, and have accumulated many exquisite patterns. In packaging design, many cases directly use traditional decorative graphics as the main element of visual communication. In layman’s terms, it is to directly put traditional graphics into the layout design of packaging design and support the cultural connotation of the design with the semantics of traditional graphics. This is the simplest and most popular design method. It is worth noting that such a method must understand whether the inner meaning of the traditional graphic elements is consistent with the information to be conveyed by the commodity. It can accurately convey the intrinsic relationship between the essential characteristics of commodities and the semantics of graphics, thus causing consumers’ “emotional” consumption.

3.3.2. Simplify the Complexity

Traditional graphic elements generally come from the decorative patterns on traditional utensils, and the patterns are exquisite and complex, mostly from the hands of skilled craftsmen. In the preindustrial world, handcrafted objects were still the main trend. Therefore, the exquisiteness of the shape of the utensils is closely related to the identity, status, and aesthetics of the users at that time. With the rapid development of economy in today’s world, people’s life rhythm and way are quietly changing with the progress of technology, which affects the change of design aesthetics. Modernism advocates the liberation of design form from complicated decoration. Simplifying complexity is to reduce the visual “weight” of traditional graphic elements and make traditional decorative graphics more suitable for the needs of modern packaging design. It weakens the cumbersome details in order to emphasize the main part of the packaging.

3.3.3. Overlay Repetition

Sometimes a single graphic element has a thin visual sense. The same figure is regarded as the elements of the plane, as a point, a line, or a surface. It produces a rhythmic visual rhythmic beauty, graphic elements, and the criss-cross of these relationships; no matter how it is unfolded, as long as it is orderly, it will naturally lead to infinity. The correctness of this view can be proved from the composition of many decorative patterns and geometric figures.

3.3.4. Color Reconstruction

Color is one of the basic elements of graphics, and it is also the most eye-catching part of packaging design. Vision is a dynamic process, which is in motion and must be enhanced by color. The elements of the plane are inseparable from the support of color attributes. There are three elements of color: hue, lightness, and purity. It is one of the richest, most rapid, most lasting, and most profound ways to enrich the graphic language and induce people’s psychological effects. Therefore, color with its dynamic visual tension touches people’s special sensitivity to color. This determines that people’s eyes are finally attracted by the “colorful” color packaging, which shows that color plays a pivotal role in packaging design.

In packaging design, we can even creatively strengthen the visual element of national color, so that the formal beauty of traditional graphic elements can be more fully displayed. Several popular packaging design styles are shown in Figure 6.

As the most intuitive visual element, graphics can directly convey information and are an important content in packaging design. Zhuang brocade graphic element is a kind of decorative visual symbol. Decorative patterns such as rhombus, water ripples, and fringe patterns are arranged in a continuous two-sided or four-sided continuous manner. The pattern is continuous, neat, and full of decorative beauty. Geometry has always been an enduring element of modern design. The modeling structure of the geometry of modern graphic design works is widely used in modern art design. The use of geometric elements can be seen in architectural design, environmental art design, small graphic design, fashion design, industrial design, etc. As the most elastic regular body, geometric elements can generate countless associations; no matter how abstract or how simple they seem, they all convey meaning. Our brains often identify things by shape, and shape is information.

4. Improved Wavelet Threshold Denoising Experiment

4.1. Wavelet Threshold Denoising Experiment

Wavelet threshold denoising is based on the fact that wavelet transform has strong de-data correlation as the main theoretical basis. After wavelet transform, the spectrum of the original signal is concentrated in the wavelet domain with larger wavelet coefficients. The frequency spectrum of the noise is distributed in the whole wavelet domain. Therefore, the wavelet coefficients of the signal can be retained by the thresholding method, and the wavelet coefficients of the noise can be removed by setting zero, thereby separating the noise and the wavelet coefficients of the signal.

Threshold is the key parameter of wavelet threshold denoising. Its setting has a great influence on the denoising effect. If the threshold is too small, more noise will be retained in the obtained denoised image, and the denoising will be incomplete. If the threshold is too large, some important details will be erased while removing the noise, which will increase the blurring of the denoised image.

In this paper, the packaging design diagram containing Gaussian noise is denoised. Compared with the denoising effect of the several threshold setting methods, this paper chooses the one with the best effect to improve it to obtain a better denoising effect. In the experiment, Gaussian noise with variances of 0.005, 0.01, and 0.02 was added to the original image, and the “sym6” wavelet was used to decompose the image in three layers, and the wavelet coefficients were processed by the soft threshold denoising function. And it uses peak signal-to-noise ratio (PSNR) and structural similarity (SSIM) as objective evaluation criteria for denoising results. Tables 2 and 3 are the SSIM and PSNR comparisons of images before and after denoising with different threshold setting methods.

Although these different threshold setting methods cannot completely eliminate the noise in the image when using wavelet threshold denoising, it can be seen that each method can suppress the noise to a certain extent.

4.2. Simulation Experiment of Improving Wavelet Threshold Setting Method

The packaging design diagram containing Gaussian noise is denoised by the improved threshold setting method of layer-by-layer variation. It is compared with the traditional fixed threshold wavelet denoising method and several common image denoising methods mentioned. The experimental results are shown in Tables 4 and 5.

It can be seen from the table that the improved wavelet threshold setting method has improved the denoising effect of Gaussian noise compared with the traditional denoising method. And the larger the noise variance, the higher the improvement of the denoising effect. The maximum and minimum thresholds that change layer by layer are significantly improved compared to the globally fixed thresholds and even better than the best global fixed thresholds.

5. Integration of Visual Elements in Packaging Design

5.1. Multivalued Typical Samples

A canonical sample of multiple values is an extension of a canonical sample of a single value, which is the most representative value in the large-scale statistics of the target pattern representing the characteristics of the target pattern. However, in the actual operating environment, due to factors such as sensor error, surrounding environment, and the mutual influence of various parts during the operation of the equipment, it is easy to cause the value to change. The typical value of a certain target mode is often not fixed but sways around a value and deviates from the typical empirical value to different degrees; that is, the typical sample should no longer be a fixed value, but within a certain interval. The Gaussian distribution-based multivalued typical sample BPA mainly uses the Gaussian distribution to construct the reliability function density. When solving the online identification problem of package design, typical samples must follow a Gaussian distribution, which can be considered as interceptable. The Gaussian distribution is used to fit it to get the final multivalued typical samples and the reliability function density function, and the final BPA is obtained by mathematical statistics and normalization algorithm. Its specific situation is shown in Figure 7.

The multivalued typical sample based on the skewed normal distribution further develops the typical sample based on the Gaussian distribution, and its distribution type is more representative and universal. According to the central limit theorem, if a probability variable is the sum of multiple independent relatively small probability variables, it can be considered a Gaussian distribution. The Gaussian distribution actually reflects the staged process and the stable process. The gamma distribution reflects the abrupt and turbulent processes.

5.2. Recognition Training and Test Analysis

Recognition performance depends on whether it has excellent generalization ability, and the generalization ability test cannot be run on the data of the training set. Instead, it uses test data other than the training set used for testing. The recognition error of the training set samples is small, but when the error of the test set samples is large, the generalization ability is reduced due to the overmatching of recognition actions during training. For example, the data of the training group is represented by mouth, and the data of the test group is represented by mouth. In extreme cases, the recognition function is similar to a table lookup, as shown in Figure 8.

As can be seen from the error curves, before a specific training time, both error curves decrease with increasing training time. Beyond this number of training runs, the training error will continue to decrease and the test error will start to increase. Therefore, this number of training is the most suitable number of training, and stopping training before this is called bottom training, and after that it is called overtraining.

5.3. Combined Analysis of Improved Denoising Method and Adaptive Median Filtering

In the traditional Canny operator, the smooth scale in the Gaussian function needs to be set manually. In order to overcome this problem, this paper chooses the improved wavelet threshold denoising algorithm proposed in the experiment part instead of Gaussian filter to process the image. It achieves the purpose of removing noise without human intervention. The Canny operator using this denoising method and the traditional Canny operator with different smoothing scales are used in the packaging design, respectively. The specific results are shown in Figure 9.

Observing the position of noise points in the final edge detection results, it can be found that salt and pepper noise appears as isolated pixels. Combined with this property, in order to facilitate the implementation of the algorithm, this paper considers the pixel position with less than 2 consecutive pixels as the salt and pepper noise point and uses the traversal method to determine the position of the suspected salt and pepper noise point. The picture shows the image of the determined noise point position. After calculation, the detection accuracy of this method in the packaging design image is 94.34%, an increase of nearly 30%.

5.4. Accuracy Rate of Text Recognition in Packaging Design

In the previous section, we analyzed the problems of image recognition and denoising in packaging design. In this paper, a recognition accuracy analysis is carried out for the unavoidable text recognition problem in packaging design. According to the difficulty of the text, strokes, etc. are divided into 5 levels. By comparing the use of traditional text recognition and improved pattern recognition, this paper explores its recognition capabilities. The results of the specific experiments are shown in Figure 10.

From the figure, we can see that the recognition accuracy using the traditional text recognition method in five different text difficulty levels is 38.6%, 36.9%, 41%, 39.4%, and 42.1%. The rejection rates were 30%, 29.9%, 26.1%, 27.2%, and 26.2%. On the other hand, the recognition accuracy after improvement is 51.3%, 56.8%, 54.9%, 55.2%, and 57.1%. The rejection rate of the improved pattern recognition method is 30%, 26.3%, 25.9%, 24.9%, and 24.5%. Although the rejection rate has not changed much, the recognition accuracy has increased by nearly 18%. It performs an accurate identification of the designed text in the actual pattern recognition packaging design.

6. Conclusion

The main research content of this paper is to conduct a research and analysis on the integration of artistic visual elements by identifying the effect of packaging design with the aid of pattern recognition technology. For the key pattern recognition technology, this paper has made a full study and understanding of it in the method part. For its identification method, the principle of identification has been split and understood in this article. In this paper, the most important image recognition algorithm in pattern recognition is improved. It enables the improved algorithm to more accurately identify the packaging design in the research topic of this paper. At the same time, this paper explores the effect of the algorithm in the experiment and analysis part. The results also show that the algorithm can be well adapted to the identification of packaging design.

Data Availability

No data were used to support this study.

Conflicts of Interest

These are no potential competing interests in this paper.