- Open Access
Preservation of image edge feature based on snowfall model smoothing filter
© The Author(s). 2018
- Received: 6 June 2018
- Accepted: 25 July 2018
- Published: 3 August 2018
This paper proposed a snowfall model as a novel smoothing filter. The pixel composition of the image was similar to the geographic features, so it could be smooth because of snow accumulation. In the snowfall processing, luminance changes are linked to terrain and snowfall amount. Curvature and luminance gradient decided the amount of snowfall; the amount of snowfall became large on the parts where the curvature was large, and it became little on the parts where the gradient was steep. Snowfall algorithm simulates the natural snowfall process, which nonlinear diffusion and the target feature could be preserved well. Snowfall model has the same function as the Gaussian filter. The number of regions was reduced after Gaussian filter and snowfall model smoothing, respectively. The contrast experiment was carried out based on Watershed algorithm. The image area segmentation that pretreated through snowfall model was compared with Gaussian filter smoothing. The experimental result showed that the proposed snowfall model was a smoothing filter. It was able to realize edge preservation, which was the original purpose, and it was also possible to apply to region segmentation.
- Smoothing filter
- Snowfall model
- Edge characteristics
- Image preservation
- Region segmentation
Image smoothing makes images easier for feature extracting and recognizing, and it could eliminate image space noise [1, 2]. Usually, image noise is mainly composed of high-frequency component; smoothing filter can enhance image low-frequency component to remove the high-frequency noise [3–5]. The typical smoothing process includes mean filter, median filter, and Gaussian low-pass filter. Mean filter is used to reduce noise in the image process, and it is an intuitive and simple method to make the image smooth . Its principle is reducing the amount of intensity variation on pixel and the next . Mean filter is based on the template for image convolution operation to achieve smooth processing . It uses the average grayscale value of template pixels instead of the object pixels . Mean filter output is an average value of the pixels within the filter template territory. Processing result reduces the image grayscale sharp changes and reduces the noise, but also has the negative effect of the fuzzy edges . Median filter is a nonlinear digital filtering technique, and it is used to perform noise reduction in an image . Pixels on the local area are sorted according to grayscale and according to the intermediate value of statistical sorting to replace the object pixel . If the nature of the noise is not relevant to a random noise with the contents of the image, the median filter is effective and the effectiveness is better than the mean filter [13, 14]. Based on the median filter method, random spike noise signals are removed and edge blur degradation is reduced [15, 16]. Gaussian low-pass filter has the properties of having no overshoot to a step function input while minimizing the rise and fall time . The pixels of space distribution are used as a reference value in an image denoising process; the weight distribution is determined based on distance to the target pixel, according to the calculate principle, the Gaussian low-pass filter blur effect close to human natural vision [18, 19]. Using a weight template the standard deviation for the convolution operation can realize the image smoothing process, with a standard deviation value becoming larger and the image smoothing effect becoming stronger. The above-described smoothing process methods do not retain the image edge effect, so the image processing results lose the edge characteristics of the original image [20, 21].
In the process of image generation and transmission, noise may be physically included due to various factors. Since noise is an obstacle to image processing, so it needs to be removed . When the mechanism for generating such noise can be mathematically modeled , a noise cancelation method corresponding to the model could be used, but if it is not, the noise is reduced by the smoothing method [24, 25]. Image noise contains many high-frequency components; smoothing is a method of using a low-frequency emphasis filter to blur images to reduce noise .
In our research, we proposed a new smoothing method that reduces the noise through pseudo-snow in the image, making the snowfall in the natural world and the terrain becoming flat. Therefore, this research proposed the snowfall model as a smoothing technique for an image.
All of image pixels additive operation execution;
Concave waveform smoothing process as a priority target;
Convexity larger waveform as a reservation target.
Based on the above image processing, desired result of the smoothing process is shown in Fig. 1.
In order to achieve the smoothing effect of the snowfall model, the luminance slope and curvature parameters need to be defined. The luminance gradient value and curvature of convex waveform were required as snowfall calculation parameters to achieve self-adaptive smoothing process. Curvature and luminance gradient decided the amount of snowfall. The upward convex waveform curvature was given a negative value and recorded as negative curvature, and downward convex waveform curvature was given a positive value and recorded as positive curvature. When curvature value and gradient value were relatively large, we need to give less snowfall in the image process. Similarly, if positive curvature value and gradient value were relatively large, we need more snowfall to achieve a blur effect. Snowfall calculation parameters were divided into horizontal and vertical directions. One-dimensional differential filter and two-dimensional differential filter were used to calculate the gradient value.
A pair of luminance gradient g(x) and curvature k(x) was calculated to produce S(x), i.e., a measure of snowfall amount at a pixel x. More specifically, a weight G(x) was defined so that cosG(x) was maximum with gradient g(x) = 0 and smaller with larger g(x) in magnitude.
In addition, another weight based on the curvature was used, where it became larger with negative values (concave) and smaller with positive ones (convex). This second weight was defined by exp(k(x)/10) as an example. A combination of the two weights was used to calculate S(x). Integrating the measure S(x) over an entire image, S(total) was to get a measure of snow amount for the entire image. S(total) was not depth of snow. Therefore, a scaling factor was needed and it was collated with real depth of snowfall. However, the process above corresponded to one-time snowfall. It was repeated, if further smoothing was necessary. If repeated once, it corresponded to depth. It should be noted that gradient and curvature should be calculated again prior to the next snowfall.
In the process of snowfall, the whole image is taken as the processing object. In the specific calculation process, in each local snowfall amount calculation, the adjacent five pixels of the target pixel is treated as the local snowfall range. If the x direction is calculated, the left and right adjacent five pixels are used as the local snowfall range. If the y direction is calculated, the top and bottom five pixels adjacent are used as the local snowfall range.
Based on the above calculation step, we calculate the snowfall amount to achieve image smooth processing, and additional operation of grayscale value might be causing an unnatural snowfall effect. Grayscale value waveform might be becoming convex waveform, although the original waveform was concave, or the original grayscale value waveform for convex became a concave waveform after the snowfall process; these phenomena are not natural snowfall effect in image smoothing.
As expected, moderate luminance variation and concavity were smoothed while large luminance variation and steep edges were preserved. At the same time, this technique increased the luminance value with each snowfall in the same way as snow falls on the ground, resulting in increase in the average luminance value. However, it did not matter since this technique was expected for use in conjunction with differential filters such as the watershed segmentation.
Using a weight template, which is from Eq. (8), the convolution operation could realize image-smoothing processing, with σ value becoming larger and the image smoothing effect becoming stronger.
Based on the watershed algorithm for image segmentation, first we find the minimum (minima) of grayscale difference and carried on the label, the label number was the serial number of each region. Grayscale value was based on the baseline moving upward starting from 0 to 255; mobile search for the maximum value was the watershed point, so as to complete the image region segmentation based on watershed algorithm.
The number of regions and edges in smoothing method
Snowfall model as a novel edge preserving smoothing filter based on nature snowfall was presented in this paper. The moderate luminance variation and concavity are smoothed while large luminance variation and steep edges are preserved. At the same time, this technique increases luminance value with each snow fall in the same way as snow falls to the ground, resulting in an increase in average luminance value. In order to verify the smoothing effect of the snowfall model, it was applied to the pretreatment of region segmentation based on the watershed algorithm. In addition, compared with Gaussian-filter, experimental results showed that the snowfall model had the same function as the Gaussian-filter. Although region was not merged in the tiny part, smoothing effect of snowfall was better than Gaussian-filter in the lower luminance part. However, it does not matter since this technique is expected for use in conjunction with differential filters such as watershed segmentation. In the future, we would further study the parameters of snowfall model on smoothing effect and application, especially the matching degree with the watershed algorithm, and suppressing over-segmentation.
This work was supported by Natural Science Fund of Changzhou (CE20165028, CE20175026), Qing Lan Project of Jiangsu Province, Natural Science Research Project of Jiangsu Province (BY2016030–05).
Availability of data and materials
We can provide the data.
Two authors take part in the discussion of the work described in this paper. The author HF designed the experiment and wrote the first version of the paper. The author HZ verified the proposed method and performed the part experiments of the paper. Both authors read and approved the final manuscript.
Honghui Fan, Doctor of Engineering, Associate Professor, Graduated from Yamgata University of Japan in 2011 and worked in Jiangsu University of Technology. His current research interests include computer application technology, image processing and image restoration. Hongjin Zhu, Doctor of Engineering, Associate Professor, graduated from Yamgata University of Japan in 2010 and worked in Jiangsu University of Technology. Her current research interests include image processing, computer vision, and pattern recognition.
Ethics approval and consent to participate
Consent for publication
Both authors declare that they have no competing interests.
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
- C Song, C Xiao, X Li, et al., Structure-preserving texture filtering for adaptive image smoothing [J]. J. Vis. Lang. Comput. 45, 17–23 (2018)View ArticleGoogle Scholar
- D Min, S Choi, J Lu, et al., Fast global image smoothing based on weighted least squares [J]. IEEE Trans. Image Process. 23(12), 5638–5653 (2014)MathSciNetView ArticleMATHGoogle Scholar
- S Gonzalez, M Brookes, PEFAC-a pitch estimation algorithm robust to high levels of noise [J]. IEEE/ACM Trans. Audio Speech Lang. Process. (TASLP) 22(2), 518–530 (2014)View ArticleGoogle Scholar
- KM Wong, TT Wong, Edge-preserving smoothing filter for particle based rendering [J]. Game Engine Gems 3 (2016), p. 91Google Scholar
- M Mazhari, RPR Hasanzadeh, Suppression of noise in SEM images using weighted local hysteresis smoothing filter [J]. Scanning 38(6), 634–643 (2016)View ArticleGoogle Scholar
- R Verma, J Ali, A comparative study of various types of image noise and efficient noise removal techniques [J]. Int. J. Adv. Res. Comput. Sci. Softw. Eng. 3(10), 617-622 (2013)Google Scholar
- H Hiary, R Zaghloul, A Al-Adwan, et al., Image contrast enhancement using geometric mean filter [J]. SIViP 11(5), 833–840 (2017)View ArticleGoogle Scholar
- K He, J Sun, X Tang, Guided image filtering [J]. IEEE Trans. Pattern Anal. Mach. Intell. 6, 1397–1409 (2013)View ArticleGoogle Scholar
- H Choi, J Jeong, Despeckling images using a preprocessing filter and discrete wavelet transform-based noise reduction techniques [J]. IEEE Sensors J. 18(8), 3131–3139 (2018)View ArticleGoogle Scholar
- KK Sirur, Y Peng, Z Qinchuan, Effect of Smoothing Filters on Time-Domain Waveform Image Segmentation [C], Proceeding IIP'17 Proceedings of the 2nd International Conference on Intelligent Information Processing (ACM, New York, 2017), p. 19. Article No. 19, Bangkok, Thailand — July 17 - 18, 2017.Google Scholar
- L Jin, M Jin, X Xu, et al., Structure-Adaptive Vector Median Filter for Impulse Noise Removal in Color Images [C], Image processing (ICIP), 2017 IEEE international conference on (IEEE, Beijing, 2017), pp. 690–694. https://doi.org/10.1109/ICIP.2017.8296369.
- C Tsiotsios, M Petrou, On the choice of the parameters for anisotropic diffusion in image processing [J]. Pattern Recogn. 46(5), 1369–1381 (2013)View ArticleGoogle Scholar
- A Roy, J Singha, L Manam, et al., Combination of adaptive vector median filter and weighted mean filter for removal of high-density impulse noise from colour images [J]. IET Image Process. 11(6), 352–361 (2017)View ArticleGoogle Scholar
- V Gupta, V Chaurasia, M Shandilya, Random-valued impulse noise removal using adaptive dual threshold median filter [J]. J. Vis. Commun. Image Represent. 26, 296–304 (2015)View ArticleGoogle Scholar
- Yang Q, Mao W, Tang H, et al. Deblending with Weak Signal Preserved by Dip Vector-Median Filter [C]. 2017 SEG international exposition and annual meeting. society of exploration geophysicists, 2017.View ArticleGoogle Scholar
- S Huo, W Zhu, T Shi, Iterative dip-steering median filter [J]. J. Appl. Geophys. 144, 151–156 (2017)View ArticleGoogle Scholar
- B Pan, Bias error reduction of digital image correlation using Gaussian pre-filtering [J]. Opt. Lasers Eng. 51(10), 1161–1167 (2013)View ArticleGoogle Scholar
- L Karacan, E Erdem, A Erdem, Structure-preserving image smoothing via region covariances [J]. ACM Trans. Graph. (TOG) 32(6), 176 (2013)View ArticleGoogle Scholar
- C Lopez-Molina, B De Baets, H Bustince, et al., Multiscale edge detection based on Gaussian smoothing and edge tracking [J]. Knowl.-Based Syst. 44, 101–111 (2013)View ArticleGoogle Scholar
- NM Zaitoun, MJ Aqel, Survey on image segmentation techniques [J]. Procedia Comput. Sci. 65, 797–806 (2015)View ArticleGoogle Scholar
- Z Guo, H Pan, J Chen, et al., Image Filtering Enhancement [C], International conference on sensing and imaging (Springer, Cham, 2018), pp. 493–499Google Scholar
- J Ahmad, MA Khan, SO Hwang, et al., A compression sensing and noise-tolerant image encryption scheme based on chaotic maps and orthogonal matrices [J]. Neural Comput. & Applic. 28(1), 953–967 (2017)View ArticleGoogle Scholar
- MR Islam, C Xu, Y Han, et al., A novel weighted variational model for image denoising [J]. Int. J. Pattern Recognit. Artif. Intell. 31(12), 1754022 (2017)View ArticleGoogle Scholar
- H Yang, M Gunzburger, Algorithms and analyses for stochastic optimization for turbofan noise reduction using parallel reduced-order modeling [J]. Comput. Methods Appl. Mech. Eng. 319, 217–239 (2017)MathSciNetView ArticleGoogle Scholar
- RVK Reddy, KP Raju, MJ Kumar, et al., Comparative analysis of common edge detection algorithms using pre-processing technique [J]. Int. J. Electr. Comput. Eng. (IJECE) 7(5), 2574–2580 (2017)View ArticleGoogle Scholar
- C Pérez-Benito, S Morillas, C Jordán, et al., A model based on local graphs for colour images and its application for Gaussian noise smoothing [J]. J. Comput. Appl. Math. 330, 955–964 (2018)MathSciNetView ArticleMATHGoogle Scholar