# Oil Painting Art Style Extraction Method Based on Image Data Recognition

Authors: Wei Guo
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

This paper introduces the background and significance of oil painting art style research and summarizes the concept and development of oil painting. Based on the research of image data recognition technology, a new method of oil painting art style extraction based on image data recognition is proposed. The visual features of oil painting images in hue, lightness, and purity are calculated in color space, which are divided into global color features and local color features. Color image boundaries are obtained by using structures of various scales, and then the boundaries are synthesized by multiscale merging algorithm to obtain the boundary results. Using a module fixing and dividing method, we can get the local area that can best show the characteristics of the writer’s painting style. The oil paintings are described by the key region algorithm, and then their artistic style features are obtained. Experiments show that this method is effective and reliable, and the recognition rate of this algorithm is higher than that of other algorithms. This study not only solves the problem that the selection of local areas is too subjective, but also provides new ideas for the study of oil paintings.


---

## Body

## 1. Introduction

As an important painting species, oil painting has a long history of over a hundred years, and it is a traditional painting art in the West. With the development of economy and the integration of the world, the development of oil painting tends to be diversified, which plays an important role in the development of human civilization [1]. The painting method of oil painting is different from other paintings, and it also has its own special charm. The historical process of oil painting is first concrete and then abstract, and finally various forms coexist [2]. By studying oil paintings, people can understand the history of human society’s history, culture, and development of science and technology so as to achieve the goals of “taking history as a mirror,” “making the past serve the present,” clarifying the knowledge structure, improving social cognition, and clarifying the future development direction. There are many kinds of modern paintings [3]. With the development of economy and the integration of oil painting with the world, the development of oil painting tends to be more international and diversified. In recent years, the digital development of painting works is in the ascendant, and more and more scholars combine computers to study painting images. The amount of information contained in images is increasing rapidly with the progress of the times [4]. Among them, the extraction method of oil painting artistic style is a difficult problem in computer-based painting research. The existing research is not satisfactory in expressing the corresponding relationship between semantic areas in the image, and the noise contained in the original image makes the edges and noises change greatly when they are gray in the spatial domain, and they are reflected as high-frequency components in the frequency domain, which brings some difficulties to edge detection [5]. As for the selection of local features, most studies use manual segmentation to select local areas, which leads to the low effectiveness of the features finally extracted and the inability to accurately describe the artist’s artistic style.Images contain more and more information, and their importance is obvious in the process of obtaining information, exchanging information, and sharing information. From the current development point of view, it will become more important in the future [6]. With the development of artificial intelligence, multimedia, and computer, image processing technology has become more and more widely used, and some achievements have been made in scientific research, education, management, medical treatment, and military affairs. Our production methods and methods are being changed by image processing technology [7]. Computers can only process digital and discrete data, not continuous data. The images we get are natural images that cannot be understood by computers [8]. Therefore, the computer cannot directly process such images, so we must first convert these images into digital data that can be understood by the computer, and then let the computer process these digital image data. Oil painting art style extraction based on image data recognition involves two fields of computer science and oil painting art [9]. It is an interdisciplinary research field of computer science and oil painting art. There are three basic painting techniques in oil painting [10]. They are as follows: (1) Nordic Netherlands School of Painting, transparent Bo Tu painting represented by Jan Van Eyck. (2) Southern European Italian School of Painting, represented by Venice Titian’s opaque thick painting method. (3) Represented by Flemish painter Rubens, the eclectic painting method of transparent Bo Tu in the dark part and opaque thick painting in the bright part, which combines the north and south techniques. Artists’ works often contain their own unique creative forms, such as creative ideas, composition styles, brushstrokes, and so on [11]. Different subjects of painting have different perceptions of things, and the order of painting will not be the same, which also reflects the personalized characteristics of everyone’s paintings from another level. As one of the expressive languages that make up the picture, the expressive law of brushstrokes is consistent with other formal expressive laws [12]. The basic laws are dialectical opposites and unified laws. That is, there is change and unity, and at the same time, we seek rhythm in the change and unity. Based on the research of image data recognition technology, this paper discusses the extraction method of oil painting artistic style.As a branch of image research, the study of oil painting art style can also be included in the study of image color characteristics [13]. Global color histogram, color moment and color entropy, spatial color aggregation vector, and color correlation graph are all important methods of this research. The global color feature not only reflects the impressionist painter’s impression of the whole painting scene, but also reflects the first impression of ordinary audience when they appreciate oil painting [14]. With the development of various computer technologies, images have gradually become and have become an important source of information for people, and it is also an important way for human beings to communicate with each other and know and understand the material objective world. In this paper, the extraction method of oil painting artistic style based on image data recognition technology is studied. The feature extraction method and classification design method are summarized. By comparing with the existing methods, the advantages and disadvantages are analyzed, and the existing feature extraction and classification recognition algorithms are improved. Calculate the hue harmony template type of oil painting image and construct hue histogram. According to the template type, the most prominent hue is extracted. The key areas of paintings are detected from the main color and color complexity of paintings, and the paintings are described by the key area algorithm, and then their artistic style features are obtained. A large number of experiments are carried out in this paper, and the experimental results verify the effectiveness and reliability of this algorithm.


## 2. Related Work

