You need more different Blur-s

 3r33865. 3r3-31. Blur the image through the filter Gaussian Blur is widely used in a variety of tasks. But sometimes you want a little more variety than just one filter for all occasions, in which only one parameter can be adjusted - its size. In this article, we will look at several other blur implementations. 3r33850.  3r33865. 3r33850.  3r33865.
You need more different Blur-s 3r33847. : 3r33850.  3r33865. 3r33850.  3r33865. 3r3334. 3r33847. : 3r33850.  3r33865. 3r33850.  3r33865. 3r340. 3r33850.  3r33865. 3r33850.  3r33865. Here for each pair of coordinates
3r33847. the distance to the center is calculated using the formula
3r3618. 3r33847. which is passed as an argument to the Gaussian function. 3r33850.  3r33865. 3r33850.  3r33865. The matrix built on the segment and with some level of sampling, it will look like this: 3r350.  3r33865. 3r3688. 3r33845. 3r33847. 3r3688. 3r33850.  3r33865. Or, if we consider the values ​​of the elements of the matrix as the brightness level, so: 3r33850.  3r33865. 3r33850.  3r33865. 3r33847. - to consider the argument in the range 3rrr4747. , and 3r33845. 3r33847. determines the degree of compression of the gaussians:
 3r33865.
3r3688.
3r33845. 3r33847. 3r3688. 3r33850.  3r33865. Divider 3r33845. 3r33847. here obtained through a definite integral at infinity: 3r3-3850.  3r33865.
3r3688.
3r33845. 3r3115. 3r33847. 3r3688. 3r33850.  3r33865. 3r33824. Start 3r33825. 3r33850.  3r33865. For an arbitrary filter, we need to first determine our own decay function for one variable
3r3125. 3r33847. , from which the rotation yields a function of two variables by replacing
3r33847. on 3r33845. 3r3618. 3r33847. where 3r33845. 3r33847. and 3r33845. 3r33150. 3r33847. These are the coordinates of the matrix element in the range
3r? 3510. 3r33847. , and which is further used to fill the elements of the matrix. We will consider normalization not analytically, but direct summation of all elements of the matrix — this is simpler and more accurate — because after sampling the function is “thinned”, and the normalization value will depend on the level of discretization. 3r33850.  3r33865. 3r33850.  3r33865. If the matrix elements are numbered from zero, the coordinate is 3r3-3845. 3r33847. or
3r33150. 3r33847. It is considered according to the formula 3r350.  3r33865.
3r3688.
3r33845. 3r3158. 3r33847. 3r3688. 3r33850.  3r33865. where
3r3164. 3r33847. - the sequence number of the element in a row or column, and 3r33845. 3r3167. 3r33847. - total number of items. 3r33850.  3r33865. 3r33850.  3r33865. For example, for a matrix of 5 to ? it would look like this: 3r33850.  3r33865.
3r3688.
3r33845. 3r3179. 3r33847. 3r3688. 3r33850.  3r33865. Or, if we exclude the boundary values ​​that are still zero, then the coordinates will be calculated by the formula 3r350.  3r33865.
3r3688.
3r33845. 3r3190. 3r33847. 3r3688. 3r33850.  3r33865. and the matrix, respectively, takes the form
 3r33865.
3r3688.
3r33845. 3r33847. 3r3688. 3r33850.  3r33865. After the matrix elements have been calculated by the formula, it is necessary to calculate their sum and divide the matrix into it. For example, if we have a 3r3508 matrix.  3r33865.
3r3688.
3r33845. 3r33847. 3r3688. 3r33850.  3r33865. then the sum of all its elements will be 4? and after normalization it will look like 3r-3850.  3r33865.
3r3688.
3r33845. 3r33847. 3r3688. 3r33850.  3r33865. and the sum of all its elements will be 1.
 3r33865. 3r33850.  3r33865. 3r33824. Linear attenuation
