How to find derivative of an image along a radial direction with an arbitrary center of rotation?
Essentially, you want to compute the derivative of your image in polar coordinates. Have a look here in particular equation (15): 



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 &amp;= r\cos(\phi)\\y &amp;= 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.