Literature [15] proposed that color histogram can be used as a research method of image color features. Literature [16] analyzes the information content of each region of oil painting with color features and proposes a key region detection algorithm based on color. Literature [17] introduces image preprocessing. Some methods of smoothing and sharpening images in spatial domain and frequency domain and methods of graying are analyzed. Literature [18] uses an improved k-means algorithm to cluster painting images. This method uses triangle inequality method to improve the speed and result of clustering. Literature [19] points out that oil painting, as an art form, contains many important elements, and color is the most prominent feature of oil painting. Literature [20] puts forward the method of color correlation diagram, which can reflect the spatial distribution characteristics of painting images. Literature [21] puts forward a mainstream direction extraction technology aiming at the stroke characteristics of oil paintings, which is used to automatically extract the stroke directions of paintings that cannot be recognized by human eyes. Literature [22] proposed the detection algorithm of key areas in traditional Chinese painting based on Canny edge detector, but this method is only suitable for traditional Chinese painting, not for oil painting. Literature [23] proposed a method of shape feature extraction with strong universality and high stability, that is, using wavelet multiscale transform and correlation moment to extract shape features. Literature [24] analyzes and studies the overall style of oil painting. The extraction method of global features is introduced, namely, color features and texture features. Literature [25] holds that the main feature of oil painting is its particularly rich color. At the same time, each oil painter has different cognition of color and unique aesthetics.Based on the previous research results, this paper proposes a new method of oil painting art style extraction based on image data recognition. The texture features, color features, and shape features of images are extracted, and some classical methods are introduced. In the key area detection and selection part, the area complexity is considered from the color complexity. Color entropy is used to calculate the complexity of the region to ensure the feature richness of the key regions, and at the same time, the key regions can fully reflect the characteristics of the painter’s brushwork habits. Combined with the dominant color and color richness, a key area detection algorithm is proposed, and then the key areas that can reflect the artist’s artistic style are extracted. It is detected by texture complexity, stroke complexity, and contour features. The technologies of semantic segmentation, feature extraction, and matching are integrated to ensure the accuracy of segmentation and the robustness of features with little manual interaction. Using Fisher score feature selection mechanism, the extracted features are screened so as to describe the artist’s artistic style with the extracted features more accurately.


## 3. Methodology

### 3.1. Image Preprocessing

