The first derivative of the image on the graphics and the second derivative Seeking

For the image find the first derivative and second derivatives or the enhanced image can find an edge image.

First Derivative:

We know that in a mathematical method for finding the first derivative is:

                                                                             \frac{\partial f}{\partial x} = \lim_{x\rightarrow 0} \frac{f(x+h)-f(x)}{h}

Since the graphics image is composed of discrete pixels by, the minimum h value is 1, so the calculation:

                                                                           \frac{\partial f}{\partial x}=f(x+1)-f(x)

Therefore, the rate of change of the derivative of the luminance image is an image of the first order, for a grayscale image, he first derivative is calculated as follows:

Gray-scale image matrix:
ABC
DEF
GHI
then the central pixel E:
DX = Fe (or FD)
Dy = of He (or hi)
Of course, if using the sobel operator, then
dx = (c + 2f + i ) - (a + 2d + G)
Dy = (G + 2H + I) - (A + 2B + C)

Therefore, the image edge detection, sobel operator of convolution factors:

It can be seen that the convolution factor sobel operator is actually requested image, the first derivative.

Second Derivative:

                                                                \frac{\partial^2f}{\partial x ^2}=\frac{ f'(x+h)-f'(x)}{h}

Therefore, when h = 1 when:

                                                                 \frac{\partial^2f}{\partial x ^2}=f'(x+1)-f'(x)

Then you can simplify:

\frac{\partial^2f}{\partial x ^2}=\frac{\partial f'(x)}{dx^2}=f'(x+1)-f'(x)

=f((x+1)+1)-f((x+1))-(f(x+1)-f(x))

=f(x+2)-f(x+1)-f(x+1)+f(x)

=f(x+2)-2f(x+1)+f(x)

This step is derived as (mathematical difference I saw was a morning read) in mathematics:

So that x = x-1 
then: 

\frac{\partial^2f}{\partial x ^2}=f(x+1)+f(x-1)-2f(x)

 

In the x and y directions, are: 

\frac{\partial^2f}{\partial x ^2}=f(x+1,y)+f(x-1,y)-2f(x,y)

\frac{\partial^2f}{\partial y ^2}=f(x,y+1)+f(x,y-1)-2f(x,y)

 

The combination of the second derivative of x and y directions:

\frac{\partial^2f}{\partial x ^2}+\frac{\partial^2f}{\partial y ^2}=f(x+1,y)+f(x-1,y)+f(x,y+1)+f(x,y-1)-4f(x,y)

This essentially is the famous second-order differential Laplace operator (Laplacian), Laplace second derivative as well as other forms, such as:

Laplacian = 4f(x,y)-f(x+1,y)-f(x-1,y)-f(x,y+1)-f(x,y-1)

So convolution factor Laplacian operator of the following two:

Guess you like

Origin blog.csdn.net/qq_40238526/article/details/89840463