# Image Geometry Terms

I getting confused over some basics of image geometry terms due to different definitions, implementations and different outputs in the internet, here is an example. The terms are:

Image Laplacian vs image second derivative vs image divergence.

Image curvature (how it is related to the other terms?).

Image normal vs image gradient magnitude.

it would be nice if someone explains these terms (or provide a reliable source so I can refer for more questions) in a simple way providing:

• Simple math symbols.
• Meaning of these terms (what can tell us about the input image?).
• Simple implementation e.g. simple matlab (without buildin functions) or c++ code.
• An input and output images.

All the best!

Ibraheem

It tells you how much local contrast there is between adjacent regions in an image. The image gradient gives you the slope of the contrast towards its greatest magnitude.

Same thing. In a simple $f(x)$, direction is implied. The derivative is always taken with respect to $x$ and the $x$ axis points to the right (if we are talking about a spatial dimension). In an $f(x,y)$ or more generally, any $f$ of more than one variables, the derivative can be obtained towards (or parallel to) a direction. If you don't specify the direction of differentiation, you get the derivative (as above) which tells you the direction of higher slope.

Image Laplacian vs image second derivative vs image divergence.

You need to understand Divergence. Divergence tells you how much "outgoing flow" there is in a vector field. Imagine a fountain, the water comes up through a pipe in a small pool. "New" water comes in to the pool and pushes the existing water out of its way. Assuming that the pool is perfectly levelled, "new" water is pushing existing water outwards without preference to a specific direction.Isotropically. If we were to represent the velocity field as a vector field, at the point of the fountain we would see vectors going out, radially, towards all directions, like a little star. The Divergence of that point (the source) would have positive maximum value. If the exact opposite happened (i.e. the water was flowing IN a sink), then the divergence at that point would have negative maximum value.

So, how do you estimate the Divergence at some point? You take a "circle" (or sphere or hypersphere in higher dimensions), you position it at a particular point in space and then you estimate how much flow goes in and out through its boundary. Why circle / sphere / hypersphere? Because Isotropically. How do you do this "boundary" thing? With a surface integral. Where do you get the "flow" from? From the vector field.

The Laplacian is the Divergence of the gradient. Remember that Divergence expects a vector field at its input.

The Laplacian of an image depends to an extent on what the image depicts. If we are talking about simple visible light images, the Laplacian gives you areas that either reflect light or absorb light. It can be used to find specular reflections for example or spherical regions that bounce light towards all directions (concave or convex).

The second derivative is the second derivative (please see earlier answers). It tells you the slope of the slope of "brightnes" and it can be used to find local maxima and local minima.

Image curvature (how it is related to the other terms?).

Which image curvature? You might have curvature of features ON the image (e.g. the curvature of a fence).

Given the discussion so far, you probably mean "curvature" as it emerges in the third dimension (reflectivity or brightness). In that case, curvature is more related to the Laplacian (but it could also be related to gradient towards a direction, anything that implies curvature).

Image normal vs image gradient magnitude.

A Normal usually refers to a vector. A vector has direction and magnitude.

The image normal is a vector that is perpendicular to some notion of curvature of the image.

Usually, normals are made to have a magnitude of one because we are only interested in the direction they are pointing towards. But that is not necessarily the case with any normal.

The image gradient tells you the highest slope departing or arriving at a given point in the image. Therefore, the image gradient is a vector field which could be used to derive the normal vector field. But if you simply take the magnitude of it, all that you have is an estimate of local contrast towards the direction of maximum difference.

My advice would be for you to revisit vector calculus and linear algebra because these are the fundamental concepts that image processing is re-using. Divergence is not redefined in image processing. This will also help you in terms of "code". All major scientific computing platforms have these operators implemented, it is just a matter of re-using them rather than re-writing them.

The other thing to note is that imaging has context. Divergence over visible light photography is different in interpertation than infrared photography or X-Ray photography or other types of imaging. In visible photography there are certain assumptions that are often made to simplify the mathematics (e.g. in the way that light reflects off of objects). These assumptions make it "easy" to use something like Divergence to estimate curvature but there are still limitations. (And you might end up requiring more than one images to truly estimate "curvature"). In visible light photography, bright / dark, usually means light/shadow, but in infrared photography, bright/dark could also mean near/far.

Hope this helps.

• Thanks for your effort, I think the first one is wrong (check the videos in my answer). Commented Jan 27, 2017 at 23:42
• I will provide a complete post as soon as I understood all the points in my question. For now, I will provide the links here Here are the links: [Derivatives and Laplacian.][1] [Gradients of scalar and vector images.][2] [1]: youtube.com/watch?v=1b3Sr2MGLFg [2]: youtube.com/watch?v=qr1nkJhvrU8 Commented Jan 28, 2017 at 11:53