Oil painting is the creation of artists or individuals through thinking, imagination, and concepts of objective things or abstractions. The so-called works of art are all the crystallization created by human beings combining their subjective imagination and using their own wisdom and inspiration [26]. Brushstrokes, as one of the expressive languages that make up pictures, are consistent with other formal expressive laws, and the basic laws are dialectical opposites and unified laws. That is, there is change and unity, and at the same time, we seek rhythm and rhythm in the change and unity. When external things enter the artist’s creative inspiration area, the artist first recognizes and perceives different scenes, then divides the related scenes to different degrees, and then determines the specific position of each object and which area of the picture each object should be in. Color is the first information that we can get from oil paintings, even if we are far from the oil paintings to watch. When creating, the painter will grasp the choice and collocation of colors as a whole so that they can be combined in an orderly, harmonious way, that is, the overall color harmony. Artists’ works often contain their own unique creative forms, such as creative ideas, composition styles, brushstrokes, and so on. Different subjects of painting have different perceptions of things, and the order of painting will not be the same, which also reflects the personalized characteristics of everyone’s paintings from another level. These characteristics exist in all art treasures, whether Chinese painting or Western oil painting. Impressionist painting is a kind of painting method in Western oil painting, and the composition of its works is often that the painter uses a typical stroke or strokes to form his own unique creative style.When collecting oil painting images, due to the different collecting environments and equipment, the obtained images have problems such as different sizes and noises. This will interfere with the later image processing, affect the effectiveness of feature extraction, and lead to inaccurate results, thereby affecting the description of artistic style characteristics of paintings. Therefore, image preprocessing of paintings is an essential part of the artist’s artistic style feature extraction. Preprocessing pictures cannot change the human senses; it just changes the numbers in the pictures in order to improve the effect of machine recognition.Generally, the length and width of the collected pictures are not all the same. When selecting the features of the region and structure of the pictures, there is a big gap between the feature values of the obtained pictures and the actual ones, which is not conducive to the later data processing. This will not only lead to the lack of uniform standards for the extracted results when extracting features from the image areas, but also affect the accuracy of the results. At the same time, it will also make the feature extraction process more complicated, which is not conducive to the detection of key areas in the later period and the extraction of artistic style features of paintings. Therefore, the scale of the picture is processed by normalization method so that it is all in the same range, and then the features are extracted, which can remove the influence of this aspect.There are component images in a color image, so we need to first decompose the component images contained in the color image, process these component images separately, and then use these processed component images to synthesize a color image; then, we can get the processed color image. The normalization of painting image scale is to convert painting image into standard mode. This can prevent the influence of affine transformation and reduce the influence of geometric transformation. Improve the standardization of feature extraction of paintings and the accuracy of painter’s artistic style description. At the same time, reducing the image to the appropriate scale can also save the operation time and reduce the workload. Pixel method is used to determine the boundary of color blocks, which is simple and fast. It only needs to mark the boundary of color blocks with special colors. After the size of the image changes, mark the special colors to fill the gaps; that is, the changed boundary can be obtained. The fitting process is shown in Figure1.Figure 1
Fitting flowchart.From the human eye, the picture is no different from the original after the normalization operation. However, its advantage lies in the following feature selection: firstly, it can greatly reduce the workload; secondly, improve the image quality. Usually, the interpolation method is used to normalize the scale of paintings, that is, to reduce the length and width of the original paintings, keep the linear nature of paintings, and get paintings with the same scale standard. Common interpolation algorithms include nearest neighbor interpolation algorithm, bilinear interpolation algorithm, and bicubic interpolation algorithm. In this paper, the average quantization method is used to collect gray information. On the premise of ensuring that the gray level of the picture does not change, it can be made uniform in the case of uneven scale. After normalizing a large-scale picture, it can save arithmetic time and reduce its own proportion in the later work. As there are at least three component images in a color image, in fact, in a color image, color pixels are vectors.Before smoothing, we should first know some basic knowledge about noise. Image noise is interference information in image data. There are all kinds of disturbing noises in image transmission, which are caused by image acquisition and quantization. In an image, the last thing we want to see is noise, but noise is everywhere in the image. If there is noise in paintings, it will seriously affect the image quality of paintings. Therefore, it is very important and necessary to denoise paintings before operation. The function of smoothing is to eliminate these unnecessary interferences. Image noise can be divided into different types according to different characteristics. For example, noise can be divided into quantitative noise, additive noise, and multiplicative noise according to its composition. According to the noise density, the noise can be divided into gamma noise, Rayleigh noise, salt-and-pepper noise, uniform noise, and teaching noise. There are various methods of denoising, such as wavelet denoising, Gaussian filtering, Wiener filtering, median filtering, mean filtering, and so on.Image segmentation is very important for contour extraction, and image segmentation has a great influence on the final artistic style extraction. Image segmentation is the key to transform painting image processing into painting image analysis. It divides each part of a painting into several disjoint but unique areas and extracts several interesting objects. The so-called image color block division is actually image segmentation. We can use the method of color similarity to divide image color blocks. When using linear filter for image processing, the details are often blurred, and median filter is very effective for pulse interference caused by scanned images. A lot of actual calculation is reduced, and it is unnecessary to calculate the statistical characteristics of the image. The image segmentation process is shown in Figure2.Figure 2
Image segmentation flowchart.Because most of the energy of the image is concentrated in the low-frequency or intermediate-frequency band of the amplitude spectrum, and an image may be interfered and influenced by multisource noise, one method is smoothing, which can not only eliminate these interferences and influences, but also make the lines and edge contours of the image not blurred. Gaussian filter is a kind of linear smoothing filter, which is suitable for dealing with paintings damaged by Gaussian noise. Gaussian filter is used to denoise paintings, that is, to average the pixels of the whole paintings. The denoised values of pixels in paintings are the pixel values in the selected template after weighted average.Smoothing is often used in image preprocessing, which can make the brightness of the image gradually change. Smoothing filter can be used to reduce or eliminate noise, remove irrelevant details in the image, and improve the image quality. Because the image contains random noise and other interference and influence, the common application of smoothing is to reduce or eliminate noise. Mean filtering is a method of filtering with the mean method. When dealing with paintings, mean filtering and neighborhood averaging are used to replace each pixel value in the original painting image with mean value. The function of image sharpening is to use high-pass filter to pass the high frequency and suppress the low frequency so that the low frequency attenuates the high frequency smoothly. The high-frequency part of the spectrum corresponds to the part of the image where the gray scale suddenly changes.


### 3.2. Oil Painting Art Style Extraction

