How to vectorize this nested for loop?
I am finding the cylindrical projection of an image given the camera’s intrinsic matrix and the distortion coefficients. After finding the warpped coordinates, I need to find the image value for those coordinates and assign them to an empty wrapped image. I would like to vectorize the nested for loop written at the end. I tried with sub2ind
, had series of errors and gave up. Below is the code: