1. Introduction
Image enhancement is to improve the visual effect of the image. It is also an important issue in many fields such as pattern recognition, robotics, medical image processing [
1,
2,
3], and remote sensing [
4,
5,
6,
7]. There are two types of image enhancement methods, one is the frequency domain method and the other is the spatial domain method [
8,
9,
10]. Based on two-dimensional Fourier transform, frequency domain method performs signal enhancement. Spatial domain method directly performs calculations on the gray level of the image when processing the algorithm based on the spatial domain. In the past, image enhancement used integer orders differential operator to enhance the image, but the effect is not ideal, there are problems such as insignificant enhancement and destruction of smooth areas. Therefore, it is necessary to improve the traditional image enhancement algorithm to improve the effect of enhanced image.
In the past few years, fractional differential operator has gradually been used to process images [
11,
12,
13], and ref. [
14] used the fractional order defined by Grünwald–Letnikov to design a fractional differential mask, which introduces the fractional order into image processing. Ref. [
15] proposed an adaptive fractional total variation image restoration method, and ref. [
16] proposed a multi-scale denoising model based on fractional partial differential equations. At present, the use of fractional differential operators to process images has become a hot issue. Many references have applied this method and achieved certain results. Ref. [
17] introduced a one-dimensional Savitzky–Golay filter, extended it from integer order to fractional order, and from one dimension to two dimensions. Then, proposed an image enhancement algorithm based on two-dimensional Savitzky–Golay filter, and got the smooth area of the image has hardly changed, and the edge details have also been enhanced, but the enhancement effect is not outstanding. The introduction of fractional methods in the field of image processing has remained popular in recent years. Ref. [
18] proposed the AFDA (Adaptive Fractional Differential Algorithm) algorithm is used to enhance medical images, but its algorithm will cause excessive enhancement in local areas. Ref. [
19] proposed an image segmentation and enhancement algorithm, but the disadvantage is lower image contrast.
Rough set and PSO are also used in the image processing. Rough set was first proposed by Polish professor Z. Pawlak in 1982. It is another mathematical method for processing uncertain information after probability theory and fuzzy set theory [
20,
21]. As a mathematical tool for describing uncertainty, it can effectually analyze and process incomplete information such as inconsistency, inaccuracy and incompleteness, it can find hidden knowledge and reveal potential laws [
22,
23]. Ref. [
23] combined rough set and kernel PCA method, proposed a 3D MR image denoising algorithm, ref. [
24] proposed a robust modified Gaussian mixture model with rough set for image segmentation. Ref. [
25] proposed a soft fuzzy rough set-based MR brain image segmentation.
PSO is an evolutionary form research on bird predation behavior [
26]. Finding the optimal solution which is shared among individuals in the group through collaboration and information is the basic idea of PSO. The advantage of PSO is that it is simple to implement and does not have many parameter adjustments. Ref. [
27] combined integrating fuzzy entropy clustering with an improved particle swarm optimization, proposed a new clustering method for segmentation of Magnetic resonance imaging (MRI) brain images. Ref. [
28] proposed a color image segmentation based on multi-level Tsallis–Havrda–Charvát entropy and 2D histogram using PSO algorithms.
Based on these previous works, in order to enhance the texture area and edge of the image while retaining the characteristics of the smooth area, an adaptive fractional-order image enhancement algorithm based on image segmentation is proposed. To achieve the desired purpose, the main difficulty lies in accurately segmenting the texture area, edge and smooth area of the image and how to find the suitable fractional order of image enhancement. The main contributions of the paper are summarized as follows:
An image segmentation method based on rough set and PSO is proposed, which accurately segments the image into smooth area, edge and texture area to prepare for the next step of image enhancement.
According to the local feature information of the image, an adaptive image enhancement algorithm is designed by using fractional differential filter.
The image is enhanced by combining the results of image segmentation, so that the edge and texture area of the image are effectively enhanced while the characteristics of the smooth area of the image are well preserved.
Compared with the refs. [
14,
17,
19], the advantage of the algorithm in the paper is that it combines the rough set and
methods to accurately segment the image, and carries out targeted enhancement according to the segmentation results. The adaptive fractional enhancement algorithm proposed in the paper enhances the edge details of the image more obviously, and the texture details are more prominent, which better overcomes the shortcomings of the traditional fractional filter enhancement that will make the image blurry and the enhancement effect is not obvious.
The rest structure of the paper are as follows.
Section 2 introduces the related knowledge of rough set, PSO and fractional differential filter.
Section 3 proposes image segmentation methods based on rough set and particle swarm optimization, and an adaptive image enhancement algorithm is proposed. The experimental results are given in
Section 4 to illustrate the effectiveness of the algorithm. Finally, the conclusions are given in
Section 5.
3. Main Results
The following is the main works of the paper. Firstly, an image segmentation algorithm is designed using the characteristics of rough set that can deal with incomplete information. According to the characteristic that PSO can find the optimal solution in a solution space, another image segmentation algorithm is proposed. Then, the advantages of these two segmentation algorithms are combined to segment the image. Finally, an adaptive fractional order algorithm is designed based on the local information characteristic of the image, and enhances the edge and texture areas of the image by the segmentation results.
The algorithm flow chart of the paper is as shown in
Figure 3.
3.1. Image Segmentation Algorithm Based on Rough Set
First of all, for the purpose of enhancing the image better, the smooth area, edge and texture regions of the image must be accurately segmented. An image segmentation method based on rough set is proposed here. Dividing the image into sub-blocks of the same size, with each sub-block as the smallest unit, the boundary threshold is calculated through the built-in function Otsu of matlab. Then, combining the rough set to find the best threshold for image segmentation. Experimental results show that this segmentation method effectively distinguishes the edge and texture regions of the image. The image segmentation algorithm steps based on rough set are as follows:
Step 1: For the image , the size of which is , dividing I into N sub-blocks according to the appropriate size, and mark the sub-blocks as . Then, find the maximum gray value and the minimum gray value in each sub-block. Analyzing the results of many experiments, it is found that the more complex the image, the smaller the sub-block segmentation, the more accurate the segmentation. Therefore, the number of sub-blocks should be as suitable as possible for the image.
Step 2: Using the built-in function Otsu of matlab to calculate the optimal boundary threshold
for each sub-block, and obtain the maximum and minimum thresholds
and
. Combining rough set, calculate the upper and lower approximate values of the target
,
and the background
,
by Equations (
15)–(
18):
Step 3: After obtaining the upper and lower approximate values of the target and background, calculate the roughness and entropy by Equations (
5) and (
19). Then, find the maximum entropy corresponding to the pixel value of the image itself, which is the best threshold for segmenting the image. Using the best threshold to segment image I, and finally get the segmentation result.
where
is roughness of the R-th sub-block.
3.2. Image Segmentation Algorithm Based on PSO
It can be found from
Figure 4b and
Figure 5b that the image segementation based on rough set has a ideal effect on the edge and texture area of the image, but the segmentation effect for the smooth area of the image is not obvious. Therefore, in order to better segment the smooth area of the image, an image segmentation method based on particle swarm optimization is proposed. At first, randomly selecting n particles, calculating the individual extremum of each particle to obtain the global extremum; then calculating the gray-scale fitness value of each particle, thereby updating the global extremum, the velocity and position of each particle. In the end of the cycle, the segmentation threshold
T is obtained. The defination of
T is as follows,
where
and
represent the entropy of the target area and the background area in the image, respectively defined as:
where
represents the number of pixels whose gray value is
k. In an image,
represents the total number of pixels whose gray value is lower than
T,
represents the total number of pixels in an image whose gray value is higher than
T.
The experimental results show that the use of PSO algorithm to perform secondary segmentation of the image makes the segmentation effect of the smooth area of the image more obvious. The steps of the image segmentation algorithm based on PSO are as follows:
Step 1: Randomly selecting p among the 256 gray values as the initial particle position (p = 10 in the paper), that is, the
position of each particle in the initial state, and randomly initializing the velocity
of each particle. Calculating the individual extreme value of each particle according to the Equation (
20), the global extreme value is the largest of the individual extreme values, setting
as the current position of the particle.
Step 2: Calculating the gray scale fitness value of each particle according to the Equation (
20). If it is better than the individual extreme value of the current position of the particle, set
to the position of the particle, record the position of the particle and update the global extreme value.
Step 3: Using Equations (
6) and (
7) to update the position and speed of each particle. When the particle gray value is greater than 255, start counting from 0, when the gray value is less than 0, counting backward from 255.
Step 4: In the end of cycle, getting the final , that is to find the threshold T for image segmentation. The parameter is selected in the paper as c1 = c2 = 2, which is obtained according to the experiments.
3.3. Combination of Two Image Segmentation Methods
According to the analysis in
Figure 4b,j and
Figure 5b,n, the rough set segmentation method has better segmentation effect in the texture area of the image, while the PSO method has better segmentation effect in the smooth area and edge of the image. Therefore, the paper combines these two methods to achieve accurate segmentation of image smooth area, edge and texture area. The combining steps in the paper are as follows:
Step 1: Dividing the two segmentation results into sub-blocks of moderate size, represents the number of pixels whose gray value is 0 in each two corresponding sub-blocks, and represents the number of pixels whose gray value is 255 in each two corresponding sub-blocks. If is less than half of the sum of the number of pixels in the two sub-blocks, it means that the area is more likely to have black background and white edge. If is less than half of the sum of the number of pixels in the two sub-blocks, it means that the area is more likely to have a black background and a white edge.
Step 2: Detecting sequentially the pixel values corresponding to the two segmentation results in turn. If the pixel values corresponding to the two segmentation results are both 0, the pixel value of this point in the final segmentation image is 0; if both are 255, the pixel value of this point in the final segmentation image is 255; if the two are different, find what state the pixel belongs to in step 1, if it is a white background and a black edge, the pixel value of this point is recorded as 0; if it is a black background and a white edge, the pixel value of this point is recorded as 255.
3.4. Adaptive Fractional Enhancement Algorithm
Fractional differential filtering not only strengthens high-frequency signal of the image, but also retains some low-frequency information non-linearly. Therefore, in image processing, the fractional differential is used to enhance the edge texture details, and to a certain extent retain the information of the smooth area of the image.
For a two-dimensional image
, the duration
is equally divided by unit interval
, namely
. Then, the partial fractional differential of
in the
direction and
direction is:
Extend the above two Equations (
23) and (
24) to the other six directions, and get a fractional filter based on eight directions [
14], as shown in
Figure 6.
where
,
,
can be calculated by the above formula,
v is the fractional order.
In the image enhancement process, the order of the fractional differential has a significant impact on the image enhancement effect. It is not only related to the average value of the gradient amplitude, the maximum of gradient amplitude and the minimum of gradient amplitude, but is also affected by the partial information of the image. The paper is to better enhance the edge details of image, an adaptive algorithm is designed according to the partial information of the image, which calculates the appropriate fractional order according to the partial information of the image.
Definition 1. [35,36]: Image entropy is characteristic statistical form that reflects the average amount of information in an image. Generally, the S in the smooth area of the image is small and which of the edge detail area is large. The expression is as follows,where is the probability of pixel value in the image. Definition 2. [37]: For an image , suppose the average value of the gradient amplitude in 8 directions of each pixel in is and normalized. Taking the maximum of as X, the minimum of as Y, and dynamic amplitude expression is obtained. The expression of the gradient magnitude M is as follows, Definition 3. [38]: An image has image roughness C, this value represents the relative offset of the gray value of the image pixels, which is large in the texture region and small in the smooth region. The expression of C is as follows,where σ is the local mean square error of the image. The three definitions mentioned above are image entropy, gradient magnitude and roughness. The common feature of these three definitions is that they are smaller in the smooth area of the image and larger in the texture area of the image, which means that the higher the value of the local information parameters M, S, C are. If the value of M, S, C are large, it indicates that the probability that the area is the target enhancement area is greater, and the fractional order should be larger; the smaller the value of M, S, C, the smaller the probability that the area is the target enhancement area, and the fractional order should also be smaller. It can be seen that the size of the fractional order is positively correlated with the size of the local parameter values of the three images.
, , are the weighting coefficient of the image local information parameter M, S, C and the sum of the three is 1. Since the value of M, S, C represents different characteristics of the image, the selected value of , , can be determined according to its influence degree. After many experiments, it is found that the roughness compared with the other two local information parameters, the influence is greater, so takes , the influence of image entropy is second, , the influence of gradient amplitude is the least, and .
The parameter
,
is adjustment parameter. Since the
E exponent is an increasing function in the real number domain, the enhancement range increases with the increase of the variable, which is in line with the purpose of the algorithm in the paper, so the fractional differential adaptive algorithm can be obtained,
where
Q is the adjustment parameter. After many experiments with different images, it is found that the image enhancement effect is the most obvious when
,
.
4. Simulation Experiment
In this section, the segmentation algorithm proposed in the paper is first evaluated with two images. Then, the enhancement algorithm is analyzed with five images, and compared with the [
14,
17,
19]. Finally, a numerical analysis of the experimental results is carried out.
Taking Lena image as an example, the effectiveness of the image segmentation algorithm in this paper is analyzed.
Figure 4b–d are Lena images processed by three image segmentation algorithms, in which some local area is enlarged and observed. It can be seen that
Figure 4e,q belong to the smooth area of the image,
Figure 4m belongs to the edge of the image, and
Figure 4i belongs to the texture area of the image. It can be seen from
Figure 4j that the effect of rough set segmentation method on the processing of the image texture area is satisfactory, but the segmentation effect of the image smooth areas (
Figure 4f,r) and edge of the image (
Figure 4n) is relatively poor. The image segmented by the particle swarm optimization method shows a excellent segmentation effect at the edge of the image (
Figure 4o) and the smooth area of the image (
Figure 4g,s), but the segmentation effect of the image texture area
Figure 4k is poor. Finally, after combining the segmentation effects of the two methods, it can be seen that whether it is the smooth area
Figure 4h,t of the image, or the edge
Figure 4p and texture area
Figure 4i of the image, the segmentation is relatively accurate.
The effectiveness of this algorithm is analyzed by the segmentation effect of plane image.
Figure 5b–d are plane images processed by three segmentation algorithms, and the same method is used to zoom in and observe some local areas. It can be seen that
Figure 5m,q belong to the texture area of the image,
Figure 5i belongs to the smooth area of the image, and
Figure 5e belongs to edge of the image. From the enlarged images of
Figure 5n,r, it can be seen that the segmentation effect of the mountains and the figures at the tail of the aircraft (texture area of the image) after the rough set method is better, while for the smooth area
Figure 5j of the image and the edge of the image
Figure 5f, the segmentation effect is poor. From the enlarged images of
Figure 5g,k, it can be seen that the PSO method effectively segments both the smooth area and the edge of the image, while for the texture area of the image
Figure 5o,s, the segmentation effect is not satisfactory. After combining the segmentation effect of the two methods, the segmentation effect of the rough set method on the texture is retained, and the PSO method is used to make up for the insufficient segmentation of the image edge and smooth area by the rough set method. A satisfactory segmentation effect is achieved.
Visual perception is used to evaluate the effectiveness of this enhancement algorithm.
Figure 7 is the experimental result of the Lena image. The enhancement effect of 0.4-order and 0.6-order are obvious, but the problem of excessive enhancement will occur in same local area. Ref. [
17] enhances the image to a certain extent, but the effect is not obvious. Ref. [
19] enhances edge and texture details but destroys some smooth areas. It can be seen that the enhancement effect of the image processed by 1-order is not obvious compared with other methods. Compared with the original image, the algorithm in the paper has obvious enhancement effect in the texture details such as eyes and hair. The enhancement effect is also satisfactory at the brim and the outline edge of the entire hat. There is almost no enhancement in the smooth area at the background and shoulders. Preserving the properties of the smooth area well. Compared with other algorithms, there is no problem of over-enhancing and destroying the smooth area, which illustrates the validity of the algorithm in the paper.
Figure 8 is the experimental result of the plane image. It can be seen that the letters on the plane in the original picture are relatively blurred, and the junction between the edge of the plane and the cloud layer is not obvious enough. The 0.6-order and 0.4-order has obvious over-enhancement problems in the enhancement of letters. It can be seen that the image of 1-order processing result is not very clear, because integer order processing will blur the image. The overall enhancement effect of [
17] is not obvious. The overall enhancement effect of [
19] is better but destroys the smooth area at the cloud layer. The processing results of the algorithm in the paper are the clearest letters, the processing results of mountains are also obvious better than other algorithms. In the paper, the contour part of the cloud layer is obviously enhanced, and the main part of the cloud layer is basically consistent with the original image, which once again shows that the algorithm in the paper has achieved a great balance between the enhancement of the texture area and the preservation of the smooth area.
For the processing results of
Figure 9, the edge of the house of the processing results in the paper is more obvious, and the middle street part and the overall outline of the tree are also clearly visible. For the smooth area at the road, there is almost no major change. For the processing results of the
Figure 10, the algorithm in the paper shows that the outlines of the three cars are very clear, and they are brighter than the original image after being enhanced in the grass, especially the texture on the front cover of the car below is very clear. The smooth area is almost unchanged, which achieves the effect of enhancing only the edge and texture details. For the aerial
Figure 11, the entire sea surface belongs to the smooth area, after processing by the algorithm in the paper, this part is almost unchanged, while the texture details at the island are rich, which has a good enhancement effect on the edge contour. To sum up, the enhancement effect of the algorithm in the paper is clearer at the edge than other algorithms. The texture area has a better enhancement effect, and the smooth area is well maintained, which illustrates the validity of the algorithm in the paper again.
In the paper, using
[
39] to detect the similarity of two images. The quality of the image can be detected by calculating the similarity of the structural information of the two images, and the visual features are better than the traditional
, the average Gradient and other methods are more in line with human visual perception. The value domain of
is [0, 1], the value is larger, the image distortion is smaller, that is, the better the image visual effect. Its calculation formula is as follows,
where:
is the covariance of
x and
y;
is the variance of
x;
is the mean value of
x;
is the mean value of
y;
is the variance of
y;
;
are two variables that maintain stability;
L is the dynamic range of the pixel, and has a default value of
,
.
is the most widely used metric to evaluate the effect of image enhancement [
40]. The larger the
value, the less distortion and the better the image enhancement effect. Its calculation formula is as follows,
among them,
d is the maximum of the image gray value,
is the mean square error.
is defined as follows,
where (
x,
y) is the size of the image,
is the original image,
is the enhanced image.
Contrast is the degree of brightness and darkness of an image [
41], which can reflect the clarity of the image. The greater the contrast, the clearer the visual effect of the image. The calculation formula of contrast is as follows,
where
is the gray difference between adjacent pixels, and
represents the pixel distribution probability that the gray difference between adjacent pixels is
.
Gray level co-occurrence matrix is a matrix function of pixel distance and angle. It reflects the comprehensive information of image in direction, interval, change amplitude and speed by calculating the correlation between two gray levels in a certain distance and direction in the image. Because the amount of data of gray level co-occurrence matrix is usually large, it generally does not operate on the matrix directly, but extracts some of its feature quantities to describe the feature information of the original image, such as entropy, homogeneity, uniformity. The paper uses the statistical feature of homogeneity to evaluate the effect of image texture enhancement. Homogeneity is used to measure the uniformity of image texture distribution [
35]. The greater the homogeneity, the more uniform the image texture area and the slower the change, indicating that the better the image enhancement effect. The calculation formula of homogeneity is as follows,
where
is the probability for gray-scale
i and
j and occurs at two pixels.
Therefore,
represents the degree of smooth area retention, and
represents the degree of edge detail and contour enhancement. Contrast reflects the clarity of the image, and homogeneity reflects the uniformity of the image texture area. It can be seen that from
Table 1 and
Table 2, compared with other algorithms, the
value of the algorithm in the paper is relatively large, and the
value is relatively high, which indicates that the algorithm in the paper strengthens the edge and texture of the image while keeping the smooth area consistent with the original image as much as possible. However, the
value of the image processed by the algorithm of 0.6-order is relatively small, because the same fractional order processing the whole image will cause excessive enhancement. The enhancement also destroys the smooth area. Ref. [
17] also has good results, but it is still insufficient compared with the algorithm in the paper. The enhancement algorithm proposed in [
19] has a lower
value because the smooth region is destroyed while enhancing. It can be seen from
Table 3 that the contrast of the algorithm in the paper is slightly lower than other algorithms, because the proportion of the smooth area of the image is relatively large, and one of the main characteristics of the algorithm in the paper is to retain the characteristics of the smooth area, so the contrast of the image processed by the algorithm in the paper is not the highest. It can be seen from
Table 4 that the homogeneity of the images processed by these algorithms is not much different, but the homogeneity of the five images processed by the algorithm in the paper is relatively large, which shows that the enhancement effect of the algorithm in the paper is very suitable for all kinds of images. It can be seen from the above analysis that the algorithm in the paper enhances the image edge and texture details and retain the information of the smooth area of the image optimally, which also reflects the effectiveness of the algorithm in the paper.
It can be seen from the above analysis that the main advantage of the algorithm in the paper is that it can effectively enhance the image edge and texture area while retaining the characteristics of the smooth area of the image. This is because the algorithm in the paper combines the advantages of rough set and PSO, accurately segments the smooth area, edge and texture area of the image. According to the local characteristics of the image, an adaptive image enhancement algorithm is designed to enhance the edge and texture area obtained after image segmentation. At the same time, the smooth area of the image is not enhanced, so that the characteristics of the smooth area of the image can be well preserved.