Different times and different regions often become the basis of different artistic styles of painters. In addition, painters have different artistic talents, so each painter’s painting style is quite different. Style refers to the ideological content and artistic style of an era, a school, and a person’s literary and artistic works. Works of art unify the content and form of works harmoniously and show ideological tendency and artistic features from them, thus forming the style of works of art. The artist’s style is not abstract and empty, but is embodied in the artistic works, which is the artistic style feature. This artistic style often shows the attributes of the times, nationalities, and classes. Even the same writer and artist will have different styles in the early and late stages.Usually, different artistic styles only correspond to painters themselves, but it is difficult to quantify them. Painting language is a unique language mode for painters to express their creative intention by means of painting. It is through the medium of painting language that audiences can interpret paintings and understand and feel painters’ thoughts, emotions, and ideas. The paintings of different individual painters must follow their own language expression rules, but they must have their own language characteristics so that their painting art will have strong appeal and long-term vitality.The art style extraction of paintings is to use mathematical methods to extract image information from computers. There is no universal and precise definition of the art style of paintings. The color features, texture features, stroke features, and shape features of painting images are all included in this definition. The “edge” of an image is the feature of the graph line. Edge detection can find a position where the gray value has changed greatly. “Edge” is a dividing line, and the local characteristics of different areas are different. Object contour plays an important role in object recognition. At present, there are many matching algorithms about object contour. But most of them only consider the inner and outer contour of the shape and do not consider the line drawing in the shape. This paper pays more attention to the matching algorithm of object line drawing. Edge detection of oil painting can reflect the structural characteristics of oil painting itself. It is obvious that we can see the changed local features in the image structure, which can show the changes of oil painting attributes.A binary image ofM × N can be represented as a two-dimensional array AM×N=aij, where the pixels of aij=l correspond to the target point of the object. The pixel with aij=0 corresponds to the background point. Let the following formula be the set of background points:(1)B=x,y|axy=0.Then, the distance transformation is to find all the pixelsi,j in A:(2)dij=minDi,j,x,y,x,y∈B.Among them,(3)Di,j,x,y=i−x2+j−y2.Thus, the Euclidean distance transformed imageDM×N of the binary image A is obtained.On the basis of the generated line drawing, the line drawing of the object is sampled at a certain frequency, and the discrete representation of the line drawing is obtained. Not every sampling point is the characteristic point of line drawing, but mainly the sampling point with relative information. Because of the painter’s own habits and the characteristics of the theme, the paintings will produce different textures. Texture is another important feature of paintings, which has rotation invariance and good antinoise performance, and can depict repeated local patterns and arrangement rules in paintings. Statistical method, geometry method, model method, signal processing method, and structure method are the main methods to extract texture features.Calculate the average hue value, average purity value, and average brightness value of an oil painting image as the statistical value of oil painting color characteristics. From the artistic point of view, these statistics represent the overall impression of an oil painting. For each pixel, they will be assigned to a designated area and marked. If they are not assigned to a designated area, the comparison process will be repeatedly used until there are pixels in this color area that do not meet the color similarity conditions or are limited by the boundary of the image. At this time, the area where the seed pixel is located has grown and all the pixels that meet the conditions are assigned to this area.Givenn sample points x1,x2,…,xn in the d-dimensional space Rd, the mean shift vector at point x can be defined by the following formula:(4)Mhx=1k∑xi∈Shxi−x,where Sh is a high-dimensional spherical region of radius h, the set of y points satisfying the following relationship:(5)Shx=y:y−xTy−x≤h2.Among them,k indicates that among the n sample points xi, there are k points falling into the area.Scale-invariant feature transformation algorithm firstly detects features in scale space and determines the position of key points and the scale of key points. Then, it uses the main direction of the neighborhood gradient of key points as the directional feature of the point so as to realize the independence of operators on scale and direction. Global features represent the overall visual features of oil painting, while local features can represent those prominent areas in oil painting that can attract the audience’s attention more easily. In order to analyze different areas of oil painting, we need to divide the oil painting image into several different parts. Each key point is assigned one or more directions according to the gradient direction of the local image. All subsequent operations are based on the direction, scale, and position of distribution. Using the gradient direction distribution characteristics of pixels in the neighborhood of key points to specify direction parameters for each key point, the operator has rotation invariance.After the process of derivation is completed, the boundary of the module must be determined, and the determination of the boundary is closely related to the threshold. If you want to get more boundaries, you should set the threshold smaller, and the corresponding excessive noise will be detected, which will easily bring values unrelated to the artist’s style. Corresponding to this, the detail detection is incomplete, and the obtained boundary is too long or too short, which is because the threshold is set too high. When painters paint, influenced by objective experience, they will also form unique shape features, area features, and perimeter features. These features are higher-level features than texture features and geometric features. Shape features have certain characteristics, such as uniqueness and geometric invariance. Area features and perimeter features can reflect the characteristics of the main objects of paintings to a certain extent. Fit the point of the number,xi,yii=1,2,3,…,n, as y = b + ax, and find a, b such that(6)Jb,a=∑i=1nyi−b+axi2.It can be known from the above formula that(7)nd+a∑i=1nxi=∑i=1nyi,b∑i=1nxi=a∑i=1nxi2=∑i=1nxiyi.Calculatea and b; y = b + ax is the fitted straight line. Information entropy is a measure of the degree of ordering of a system. The more orderly a system is, the lower the information entropy is. Conversely, the more chaotic a system is, the higher the information entropy is, such as the following formula:(8)Hx=−∑i=1npxilogpxi.Among them,pxi represents the probability of event xi, and ∑i=1npxi=1. The greater the uncertainty of the event, the greater the entropy. The size of color entropy reflects the amount of color information. The larger the value of R, the richer the color information of the region, as shown in the following formula:(9)R=−∑pilogpi.For an image, the probability of pixels with different gray levels appearing in the image area is random and independent of each other. The probability that the color valuei appears in the region is P(i).Set a maximum value and start searching for the initial point. After finding the position of the initial point, start searching for other points from this point. In the process of searching for the boundary point, if the value of a point is less than the set minimum threshold, stop searching. If it is not found, continue searching along the route and stop searching for the position of the calibration point until it is found. When there are areas with slowly changing gray levels in the image, it is possible to merge different areas step by step, resulting in errors. In order to overcome this problem, instead of comparing the gray values of new pixels with those of neighboring pixels, the average gray values of the region where the new pixels are located can be used to compare with the gray values of neighboring pixels.After a module is selected, its gray histogram is obtained on the module, which is not affected by its own shape, color, and other features, and the artist’s painting style feature data is directly calculated from the gray histogram, thus avoiding the influence of unnecessary factors. There are many color features in a painting, but some color features of the painting have no effect on the classification of the painting, and even interfere with the classification results. Therefore, the choice of features is very important to the description of painting. Good feature selection can improve the performance of the model and help to understand the characteristics and underlying structure of paintings. And it can reduce the number and dimension of features, make the generalization ability of the model stronger, reduce overfitting, and enhance the understanding between features and feature values.


## 3.1. Image Preprocessing

