MATLAB Answers

0

How to apply pixel shift to individual pixels in image file?

Asked by Massimiliano on 3 Mar 2015
Latest activity Commented on by Massimiliano on 30 Mar 2015
I have a gray-scale image file (1024 rows by 1024 columns). The gray values range from 0 to 65535 (16-bit). I also have a distortion correction map (same size as the image file) which indicates how each pixel in the first image must be shifted to create the new 'corrected' image.
I've found several forum posts giving examples on how to apply a shift equally to all pixels. However, in my case, I'd like to apply different shifts to different pixels. In some cases, the shift could also be sub-pixel (in which case, I can imagine I'd have to first split each pixel into sub-pixels).
Thank you in advance for your help.
Massi

  0 Comments

Sign in to comment.

1 Answer

Answer by Ashish Uthama on 3 Mar 2015
 Accepted Answer

Have a look at the displacement field syntax of imwarp. Depending on the format of your distortion correction map, it might be as simple as a direct call.

  1 Comment

Thank you, Ashish, for the response. I've looked at IMWARP and it looks like what I need. However, I am running into other issues with regards to its implementation. I'll pitch another question on the forum. Thanks, again.

Sign in to comment.