1
$\begingroup$

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}$?

$\endgroup$

1 Answer 1

1
$\begingroup$

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

$$\frac{dI(r,\phi)}{d\phi}$$

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

$$\frac{dI}{d\phi}=\frac{dI}{dx}\frac{dx}{d\phi}+\frac{dI}{dy}\frac{dy}{d\phi}=-\frac{dI}{dx}(r\sin\phi)+\frac{dI}{dy}(r\cos\phi)$$

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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