Oil painting is the creation of artists or individuals through thinking, imagination, and concepts of objective things or abstractions. The so-called works of art are all the crystallization created by human beings combining their subjective imagination and using their own wisdom and inspiration [26]. Brushstrokes, as one of the expressive languages that make up pictures, are consistent with other formal expressive laws, and the basic laws are dialectical opposites and unified laws. That is, there is change and unity, and at the same time, we seek rhythm and rhythm in the change and unity. When external things enter the artist’s creative inspiration area, the artist first recognizes and perceives different scenes, then divides the related scenes to different degrees, and then determines the specific position of each object and which area of the picture each object should be in. Color is the first information that we can get from oil paintings, even if we are far from the oil paintings to watch. When creating, the painter will grasp the choice and collocation of colors as a whole so that they can be combined in an orderly, harmonious way, that is, the overall color harmony. Artists’ works often contain their own unique creative forms, such as creative ideas, composition styles, brushstrokes, and so on. Different subjects of painting have different perceptions of things, and the order of painting will not be the same, which also reflects the personalized characteristics of everyone’s paintings from another level. These characteristics exist in all art treasures, whether Chinese painting or Western oil painting. Impressionist painting is a kind of painting method in Western oil painting, and the composition of its works is often that the painter uses a typical stroke or strokes to form his own unique creative style.When collecting oil painting images, due to the different collecting environments and equipment, the obtained images have problems such as different sizes and noises. This will interfere with the later image processing, affect the effectiveness of feature extraction, and lead to inaccurate results, thereby affecting the description of artistic style characteristics of paintings. Therefore, image preprocessing of paintings is an essential part of the artist’s artistic style feature extraction. Preprocessing pictures cannot change the human senses; it just changes the numbers in the pictures in order to improve the effect of machine recognition.Generally, the length and width of the collected pictures are not all the same. When selecting the features of the region and structure of the pictures, there is a big gap between the feature values of the obtained pictures and the actual ones, which is not conducive to the later data processing. This will not only lead to the lack of uniform standards for the extracted results when extracting features from the image areas, but also affect the accuracy of the results. At the same time, it will also make the feature extraction process more complicated, which is not conducive to the detection of key areas in the later period and the extraction of artistic style features of paintings. Therefore, the scale of the picture is processed by normalization method so that it is all in the same range, and then the features are extracted, which can remove the influence of this aspect.There are component images in a color image, so we need to first decompose the component images contained in the color image, process these component images separately, and then use these processed component images to synthesize a color image; then, we can get the processed color image. The normalization of painting image scale is to convert painting image into standard mode. This can prevent the influence of affine transformation and reduce the influence of geometric transformation. Improve the standardization of feature extraction of paintings and the accuracy of painter’s artistic style description. At the same time, reducing the image to the appropriate scale can also save the operation time and reduce the workload. Pixel method is used to determine the boundary of color blocks, which is simple and fast. It only needs to mark the boundary of color blocks with special colors. After the size of the image changes, mark the special colors to fill the gaps; that is, the changed boundary can be obtained. The fitting process is shown in Figure1.Figure 1
Fitting flowchart.From the human eye, the picture is no different from the original after the normalization operation. However, its advantage lies in the following feature selection: firstly, it can greatly reduce the workload; secondly, improve the image quality. Usually, the interpolation method is used to normalize the scale of paintings, that is, to reduce the length and width of the original paintings, keep the linear nature of paintings, and get paintings with the same scale standard. Common interpolation algorithms include nearest neighbor interpolation algorithm, bilinear interpolation algorithm, and bicubic interpolation algorithm. In this paper, the average quantization method is used to collect gray information. On the premise of ensuring that the gray level of the picture does not change, it can be made uniform in the case of uneven scale. After normalizing a large-scale picture, it can save arithmetic time and reduce its own proportion in the later work. As there are at least three component images in a color image, in fact, in a color image, color pixels are vectors.Before smoothing, we should first know some basic knowledge about noise. Image noise is interference information in image data. There are all kinds of disturbing noises in image transmission, which are caused by image acquisition and quantization. In an image, the last thing we want to see is noise, but noise is everywhere in the image. If there is noise in paintings, it will seriously affect the image quality of paintings. Therefore, it is very important and necessary to denoise paintings before operation. The function of smoothing is to eliminate these unnecessary interferences. Image noise can be divided into different types according to different characteristics. For example, noise can be divided into quantitative noise, additive noise, and multiplicative noise according to its composition. According to the noise density, the noise can be divided into gamma noise, Rayleigh noise, salt-and-pepper noise, uniform noise, and teaching noise. There are various methods of denoising, such as wavelet denoising, Gaussian filtering, Wiener filtering, median filtering, mean filtering, and so on.Image segmentation is very important for contour extraction, and image segmentation has a great influence on the final artistic style extraction. Image segmentation is the key to transform painting image processing into painting image analysis. It divides each part of a painting into several disjoint but unique areas and extracts several interesting objects. The so-called image color block division is actually image segmentation. We can use the method of color similarity to divide image color blocks. When using linear filter for image processing, the details are often blurred, and median filter is very effective for pulse interference caused by scanned images. A lot of actual calculation is reduced, and it is unnecessary to calculate the statistical characteristics of the image. The image segmentation process is shown in Figure2.Figure 2
Image segmentation flowchart.Because most of the energy of the image is concentrated in the low-frequency or intermediate-frequency band of the amplitude spectrum, and an image may be interfered and influenced by multisource noise, one method is smoothing, which can not only eliminate these interferences and influences, but also make the lines and edge contours of the image not blurred. Gaussian filter is a kind of linear smoothing filter, which is suitable for dealing with paintings damaged by Gaussian noise. Gaussian filter is used to denoise paintings, that is, to average the pixels of the whole paintings. The denoised values of pixels in paintings are the pixel values in the selected template after weighted average.Smoothing is often used in image preprocessing, which can make the brightness of the image gradually change. Smoothing filter can be used to reduce or eliminate noise, remove irrelevant details in the image, and improve the image quality. Because the image contains random noise and other interference and influence, the common application of smoothing is to reduce or eliminate noise. Mean filtering is a method of filtering with the mean method. When dealing with paintings, mean filtering and neighborhood averaging are used to replace each pixel value in the original painting image with mean value. The function of image sharpening is to use high-pass filter to pass the high frequency and suppress the low frequency so that the low frequency attenuates the high frequency smoothly. The high-frequency part of the spectrum corresponds to the part of the image where the gray scale suddenly changes.


