Clear Filters
Clear Filters

Image Lookup Table Generation

1 view (last 30 days)
Jon Conger
Jon Conger on 2 Sep 2017
Commented: Jon Conger on 2 Sep 2017
Is it possible to perform a number of image transform operations on an image and generate a lookup table that maps each original pixel location to its new location? I want to use this LUT output as an input in a different software to mass-process the same pixel reassignment on each frame of streaming video.

Accepted Answer

Walter Roberson
Walter Roberson on 2 Sep 2017
Provided the transformations only move entries:
temp_img = reshape(1:numels(YourImage), size(YourImage));
Now do your transformation on temp_img . The result will be an array of linear indices:
mapped_idx = Do_all_the_moving_transformations(temp_idx);
example_mapped_image = YourImage(mapped_idx);
another_mapped_image = YourOtherImage(mapped_idx);
  1 Comment
Jon Conger
Jon Conger on 2 Sep 2017
Thanks! This makes sense. I'll give it a try.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!