barrel and pincushion lens distortion correction

버전 1.1.0.0 (586 KB) 작성자: Jaap de Vries
I = LENSDISTORT(I, k)corrects for radially symmetric distortions
다운로드 수: 6.5K
업데이트 날짜: 2012/8/31

라이선스 보기

I = LENSDISTORT(I, k)corrects for radially symmetric distortions, where
I is the input image and k is the distortion parameter. lens distortion
can be one of two types: barrel distortion and pincushion distortion.
In "barrel distortion", image magnification decreases with
distance from the optical axis. The apparent effect is that of an image
which has been mapped around a sphere (or barrel). In "pincushion
distortion", image magnification increases with the distance from the
optical axis. The visible effect is that lines that do not go through the
centre of the image are bowed inwards, towards the centre of the image,
like a pincushion [1].

I = LENSDISTORT(...,PARAM1,VAL1,PARAM2,VAL2,...) creates a new image,
specifying parameters and corresponding values that control various aspects
of the image distortion correction. Parameter names case does not matter.

Parameters include:

'bordertype' String that controls the treatment of the image
edges. Valid strings are 'fit' and 'crop'. By
default, 'bordertype' is set to 'crop'.

'interpolation' String that specifies the interpolating kernel
that the separable resampler uses. Valid
strings are 'cubic', 'linear' and 'nearest'. By
default, the 'interpolation' is set to 'cubic'

'padmethod' string that controls how the resampler
interpolates or assigns values to output elements
that map close to or outside the edge of the input
array. Valid strings are 'bound', circular',
'fill', 'replicate', and symmetric'. By
default, the 'padmethod' is set to 'fill'

'ftype' Integer between 1 and 4 that specifies the
distortion model to be used. The models
available are

'ftype' = 1: s = r.*(1./(1+k.*r));

'ftype' = 2: s = r.*(1./(1+k.*(r.^2)));

'ftype' = 3: s = r.*(1+k.*r);

'ftype' = 4: s = r.*(1+k.*(r.^2));

By default, the 'ftype' is set to 4.

Class Support
-------------
An input intensity image can be uint8, int8, uint16, int16, uint32,
int32, single, double, or logical. An input indexed image can be uint8,
uint16, single, double, or logical.

Examples
--------
% read image
I = imread('cameraman.tif');

% Distort Image
I2 = lensdistort(I, 0.1);

% Display both images
imshow(I), figure, imshow(I2)

References
--------------
[1] http://en.wikipedia.org/wiki/Distortion_(optics), August 2012.

[2] Harri Ojanen, "Automatic Correction of Lens Distortion by Using
Digital Image Processing," July 10, 1999.

[3] G.Vassy and T.Perlaki, "Applying and removing lens distortion in post
production," year???

[4] http://www.mathworks.com/help/images/examples/creating-a-gallery-of-transformed-images.html, August 2012.

Created by Jaap de Vries, 8/31/2012
jpdvrs@yahoo.com

-----------------------------------------------------------------------%

인용 양식

Jaap de Vries (2024). barrel and pincushion lens distortion correction (https://www.mathworks.com/matlabcentral/fileexchange/37980-barrel-and-pincushion-lens-distortion-correction), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2012a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Read, Write, and Modify Image에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.1.0.0

8-31-2012 Made some spelling corrections and added an example.pdf file and example images

1.0.0.0