## 3.2. Oil Painting Art Style Extraction

Different times and different regions often become the basis of different artistic styles of painters. In addition, painters have different artistic talents, so each painter’s painting style is quite different. Style refers to the ideological content and artistic style of an era, a school, and a person’s literary and artistic works. Works of art unify the content and form of works harmoniously and show ideological tendency and artistic features from them, thus forming the style of works of art. The artist’s style is not abstract and empty, but is embodied in the artistic works, which is the artistic style feature. This artistic style often shows the attributes of the times, nationalities, and classes. Even the same writer and artist will have different styles in the early and late stages.Usually, different artistic styles only correspond to painters themselves, but it is difficult to quantify them. Painting language is a unique language mode for painters to express their creative intention by means of painting. It is through the medium of painting language that audiences can interpret paintings and understand and feel painters’ thoughts, emotions, and ideas. The paintings of different individual painters must follow their own language expression rules, but they must have their own language characteristics so that their painting art will have strong appeal and long-term vitality.The art style extraction of paintings is to use mathematical methods to extract image information from computers. There is no universal and precise definition of the art style of paintings. The color features, texture features, stroke features, and shape features of painting images are all included in this definition. The “edge” of an image is the feature of the graph line. Edge detection can find a position where the gray value has changed greatly. “Edge” is a dividing line, and the local characteristics of different areas are different. Object contour plays an important role in object recognition. At present, there are many matching algorithms about object contour. But most of them only consider the inner and outer contour of the shape and do not consider the line drawing in the shape. This paper pays more attention to the matching algorithm of object line drawing. Edge detection of oil painting can reflect the structural characteristics of oil painting itself. It is obvious that we can see the changed local features in the image structure, which can show the changes of oil painting attributes.A binary image ofM × N can be represented as a two-dimensional array AM×N=aij, where the pixels of aij=l correspond to the target point of the object. The pixel with aij=0 corresponds to the background point. Let the following formula be the set of background points:(1)B=x,y|axy=0.Then, the distance transformation is to find all the pixelsi,j in A:(2)dij=minDi,j,x,y,x,y∈B.Among them,(3)Di,j,x,y=i−x2+j−y2.Thus, the Euclidean distance transformed imageDM×N of the binary image A is obtained.On the basis of the generated line drawing, the line drawing of the object is sampled at a certain frequency, and the discrete representation of the line drawing is obtained. Not every sampling point is the characteristic point of line drawing, but mainly the sampling point with relative information. Because of the painter’s own habits and the characteristics of the theme, the paintings will produce different textures. Texture is another important feature of paintings, which has rotation invariance and good antinoise performance, and can depict repeated local patterns and arrangement rules in paintings. Statistical method, geometry method, model method, signal processing method, and structure method are the main methods to extract texture features.Calculate the average hue value, average purity value, and average brightness value of an oil painting image as the statistical value of oil painting color characteristics. From the artistic point of view, these statistics represent the overall impression of an oil painting. For each pixel, they will be assigned to a designated area and marked. If they are not assigned to a designated area, the comparison process will be repeatedly used until there are pixels in this color area that do not meet the color similarity conditions or are limited by the boundary of the image. At this time, the area where the seed pixel is located has grown and all the pixels that meet the conditions are assigned to this area.Givenn sample points x1,x2,…,xn in the d-dimensional space Rd, the mean shift vector at point x can be defined by the following formula:(4)Mhx=1k∑xi∈Shxi−x,where Sh is a high-dimensional spherical region of radius h, the set of y points satisfying the following relationship:(5)Shx=y:y−xTy−x≤h2.Among them,k indicates that among the n sample points xi, there are k points falling into the area.Scale-invariant feature transformation algorithm firstly detects features in scale space and determines the position of key points and the scale of key points. Then, it uses the main direction of the neighborhood gradient of key points as the directional feature of the point so as to realize the independence of operators on scale and direction. Global features represent the overall visual features of oil painting, while local features can represent those prominent areas in oil painting that can attract the audience’s attention more easily. In order to analyze different areas of oil painting, we need to divide the oil painting image into several different parts. Each key point is assigned one or more directions according to the gradient direction of the local image. All subsequent operations are based on the direction, scale, and position of distribution. Using the gradient direction distribution characteristics of pixels in the neighborhood of key points to specify direction parameters for each key point, the operator has rotation invariance.After the process of derivation is completed, the boundary of the module must be determined, and the determination of the boundary is closely related to the threshold. If you want to get more boundaries, you should set the threshold smaller, and the corresponding excessive noise will be detected, which will easily bring values unrelated to the artist’s style. Corresponding to this, the detail detection is incomplete, and the obtained boundary is too long or too short, which is because the threshold is set too high. When painters paint, influenced by objective experience, they will also form unique shape features, area features, and perimeter features. These features are higher-level features than texture features and geometric features. Shape features have certain characteristics, such as uniqueness and geometric invariance. Area features and perimeter features can reflect the characteristics of the main objects of paintings to a certain extent. Fit the point of the number,xi,yii=1,2,3,…,n, as y = b + ax, and find a, b such that(6)Jb,a=∑i=1nyi−b+axi2.It can be known from the above formula that(7)nd+a∑i=1nxi=∑i=1nyi,b∑i=1nxi=a∑i=1nxi2=∑i=1nxiyi.Calculatea and b; y = b + ax is the fitted straight line. Information entropy is a measure of the degree of ordering of a system. The more orderly a system is, the lower the information entropy is. Conversely, the more chaotic a system is, the higher the information entropy is, such as the following formula:(8)Hx=−∑i=1npxilogpxi.Among them,pxi represents the probability of event xi, and ∑i=1npxi=1. The greater the uncertainty of the event, the greater the entropy. The size of color entropy reflects the amount of color information. The larger the value of R, the richer the color information of the region, as shown in the following formula:(9)R=−∑pilogpi.For an image, the probability of pixels with different gray levels appearing in the image area is random and independent of each other. The probability that the color valuei appears in the region is P(i).Set a maximum value and start searching for the initial point. After finding the position of the initial point, start searching for other points from this point. In the process of searching for the boundary point, if the value of a point is less than the set minimum threshold, stop searching. If it is not found, continue searching along the route and stop searching for the position of the calibration point until it is found. When there are areas with slowly changing gray levels in the image, it is possible to merge different areas step by step, resulting in errors. In order to overcome this problem, instead of comparing the gray values of new pixels with those of neighboring pixels, the average gray values of the region where the new pixels are located can be used to compare with the gray values of neighboring pixels.After a module is selected, its gray histogram is obtained on the module, which is not affected by its own shape, color, and other features, and the artist’s painting style feature data is directly calculated from the gray histogram, thus avoiding the influence of unnecessary factors. There are many color features in a painting, but some color features of the painting have no effect on the classification of the painting, and even interfere with the classification results. Therefore, the choice of features is very important to the description of painting. Good feature selection can improve the performance of the model and help to understand the characteristics and underlying structure of paintings. And it can reduce the number and dimension of features, make the generalization ability of the model stronger, reduce overfitting, and enhance the understanding between features and feature values.


