How to get indexed pixels from set of images?
4 views (last 30 days)
Show older comments
A set of images a(x,y,n); n images, each image has a size of (x * y); A known index map: imind(x,y), size of the image with each element value from 1 to n;
How to obtain the image that each pixel is from different image? For example: imind(1,1)=2, then take final_im(1,1)=a(1,1,2); imind(21,33)=6, then take final_im(21,33)=a(21,33,6); etc.
It can be done with a loop:
But, is there an elegant way?
KSSV on 5 May 2017
You can reduce one loop shown below:
Image Analyst on 5 May 2017
I wouldn't encourage John's bad habits of calling vertical row "x" and the horizontal column "y" - this is the opposite the way the rest of the world does it. Images take indexes y,x not x,y.
Find more on Image Arithmetic in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!