Click here to Skip to main content
15,891,423 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, how can we remove barrel distortion from a image? i tested some algorithms but the result was not acceptable. please help!
Posted

Think of barrel distortion as a transformation. You transform the original image by moving the pixels outward so that they look like a TV (this is known as barrel distortion). You just apply the opposite transform to move the pixels inward. So, for each pixel in the barrel distored image, calculate where that pixel would have come from, and set that pixel in the adjusted image. Or, visit each pixel in the adjusted image and apply a barrel distortion transformation to that pixel to determine where it would be placed in the distorted image, then grab the pixel from that location in the barrel distorted image and set it in the adjusted image.

The latter of those 2 approaches will work better, but it will not be perfect, as it cannot be in this type of lossy transformation. Also, depending on the details of the transformation, you may end up with some missing edge pixels... that is unavoidable.

If you describe in detail what you've tried and why it is not acceptable, that may help us help you.
 
Share this answer
 
Hi dear friend, i want to find the right X and Y. is there any algorithm to correct the right X and Y or any equation to correct the wrong position?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900