## 4. Result Analysis and Discussion

The formation of a work has the artist’s own unique style characteristics. Not only in the brushwork, the use of color, but also in the texture and touch of the canvas itself, it has different characteristics from other artists. This unique way of painting of oil painting is that it is different from other kinds of paintings, and at the same time it has formed its own unique artistic style and visual characteristics. When a painter paints an oil painting, he usually adopts the strategy of layering. In the process of oil painting simulation rendering, firstly, the image is analyzed and layered. Then, according to the spatial distance of objects, from far to near, he starts from the farthest layer, draws layer by layer, and finally draws the image of the front layer. In order to extract the artistic style of oil painting more accurately and eliminate the features that interfere with oil painting description, this paper evaluates the extracted features and selects excellent features. Because each feature of oil painting works is relatively independent, the smaller the intraclass difference of features, the greater the interclass difference of features, and the higher the degree of correlation with the class to which they belong, the better the features are. Figure3 is the convergence process of total loss training in this paper.Figure 3
The training total loss convergence process.It can be seen from the figure that the value of the total loss function decreases very quickly at the initial stage, and it has been close to the optimal value by the 100th iteration, and then the value of the total loss function tends to be stable, indicating that it is very close to the convergence point.This paper collects a large number of data sets and establishes a database of 659 works, including 10 painters and 4 factions. This paper uses the algorithm to extract the key areas of oil paintings and the characteristics of the overall and key areas of oil paintings, so as to realize the extraction and description of artists’ artistic style characteristics. The algorithm describing the artist’s artistic style in this paper is compared withk-nearest neighbor algorithm and support vector machine algorithm to classify oil paintings. At the beginning of training, generate a noise picture according to the content picture, then input the noise picture into the network, calculate the loss, and then adjust the noise picture according to the loss. Then, repeat until the specified number of iterations is reached, and finally save. Figure 4 shows the SNR (signal-to-noise ratio) of edge images extracted by three different methods.Figure 4
Edge image SNR extracted by various methods.From the above figure, it is obvious that after adding noise, the SNR value of common algorithms such as Prewitt is smaller than that of the algorithm proposed in this paper, and the SNR value of this algorithm is larger than that of other algorithms. The above shows that this algorithm can effectively filter out noise and extract effective edges.Texture has good robustness and robustness and is not changed by the direction, position, and size of the picture. Noise cannot have much influence on it. At the same time, it also has its own shortcomings. It is closely related to the discrimination rate. When it changes, the statistical value obtained above the change will also deviate. Extracting the dominant color and combining the dominant color and color entropy, an information-rich measurement formula is proposed. Using this method, the key areas of paintings are detected and features are extracted. Then, based on Fisher score feature selection mechanism, effective features are selected, and the artistic style features of paintings are described by color features, texture features, and other features. Finally, this method is applied to the classification of works. Gray scale distribution is concrete texture. Other situations such as the change of a picture, if you want to use specific numerical values, it is texture features. The co-occurrence matrix. Figure5 shows the effective feature selection results of different algorithms.Figure 5
Efficient feature selection results of different algorithms.It can be seen that compared with other algorithms, this algorithm has the largest number of effective features. Because the peak extraction of hue histogram is still an important step in this method, it is impossible to abandon it. Therefore, it is necessary to divide the hue bands of the color ring so that each hue band can be represented as much as possible. Define the color block boundary with special colors. After the image is enlarged, the special colors are filled and connected to form the boundary. When extracting the texture features of oil painting images, the color painting images are usually transformed into gray images. Gray-scale images can display the darkest to brightest gray scales in paintings, reflect the depth of colors in paintings, and keep the brightness of paintings. The complex image data is transformed into regular space, which is realized by constructing the density function of the image by using the kernel density estimation model. Extracting features and representative pixels in density function space. In order to understand the time-consuming problem of feature selection in this method, three different methods were tested. The result is shown in Figure6.Figure 6
Time-consuming comparison of different methods.It can be seen that by comparison, the method in this paper has the lowest time consumption and better running status. This result verifies the superiority of this method. In the color image, we first select the first seed pixel and then start with this seed pixel, and this seed pixel will be compared with the pixels in its 8 neighborhood but these pixels must not be segmented. Analyze the points with lower values calculated by reading. The mountain climbing method in the mountain climbing algorithm is used to find out all density attractors in all pixel data points. The so-called mountain climbing algorithm is to search by recursive induction along the direction of the ladder. In this process, the density attractor to which all data points pass is the end of the process. Enlarge the image, and get the ideal effect, which is actually equivalent to the original image after increasing the number of pixels. In fact, if you want to enlarge an image, it is essentially interpolation, which is a process of interpolation according to the pixels in the image. The accuracy of oil painting classification results of the three methods for different themes is shown in Figure7.Figure 7
Comparison of the accuracy of oil painting classification results.The analysis shows that this method has a high classification accuracy for oil paintings with different themes. This correct rate has been able to reflect the effectiveness of the article algorithm.To process all the detected clustering feature points, all the clustering feature points detected in this mountain climbing algorithm should be replaced by inserting values into the conventional pixel points in its own image so as to display the clustering image. This approach is convenient to express more clearly the effectiveness based on the image clustering feature extraction formed by the density function. Fitting the color block boundary with polynomial curve avoids the discontinuity of the edge during edge detection and then enlarges the boundary. The enlarged color block boundary has good continuity. Polynomial curve fitting is different from function interpolation; it only requires that the fitting curve reflect the basic relationship of data. Compared with the results obtained by interpolation, the results obtained by curve fitting can better reflect the objective reality, and the error is smaller and the calculation speed is faster.Through comparison in this chapter, it is found that among the selected global features and key features, the effective features of key areas are more than those of global features. It shows that the key areas can reflect the artist’s artistic style, and the texture features of the key areas are all selected, which shows that the key areas can effectively extract the texture features of oil paintings without losing color features. This chapter compares the effective characteristics of global and key areas and analyzes the effectiveness of the algorithm. It is verified that the key region detection algorithm can not only automatically select regions, but also select regions that can effectively describe the artist’s artistic style. It can accurately express the information conveyed by images and has good visibility and distinguishability from other images.


