Hi guys, I am working on Barrel distortion correction using MATLAB. I have written code as per correction algorithm. I am unable to mathematically compare corrected output with original image can you suggest me some parameter for it..

조회 수: 16 (최근 30일)
Basically Barrel distortion is image appears like fisheye image. straight line appears as curve due to use of wide angle lens. Correction depends on input parameter that is correction factor. Now as i vary correction factor i am getting nearby similar but corrected image. Hence i need to mathematically justify exact output.
As per correction algorithm used my code is giving me corrected image for input distorted image. But i am unable to compare my result using some standard parameter.Its just visually i could say that it is corrected.
I have attached input output images and code here.Please suggest how could i work forward in this?
Will correlation between images give me what i require?
  댓글 수: 3
Image Analyst
Image Analyst 2017년 10월 20일
Of course. Distortion is a third order optical aberration where the point moved inward (barrel) or outward (pincushion). The distance it moved, delta r, is proportional to the radius. So the formula is
rNew = rOld + factor * rOld^2;
Najwa Anwar
Najwa Anwar 2017년 10월 31일
I do not have information regarding the rOld and the factor. Is it provided by the lens manufacture or I can get it from calculating from the image? (I'm sorry but I have zero knowledge on optics and I need to create a matlab code with precise correcting factor, k value).

댓글을 달려면 로그인하십시오.

답변 (2개)

Bjorn Gustavsson
Bjorn Gustavsson 2017년 2월 9일
Well, if the only thing you have is the original image you cant really tell. You kind of have to trust the task-givers world that it is made with a fish-eye lens. Then you'll have to assume that there are a reasonable number of edges (houses, lamp-posts, telegraph poles and the like) that are straight in reality (this is obviously not a given, but a good assumption). Then you'll have to find a correction factor that transform these edged in the fish-eye image to straight lines in the "corrected" image.
HTH
  댓글 수: 3
Bjorn Gustavsson
Bjorn Gustavsson 2017년 2월 10일
Well, if you want to compare your "corrected" image with the original, just apply the inverse of the correction to make sure that you get the original image back?
Or take a couple of cuts (preferably horizontal and vertical) through your original image and the corresponding corrected images (just transform the pixel-coordinates of the cuts and get the image coordinates in the "corrected" image by interpolation) and show that they correlate very well? For extra credibility do the same in the opposite direction.
I'd just take a look at the images and check that features in the fish-eye images that I know to be straight line-features are corrected to become linear in the corrected image and then say: "Ok that will do". On the other hand I'd also be way more arrogant and say that I would never have any problems with motion tracking or any other image analysis with fish-eye images in the first place...
Hope this clarifies your confusion.
Smita Darvatkar
Smita Darvatkar 2017년 2월 14일
Thankyou so much.. I think this would help me in some way.Thanks alot

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2017년 10월 20일
  댓글 수: 1
Aishwarya Patil
Aishwarya Patil 2017년 11월 1일
Hello, I applied your code, and the when i was changing the correction factor i am not the getting the corrected output istead im getting the cropped image.I am changing distortion parameters from 1/2 to 3/4 and getting the same output as input and when i increase it to 2 my image gets cropped. Can you please help me with the implementation of the code and how to find the proper output with my input image.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by