I want to find the derivative of an image along a radial direction. For instance, in the image below I want to find the gradient at a point $P$ of the image, along the direction of the circumference of the circle.

enter image description here

Just like we do image intensity derivatives $\frac{dI}{dx}$ or $\frac{dI}{dy}$, all I want to do is to find $\frac{dI}{dr}$ where $r$ is a variable that stores the rotation angle of the image with a particular center.

From what I know we need to follow chain rule of partial differentiation. $$\frac{dI}{dr} = \frac{dI}{dx} \cdot \frac{dx}{dr}$$

We know $\frac{dI}{dx}$ but how to find $\frac{dx}{dr}$?


Essentially, you want to compute the derivative of your image in polar coordinates. Have a look here in particular equation (15):

enter image description here

Your image is given in cartesian coordinates: $I(x,y)$ where $x,y$ are column and row. You want to know the expression


where $I(r,\phi)$ is the image in polar coordinates. $r,\phi$ relate to $x,y$ by the expressions

$$\begin{align} x &= r\cos(\phi)\\y &= r\sin(\phi) \end{align}$$

Now, using the chain rule we get


where $\frac{dI}{dx}$ and $\frac{dI}{dy}$ are the gradients in cartesian coordinates.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.