0
$\begingroup$

I know we can shift an image entirely with FFT as

https://stackoverflow.com/questions/25827916/matlab-shifting-an-image-using-fft

However, is it possible to shift the image pixel-wise? I just found a similar description in a recently published paper: X. Wang, L. Li, and G. Hou, "High-resolution light field reconstruction using a hybrid imaging system," Appl. Opt. 55, 2580-2593 (2016). They use a subband approach that really confused me.

$\endgroup$
4
  • 3
    $\begingroup$ What do you mean by "pixel-wise" in this context? As you mentioned, you do understand that a shift of the entire image is possible (i.e. a displacement of the image in $x$ and $y$ by a certain (not necessarily integer) number of pixels). What is the difference between this shift and your "pixel-wise" shift then? $\endgroup$
    – M529
    Commented Apr 7, 2016 at 13:58
  • $\begingroup$ "pixel-wise" means each pixel owns its own displacement that differs from others', in this case shifting the entire image is not equivalent to shifting pixel-wise. $\endgroup$
    – scimg
    Commented Apr 8, 2016 at 5:18
  • 1
    $\begingroup$ In this case, I do not see an efficient way to do this by an FFT. You could certainly chop up your image, displace each pixel individually and recombine the results then to achieve an shifted image. However, this is computationally certainly not the best option, and does also not solve the problem that you would generate "holes" (i.e. if you would shift one pixel to the left by exactely one pixel, you would have a hole/"missing value" in the original place, since no other pixels are dragged along with the originally shifted pixel). $\endgroup$
    – M529
    Commented Apr 8, 2016 at 8:10
  • $\begingroup$ Thanks for your comment, though I still don't understand the subband approach in the paper. $\endgroup$
    – scimg
    Commented Apr 8, 2016 at 12:32

1 Answer 1

1
$\begingroup$

The point that with "pixel-wise" you mean "differently for each pixel" indicates that a frequency-domain transform is a really bad approach for this. The DFT of a single element is that element (scaled, if at all modified), so you can't win with this.

You can use the FFT and similar algorithms to do elegant shifts, but the fact that it's used in light-field reconstruction stems from the fact that there's a certain, mathematically elegant model of what should happen to many of those pixels that relates nicely to frequency domain.

If you just want to shift/interpolate/distort your image pixel-wise, the normal distortion matrices are the way to go – ask google about that.

For example, OpenCV has a very short tutorial on camera calibration; maybe the theory contained in there is something for you?

$\endgroup$
1
  • $\begingroup$ Thank you for your answer! I will try some warping method in optical flow. $\endgroup$
    – scimg
    Commented Apr 8, 2016 at 12:34

Your Answer

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

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