0

I want to perform a convolution, but as a complication there is a cosine of the angle between any pair of vectors in the expression:

\begin{equation} f(\theta^{\prime}) = \int d\theta G(|\theta^{\prime}-\theta|)H(\theta)\cos(2\Theta(\theta^{\prime}-\theta)) \end{equation}

where $\Theta$ is an expression for the angle, and $G$ and $H$ are just some functions.

How can I efficiently compute this integral numerically?

user1991
  • 175

1 Answers1

1

Can you collapse together $\Theta$ and $G$?

$$ X(\theta) = G(|\theta|)cos(\Theta(\theta)) $$

Then just find $X * H$

Eric
  • 623
  • Perhaps this was unclear, perhaps not: but for clarity, $\theta$ is a position vector in the plane here. Confusing notation, my apologies. The thing I'm struggling with to wrap my head around: $\Theta$ is a function of the angle of the vector $\theta$. To use that in a convolution, I think the numerical implementation would need to be evaluated in polar coordinates... – user1991 Dec 13 '15 at 19:49
  • I don't see how your comment relates to my answer. If you're doing this numerically, you just need to precalculate $G(x^2 + y^2)\cos(\Theta(x, y))$, and convolve that with H (which from your SO post, I assume is a discrete image) – Eric Dec 13 '15 at 21:48