I have a convolution kernel which I need to apply to an image. However, at each pixel in the image, I'm convolving using a rotated kernel, with respect to the center (think hands on a clock, with the convolution kernel being stuck at the end, moving up and down the hands length). Is there a frequency domain equivalent to this? I looked around and found something like "polar ffts" but I'm not sure that's entirely related to what I'm trying to do. Heck I'm not even sure what the official name for this operation is.
$\begingroup$
$\endgroup$
3
-
$\begingroup$ Do you mean the kernel is rotated depending on the pixel location it convolves its window? $\endgroup$– RoyiCommented Jul 16, 2023 at 20:36
-
$\begingroup$ @Royi yes, that's what I meant. $\endgroup$– KrupipCommented Jul 18, 2023 at 6:16
-
$\begingroup$ See here for how to do this relatively efficiently: stackoverflow.com/a/72759364/7328782 $\endgroup$– Cris LuengoCommented Jul 18, 2023 at 19:25
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
The Polar FFT is about data in polar coordinate system.
The operation you describe is not shift invariant, hence it can not be represented as convolution.
If the number of rotations is small (Let's say a single digit number) then you may apply each variant on the whole image by utilizing the spectrum according to the convolution theorem and then fuse the result using a mask.