Home > Software engineering >  What is the gradient of d^2f/dxdy on image
What is the gradient of d^2f/dxdy on image

Time:07-04

On my knowledge, 1st gradient of the image pixel on x can be approximated by df/dx = f(x-1, y) - f(x 1, y), and df/dy = f(x, y-1) - f(x, y 1)

Question is, how can I compute the 2st gradient of d^2f/dxdy?

CodePudding user response:

2nd one is no longer a gradient, but the local curvature. Be aware that curvatures can (and often will be) depend on what direction you're going (think for example about a saddle). Hence taking the partial derivatives of a gradient will actually give you a n×n tensor, where n is the dimensionality of your image (3D image = voxels, and so on).

CodePudding user response:

Just go deeper (Leonardo Dicaprio pic):

G = df/dx = f(x 1, y) - f(x-1,y)

Result = d^2f/dxdy 
= dG/dy 
= (f(x 1, y 1) - f(x-1,y 1)) - (f(x 1, y-1) - f(x-1,y 1))
  • Related