## 5. Conclusions

This paper studies from the angle of artistic style feature extraction, trying to combine image processing technology with art. By detecting the most representative key areas in paintings, the artist’s artistic style features can be extracted. This paper introduces various features of oil paintings and their extraction methods and analyzes the feature selection mechanism. the Preprocessing and segmentation of the input image are completed. Firstly, the input color image is converted into a gray image, and then according to a segmentation algorithm based on region growth proposed in this paper, the gray image is segmented, which ensures the accuracy of segmentation and the robustness of features. In the aspect of image preprocessing, this paper uses the weighted average algorithm to gray the image. The mean filter is used to smooth the image to suppress and eliminate the noise contained in the image, and the Laplace algorithm is used to sharpen the image to improve the image quality and make the visual effect of the image more ideal.In this paper, the effectiveness of this algorithm is tested by different experiments. MATLAB software is used as an experimental tool to extract the features of paintings, including global features and key area features. And Fisher score is used to select features to ensure the comprehensiveness and effectiveness of the artist’s artistic style. The best way to express the object with clear boundaries in the picture is to get some shape features from the edge information. Compared with traditional methods, the advantages of this algorithm are that it can suppress noise better and extract more useful edge information to meet different application requirements. This paper has made some achievements in oil painting art style extraction methods. However, due to the limitations of time and experimental conditions, as well as my limited knowledge level, there are still many problems to be improved in the research of oil painting art style extraction method. For example, the methods of edge detection and image segmentation are not novel enough, and how to combine color blocks in color block division needs to be improved. These problems are worthy of further study in the later stage.



---

*Source: 4196174-2022-05-18.xml*