How can I fasten my code?
Show older comments
Hi there,
My brother has an old photo taken from an airplane, but it is deformed due to the lens. The specs of the lens are unknown. He has another map on which all building that are currently in that area are drown. I have combined the two maps and we can clearly see the deformation. I have wrote a code that finds the deformation: we manually set reference points (for instance a green dot on the edge of a building and then a red dot on the same edge of that building on the other map). The script then finds the deformation of all those reference points (vectors). My plan: In a while loop, each pixel becomes the average of its first neighbours. The while loop stops when the difference between the current and former matrix (measured using the sum of all amplitudes) is some set small number. In the end we would have a matrix with vectors that approximately show the complete deformation of the photo. Applying the inverse deformation would then give the old photo, but in the real dimensions. THE PROBLEM: the photo is like 21kx19k pixels, which means HUGE matrices. It could take ages until the deformation is found. What I ask you guys: does any of you know a way to solve this problem quicker?
Thanks a lot for your help in advance.
Kind regards, Rudy
Accepted Answer
More Answers (0)
Categories
Find more on Feature Detection and Extraction 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!