3r33850.  3r33865. First, take the simplest function - the line: 3r33850.  3r33865.
3r3688.
3r33845. 3r33847. 3r3688. 3r33850.  3r33865.  3r33865. 3r33850.  3r33865. 3r33850.  3r33865. The abrupt transition from an inclined line to zero functions can cause a contradiction with a sense of beauty. The function
will help us to eliminate it.  3r33865.
3r3688.
3r33845. 3r33847. 3r3688. 3r33850.  3r33865. in which 3r34545. 3r33333. 3r33847. defines the “stiffness” of the dock, 3r33845. 1 $ "data-tex =" inline "> 3r33847 For, for example, 3r33845.
We get 3r33850.  3r33865.
3r3688.
3r33845. 3r33847. 3r3688. 3r33850.  3r33865.  3r33865. 3r33850.  3r33865. 3r3305. 3r33850.  3r33865. 3r33850.  3r33865. 3r33824. Hyperbolic attenuation
3r33850.  3r33865. The filter can be made more “sharp” and more smoothly going to zero, taking a different function as a generator, for example, hyperbola, and providing a smooth transition to zero by summing with a parabola. 3r33850.  3r33865. 3r33850.  3r33865. 3r33333. 3r33850.  3r33865. 3r33850.  3r33865. After all the calculations and simplifications, we get the formula 3r33850.  3r33865.
3r3688.
3r33845. 3r33847. 3r3688. 3r33850.  3r33865. in which the parameter is 3r33845. 3r33333. $ 0 "data-tex =" inline "> Determines the attenuation pattern:
 3r33865. 3r33850.  3r33865. 3r33333. 3r33850.  3r33865. 3r33850.  3r33865. and the filter itself will look (for

) as
 3r33865. 3r33850.  3r33865. 3r33850.  3r33865. You can go the other way - to make the top of the filter is not sharp, but stupid. The easiest way to do this is to set the attenuation function as a constant: 3r3-3850.  3r33865.
3r3688.
3r33845. 3r33847. 3r3688. 3r33850.  3r33865. 3r33333. 3r33850.  3r33865. 3r33850.  3r33865. But in this case, we get a strong pixelation, which contrasts with a sense of beauty. A parabola of higher orders will help us to make it smoother at the edges, from which, by its displacement along the ordinate axis and squaring, we get 3r350.  3r33865.
3r3688.
3r33845. 3r33847. 3r3688. 3r33850.  3r33865. Varying the parameter
3r33333. 3r33847. , you can get a wide range of filter options:
 3r33865.
3r3688.
3r33845. 3r33847. 3r3688. 3r3013. 3r33850.  3r33865.
3r3688.
3r33845. 3r3408. 3r33847. 3r3688. 3r33411. 3r33850.  3r33865.
3r3688.
3r33845. 3r33418. 3r33847. 3r3688. 3r33421. 3r33850.  3r33865.
3r3688.
3r33845. 3r33434. 3r33847. 3r3688.  3r33865.
3r3688.
3r33845. 3r33847. 3r3688. 3r33850.  3r33865. Here is the parameter 3r33845. 3r33448. 3r33847. determines the height of the center, and
3r33847. - the sharpness of the transition to the edges. 3r33850.  3r33865. For 3r33845. 3r33847. we get 3r350.  3r33865. 3r33850.  3r33865. 3r33462. 3r33850.  3r33865. 3r33850.  3r33865. and for 3r33845. 3r33434. 3r33847. 3r33850.  3r33865. 3r33850.  3r33865. 3r37474. 3r33850.  3r33865. 3r33850.  3r33865. 3r33824. Variations of Gaussians
3r33850.  3r33865. You can directly modify the function of the Gaussians. The most obvious way to do this is to parameterize the exponent — we are not going to consider it now, but take the more interesting option: 3r350.  3r33865.
3r3688.
3r33845. 3r33847. 3r3688. 3r33850.  3r33865. Due to the fact that at
3r33847. tending to the unit denominator
3r33847. tends to zero, fraction
3r3501. 3r33847. tends to minus infinity, and the exponent itself also tends to zero. Thus, the division by
3r33847. allows you to compress the domain of the function from 3r33845. 3r33847. until 3r33845. 3r? 3510. 3r33847. . At the same time, at
3r? 3513. 3r33847. by dividing by zero (3r3-3845. 3r3-351616. 3r3-33847.) the value of the function is not defined, but it has two limits - the limit on one side (from the inside) is zero, and on the other hand - infinity: 3r350.  3r33865.
3r3688.
3r33845. 3r33524. 3r33847. 3r3688. 3r33850.  3r33865.
3r3688.
3r33845. 3r? 3533. 3r33847. 3r3688. 3r33850.  3r33865. Since the boundary values ​​are not included in the interval, then zero in the limit on one side only is sufficient. Interestingly, this property extends to all derivatives of this function, which provides an ideal connection with zero. 3r33850.  3r33865. 3r33850.  3r33865. Parameter 3r33845. 3r? 3543. 3r33847. determines the similarity with the Gaussian - the bigger it is, the stronger the similarity is obtained - due to the fact that an increasingly linear segment of 3r34545. 3r33546. 3r33847. fall at the center of the function. One would assume that due to this in the limit one can get the original Gaussian - but, unfortunately, no - the functions are still different. 3r33850.  3r33865. 3r33850.  3r33865. 3r33552. 3r33850.  3r33865. 3r33850.  3r33865. Now you can see what happened:
 3r33865. 3r33850.  3r33865.
3r3688.
3r33845. 3r33565. 3r33847. 3r3688. 3r3-3568. 3r33850.  3r33865.
3r3688.
3r33845. 3r33575. 3r33847. 3r3688. 3r33578. 3r33850.  3r33865.
3r3688.
3r33845. 3r33585. 3r33847. 3r3688. 3r33588. 3r33850.  3r33865.
3r3688.
3r33845. 3r33595. 3r33847. 3r3688. 3r3-3598. 3r33850.  3r33865.
3r3688.
3r33845. 3r33847. 3r3688. 3r3608. 3r33850.  3r33865. 3r33850.  3r33865. 3r33824. Variations of the form
3r33850.  3r33865. By changing the transition function from two coordinates to one
3r3618. 3r33847. , you can get other shapes, not just a disk. For example: 3r350.  3r33865.
3r3688.
3r33845. 3r33847. 3r3688. 3r33850.  3r33865. 3r3633. 3r33850.  3r33865. 3r33850.  3r33865.
3r3688.
3r33845. 3r3640. 3r33847. 3r3688. 3r33850.  3r33865. 3r3645. 3r33850.  3r33865. 3r33850.  3r33865. Turning to complex numbers, you can construct more complex shapes: 3r3-3850.  3r33865.
3r3688.
3r33845. 3r3656. 3r33847. 3r3688.
 3r33865. 3r33850.  3r33865. 3r3663. 3r33850.  3r33865. 3r33850.  3r33865.
3r3688.
3r33845. 3r33847. 3r3688. 3r33850.  3r33865. 3r3777. 3r33850.  3r33865. 3r33850.  3r33865.
3r3688.
3r33845. 3r33847. 3r3688. 3r33850.  3r33865. 3r33850.  3r33865. when converting coordinates. 3r3699. 3r33847. - well, or vice versa, to define the damping function for negative values ​​of the argument. 3r33850.  3r33865. 3r33850.  3r33865. 3r33824. A few specific examples are 3r33825. 3r33850.  3r33865. An article would not be complete without practical testing on specific images. Since we do not have a scientific work, then the image 3r3709. Lena 3r3r5353. we will not take it - but take something soft and fluffy:
 3r33865. 3r33850.  3r33865. 3r33737. 3r33850.  3r33865. 3r33850.  3r33865.
Gaussian [/b] 3r3r7787. 3r33724. 3r33850.  3r33865. 3r33861. 3r33861. 3r33850.  3r33865.
Hyperbolic attenuation [/b] 3r3r7787. 3r33737. 3r33850.  3r33865. 3r33861. 3r33861. 3r33850.  3r33865. 3r3747. 3r33850.  3r33865. 3r33850.  3r33865.
Cross 3r3786. 3r3r7787. 3r3756. 3r33850.  3r33865. 3r33861. 3r33861. 3r33850.  3r33865.
Ring [/b] 3r3r7787. 3r33850.  3r33865. 3r33850.  3r33865.
One-way attenuation [/b] 3r3r7787. 3r33788. 3r33850.  3r33865. 3r33861. 3r33861. 3r33850.  3r33865. 3r33795. 3r33850.  3r33865. 3r33850.  3r33865. Same filters, but for text: 3r33850.  3r33865. 3r33850.  3r33865. 3r3804. 3r33850.  3r33865. 3r33850.  3r33865.
, 1) or initially count window functions by the formula
3r33846. 3r33847. . 3r33850.  3r33865. 3r33850.  3r33865. The original Wolfram Mathematica document for this article can be downloaded
here is 3r33853. . 3r33861. 3r33865. 3r33865. 3r33865. 3r33858. ! function (e) {function t (t, n) {if (! (n in e)) {for (var r, a = e.document, i = a.scripts, o = i.length; o-- ;) if (-1! == i[o].src.indexOf (t)) {r = i[o]; break} if (! r) {r = a.createElement ("script"), r.type = "text /jаvascript", r.async =! ? r.defer =! ? r.src = t, r.charset = "UTF-8"; var d = function () {var e = a.getElementsByTagName ("script")[0]; e.parentNode.insertBefore (r, e)}; "[object Opera]" == e.opera? a.addEventListener? a.addEventListener ("DOMContentLoaded", d,! 1): e.attachEvent ("onload", d ): d ()}}} t ("//mediator.mail.ru/script/2820404/"""_mediator") () (); 3r33859. 3r33865. 3r33861. 3r33865. 3r33865. 3r33865. 3r33865.
+ 0 -

Add comment