Reputation: 748
For eg, I know image I and its result J. I need to find out the kernel that was applied on I to get J.
Upvotes: 1
Views: 390
Reputation: 781
I think we'd need a bit more information to be able to give some guidance here.
The short story is that if what you have is the result of a circular convolution (i.e., something like y = ifft2(fft2(x).*fft2(h))
, then you can use the FFT to recover the kernel by just inverting this process (though there may be numerical concerns if fft2(x)
or fft2(h)
have any elements close to zero.
However, my guess would be that you have the partial result of a linear convolution -- something like having y = conv2(x, h, 'same')
. In this case, you need to solve a two-level Toeplitz system y = T*h
, where T
is the convolution matrix constructed from x
.
Upvotes: 1