KR101465607B1 - Distorted Image Processing Method For Fish-Eye Lens - Google Patents

Distorted Image Processing Method For Fish-Eye Lens Download PDF

Info

Publication number
KR101465607B1
KR101465607B1 KR1020120139983A KR20120139983A KR101465607B1 KR 101465607 B1 KR101465607 B1 KR 101465607B1 KR 1020120139983 A KR1020120139983 A KR 1020120139983A KR 20120139983 A KR20120139983 A KR 20120139983A KR 101465607 B1 KR101465607 B1 KR 101465607B1
Authority
KR
South Korea
Prior art keywords
coordinates
image
distortion
integer
corrected
Prior art date
Application number
KR1020120139983A
Other languages
Korean (ko)
Other versions
KR20140072470A (en
Inventor
이준환
최창원
Original Assignee
광운대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 광운대학교 산학협력단 filed Critical 광운대학교 산학협력단
Priority to KR1020120139983A priority Critical patent/KR101465607B1/en
Publication of KR20140072470A publication Critical patent/KR20140072470A/en
Application granted granted Critical
Publication of KR101465607B1 publication Critical patent/KR101465607B1/en

Links

Images

Classifications

    • G06T3/047
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration

Abstract

본 발명은 어안 렌즈 왜곡 영상 처리 방법에 관한 것이다. 본 발명의 일 실시예에 따른 어안 렌즈 왜곡 영상 처리 방법은 어안렌즈로 획득한 왜곡 영상으로부터 보정할 보정 영상으로 파라미터를 사용하여 보정 영상의 좌표를 교정(calibration)하는 단계, 및 보정 영상에서 보간할 정수 좌표(C(xc,yc))의 화소값을 보간하는 단계를 포함한다. 보간하는 단계는 보정 영상에서 보간할 정수 좌표(C(xc,yc))를 왜곡 영상 실수 좌표(D(xd,yd))로 변환하는 단계, 변환된 왜곡 영상 실수 좌표(D(xd,yd)) 주위의 적어도 2개의 왜곡 영상 정수 좌표(Dk(xd k,yd k))를 보정 영상 실수 좌표(Ck(xc k,yc k))로 변환하는 단계, 및 변환된 보정 영상 실수 좌표들(Ck(xc k,yc k)) 중에서 정수 좌표(C(xc,yc))에 가장 근접한 적어도 1 개의 변환된 보정 영상 실수 좌표를 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))로 설정하는 단계를 포함한다.The present invention relates to a method for processing a fisheye lens distortion image. A method of processing a fisheye lens distortion image according to an embodiment of the present invention includes the steps of calibrating coordinates of a correction image using a parameter as a correction image to be corrected from a distorted image acquired by a fisheye lens, And interpolating pixel values of integer coordinates (C (x c , y c )). The step of interpolating includes the steps of transforming the integer coordinates (C (x c , y c ) to be interpolated in the corrected image into the distorted image real number coordinates (D (x d , y d ) to convert x d, y d)) at least two distortion integer coordinates (d k (x d k, y d k)), the corrected video real coordinates (c k (x c k, y c k) of the surrounding) step, and converts the corrected video real coordinates (C k (x c k, y c k)) from the integer coordinates (C (x c, y c )) closest to at least one of the converted correction image correction of an error coordinate the and a step of setting in the image closest real coordinates (C k N (k x c, y c k)).

Description

어안 렌즈용 왜곡 영상 처리 방법{Distorted Image Processing Method For Fish-Eye Lens}[0001] The present invention relates to a distortion image processing method for a fisheye lens,

본 발명은 영상 처리 방법에 관한 것으로, 더 구체적으로 어안 렌즈용 보정영상 보간 방법에 관한 것이다.The present invention relates to an image processing method, and more particularly, to a corrected image interpolation method for a fish-eye lens.

어안렌즈는 보통의 광각 렌즈와 비교하여 넓은 화각을 가진다. 따라서, 자동 항법 장치, 자동차, 영상 의학 등의 다양한 머신 비젼 분야에서 어안렌즈는 다양하게 활용되고 있다. 하지만 화각이 넓어짐에 따라 광축으로부터 멀어지는 외곽으로 갈수록 방사 왜곡이 심해진다. 이러한 방사 왜곡을 보정하기 위하여 두 단계를 거치게 된다. 첫 번째 단계는 어안렌즈로부터 획득한 왜곡 영상을 보정할 보정 영상으로 교정(calibration)하는 것이다. 두 번째 단계는 보정 영상 위에서 보정할 해당 좌표의 화소 값을 결정하는 보간(interpolation)하는 것이다.The fisheye lens has a wide angle of view compared to a normal wide-angle lens. Accordingly, fisheye lenses are widely used in various machine vision fields such as an autopilot, a car, and a radiology. However, as the angle of view increases, the distortion of the image becomes worse as it goes from the optical axis to the outer edge. In order to correct this radial distortion, two steps are taken. The first step is to calibrate the distorted image acquired from the fisheye lens with a corrected image to be corrected. The second step is to interpolate to determine the pixel value of the corresponding coordinate to be corrected on the corrected image.

본 발명의 해결하고자 하는 일 기술적 과제는 어안 렌즈의 방사 왜곡을 SUMMARY OF THE INVENTION It is an object of the present invention to provide a lens-

본 발명의 일 실시예에 따른 어안 렌즈 왜곡 영상 처리 방법은 어안렌즈로 획득한 왜곡 영상으로부터 보정할 보정 영상으로 파라미터를 사용하여 보정 영상의 좌표를 교정(calibration)하는 단계; 및 상기 보정 영상에서 보간할 정수 좌표(C(xc,yc))의 화소값을 보간하는 단계를 포함한다. 상기 보간하는 단계는 상기 보정 영상에서 보간할 정수 좌표(C(xc,yc))를 왜곡 영상 실수 좌표(D(xd,yd))로 변환하는 단계; 변환된 왜곡 영상 실수 좌표(D(xd,yd)) 주위의 적어도 2개의 왜곡 영상 정수 좌표(Dk(xd k,yd k))를 보정 영상 실수 좌표(Ck(xc k,yc k))로 변환하는 단계; 및 변환된 보정 영상 실수 좌표들(Ck(xc k,yc k)) 중에서 상기 정수 좌표(C(xc,yc))에 가장 근접한 적어도 1 개의 변환된 보정 영상 실수 좌표를 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))로 설정하는 단계를 포함한다.A method of processing a fisheye lens distortion image according to an exemplary embodiment of the present invention includes calibrating coordinates of a correction image using a parameter as a correction image to be corrected from a distorted image acquired by a fisheye lens; And interpolating pixel values of integer coordinates (C (x c , y c ) to be interpolated in the corrected image). Wherein the interpolating comprises transforming the integer coordinates (C (x c , y c )) to be interpolated in the corrected image into a distorted image real number coordinate (D (x d , y d )). The converted distortion real coordinates (D (x d, y d )) at least two distortion integer coordinates around (D k (x d k, y d k)) corrected video real coordinates (C k (x c k , y c k )); And converting the corrected image real coordinates (C k (x c k, y c k)) the integer coordinates (C (x c, y c )) from the closest at least one of the converted corrected video real coordinates corrected video in and a step of setting a coordinate nearest real number (N c k (k x c, y c k)).

본 발명의 일 실시예에 있어서, 상기 보간하는 단계는 상기 보정 영상에서 상기 정수 좌표(C(xc,yc))와 상기 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k)) 사이의 좌표 거리(dk)를 계산하고, 상기 좌표 거리(dk)에 반비례하는 보간 계수(iCk)를 산출하는 단계;및 상기 보간 계수(iCk)와 상기 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))에 대응하는 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))의 화소값(Q(xc k,yc k))을 이용하여 상기 정수 좌표(C(xc,yc))의 화소값(P(xc,yc))을 계산하는 단계를 더 포함할 수 있다.In one embodiment of the present invention, the interpolating comprises interpolating the integer coordinates C (x c , y c ) and the corrected image nearest real coordinates C k N (x c k , y c) k)), and calculating a coordinate distance (d k) between the coordinate distance (d k) and calculating the interpolation coefficient (iC k) that is inversely proportional to; and the interpolation coefficient (iC k) with the corrected image closest the pixel value of the real coordinates (c k N (x c k , y c k)) distortion image closest integer coordinates (d k N (x d k , y d k)) corresponding to the (Q (x c k, y c k)) is the pixel value (P (x c, y c )) of the integer coordinates (c (x c, y c )) may further comprise the step of calculating using.

본 발명의 일 실시예에 있어서, 상기 보간하는 단계는 보정 영상 최근접 실수 좌표 (Ck N(xc k,yc k))에 대응하는 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))를 메모리에 저장하는 단계; 왜곡 영상에서 정수 좌표(C(xc,yc)와 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k)) 사이의 좌표 거리(dk)를 계산하고, 좌표 거리(dk)를 이용하여 보간 계수(iCk)를 계산하고, 보간 계수를 (iCk)를 메모리에 저장하는 단계를 더 포함할 수 있다.In one embodiment of the present invention, wherein the interpolation is corrected image closest real coordinates (C k N (x c k , y c k)) distortion image closest integer coordinates (D k N (x d corresponding to k , y d k )) in a memory; Calculating a coordinate distance (d k) between the integer coordinates in the distorted images (C (x c, y c) and the corrected image closest real coordinates (C k N (x c k , y c k)), and the coordinate distance ( calculating the interpolation coefficient (iC k) using the d k), and may further comprise the step of storing the interpolation coefficients a (iC k) in the memory.

본 발명의 일 실시예에 있어서, 상기 보간하는 단계는 상기 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))를 메모리부터 독출하는 단계; 상기 보간 계수(iCk)를 메모리부터 독출하는 단계; 및 상기 보간 계수(iCk)와 상기 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))의 화소값(Q(xc k,yc k))을 이용하여 상기 정수 좌표(C(xc,yc))의 화소값(P(xc,yc))을 계산하는 단계를 더 포함할 수 있다.In one embodiment of the present invention, the step of interpolating comprises the steps of: reading the distortion image nearest integer coordinates (D k N (x d k , y d k )) from a memory; Reading the interpolation coefficient (i C k ) from a memory; And the integer using the pixel value (Q (x c k, y c k)) of the interpolation coefficient (iC k) and the distortion closest integer coordinates (D k N (x d k , y d k)) And calculating a pixel value (P (x c , y c )) of the coordinates (C (x c , y c )).

본 발명의 일 실시예에 있어서, 상기 보간하는 단계는 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))에 대응하는 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))의 패턴을 결정하고, 상기 패턴을 패턴 메모리에 패턴 데이터로 저장하고, 보간할 정수 좌표(C(xc,yc)에 대응하는 패턴 어드레스 메모리가 상기 패턴 테이터를 가지는 패턴 메모리를 지시하도록 설정하는 단계를 더 포함할 수 있다.In one embodiment of the present invention, wherein the interpolation is corrected image closest real coordinates (C k N (x c k , y c k)) distortion image closest integer coordinates (D k N (x d corresponding to determine the pattern of k, y d k)), and stores the pattern in the pattern data in the pattern memory, a pattern corresponding to the integer coordinates (c (x c, y c) to interpolate the address memory having the pattern mutator And setting the pattern memory to indicate the pattern memory.

본 발명의 일 실시예에 있어서, 상기 보간하는 단계는 상기 정수 좌표(C(xc,yc))가 가리키는 상기 패턴 메모리의 값으로 패턴 메모리를 접근하여 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))의 패턴 데이터를 독출하는 단계; 상기 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))의 패턴 데이터로부터 상기 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))를 계산하는 단계; 상기 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))에 대응하는 상기 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))를 계산하는 단계; 상기 보정 영상의 상기 정수좌표(C(xc,yc))와 상기 보정 영상 최근접 실수 좌표들(Ck N(xc k,yc k)) 사이의 좌표 거리(dk)를 계산하고, 상기 좌표 거리(dk)에 반비례하는 보간 계수(iCk)를 산출하는 단계;및 상기 보간 계수(iCk)와 상기 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))의 화소값(Q(xc k,yc k))을 이용하여 상기 정수 좌표(C(xc,yc))의 화소값(P(xc,yc))을 계산하는 단계를 더 포함할 수 있다.In one embodiment of the present invention, the interpolating step accesses the pattern memory with the value of the pattern memory indicated by the integer coordinates (C (x c , y c )) and outputs the distortion image nearest integer coordinates (D k N (x d k , y d k )); Calculating the distortion image nearest integer coordinates (D k N (x d k , y d k )) from the pattern data of the distortion image nearest integer coordinates (D k N (x d k , y d k ) ; Calculating the corrected image nearest real number coordinate (C k N (x c k , y c k )) corresponding to the distortion image nearest integer coordinates (D k N (x d k , y d k )); Calculates a coordinate distance (d k ) between the integer coordinates (C (x c , y c )) of the corrected image and the corrected image nearest real coordinates (C k N (x c k , y c k ) and the coordinate distance (d k) interpolation coefficients (iC k) the step of calculating in inverse proportion to; and the interpolation coefficient (iC k) and the distortion closest integer coordinates (d k N (x d k, y d k) the pixel value (Q (x c k, y c k)) for use by the pixel value (P (x c, y c ) of the integer coordinates (c (x c, y c )) of a)) to calculate the Step < / RTI >

본 발명의 일 실시예에 있어서, 상기 교정(calibration)은 구면 투영법을 사용할 수 있다.In one embodiment of the present invention, the calibration may use spherical projection.

본 발명의 일 실시예에 따른 어안 렌즈 왜곡 영상 처리 방법은 어안렌즈로 획득한 왜곡 영상을 보정 영상으로 보정한다. 상기 어안 렌즈 왜곡 영상 처리 방법은 상기 보정 영상에서 보간할 정수 좌표(C(xc,yc))를 왜곡 영상 실수 좌표(D(xd,yd))로 변환하는 단계; 상기 왜곡 영상 실수 좌표(D(xd,yd)) 주위의 적어도 2개의 왜곡 영상 정수 좌표(Dk(xd k,yd k))를 보정 영상 실수 좌표(Ck(xc k,yc k))로 변환하는 단계; 상기 보정 영상 실수 좌표들(Ck(xc k,yc k)) 중에서 상기 정수 좌표(C(xc,yc))에 가장 근접한 적어도 1 개의 변환된 보정 영상 실수 좌표를 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))로 설정하는 단계; 및 상기 보정 영상에서 보간할 정수 좌표(C(xc,yc))의 화소값을 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))에 대응하는 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))의 화소값(Q(xc k,yc k))을 이용하여 보간하는 단계를 포함한다.A fisheye lens distortion image processing method according to an embodiment of the present invention corrects a distorted image acquired by a fisheye lens with a corrected image. Wherein the fisheye lens distortion image processing method comprises the steps of: transforming integer coordinates (C (x c , y c ) to be interpolated in the corrected image into distorted image real coordinates (D (x d , y d )); The distortion real coordinates (D (x d, y d )) at least two distortion integer coordinates around (D k (x d k, y d k)) corrected video real coordinates (C k (x c k, y c k )); At least one converted corrected image real number coordinate closest to the integer coordinates C (x c , y c ) among the corrected image real number coordinates C k (x c k , y c k ) And setting real coordinates (C k N (x c k , y c k )); And a pixel value of an integer coordinate (C (x c , y c ) to be interpolated in the corrected image is referred to as a corrected image nearest real number coordinate (C k N (x c k , y c k ) using the pixel value (Q (k x c, y c k)) of the integer coordinates (D k N (k x d, y d k)) and a step of interpolation.

본 발명의 일 실시예에 있어서, 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))를 룩업 테이블 메모리에 저장하는 단계를 더 포함할 수 있다.In one embodiment of the present invention, the method may further comprise storing the distortion image nearest integer coordinates (D k N (x d k , y d k )) in a lookup table memory.

본 발명의 일 실시예에 따른 어안 렌즈 왜곡 영상 처리 방법은 영상의 외곽에서객관적 화질 및 주관적 화질을 향상시킬 수 있다.The fisheye lens distortion image processing method according to an embodiment of the present invention can improve the objective image quality and the subjective image quality at the periphery of the image.

도 1은 본 발명의 일 실시예에 따른 구면 투영법을 설명하는 도면이다.
도 2a 내지 도 2d는 전방향 사상과 역방향 사상을 설명하기 위한 예제 그림이다.
도 3은 본 발명의 일 실시예에 따른 어안 렌즈 왜곡 영상 처리 방법을 설명하는 흐름도이다.
도 4는 본 발명의 일 실시예에 따른 왜곡 영상과 보정 영상의 좌표 변환을 설명하는 도면이다.
도 5는 보정 영상 평면에서 보정 영상 최근접 실수 좌표들(Ck N(xc k,yc k))를 나타내는 도면이다.
도 6은 왜곡 영상 평면에서 왜곡 영상 최근접 정수 좌표들 (Dk N(xd k,yd k))를 나타내는 도면이다.
도 7은 본 발명의 일 실시예에 따른 이진화 영상(binary image)이다.
도 8은 도 7의 이진 영상 중심 부분의 좌표 변환 결과를 나타내는 도면이다.
도 9는 본 발명의 일 실시예에 따른 iC0의 크기에 따른 분포를 나타내는 그레이 영상이다.
도 10은 도 7과 도 9를 조합한 그레이 이미지이다.
도 11은 본 발명의 다른 실시예에 따른 영상 처리 방법을 설명하는 흐름도이다.
도 12는 또 다른 실시예에 따른 영상 처리 방법을 설명하는 흐름도이다.
도 13은 방사 왜곡 특성을 나타내는 도면이다.
도 14는 제 2 사분면(II)에서 발생하는 위치에 따른 패턴들을 보여준다.
도 15는 본 발명의 일 실시예에 따른 2-레벨 LUT(LUT2)의 구조를 설명하는 도면이다.
도 16은 본 발명의 일 실시예에 따른 실행 시간을 비교한 그래프이다.
1 is a view for explaining a spherical projection method according to an embodiment of the present invention.
FIGS. 2A to 2D are exemplary diagrams for explaining forward and backward mapping. FIG.
3 is a flowchart illustrating a fisheye lens distortion image processing method according to an embodiment of the present invention.
4 is a view for explaining coordinate transformation between a distorted image and a corrected image according to an embodiment of the present invention.
5 is a diagram showing the corrected image nearest real coordinates (C k N (x c k , y c k )) in the corrected image plane.
6 is a diagram showing distorted image nearest integer coordinates (D k N (x d k , y d k )) in the distortion image plane.
7 is a binary image according to an embodiment of the present invention.
FIG. 8 is a diagram showing the result of coordinate transformation of the center portion of the binary image of FIG. 7. FIG.
9 is a gray image showing a distribution according to the size of iC 0 according to an embodiment of the present invention.
Fig. 10 is a gray image combining Figs. 7 and 9. Fig.
11 is a flowchart illustrating an image processing method according to another embodiment of the present invention.
12 is a flowchart illustrating an image processing method according to another embodiment.
Fig. 13 is a view showing a radial distortion characteristic. Fig.
Fig. 14 shows patterns according to positions occurring in the second quadrant II.
15 is a diagram for explaining the structure of a two-level LUT (LUT2) according to an embodiment of the present invention.
16 is a graph comparing execution times according to an embodiment of the present invention.

본 발명의 일 실시예에 따른 어안 렌즈 영상 처리 방법은 어안렌즈의 방사왜곡(radial distortion)을 고려한 개선된 보간법을 제공한다. 어안렌즈에서 발생하는 방사왜곡의 보정은 교정 단계과 보간 단계의 두 단계를 통해 진행된다. 기존기술과 달리 왜곡 영상이 아닌 보정 영상에서 최근접한 좌표를 사용한 보간법이 제공된다. 또한 제안한 알고리즘의 수행시 성능 향상을 위한 룩업 테이블(look-up table;LUT) 구조가 제안된다. 실험 결과에 따르면, 주관적인 화질과 첨두 신호대노이즈비(peak singal to noise ratio;PSNR) 통한 객관적인 화질이 향상되었다. 또한, 상기 LUT 구조는 연산 속도를 향상시킨다.A fisheye lens image processing method according to an embodiment of the present invention provides an improved interpolation method considering radial distortion of a fisheye lens. The correction of the radial distortion occurring in the fisheye lens proceeds through two steps: a calibration step and an interpolation step. Unlike the conventional technique, an interpolation method using nearest coordinates in a corrected image rather than a distorted image is provided. In addition, a look-up table (LUT) structure for improving the performance of the proposed algorithm is proposed. Experimental results show that the objective image quality is improved through subjective image quality and peak signal to noise ratio (PSNR). In addition, the LUT structure improves the computation speed.

교정 단계는 변수(parameter)를 사용하여 보정 영상에서의 좌표를 계산하는 과정이다. 교정 단계는 변수(parameter)를 결정하는 방법에 따라, 측량적 방법(metric methods)와 비측량적 방법(non-metric methods)으로 분리될 수 있다.The calibration step is a process of calculating coordinates in a corrected image using a parameter. The calibration step can be divided into metric methods and non-metric methods, depending on how the parameters are determined.

측량적 방법에 따르면, 영상으로부터 직선과 같은 특징점(feature point)이 인식되고, 이러한 특징점 사이의 관계로 변수(parameters)를 결정하고 좌표가 계산된다. 측량적 방법은 영상으로부터 특징점을 인식하기 때문에, 많은 연산량을 가지고 잡음에 민감하다. According to the measurement method, a feature point such as a straight line is recognized from an image, and parameters are determined by the relation between these feature points and coordinates are calculated. The measurement method recognizes the feature points from the image, so it is sensitive to noise with a large amount of computation.

비측량적 방법에 따르면, 렌즈의 특성으로 변수(parameters)가 결정되고, 좌표가 계산된다. 비측량적 방법은 크게 다항식(polynomial expression)을 사용하여 왜곡 계수를 반복적으로 연산하여 보정하는 방법과 구면 투영법(spherical projection)를 이용한 기하학적 방법(geometric methods)으로 분리될 수 있다.According to the non-metric method, the parameters are determined by the characteristics of the lens, and the coordinates are calculated. Non-parametric methods can be largely divided into methods of repetitively calculating and correcting distortion coefficients using polynomial expressions and geometric methods using spherical projections.

교정 작업이 완료되면 보정할 해당 좌표의 화소 값을 결정하는 보간이 수행된다. 일반적인 영상 처리에서 보간은 입력 영상의 크기를 변경할 때 사용된다. 또는, 보간은 화소 값을 가지지 않는 화소(vacant pixel)에 대하여 주변 좌표의 화소 값을 참조하여 보정할 해당 좌표의 화소 값을 결정한다. 이에 따라, 보간된 영상이 생성된다.When the calibration operation is completed, interpolation is performed to determine the pixel value of the corresponding coordinate to be corrected. In general image processing, interpolation is used to change the size of the input image. Alternatively, interpolation refers to a pixel value of a surrounding coordinate with respect to a vacant pixel having no pixel value, and determines a pixel value of the corresponding coordinate to be corrected. Thus, an interpolated image is generated.

대표적인 보간법에는 최근접 좌표 보간법(nearest neighborhood interpolation), 양선형 보간법(bilinear interpolation), 3차 회선 보간법(cubic interpolation) 등이 있다. 마찬가지로, 어안렌즈에서 보간법은 어안렌즈를 통해 촬영된 왜곡 영상(distorted image)에 대하여 보정 영상(corrected image)을 생성할 때, 방사 왜곡으로 인해 발생하는 화소 값을 가지지 않는 화소에 대한 화소 값을 결정하는 것이다. 기존 어안렌즈의 왜곡 영상의 보정은 양선형 보간법, 또는 3차 회선 보간법을 사용하였다.Representative interpolation methods include nearest neighborhood interpolation, bilinear interpolation, and cubic interpolation. Similarly, in the fisheye lens, the interpolation method determines a pixel value for a pixel having no pixel value due to radial distortion when generating a corrected image for a distorted image photographed through a fisheye lens . The correction of the distorted image of the conventional fisheye lens was performed by the two - line interpolation method or the third line interpolation method.

하지만 어안렌즈로 찍은 왜곡 영상의 경우, 방사 왜곡으로 인해 기존에 좋은 성능을 보이는 보간법이 좋은 성능을 보이지 않는 경우가 발생한다. 따라서 이러한 방사 왜곡을 고려하여 보정 영상에서 길이의 비를 적용한 양선형 보간법이 제안되었다.However, in the case of distorted images taken with a fisheye lens, the interpolation method having good performance may not show good performance due to the radial distortion. Therefore, a bilinear interpolation method is proposed in which the length ratio is applied to the corrected image considering the radial distortion.

종래의 보간법들은 왜곡 영상 위에서 근접한 화소들 간의 거리를 이용하여 보간을 수행하였다. 하지만 어안 렌즈의 왜곡 영상은 외곽으로 갈수록 방사 왜곡이 심해진다. 따라서, 왜곡 영상에서 근접한 화소가 보정 영상에서는 근접한 화소가 아닐 수 있다.Conventional interpolation methods interpolate using distances between adjacent pixels on a distorted image. However, the distorted image of a fisheye lens gets more radial distortion as it goes to the outer edge. Therefore, the adjacent pixels in the distorted image may not be adjacent pixels in the corrected image.

본 발명의 일 실시예에 따르면, 왜곡 영상이 아닌 보정 영상에서의 최근접 화소를 이용한 개선된 보간법이 제안된다. 또한 제안하는 보간법은 기존 보간법들보다 연산량이 많을 수 있다. 따라서, 많은 연산량으로 인해 발생하는 성능 저하를 해결하기 위해, LUT(look-up table)의 구조가 제안된다.According to an embodiment of the present invention, an improved interpolation method using a nearest neighbor pixel in a corrected image rather than a distorted image is proposed. Also, the proposed interpolation method may be more computationally expensive than the existing interpolation methods. Therefore, a structure of a look-up table (LUT) is proposed to solve the performance degradation caused by a large amount of computation.

어안 렌즈 왜곡은 방사 왜곡(radial distortion)과 접선 왜곡(tangential distortion)으로 분리될 수 있다. 상기 방사 왜곡은 광선(ray)이 렌즈를 통해 굴절되면서 발생하는 왜곡으로 광축에서 가장자리로 갈수록 커진다. 상기 접선 왜곡은 광축이 이탈하여 발생하는 물리적인 왜곡으로 렌즈 제조 과정에서 렌즈와 영상 평면이 완벽하게 평행을 이루지 않기 때문에 발생한다.Fisheye lens distortion can be separated into radial distortion and tangential distortion. The radial distortion is a distortion generated when a ray is refracted through the lens, and becomes larger toward the edge from the optical axis. The tangent line distortion is a physical distortion caused by the deviation of the optical axis, which occurs because the lens and the image plane are not perfectly parallel in the lens manufacturing process.

상기 방사 왜곡은 술통 변형(barrel distortion)과 바늘꽂이 변형(pincushion distortion)으로 분리될 수 있다. 상기 술통 변형은 광축으로 부터 거리가 멀어질수록 영상의 배율이 감소하는 것을 의미하며 어안렌즈에서 주로 나타난다. 상기 바늘꽂이 변형은 광축으로부터 거리가 멀어질수록 영상의 배율이 확대되는 것을 의미하며 망원경과 같은 반사 망원 렌즈(catadioptric lens)에서 주로 나타난다.The radial distortion can be separated into barrel distortion and pincushion distortion. The deformation of the barrel means that the magnification of the image decreases as the distance from the optical axis increases, and it mainly occurs in the fisheye lens. The deformation of the needle bar means that the magnification of the image increases as the distance from the optical axis increases, and it mainly appears in a catadioptric lens such as a telescope.

본 발명의 일 실시예에 따르면, 교정을 위하여 비측량적 접근법 중 하나인 구면 투영법(Spherical projection method)이 사용된다. 구면 투영법은 렌즈를 완전한 구로 가정하기 때문에 다른 방법들에 비하여 정확도가 떨어지는 단점을 가진다. 하지만, 교정과 보간은 독립적으로 수행될 수 있다. 본 발명의 변형된 실시예에 따르면, 다른 교정 방법을 사용해도 제안하는 보간법의 효과는 동일하다.According to one embodiment of the invention, a spherical projection method, one of the non-metric approaches, is used for calibration. Spherical projection has the disadvantage that accuracy is lower than other methods because the lens is assumed to be a perfect sphere. However, calibration and interpolation can be performed independently. According to a modified embodiment of the present invention, even if other calibration methods are used, the effects of the proposed interpolation method are the same.

이하, 첨부한 도면들을 참조하여 본 발명의 바람직한 실시예들을 상세히 설명하기로 한다. 그러나, 본 발명은 여기서 설명되어지는 실시예들에 한정되지 않고 다른 형태로 구체화될 수도 있다. 오히려, 여기서 소개되는 실시예는 개시된 내용이 철저하고 완전해질 수 있도록 그리고 당업자에게 본 발명의 사상이 충분히 전달될 수 있도록 하기 위해 제공되어지는 것이다. 도면들에 있어서, 구성요소는 명확성을 기하기 위하여 과장되어진 것이다. 명세서 전체에 걸쳐서 동일한 참조번호로 표시된 부분들은 동일한 구성요소들을 나타낸다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. However, the present invention is not limited to the embodiments described herein but may be embodied in other forms. Rather, the embodiments disclosed herein are being provided so that this disclosure will be thorough and complete, and will fully convey the concept of the invention to those skilled in the art. In the drawings, the components have been exaggerated for clarity. Like numbers refer to like elements throughout the specification.

도 1은 본 발명의 일 실시예에 따른 구면 투영법을 설명하는 도면이다.1 is a view for explaining a spherical projection method according to an embodiment of the present invention.

도 1을 참조하면, 구면 투영법은 교정을 위하여 구에서 평면으로 투영 연산을 수행한다. 어안렌즈(10)를 완전한 구로 가정하였을 때, 영상 평면(image plane) 위에서의 좌표는 방사 왜곡으로 인해 센서 평면(sensor plane) 위에서의 왜곡된 좌표로 투영된다. 센서 평면 상의 왜곡 영상을 보정 영상으로 변환하기 위한 좌표가 계산될 수 있다.Referring to FIG. 1, a spherical projection method performs a projection operation from a sphere to a plane for calibration. When the fisheye lens 10 is assumed to be a perfect sphere, the coordinates on the image plane are projected to distorted coordinates on the sensor plane due to the radial distortion. The coordinates for converting the distorted image on the sensor plane into the corrected image can be calculated.

C(xc,yc)는 영상 평면에서의 보정 영상 좌표를 나타내며, D(xd,yd)는 센서 평면에서의 왜곡된 왜곡 영상 좌표를 나타낸다. F는 어안렌즈의 초점 거리(focal length)이다. 삼각형의 닮음비(similarity of triangles)을 이용하여 다음과 같이 계산될 수 있다.C (x c , y c ) denotes the corrected image coordinates in the image plane, and D (x d , y d ) denotes the distorted image coordinate in the sensor plane. F is the focal length of the fisheye lens. Using the similarity of triangles of the triangle, the following can be calculated.

Figure 112012100702052-pat00001
Figure 112012100702052-pat00001

수학식 1은 초점 거리(F)와 영상 평면 상에서의 실제 보정 영상 좌표를 이용하여 센서 평면에서의 왜곡된 왜곡 영상 좌표를 계산하는 식이다. 또한, 수학식 1은 다음과 같이 다시 정리된다.Equation (1) is an equation for calculating the distorted image coordinates in the sensor plane using the focal length F and the actual corrected image coordinates on the image plane. Also, Equation (1) is rearranged as follows.

Figure 112012100702052-pat00002
Figure 112012100702052-pat00002

수학식 2는 초점 거리(F)와 센서 평면 상의 왜곡 영상 좌표를 이용하여 보정 영상 위에서의 보정 영상 좌표를 계산하는 식이다. 어안렌즈의 왜곡 보정을 위하여 수학식 1과 수학식 2를 이용하여, 왜곡 영상에서 보정 영상으로 변환되는 좌표가 계산될 수 있다.Equation (2) is an equation for calculating the corrected image coordinates on the corrected image using the focal distance F and the distorted image coordinates on the sensor plane. For correcting the distortion of the fisheye lens, the coordinates converted from the distorted image to the corrected image can be calculated using Equations (1) and (2).

왜곡 보정을 위한 좌표 변환이 수행될 때, 사상(mapping)되는 방향에 따라 사상은 전방향 사상(forward mapping)과 역방향 사상(backward mapping)으로 분리될 수 있다. When the coordinate transformation for distortion correction is performed, the mapping can be separated into a forward mapping and a backward mapping according to the mapping direction.

전방향 사상은 수학식 2를 이용하여 왜곡 영상에서 보정 영상으로 변환되는 좌표를 계산한 후, 왜곡 영상 위의 좌표 화소 값을 보정 영상 위의 변환되는 좌표 의 화소 값으로 사상시키는 것이다. The omnidirectional mapping is to calculate the coordinates converted from the distorted image to the corrected image using Equation (2), and then map the coordinate pixel values on the distorted image to the pixel values of the transformed coordinates on the corrected image.

전방향 사상은 왜곡 영상과 보정 영상 간의 다대일 사상 관계로 인하여, 겹침 현상(overlap)과 구멍 현상(hole)을 발생시킨다. 따라서 이를 예방하기 위한 추가적인 방법이 필요하다.The omnidirectional mapping causes overlap and hole due to the many-to-one mapping relationship between the distorted image and the corrected image. Therefore, additional methods are needed to prevent this.

역방향 사상은 수학식 1을 이용하여 보정 영상에서 왜곡 영상으로 변환되는 좌표를 계산한 후, 보정 영상 위의 좌표의 화소 값을 왜곡 영상 위의 좌표의 화소 값으로 사상시키는 방법이다. 역방향 사상은 왜곡 영상과 보정 영상 간의 일대다 사상 관계로 인하여, 겹침 현상과 구멍 현상을 발생시키지 않는다. 하지만, 수학식 1을 통하여 변환되는 좌표가 정수 좌표로 떨어지지 않는 경우가 발생하기 때문에 왜곡 영상 위의 주변 좌표로부터 보정 영상 위의 해당하는 좌표의 화소 값을 결정하기 위한 보간법이 필요하다.The backward mapping is a method of calculating the coordinates converted from the corrected image to the distorted image using Equation 1 and mapping the pixel values of the coordinates on the corrected image to the pixel values of the coordinates on the distorted image. The backward mapping does not cause overlapping and hole phenomenon due to a one-to-many mapping relationship between the distorted image and the corrected image. However, since the coordinates to be transformed through Equation (1) do not fall into integer coordinates, an interpolation method for determining the pixel values of the corresponding coordinates on the corrected image from the surrounding coordinates on the distorted image is needed.

도 2a 내지 도 2d는 전방향 사상과 역방향 사상을 설명하기 위한 예제 그림이다. 도 2a는 원래의 영상이고, 도 2b는 수학식 1을 이용하여 도 2a를 어안 렌즈를 사용한 왜곡 영상으로 변환한 그림이다. 도 2c는 도 2b를 전방향 사상을 통하여 생성된 보정 영상이다. 영상 내에 구멍 현상이 발생하여 추가적인 방법이 필요함을 확인할 수 있다. 도 2c에서 보정 영상의 외곽에서 홀이 발생하는 것을 확인할 수 있다. 이는 방사 왜곡으로 인하여 영상 외곽의 정보가 영상의 중심보다 많이 없음을 보여준다. 도 2d는 도 2b를 역방향 사상 및 보간법을 통하여 생성된 보정 영상이다.FIGS. 2A to 2D are exemplary diagrams for explaining forward and backward mapping. FIG. FIG. 2A is an original image, and FIG. 2B is a diagram obtained by transforming FIG. 2A into a distorted image using a fisheye lens using Equation 1. FIG. FIG. 2C is a corrected image generated through the forward mapping in FIG. 2B. It can be confirmed that an additional method is required because a hole phenomenon occurs in the image. It can be seen from FIG. 2C that a hole is generated at the outer edge of the corrected image. This shows that there is no more information on the outer edge of the image than the center of the image due to the radial distortion. FIG. 2D is a correction image generated through the reverse mapping and interpolation in FIG. 2B.

역방향 사상을 통하여 화소 값을 결정하기 위하여 보간법이 필요하다. 영상처리에서 대표적인 보간법에는 최근접 보간법, 양선형 보간법, 3차 회선 보간법 등이 있다. 최근접 보간법은 보간 시 가장 인접한 좌표의 화소 값을 대입하는 방법이다. 양선형 보간법은 보간 시 이웃한 4개 좌표의 화소 값에 대하여 거리에 반비례하는 가중치를 적용하여 화소 값을 계산한다. 3차 회선 보간법은 보간 시 이웃한 16 개 좌표의 화소 값에 대하여 양의 가중치와 음의 가중치를 주어 화소 값을 계산하여 대입하는 방법이다. 일반적인 영상 처리에서는 보간 시 사용하는 보간 함수가 복잡할수록 연산량은 많고 성능은 향상된다.Interpolation is needed to determine pixel values through backward mapping. Representative interpolation methods in image processing include nearest interpolation, bilinear interpolation, and third-order interpolation. Nearest interpolation is a method of assigning the pixel value of the nearest coordinate at the time of interpolation. In the bilinear interpolation method, a pixel value is calculated by applying a weight inversely proportional to a distance to pixel values of four neighboring coordinates at the time of interpolation. In the third line interpolation method, pixel values are calculated by assigning positive weight and negative weight to pixel values of neighboring 16 coordinates during interpolation. In general image processing, the complexity of the interpolation function used in interpolation increases the amount of computation and improves performance.

하지만, 실험 결과에 따르면, 일반적인 영상에서는 좋은 성능을 보이는 방법은 방사 왜곡 보정에는 좋은 성능을 보이지 않는다. 예를 들어, 왜곡 영상 위에서 근접한 화소들을 이용하여 보간법을 수행하였다. 보정 영상에서의 거리를 반영하여 보간을 수행하였지만, 보간에 사용된 좌표는 왜곡 영상에서의 근접 좌표들이다. 어안 렌즈를 통해 촬영된 왜곡 영상은 영상의 외곽으로 갈수록 방사 왜곡이 심해진다. 따라서, 왜곡 영상 위에서 근접한 화소들이 보정 영상 위에서는 근접한 화소가 아닌 경우가 발생한다. 또한, 보정 영상 위에서 근접한 화소가 수평선 상에 위치하지 않기 때문에 선형 보간법을 바로 적용할 수 없다.However, according to the experimental results, a method that shows good performance in general image does not show good performance for radial distortion correction. For example, interpolation is performed using pixels near the distortion image. The interpolation was performed to reflect the distance in the corrected image, but the coordinates used in the interpolation are close coordinates in the distorted image. The distorted image captured through the fisheye lens becomes more distorted as it moves toward the outer edge of the image. Therefore, there is a case where the pixels adjacent to each other on the distorted image are not adjacent to each other on the corrected image. In addition, linear interpolation can not be applied immediately because adjacent pixels on the corrected image are not located on the horizontal line.

따라서, 방사 왜곡을 고려하여 보정 영상 위에서 보간을 수행하기 위하여 새로운 보간법이 요구된다.Therefore, a new interpolation method is required to perform the interpolation on the corrected image in consideration of the radial distortion.

도 3은 본 발명의 일 실시예에 따른 어안 렌즈 왜곡 영상 처리 방법을 설명하는 흐름도이다.3 is a flowchart illustrating a fisheye lens distortion image processing method according to an embodiment of the present invention.

도 3을 참조하면, 어안 렌즈 왜곡 영상 처리 방법은 어안렌즈로 획득한 왜곡 영상으로부터 보정할 보정 영상으로 파라미터를 사용하여 보정 영상의 좌표를 교정(calibration)하는 단계(S100), 및 상기 보정 영상에서 보간할 정수 좌표(C(xc,yc))의 화소값을 보간하는 단계(S200)를 포함한다.Referring to FIG. 3, a fisheye lens distortion image processing method includes a step (S100) of calibrating coordinates of a correction image using a parameter as a correction image to be corrected from a distortion image acquired by a fisheye lens, And interpolating pixel values of integer coordinates (C (x c , y c )) to be interpolated (S200).

상기 보간하는 단계(S200)는 상기 보정 영상에서 보간할 정수 좌표(C(xc,yc))를 왜곡 영상 실수 좌표(D(xd,yd))로 변환하는 단계(S212), 변환된 왜곡 영상 실수 좌표(D(xd,yd)) 주위의 적어도 2개의 왜곡 영상 정수 좌표(Dk(xd k,yd k))를 보정 영상 실수 좌표(Ck(xc k,yc k))로 변환하는 단계(S214), 및 변환된 보정 영상 실수 좌표들(Ck(xc k,yc k)) 중에서 상기 정수 좌표(C(xc,yc))에 가장 근접한 적어도 1 개의 변환된 보정 영상 실수 좌표를 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))로 설정하는 단계(S216)를 포함한다.The interpolating step S200 may include transforming the integer coordinates C (x c , y c ) to be interpolated in the corrected image into distorted image real coordinates D (x d , y d ) a distorted image real coordinates (d (x d, y d )) at least two distortion integer coordinates around (d k (x d k, y d k)) corrected video real coordinates (c k (x c k, y c k), step (S214), and the transformed corrected video real coordinates (c k (x c k, y c k)), the integer coordinates (c (x c, y c ) from converting to a)), the in and a step of setting at least proximate to the one converted image correction of an error correction coordinate image closest real coordinates (N c k (x c k, c k y)) (S216).

교정(calibration)은 구면 투영법을 사용할 수 있다. 구체적으로 수학식 1 및 2가 사용될 수 있다. 역방향 사상을 위하여, 보간을 수행한다. 이하, 구체적으로, 왜곡 영상과 보정 영상의 좌표 변환 및 보간하는 방법이 설명된다.Calibration can use spherical projection. Specifically, equations (1) and (2) can be used. For reverse mapping, interpolation is performed. Specifically, a method of transforming and interpolating coordinates of a distorted image and a corrected image will be described.

도 4는 본 발명의 일 실시예에 따른 왜곡 영상과 보정 영상의 좌표 변환을 설명하는 도면이다.4 is a view for explaining coordinate transformation between a distorted image and a corrected image according to an embodiment of the present invention.

도 5는 보정 영상 평면에서 보정 영상 최근접 실수 좌표들(Ck N(xc k,yc k))를 나타내는 도면이다.5 is a diagram showing the corrected image nearest real coordinates (C k N (x c k , y c k )) in the corrected image plane.

도 6은 왜곡 영상 평면에서 왜곡 영상 최근접 정수 좌표들 (Dk N(xd k,yd k))를 나타내는 도면이다.6 is a diagram showing distorted image nearest integer coordinates (D k N (x d k , y d k )) in the distortion image plane.

도 4를 참조하면, 왜곡 영상의 크기가 512 x 512이고, 어안 렌즈의 초점 거리가 20 mm일 때, 어안 렌즈를 통해 획득한 왜곡 영상에서 좌측 상단의 좌표는 확대되어 직각좌표계(x,y)로 표시된다. 보정 영상에서 보간할 정수 좌표(C(64,64))는 왜곡 영상에서 실수 좌표(D(142.13, 142.13))로 변환된다(S212).4, when the size of the distorted image is 512 x 512 and the focal length of the fisheye lens is 20 mm, the coordinates of the upper left corner of the distorted image acquired through the fisheye lens are enlarged to form a rectangular coordinate system (x, y) . The integer coordinates (C (64,64)) to be interpolated in the corrected image are converted from the distorted image to the real coordinates (D (142.13, 142.13)) (S212).

빈 원형으로 나타낸 왜곡 영상에서의 실수 좌표 D(142.13, 142.13)는 보정 영상에서의 보간을 수행할 정수 좌표 C(64,64)에 대하여 수학식 1을 이용하여 변환된 왜곡 영상 실수 좌표이다.The real coordinate D (142.13, 142.13) in the distorted image represented by the empty circle is the real image of the distorted image transformed using Equation 1 with respect to the integer coordinate C (64,64) to be interpolated in the corrected image.

이때, 왜곡 영상에서 실수 좌표 D(142.13, 142.13)의 근접한 주변 16개 정수 좌표 Dk에 대하여 1 내지 16의 ID가 부여되었다. 변환된 왜곡 영상 실수 좌표(D(142.13, 142.13)) 주위의 16 개의 왜곡 영상 정수 좌표(Dk(xd k,yd k))는 보정 영상 실수 좌표(Ck(xc k,yc k))로 변환된다(S214). 왜곡 영상에서 상기 실수 좌표 D(142.13, 142.13)의 주변 16개의 왜곡 영상 정수 좌표 (Dk(xd k,yd k))는 수학식 2를 이용하여 보정 영상 근접 실수 좌표(Ck(xc k,yc k))로 변환된다.At this time, in the distorted image, IDs of 1 to 16 are assigned to sixteen integer constants D k in the vicinity of the real coordinates D (142.13, 142.13). The converted distortion real coordinates 16 distortion integer coordinates around (D (142.13, 142.13)) (D k (x d k, y d k)) is corrected video real coordinates (C k (x c k, y c k ) (S214). The distortion image ID constants D k (x d k , y d k ) in the vicinity of the real coordinate D (142.13, 142.13) in the distorted image are calculated using the corrected video proximity real coordinate C k c k , y c k )).

기존 선형 보간법은 D의 주변 좌표인 D6, D7, D10, D11을 사용하여 보간을 수행하였다. 그러나, 기존 선형 보간법은 어안 렌즈에 대하여 적합하지 않다.In the conventional linear interpolation method, the interpolation was performed using D6, D7, D10 and D11, which are the peripheral coordinates of D, respectively. However, existing linear interpolation is not suitable for fisheye lenses.

도 5를 참조하면, 방사 왜곡에 의하여 보정 영상에서의 보간을 수행할 정수 좌표 C(64,64)에 가장 근접한 4개의 좌표는 {C3, C6, C7, C9}이다. 즉, 보정 영상에서 보간을 수행할 상기 정수 좌표 C(64,64)에 대한 정보는 {C6, C7, C9, C11} 보다 {C3, C6, C7, C9}에 더 많이 포함되어 있다.Referring to FIG. 5, the four coordinates closest to the integer coordinates C (64, 64) to be interpolated by the radial distortion in the corrected image are {C3, C6, C7, C9}. That is, the information on the integer coordinates C (64, 64) to be interpolated in the corrected image is included in {C3, C6, C7, C9} more than {C6, C7, C9, C11}.

변환된 보정 영상 실수 좌표들(Ck(xc k,yc k)) 중에서 상기 보정 영상의 정수 좌표(C(xc,yc))에 가장 근접한 4 개의 보정 영상 실수 좌표들은 보정 영상 최근접 실수 좌표들(Ck N(xc k,yc k))로 설정된다(S216). k는 상기 정수 좌표(C(xc,yc))로부터 거리에 따라 증가한다. 즉, k=0 인 경우, C0 N 이 상기 정수 좌표(C(xc,yc))에 가장 근접한 좌표이다.The four corrected image real number coordinates closest to the integer coordinates C (x c , y c ) of the corrected image among the converted corrected real image coordinates C k (x c k , y c k ) (C k N (x c k , y c k )) (step S216). k increases with distance from the integer coordinates (C (x c , y c )). That is, when k = 0, C 0 N Is the closest coordinate to the integer coordinates C (x c , y c ).

이어서, 상기 보정 영상에서 상기 정수 좌표(C(xc,yc))와 보정 영상 최근접 실수 좌표들(Ck N(xc k,yc k)) 사이의 좌표 거리(dk)가 계산된다(S232). 상기 좌표 거리(dk)에 반비례하는 보간 계수(iCk)(interpolation coefficient)가 산출된다(S234).Subsequently, a coordinate distance dk between the integer coordinates C (x c , y c ) and the corrected image nearest real coordinates C k N (x c k , y c k ) (S232). An interpolation coefficient (iC k ) (inverse proportion to the coordinate distance d k ) is calculated (S234).

상기 좌표 거리(dk)는 피타고라스의 정리를 이용하여 구해질 수 있다. 예를 들어, d0은 C와 C0 N 사이의 거리이고, d1은 C와 C1 N 사이의 거리이고, d2은 C와 C2 N 사이의 거리이고, d3은 C와 C3 N이의 거리이다. 보간 계수(iCk)는 다음과 같이 주어질 수 있다. 보간 계수(iCk)는 거리에 반비례하는 가중치가 적용될 수 있다.The coordinate distance d k can be obtained using the Pythagorean theorem. For example, d 0 is C and C 0 N , D 1 is the distance between C and C 1 N And d 2 is the distance between C and C 2 N A distance between, d 3 is a distance between N 3 and C C. The interpolation coefficient (iC k ) can be given as: The interpolation coefficient (iC k ) may be weighted in inverse proportion to the distance.

Figure 112012100702052-pat00003
Figure 112012100702052-pat00003

상기 보정 영상 최근접 실수 좌표들 (Ck N(xc k,yc k))에 대응하는 왜곡 영상 최근접 정수 좌표들 (Dk N(xd k,yd k))이 계산된다(S236).It said corrected image closest real coordinates (C k N (x c k, y c k)) distortion recently in contact with integer coordinates (D k N (x d k, y d k)) corresponding to this is calculated ( S236).

상기 보간 계수(iCk)와 보정 영상에서의 보정 영상 최근접 실수 좌표들 (Ck N(xc k,yc k))에 대응하는 왜곡 영상 최근접 정수 좌표들 (Dk N(xd k,yd k))의 화소값(Q(xc k,yc k))을 이용하여 보간할 정수 좌표(C(xc,yc))의 화소값(P(xc,yc))은 다음과 같이 구해질 수 있다(S240). The distortion image nearest integer coordinates D k N (x d ( k )) corresponding to the interpolation coefficient (i C k ) and the corrected image nearest real number coordinates C k N (x c k , y c k ) pixel values of k, y d k)) ( Q (x c k, y c k)) for x (an integer coordinates (c to be interpolated, using c, y c)) pixel value (P (x c, y c of )) Can be obtained as follows (S240).

Figure 112012100702052-pat00004
Figure 112012100702052-pat00004

(xc,yc)는 보정 영상에서 보간할 정수 좌표의 값을 의미하며, iCk는 상기 보간 계수이고, Q(xc k,yc k)는 보정 영상에서의 보정 영상 최근접 실수 좌표들 (Ck N(xc k,yc k))에 대응하는 왜곡 영상 최근접 정수 좌표들 (Dk N(xd k,yd k))의 화소값이다.(x c , y c ) denotes a value of an integer coordinate to be interpolated in the corrected image, i C k is the interpolation coefficient, and Q (x c k , y c k ) (D k N (x d k , y d k )) corresponding to the distorted image nearest integer coordinates (C k N (x c k , y c k )).

구체적으로, 왜곡 영상 최근접 정수 좌표들 {D3,D6,D7,D9}의 화소값이 사용될 수 있다. 한편, 종래의 방법을 사용하여 {D6,D7,D10,D11}의 화소값이 사용된다.Specifically, the pixel values of the distorted image nearest integer coordinates {D3, D6, D7, D9} can be used. On the other hand, the pixel values of {D6, D7, D10, D11} are used by the conventional method.

본 발명의 일 실시예에 따르면, 왜곡 영상의 실수 좌표 D(xd,yd)에 근접한 좌표가 보정 영상에서는 C(xc,yc)에 근접한 좌표가 아닐 수 있다.According to an embodiment of the present invention, a coordinate close to the real coordinate D (x d , y d ) of the distorted image may not be close to C (x c , y c ) in the corrected image.

도 7은 본 발명의 일 실시예에 따른 이진화 영상(binary image)이다. 7 is a binary image according to an embodiment of the present invention.

도 7을 참조하면, 영상 크기가 512 X 512일 때, 왜곡 영상에서 왜곡 영상 근접 정수 좌표들 Dk (k=0,1,2,3)와 보정 영상에서 보정 영상 최근접 실수 좌표들 Ck N (k=0,1,2,3)이 같을 경우에는 보정 영상의 화소는 흰점으로 표시된다. 왜곡 영상에서 왜곡 영상 근접 정수 좌표들 Dk (k=0,1,2,3)와 보정 영상에서 보정 영상 최근접 실수 좌표들 Ck N (k=0,1,2,3)이 다를 경우에는 보정 영상의 화소는 검은점으로 표시된다.Referring to FIG. 7, when the image size is 512 X 512, the distorted image proximity constants D k (k = 0, 1, 2, 3) in the distorted image and the corrected image closest real coordinates C k If N (k = 0, 1, 2, 3) are the same, the pixel of the corrected image is represented by a white point. If the distortion image near-field constants D k (k = 0, 1, 2, 3) in the distorted image and the corrected image nearest real coordinates C k N (k = 0, 1, The pixels of the corrected image are indicated by black dots.

상기 이진 영상의 외곽으로 갈수록 방사 왜곡에 의하여 검은점들이 많다. 방사 왜곡은 영상의 중심에는 영향을 거의 미치지 않을 수 있다. 그럼에도 불구하고, 검은점들은 영상의 중심부에서 나타난다. 그 이유는 보정 영상의 정수 좌표에 근접하여 대각선에 위치한 좌표가 선택되지 않았기 때문이다. There are many black spots due to the radial distortion toward the outer edge of the binary image. Radiation distortion may have little effect on the center of the image. Nonetheless, black dots appear at the center of the image. The reason for this is that the coordinates located on the diagonal line are not selected close to the integer coordinates of the corrected image.

도 8은 도 7의 이진 영상 중심 부분의 좌표 변환 결과를 나타내는 도면이다.FIG. 8 is a diagram showing the result of coordinate transformation of the center portion of the binary image of FIG. 7. FIG.

도 8을 참조하면, 보정 영상의 보간할 정수 좌표 C 에 대하여 보정 영상에서 보정 영상 최근접 실수 좌표들 Ck N 가 찾아졌다. 그 결과, C3 N 또는 C4 N 가 대각선 좌표인 C5 N 보다 C에 근접한다. 즉, 기존 선형 보간법에서 사용한 {C0 N,C1 N,C2 N,C5 N}가 아닌 {C0 N,C1 N,C2 N,C3 N}가 선택됨을 알 수 있다.Referring to FIG. 8, in the corrected image, the nearest real number coordinates C k N of the corrected image are found for the integer coordinate C to be interpolated in the corrected image. As a result, C 3 N or C 4 N is closer to C than C 5 N , which is the diagonal coordinate. That is, {C 0 N , C 1 N , C 2 N , C 3 N } are selected instead of the {C 0 N , C 1 N , C 2 N , C 5 N } used in the existing linear interpolation method.

도 8에서 회색 영역은 C3 N 또는 C4 N 가 C5 N 보다 C에 거리상 가까이 위치하는 영역을 보여준다. 따라서, 도 7에서 중심 영역의 검은점들은 위와 같은 회색 영역에 해당될 수 있다.The gray area in FIG. 8 shows a region where C 3 N or C 4 N is located closer to C than C 5 N. Therefore, in FIG. 7, the black dots of the center area may correspond to the gray area as described above.

본 발명의 일 실시예에서 따른 보간법은 보정 영상에서 최근접 좌표 4개를 선택하여 거리에 반비례한 가중치를 적용하여 보간을 수행한다. 보정 영상 위의 최근접 좌표인 Ck N 는 짧은 거리 순으로 정렬된다. 따라서, 거리에 반비례하게 계산된 보간 계수(iCk)는 아래 첨자(subscript) k가 작을수록 더 큰 값을 가진다. 즉, iC0는 1에 가까울수록, C0 N는 C에 근접함을 의미한다. In the interpolation method according to an embodiment of the present invention, four closest coordinates are selected from the corrected image and interpolation is performed by applying a weight inversely proportional to the distance. The closest coordinates C k N on the corrected image are arranged in short distances. Therefore, the interpolation coefficient (iC k ) calculated in inverse proportion to the distance has a larger value as the subscript k is smaller. That is, the closer iC 0 is to 1, the closer C 0 N is to C 1.

도 9는 본 발명의 일 실시예에 따른 iC0의 크기에 따른 분포를 나타내는 그레이 영상이다.9 is a gray image showing a distribution according to the size of iC 0 according to an embodiment of the present invention.

도 9를 참조하면, 화소는 iC0의 크기가 클수록 밝게 표시되며, iC0의 크기가 작을수록 어둡게 표시된다. 상기 그레이 영상의 중심이 외곽에 비하여 밝다. 즉, 상기 그레이 영상의 중심은 근접 좌표들 중에서 하나의 좌표의 화소 값에 강하게 의존한다. Referring to FIG. 9, the larger the size of iC 0, the brighter the pixel, and the smaller the size of iC 0 , the darker the pixel is displayed. The center of the gray image is brighter than the outer frame. That is, the center of the gray image strongly depends on the pixel value of one of the nearby coordinates.

구체적으로, 도 8을 참조하면, 보간을 수행하는 경우, 보정 영상 최근접 좌표로 {C0 N,C1 N,C2 N,C3 N} 또는 {C0 N,C1 N,C2 N,C4 N}가 사용된다. 하지만, 이 경우, iC0가 1에 가깝기 때문에, {C1 N,C2 N,C3 N,C4 N}는 보간할 정수 좌표의 화소값에 거의 영향을 주지않는다. Referring to FIG. 8, when interpolation is performed, {C 0 N , C 1 N , C 2 N , C 3 N } or {C 0 N , C 1 N , C 2 N , C 4 N } is used. However, in this case, {C 1 N , C 2 N , C 3 N , C 4 N } has little influence on the pixel value of the integer coordinates to be interpolated because iC 0 is close to 1.

한편, 상기 그레이 영상의 외곽으로 갈수록 방사 왜곡이 심해진다. 따라서, 모든 최근접 좌표의 화소값을 포함하도록 보간이 수행되어야 한다. On the other hand, the radial distortion becomes larger toward the outer edge of the gray image. Therefore, interpolation must be performed to include pixel values of all closest coordinates.

도 10은 도 7과 도 9를 조합한 그레이 이미지이다.Fig. 10 is a gray image combining Figs. 7 and 9. Fig.

도 10을 참조하면, 도 7에서 하얀 색은 0으로 설정되고, 검은 색은 1로 설정된다. 이어서, 도 10은 변경된 도 7과 도 9의 곱으로 생성된다. 밝은 영역은 Dk과 Ck N가 같거나 iC0가 1에 가깝다는 것을 의미한다. 어두운 영역은 그 반대의 경우이다. 결론적으로, 방사 왜곡은 영상의 외곽으로 갈 수록 심해진다. 따라서, 영상 중심이 영상 외곽에 비하여 밝다.Referring to FIG. 10, the white color is set to 0 and the black color is set to 1 in FIG. Then, Fig. 10 is generated by the modified Fig. 7 and Fig. 9 multiplication. A bright area means that D k and C k N are equal or i C 0 is close to 1. The dark area is the opposite case. In conclusion, radial distortion becomes worse as it goes to the outer edge of the image. Therefore, the center of the image is brighter than the outer edge of the image.

본 발명의 일 실시예에 따른 보간법은 방사 왜곡을 고려하여 보정 영상에서 가장 근접한 4 개의 실수 좌표를 선택하여 보간을 수행한다. 따라서, 영상의 외곽에서 특히 성능이 향상된다. 본 발명의 일 실시에에 따른 영상 처리 방법은 전체적으로 영상의 성능을 향상시키며, 특히 영상 외곽에서 화질을 더욱 향상시킬 수 있다. In the interpolation method according to an embodiment of the present invention, interpolation is performed by selecting four real coordinates closest to the corrected image in consideration of radial distortion. Therefore, the performance is particularly improved at the periphery of the image. The image processing method according to one embodiment of the present invention improves the performance of the image as a whole, and particularly, the image quality can be improved in the outline of the image.

도 11은 본 발명의 다른 실시예에 따른 영상 처리 방법을 설명하는 흐름도이다.11 is a flowchart illustrating an image processing method according to another embodiment of the present invention.

도 11을 참조하면, 어안 렌즈 왜곡 영상 처리 방법은 어안렌즈로 획득한 왜곡 영상으로부터 보정할 보정 영상으로 파라미터를 사용하여 보정 영상의 좌표를 교정(calibration)하는 단계(S100); 및 상기 보정 영상에서 보간할 정수 좌표(C(xc,yc))의 화소값을 보간하는 단계(S400)를 포함한다.Referring to FIG. 11, a fisheye lens distortion image processing method includes a step (S100) of calibrating coordinates of a correction image using a parameter as a correction image to be corrected from a distortion image acquired by a fisheye lens; And interpolating pixel values of integer coordinates C (x c , y c ) to be interpolated in the corrected image (S400).

상기 보간하는 단계(S400)에서, 상기 보정 영상에서 보간할 정수 좌표(C(xc,yc))는 구면 투영법의 수학식 1을 사용하여 왜곡 영상 실수 좌표(D(xd,yd))로 변환될 수 있다(S412). In the interpolation step (S400), the integer coordinates (C (x c , y c ) to be interpolated in the corrected image are calculated using the distortion video real coordinates (D (x d , y d ) (S412).

이어서, 변환된 왜곡 영상 실수 좌표(D(xd,yd)) 주위의 적어도 2개의 왜곡 영상 정수 좌표(Dk(xd k,yd k))는 구면 투영법의 수학식 2를 사용하여 보정 영상 실수 좌표(Ck(xc k,yc k))로 변환될 수 있다. 바람직하게는, 변환된 왜곡 영상 실수 좌표(D(xd,yd)) 주위의 16개의 왜곡 영상 정수 좌표(Dk(xd k,yd k))는 구면 투영법의 수학식 2를 사용하여 보정 영상 실수 좌표(Ck(xc k,yc k))로 변환될 수 있다(S414).Subsequently, at least two distortion image integer coordinates (D k (x d k , y d k )) around the transformed distorted image real coordinates (D (x d , y d )) are calculated using Equation 2 of the spherical projection (C k (x c k , y c k )). Preferably, the sixteen distorted image constants D k (x d k , y d k ) around the transformed distorted image real coordinates (D (x d , y d )) are calculated using Equation 2 of the spherical projection method (C k (x c k , y c k )) (S414).

이어서, 변환된 보정 영상 실수 좌표들(Ck(xc k,yc k)) 중에서 상기 정수 좌표(C(xc,yc))에 가장 근접한 4개의 변환된 보정 영상 실수 좌표는 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))로 설정될 수 있다(S416). 상기 정수 좌표(C(xc,yc))에 가장 근접한 좌표인지를 판단하기 위하여, 상기 정수 좌표(C(xc,yc))와 상기 보정 영상 실수 좌표들(Ck(xc k,yc k)) 사이의 거리가 확인될 수 있다.Subsequently, the four converted corrected image real coordinates closest to the integer coordinates C (x c , y c ) among the converted corrected real image coordinates C k (x c k , y c k ) (C k N (x c k , y c k )) (S416). In order to determine whether the closest coordinate to the integer coordinates (C (x c, y c )), with the integer coordinates (C (x c, y c )) and the corrected video real coordinates (C k (x c k , y c k ) can be identified.

왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))는 룩업 테이블 메모리에 저장될 수 있다. 구체적으로, 상기 보정 영상 최근접 실수 좌표 (Ck N(xc k,yc k))에 대응하는 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))는 메모리에 저장될 수 있다. 상기 보정 영상 최근접 실수 좌표 (Ck N(xc k,yc k))의 좌표값은 실수이므로, 정수 좌표인 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))가 저장되는 것이 바람직할 수 있다. 이에 따라, 보정 영상의 모든 화소에 대하여, 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))가 메모리에 저장될 수 있다(S417).The distortion image nearest integer coordinates (D k N (x d k , y d k )) may be stored in a lookup table memory. Specifically, the distortion image nearest integer coordinates (D k N (x d k , y d k )) corresponding to the corrected image nearest real number coordinates (C k N (x c k , y c k ) Lt; / RTI > Since the coordinate values of the corrected image nearest real number coordinates C k N (x c k , y c k ) are real numbers, the distortion image nearest integer coordinates (D k N (x d k , y d k ) May be preferably stored. Accordingly, for all the pixels of the corrected image, the distorted image nearest integer coordinates (D k N (x d k , y d k )) can be stored in the memory (S417).

이어서, 왜곡 영상에서 정수 좌표(C(xc,yc)와 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k)) 사이의 좌표 거리(dk)는 계산될 수 있다. 상기 좌표 거리(dk)를 이용하여 보간 계수(iCk)가 계산될 수 있다. 또한, 보간 계수를 (iCk)는 메모리에 저장될 수 있다(S418). 결국, 룩업 테이블 메모리에 상기 보간 계수 (iCk)와 상기 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))가 저장된다. 상기 보간 계수 (iCk)와 상기 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))는 어안 렌즈의 특성에 의하여 주어질 수 있다. 동일한 어안렌즈에 대하여, 한 번 계산된 상기 보간 계수 (iCk)와 상기 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))는 임의의 왜곡 영상을 보정 영상으로 변환하기 위하여 사용될 수 있다.Subsequently, the coordinate distance dk between the integer coordinates C (x c , y c ) and the corrected image nearest real coordinates (C k N (x c k , y c k )) in the distorted image can be calculated the coordinate distance may be calculated an interpolation coefficient (iC k) by using a (d k). Further, it can be stored in the interpolation coefficient in a memory (iC k) (S418). As a result, the the look-up table memory, interpolation coefficients (iC k) and the distortion nearest the integer coordinates (d k N (x d k , y d k)) are stored. the interpolation coefficients (iC k) and the distortion closest integer coordinates (d k N (x d k, y d k)) may be given by the characteristics of the fish-eye lens for the same fish-eye lens, one of the interpolation coefficient calculated time (iC k) and the distortion closest integer coordinates (D k N (x d k , y d k )) can be used to transform any distorted image into a corrected image.

상기 왜곡 영상은 왜곡 영상 정수 좌표와 그 좌표에서의 화소값을 가진다. 상기 왜곡 영상을 촬영한 어안 렌즈의 특성은 계산되어 메모리에 저장된다.The distorted image has a distorted image constant coordinate and a pixel value at that coordinate. The characteristics of the fisheye lens having the distorted image are calculated and stored in the memory.

따라서, 상기 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))는 메모리부터 독출된다(S424). 이어서, 상기 보간 계수(iCk)는 메모리부터 독출된다(S432).Therefore, the distorted image nearest integer coordinates (D k N (x d k , y d k )) are read from the memory (S424). Subsequently, the interpolation coefficient (i C k ) is read out from the memory (S432).

이어서, 상기 보간 계수(iCk)와 상기 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))의 화소값(Q(xc k,yc k))을 이용하여 상기 정수 좌표(C(xc,yc))의 화소값(P(xc,yc))은 수학식 4를 이용하여 계산될 수 있다.Then, the by using the pixel value (Q (x c k, y c k)) of the interpolation coefficient (iC k) and the distortion closest integer coordinates (D k N (x d k , y d k)) The pixel value (P (x c , y c )) of the integer coordinates (C (x c , y c )) can be calculated using Equation (4).

본 발명의 일 실시예에 따르면, 화소(pixel) 하나 당 16 개의 왜곡 영상 정수 좌표가 보정 영상에서의 보정 영상 실수 좌표로 변환될 수 있다. 이 경우, 좌표 변환할 좌표의 개수가 기존의 방법보다 4배 많다. 또한, 16 개의 보정 영상 실수 좌표 중에서 가장 근접한 4개의 좌표를 선택하기 위한 정렬 과정이 요구된다. 상기 정렬 과정은 많은 연산량을 요구한다. 이러한 연산량을 줄이기 위하여 룩업 테이블(look-up table; LUT)를 기반으로 보간을 수행할 경우, 성능이 향상될 수 있다.According to an embodiment of the present invention, 16 distorted image constant coordinates per pixel can be converted into real image coordinates of the corrected image in the corrected image. In this case, the number of coordinates to be converted is four times that of the conventional method. In addition, an alignment process is required to select the four closest coordinates among the 16 corrected video real coordinates. This sorting process requires a large amount of computation. Performance can be improved if interpolation is performed based on a look-up table (LUT) to reduce the amount of computation.

어안 렌즈의 특성이 정해지면, 모든 화소의 보정 영상 최근접 실수 좌표들 및 보간 계수는 미리 계산될 수 있다. 상기 보간 계수와 상기 보정 영상 최근접 실수 좌표에 대응하는 왜곡 영상 최근접 정수 좌표는 LUT1에 저장되어 사용될 수 있다. 이에 따라, 어안 렌즈를 통해 촬영한 왜곡 영상의 보정을 위하여 소모되는 연산량이 감소될 수 있다. 이 경우, LUT1의 크기는 다음과 같이 주어질 수 있다.Once the characteristics of the fisheye lens are determined, the corrected image nearest real coordinates and interpolation coefficient of all pixels can be calculated in advance. The distortion coefficient image nearest integer coordinates corresponding to the interpolation coefficient and the closest real number coordinate of the corrected image may be stored and used in the LUT1. Accordingly, the amount of computation consumed for correcting the distorted image photographed through the fish-eye lens can be reduced. In this case, the size of LUT1 can be given as follows.

Figure 112012100702052-pat00005
Figure 112012100702052-pat00005

여기서, xbw와 ybw는 각각 xc와 yc의 대역폭(bandwidth)을 나타낸다. icbw는 보간 계수의 대역폭을 나타낸다. Iw와 Ih는 보정 영상의 너비와 높이를 나타낸다. xbw와 ybw의 가장 작은 값은 각각 [log2(Iw)]와 [log2(Ih)]가 된다. 그리고, icbw의 경우, 보간 계수가 클수록 영상의 화질은 좋아지지만, LUT1의 크기가 커진다. Here, x bw and y bw represent the bandwidths of x c and y c , respectively. and ic bw represents the bandwidth of the interpolation coefficient. I w and I h represent the width and height of the corrected image. The smallest values of x bw and y bw are [log 2 (I w )] and [log 2 (I h )], respectively. In the case of ic bw, the larger the interpolation coefficient, the better the picture quality of the image, but the larger the size of LUT1.

예를 들어, 실험에서 사용한 영상의 크기가 768 X 512이고, xbw와 ybw가 각각 9 bits와 8 bits이고, icbw가 32 bits라고 할 경우, LUT1의 크기는 2.39 Mbytes가 된다. LUT1는 왜곡 영상 최근접 정수 좌표들과 보간 계수를 모두 저장할 수 있다. 그러나, 이 경우, LUT1의 크기가 너무 커진다. For example, if the size of the image used in the experiment is 768 X 512, x bw and y bw are 9 bits and 8 bits, respectively, and ic bw is 32 bits, the size of LUT1 is 2.39 Mbytes. LUT1 can store both the nearest integer coordinates and the interpolation coefficient of the distortion image. However, in this case, the size of the LUT1 becomes too large.

LUT1가 왜곡 영상 최근접 정수 좌표들과 보간 계수를 모두 저장하는 경우, 보간 수행 속도는 빠르다. 하지만, LUT1의 크기가 너무 크게 된다. 따라서, LUT1의 크기를 감소시키는 방법이 요구된다.When LUT1 stores both the nearest integer coordinates and the interpolation coefficient, the interpolation speed is fast. However, the size of LUT1 becomes too large. Therefore, a method of reducing the size of the LUT1 is required.

본 발명의 일 실시예에 따른 영상 처리 방법은 가장 큰 크기를 차지하는 보간 계수를 저장하지 않고, 왜곡 영상 최근접 좌표만을 LUT에 저장할 수 있다.In the image processing method according to an embodiment of the present invention, only the nearest point of the distorted image can be stored in the LUT without storing the interpolation coefficient occupying the largest size.

또한, LUT의 크기를 최적화하기 위하여, 배럴 방사 왜곡의 대칭성(symmetry property of barrel radial distortion), 상대 좌표 저장(storing relative coordinates), 그리고 왜곡 영상 최근접 정수 좌표의 패턴(patterns of distorted image nearest neigborhood coordinates)을 이용한 2 레벨(two-level) LUT2의 구조가 제안된다. 이에 대한 동작이 이하 설명된다.In order to optimize the size of the LUT, symmetry property of barrel radial distortion, storing relative coordinates, and patterns of distorted image nearest neigborhood coordinates A two-level LUT2 structure is proposed. The operation thereof will be described below.

방사 왜곡의 대칭성은 광축을 중심으로 배율 축소(magnification reduction)가 대칭을 이루는 성질을 이용한다.The symmetry of the radial distortion uses the property that the magnification reduction is symmetrical around the optical axis.

도 12는 또 다른 실시예에 따른 영상 처리 방법을 설명하는 흐름도이다.12 is a flowchart illustrating an image processing method according to another embodiment.

도 12를 참조하면, 영상 처리 방법은 어안렌즈로 획득한 왜곡 영상으로부터 보정할 보정 영상으로 파라미터를 사용하여 보정 영상의 좌표를 교정(calibration)하는 단계(S100), 및 상기 보정 영상에서 보간할 정수 좌표(C(xc,yc))의 화소값을 보간하는 단계(S300)를 포함한다.12, the image processing method includes a step (S100) of calibrating coordinates of a corrected image using a parameter as a corrected image to be corrected from a distorted image acquired by a fisheye lens, And interpolating the pixel values of the coordinates (C (x c , y c )) (S300).

상기 보정 영상에서 보간할 정수 좌표(C(xc,yc))는 왜곡 영상 실수 좌표(D(xd,yd))로 변환된다(S312). 이어서, 상기 변환된 왜곡 영상 실수 좌표(D(xd,yd)) 주위의 적어도 2개의 왜곡 영상 정수 좌표(Dk(xd k,yd k))는 보정 영상 실수 좌표(Ck(xc k,yc k))로 변환된다(S314). The integer coordinates C (x c , y c ) to be interpolated in the corrected image are converted into the distorted image real coordinates (D (x d , y d )) (S312). Then, the converted distortion image real coordinates (D (x d, y d )) at least two distortion integer coordinates (D k (x d k, y d k)) of the periphery are corrected video real coordinates (C k ( x c k , y c k ) (S314).

이어서, 변환된 보정 영상 실수 좌표들(Ck(xc k,yc k)) 중에서 상기 정수 좌표(C(xc,yc))에 가장 근접한 적어도 1 개의 변환된 보정 영상 실수 좌표는 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))로 설정된다.Subsequently, at least one converted corrected image real number coordinate closest to the integer coordinate C (x c , y c ) among the converted corrected real number coordinates C k (x c k , y c k ) Is set to the nearest real coordinate (C k N (x c k , y c k )).

보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))에 대응하는 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))의 패턴은 결정된다. 이에 따라, 상기 패턴은 패턴 메모리에 패턴 데이터로 저장된다(S318). 이어서, 보간할 정수 좌표(C(xc,yc)에 대응하는 패턴 어드레스 메모리가 상기 패턴 테이터를 가지는 패턴 메모리를 지시하도록 설정된다(S318).The pattern of the distorted image nearest integer coordinates (D k N (x d k , y d k )) corresponding to the corrected image nearest real number coordinate (C k N (x c k , y c k )) is determined. Accordingly, the pattern is stored in the pattern memory as pattern data (S318). Then, it is set integral coordinate to be interpolated (C (x c, y c) a pattern corresponding to the address memory to point to the pattern memory having the mutator pattern (S318).

구체적으로, LUT2의 구조는 이하에서 설명된다.Specifically, the structure of the LUT 2 will be described below.

도 13은 방사 왜곡 특성을 나타내는 도면이다.Fig. 13 is a view showing a radial distortion characteristic. Fig.

도 13을 참조하면, 중심의 광축은 직각 좌표계(u,v)의 원점(optical center)으로 설정된다. 상기 원점을 중심으로 방사 왜곡은 원점 대칭을 이룬다. 원점 대칭성을 이용하면, 전체 왜곡 영상의 방사 왜곡 특성은 4개의 사분면(I~IV)에)이 아닌 1 개의 사분면(I)에 대한 특성으로 압축될 수 있다. 따라서, 1 개의 사분면(I)에 대한 왜곡 영상 최근접 좌표 정보는 방사 왜곡 대칭성에 의하여 전체 왜곡 영상에 대한 보간에 대한 정보를 제공할 수 있다. 따라서, LUT의 크기는 25 퍼센트로 감소될 수 있다.Referring to Fig. 13, the optical axis of the center is set to the optical center of the rectangular coordinate system (u, v). The radial distortion around the origin forms an origin symmetry. Using the origin symmetry, the radial distortion characteristics of the total distortion image can be compressed to a characteristic for one quadrant (I) rather than four quadrants (I to IV). Thus, the distortion image nearest neighbor coordinate information for one quadrant (I) can provide information about the interpolation for the entire distorted image by the radiation distortion symmetry. Thus, the size of the LUT can be reduced to 25 percent.

또한, 왜곡 영상 최근접 정수 좌표는 상기 보정 영상의 보간할 정수 좌표(C(xc,yc))에 대응하는 왜곡 영상 실수 좌표(D(xd,yd))을 기준으로 상대 좌표를 이용하여 LUT에 저장될 수 있다. 즉, 상대 좌표 저장은 보간을 위하여 사용되는 왜곡 영상 최근접 정수 좌표에 대하여 절대 좌표가 아닌 상대 좌표를 LUT에 저장하는 방법이다. Further, the distortion image nearest integer coordinates are obtained by substituting the relative coordinates based on the distortion image real number coordinates (D (x d , y d )) corresponding to the integer coordinates (C (x c , y c ) Can be stored in the LUT. That is, relative coordinate storage is a method of storing relative coordinates in the LUT for the nearest integer coordinates of the distorted image used for interpolation.

상기 LUT 구조는 보간할 정수 좌표(C(xc,yc))에 대응하는 왜곡 영상 정수 좌표를 저장할 수 있다. 그러나, 보간할 정수 좌표(C(xc,yc))에 대응하는 왜곡 영상 실수 좌표(D(xd,yd))의 주변 16 개 좌표(Dk(xd k,yd k))에 대하여 16 bits가 할당된다. 즉, 한 좌표에 대하여 하나의 비트가 할당된다.The LUT structure may store the distortion image constant coordinates corresponding to the integer coordinates (C (x c , y c )) to be interpolated. However, the integral coordinate to be interpolated (C (x c, y c)) distortion image real coordinates (D (x d, y d)) 16 gae coordinates (D k (x d k, y d k periphery of the) corresponding to 16 bits are assigned to each bit. That is, one bit is assigned to one coordinate.

예를 들어, 보간 시 사용되는 4 개의 왜곡 영상 최근접 정수 좌표에 대응하는 비트는 "1"의 상태를 가지도록 세트(set)되고, 보간 시 사용되지 않는 12 개의 좌표에 대응하는 비트는 "0" 상태로 가지도록 설정된다.For example, the bits corresponding to the four distortion image nearest integer coordinates used in interpolation are set to have a state of "1 ", and the bits corresponding to the twelve coordinates not used in interpolation are set to" 0 Quot; state.

위와 같은 LUT 구조를 가지는 경우, 보간할 정수 좌표(C(xc,yc))에 대하여 수학식 1을 적용하여 왜곡 영상에서 왜곡 영상 실수 좌표(D(xd,yd))의 계산이 다시 요구될 수 있다(S326). 상기 왜곡 영상 실수 좌표(D(xd,yd))는 상대 좌표를 절대 좌표로 변환하기 위하여 요구될 수 있다.In the case of the LUT structure as described above, the calculation of the distorted image real number coordinate (D (x d , y d )) in the distorted image is performed by applying Equation 1 to the integer coordinates C (x c , y c ) It may be requested again (S326). The distortion image real number coordinate (D (x d , y d )) may be required to convert the relative coordinate to the absolute coordinate.

또한, 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))에 대응하는 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))의 계산이 추가적으로 요구된다(S328). 상기 보정 영상 최근접 실수 좌표는 좌표 거리(dk) 및 보정 계수(iCk)의 연산을 위하여 필요하다. 위와 같은 LUT 구조를 가지는 경우, 보정 영상 최근접 실수 좌표를 계산하는 추가적인 연산이 필요하지만, LUT의 크기가 감소될 수 있다.Further, calculation of the corrected image nearest real number coordinate (C k N (x c k , y c k )) corresponding to the distorted image nearest integer coordinates (D k N (x d k , y d k ) (S328). The nearest real number coordinate of the corrected image is necessary for the calculation of the coordinate distance d k and the correction coefficient i C k . In the case of the above LUT structure, an additional operation for calculating the nearest real coordinates of the corrected image is required, but the size of the LUT can be reduced.

왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))의 패턴은 하나의 화소(C(xc,yc))를 보간하기 위하여 선택되는 4 개의 좌표들의 배치 형태이다. The pattern of distorted image nearest integer coordinates D k N (x d k , y d k ) is a layout of four coordinates selected to interpolate one pixel C (x c , y c ).

16개의 왜곡 영상 정수 좌표들(Dk(xd k,yd k)) 중에서 4 개의 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))가 선택된다. 이 경우, 16 개의 좌표에서 4 개의 좌표가 선택되는 경우의 수는 C4 16 (4-combinations from a given set S of 16 elements)으로 1820개이다. 하지만, 방사 왜곡은 배율축소가 영상의 중심에서부터 외부로 진행되기 때문에 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))은 일정한 패턴을 가진다. 패턴의 수는 1820 개보다 작다. The sixteen distortion integer coordinates (D k (k x d, y d k)) of the four closest integer coordinates distortion (D k N (k x d, y d k)) is selected. In this case, the number of cases in which four coordinates are selected from 16 coordinates is 1820, which is C 4 16 (4-combinations from a given set of 16 elements). However, since the radial distortion progresses from the center of the image to the outside of the image, the distorted image nearest integer coordinates (D k N (x d k , y d k )) have a constant pattern. The number of patterns is less than 1820.

또한 앞서 설명한 방사왜곡의 대칭성을 적용하면, 패턴의 수는 하나의 사분면에 대해서만 필요하기 때문에 더 줄어든다. Also, applying the above-described symmetry of radial distortion, the number of patterns is further reduced because it is needed only for one quadrant.

도 14는 제 2 사분면(II)에서 발생하는 위치에 따른 패턴들을 보여준다. Fig. 14 shows patterns according to positions occurring in the second quadrant II.

도 14를 참조하면, 좌측 상단의 박스는 왜곡 영상 실수 좌표(D(xd,yd)) 주변의 16 개의 왜곡 영상 정수 좌표(Dk(xd k,yd k))에 대한 ID(k=1~16)를 나타낸 것이다. 위치에 따라 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))의 패턴은 주위에 표시되었다. 14, the box on the top left side ID to the distortion image real coordinates (D (x d, y d )) of the peripheral 16 distortion integer coordinates (D k (x d k, y d k)) ( k = 1 to 16). Depending on the position, the pattern of the distorted image nearest integer coordinates (D k N (x d k , y d k )) is displayed around.

예를 들어, 실험에 사용한 영상 크기가 768 X 512이고, 어안렌즈의 초점거리가 20 mm 인 경우, 방사 왜곡의 대칭성까지 적용하면 발생할 수 있는 패턴의 개수는 110 개이었다. 상기 패턴의 개수는 어안렌즈의 특성에 의하여 주어질 수 있다.For example, when the image size used in the experiment is 768 X 512 and the focal length of the fisheye lens is 20 mm, the number of patterns that can be generated when applying the symmetry of the radial distortion is 110. The number of the patterns can be given by the characteristics of a fish-eye lens.

도 15는 본 발명의 일 실시예에 따른 2-레벨 LUT(LUT2)의 구조를 설명하는 도면이다.15 is a diagram for explaining the structure of a two-level LUT (LUT2) according to an embodiment of the present invention.

도 15를 참조하면, 상기 2-레벨 LUT(LUT2)의 구조는 두 개의 메모리를 포함한다. 하나의 메모리는 패턴 메모리(pattern memory)이다. 패턴 메모리는 발생하는 패턴들을 저장한다. 상기 패턴 메모리는 16 비트를 가지고, 패턴의 형태에 따라 상기 패턴 메모리는 다른 값을 가진다. 상기 패턴 메모리는 앞에서 명한 상대 좌표를 저장한다. 예를 들어, 패턴 1(ID= 2,3,5,6가 "1")을 가지는 경우, 상기 패턴 메모리는 "0110110000000000"를 가진다.Referring to FIG. 15, the structure of the 2-level LUT (LUT2) includes two memories. One memory is a pattern memory. The pattern memory stores the generated patterns. The pattern memory has 16 bits, and the pattern memory has different values depending on the pattern type. The pattern memory stores the aforementioned relative coordinates. For example, when the pattern 1 (ID = 2, 3, 5, 6 is "1"), the pattern memory has "0110110000000000".

다른 하나의 메모리는 패턴 주소 메모리(pattern address memory)이다. 상기 패턴 주소 메모리는 특정한 패턴 메모리를 가리키는 주소를 저장한다.The other memory is a pattern address memory. The pattern address memory stores an address indicating a specific pattern memory.

보간할 정수 좌표(C(xc,yc))는 패턴 주소 메모리를 가리키는 인텍스(index)로 사용된다. 또한, 패턴 주소 메모리의 값은 패턴 메모리의 주소를 가리킨다. 패턴 메모리의 값은 특정한 패턴을 나타낸다. The integer coordinate (C (x c , y c )) to be interpolated is used as an index to indicate the pattern address memory. Also, the value of the pattern address memory indicates the address of the pattern memory. The value of the pattern memory represents a specific pattern.

위와 같은 2-레벨 LUT(LUT2)의 크기는 다음과 같이 주어질 수 있다.The size of the above-described 2-level LUT (LUT2) can be given as follows.

Figure 112012100702052-pat00006
Figure 112012100702052-pat00006

여기서, LUTPAM은 패턴 주소 메모리를 나타내고, LUTPM은 패턴 메모리를 나타낸다. Iw는 영상의 너비, Ih는 영상의 높이, 그리고 Np는 패턴의 개수를 각각 나타낸다. 패턴 주소 메모리의 대역폭은 [log2 Np]이다. Iw/2 및 Ih/2는 방사왜곡의 대칭성에 기인한다. 즉, 하나의 사분면에 대한 정보만이 필요하다.Here, LUT PAM represents a pattern address memory, and LUT PM represents a pattern memory. Iw is the width of the image, Ih is the height of the image, and Np is the number of patterns. The bandwidth of the pattern address memory is [log2 Np]. Iw / 2 and Ih / 2 are due to the symmetry of the radiation distortion. That is, only information on one quadrant is needed.

또한, 패턴 메모리의 대역폭인 16은 보간 시 사용되는 주변 16 개의 상대 좌표를 의미하고, Np는 패턴 메모리의 높이이다. 예를 들어, 영상 크기가 768x512일 때, 특정한 어안렌즈에 의한 패턴의 수는 110 개인 경우, 2-레벨 LUT의 크기는 689,988 bits로 약 84.2 Kbytes이다. In addition, the bandwidth 16 of the pattern memory means the relative coordinates of 16 surrounding areas used in interpolation, and Np is the height of the pattern memory. For example, when the image size is 768x512 and the number of patterns by a specific fisheye lens is 110, the size of the 2-level LUT is 689,988 bits, which is about 84.2 Kbytes.

2-레벨 LUT(LUT2)는 보간 계수(iCk)를 LUT에 저장하지 않는다. 따라서, 보간을 위하여, 추가적인 연산이 필요하다. 추가적인 연산의 순서는 다음과 같다.The 2-level LUT (LUT2) does not store the interpolation coefficient (iC k ) in the LUT. Thus, for interpolation, additional computation is required. The order of the additional operations is as follows.

상기 정수 좌표(C(xc,yc))가 가리키는 상기 패턴 메모리의 값으로 패턴 메모리를 접근하여 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))의 패턴 데이터는 독출된다(S324).The pattern data of the distortion image nearest integer coordinates (D k N (x d k , y d k )) is obtained by accessing the pattern memory with the value of the pattern memory indicated by the integer coordinates C (x c , y c ) (S324).

이어서, 상기 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))의 패턴 데이터로부터 상기 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))가 계산된다(S326).Then, the distorted picture closest integer coordinates (D k N (x d k , y d k)) said distorted image closest integer coordinates (D k N (x d k , y d k)) from the pattern data of the calculated (S326).

이어서, 상기 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))에 대응하는 상기 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))는 계산된다(S328).Then, the distorted picture closest integer coordinates (D k N (x d k , y d k)) the corrected image closest real coordinates (C k N (x c k , y c k)) corresponding to is calculated (S328).

이어서, 상기 보정 영상의 상기 정수좌표(C(xc,yc))와 상기 보정 영상 최근접 실수 좌표들(Ck N(xc k,yc k)) 사이의 좌표 거리(dk)가 계산된다. 상기 좌표 거리(dk)에 반비례하는 보간 계수(iCk)가 수학식 3을 이용하여 산출된다.Then, the corrected image the integer coordinates (C (x c, y c )) with the corrected video recently in contact with real coordinates (C k N (x c k , y c k)) coordinates the distance (d k) between Is calculated. An interpolation coefficient (iC k ) inversely proportional to the coordinate distance (d k ) is calculated using the equation (3).

이어서, 상기 보간 계수(iCk)와 상기 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))의 화소값(Q(xc k,yc k))을 이용하여 상기 정수 좌표(C(xc,yc))의 화소값(P(xc,yc))이 수학식 4를 이용하여 계산된다.Then, the by using the pixel value (Q (x c k, y c k)) of the interpolation coefficient (iC k) and the distortion closest integer coordinates (D k N (x d k , y d k)) The pixel value P (x c , y c ) of the integer coordinates C (x c , y c ) is calculated using the equation (4).

본 발명의 일 실시예에 따른 보간법과 다른 보간법이 비교되었다. Kodak Lossless True Color Image를 사용하는 경우, 본 발명에 따른 보간법은 다른 보간법에 따른 결과보다 높은 평균 27.499 dB의 첨두 신호대노이즈비(peak signal to noise ratio; PSNR)를 보였다. 방사 왜곡은 영상의 중상보다 외곽으로 갈수록 심해진다. 따라서, 본 보간법은 외각 지역에서 화질을 더욱 향상시킬 수 있다. 또한, 전체적으로 객관적인 화질뿐만 아니라 주관적인 화질이 향상되는 것이 확인되었다.The interpolation method according to an embodiment of the present invention is compared with other interpolation methods. In the case of using the Kodak Lossless True Color Image, the interpolation method according to the present invention showed a peak signal to noise ratio (PSNR) of 27.499 dB, which is higher than the result according to other interpolation methods. The radial distortion becomes worse as it goes beyond the middle of the image. Therefore, this interpolation method can further improve the picture quality in the outer area. In addition, it has been confirmed that not only an objective image quality but also subjective image quality is improved as a whole.

도 16은 본 발명의 일 실시예에 따른 실행 시간을 비교한 그래프이다.16 is a graph comparing execution times according to an embodiment of the present invention.

도 16을 참조하면, 본 발명에 일 실시예에 따른 보간법의 실행 시간이 조사되었다. LUT 구조가 적용되지 않는 경우(Nearest Neighbor Based Interpolation; NNBI), 실행시간은 270 msec 정도이다. 수행 시간을 줄이기 위하여 LUT 구조(LUT1)를 사용하는 경우, 실행시간은 20 msec 정도이다. 또한 2-레벨 LUT 구조(LUT2)를 사용하는 경우, 실행시간은 45 msec 정도이다. LUT1은 왜곡 영상 최근접 좌표와 보간 계수를 모두 저장한다. 한편, LUT2는 영상 최근접 좌표만을 저장한다. 한편, LUT1의 사이즈는 LUT2의 사이즈보다 약 29.06 배 크다. 2-레벨 LUT 구조(LUT2)를 사용하는 경우, 메모리 효율성은 향상된다. 그러나, 추가적인 연산이 필요하다. 하지만, 2-레벨 LUT 구조(LUT2)에서는, 연산량이 가장 많은 정렬 과정이 수행되지 않는다. 따라서, 전체적인 실행시간은 많이 줄어들었다.Referring to FIG. 16, the execution time of the interpolation method according to an embodiment of the present invention is examined. When the LUT structure is not applied (Nearest Neighbor Based Interpolation; NNBI), the execution time is about 270 msec. When the LUT structure (LUT1) is used to reduce the execution time, the execution time is about 20 msec. When the 2-level LUT structure (LUT2) is used, the execution time is about 45 msec. LUT1 stores both the nearest point of the distortion image and the interpolation coefficient. On the other hand, LUT2 stores only the image nearest coordinates. On the other hand, the size of LUT1 is about 29.06 times larger than the size of LUT2. When using the two-level LUT structure (LUT2), the memory efficiency is improved. However, additional computation is required. However, in the two-level LUT structure (LUT2), the alignment process having the largest computation amount is not performed. As a result, overall execution time has been greatly reduced.

이상에서는 본 발명을 특정의 바람직한 실시예에 대하여 도시하고 설명하였으나, 본 발명은 이러한 실시예에 한정되지 않으며, 당해 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 특허청구범위에서 청구하는 본 발명의 기술적 사상을 벗어나지 않는 범위 내에서 실시할 수 있는 다양한 형태의 실시예들을 모두 포함한다.While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed exemplary embodiments, And all of the various forms of embodiments that can be practiced without departing from the technical spirit.

10: 어안렌즈10: Fisheye lens

Claims (9)

어안렌즈로 획득한 왜곡 영상으로부터 보정할 보정 영상으로 파라미터를 사용하여 보정 영상의 좌표를 교정(calibration)하는 단계; 및
상기 보정 영상에서 보간할 정수 좌표(C(xc,yc))의 화소값을 보간하는 단계를 포함하고,
상기 보간하는 단계는:
상기 보정 영상에서 보간할 정수 좌표(C(xc,yc))를 왜곡 영상 실수 좌표(D(xd,yd))로 변환하는 단계;
변환된 왜곡 영상 실수 좌표(D(xd,yd)) 주위의 적어도 2개의 왜곡 영상 정수 좌표(Dk(xd k,yd k))를 보정 영상 실수 좌표(Ck(xc k,yc k))로 변환하는 단계; 및
변환된 보정 영상 실수 좌표들(Ck(xc k,yc k)) 중에서 상기 정수 좌표(C(xc,yc))에 가장 근접한 적어도 1 개의 변환된 보정 영상 실수 좌표를 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))로 설정하는 단계를 포함하는 것을 특징으로 하는 어안 렌즈 왜곡 영상 처리 방법.
Calibrating coordinates of a corrected image using a parameter as a corrected image to be corrected from a distorted image acquired with a fisheye lens; And
Interpolating pixel values of integer coordinates (C (x c , y c )) to be interpolated in the corrected image,
Wherein the interpolating comprises:
Transforming the integer coordinates C (x c , y c ) to be interpolated in the corrected image into distorted image real coordinates (D (x d , y d ));
The converted distortion real coordinates (D (x d, y d )) at least two distortion integer coordinates around (D k (x d k, y d k)) corrected video real coordinates (C k (x c k , y c k )); And
At least one converted corrected image real number coordinate closest to the integer coordinate C (x c , y c ) among the converted corrected real image coordinates C k (x c k , y c k ) (C k N (x c k , y c k )) of the fisheye lens distortion image.
제 1 항에 있어서,
상기 보간하는 단계는:
상기 보정 영상에서 상기 정수 좌표(C(xc,yc))와 상기 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k)) 사이의 좌표 거리(dk)를 계산하고, 상기 좌표 거리(dk)에 반비례하는 보간 계수(iCk)를 산출하는 단계;및
상기 보간 계수(iCk)와 상기 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))에 대응하는 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))의 화소값(Q(xc k,yc k))을 이용하여 상기 정수 좌표(C(xc,yc))의 화소값(P(xc,yc))을 계산하는 단계를 더 포함하고,
상기 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))에 대응하는 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))는 상기 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))가 왜곡 영상 좌표로 변환되는 경우, 변환된 왜곡 영상 좌표에 가장 근접한 정수 좌표인 것을 특징으로 하는 어안 렌즈 왜곡 영상 처리 방법.
The method according to claim 1,
Wherein the interpolating comprises:
A coordinate distance dk between the integer coordinates C (x c , y c ) and the nearest real number coordinate C k N (x c k , y c k ) of the corrected image in the corrected image is calculated , Calculating an interpolation coefficient (iC k ) inversely proportional to the coordinate distance (d k ), and
The interpolation coefficient (iC k) with the corrected image closest real coordinates (C k N (x c k , y c k)) distortion image closest integer coordinates (D k N (x d k, y d k which corresponds to )) calculating a pixel value (Q (x c k, y c k)), the pixel value (P (x c, y c ) of the use by the integer coordinates (c (x c, y c ))) of Further comprising:
The distortion image nearest integer coordinates (D k N (x d k , y d k )) corresponding to the corrected image nearest real number coordinates (C k N (x c k , y c k ) Wherein when the real coordinates (C k N (x c k , y c k )) are transformed into the distorted image coordinates, the transformed distortion image coordinates are closest to the transformed distortion image coordinates.
제 1 항에 있어서,
상기 보간하는 단계는:
보정 영상 최근접 실수 좌표 (Ck N(xc k,yc k))에 대응하는 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))를 메모리에 저장하는 단계;
왜곡 영상에서 정수 좌표(C(xc,yc)와 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k)) 사이의 좌표 거리(dk)를 계산하고, 좌표 거리(dk)를 이용하여 보간 계수(iCk)를 계산하고, 보간 계수를 (iCk)를 메모리에 저장하는 단계를 더 포함하고,
상기 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))에 대응하는 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))는 상기 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))가 왜곡 영상 좌표로 변환되는 경우, 변환된 왜곡 영상 좌표에 가장 근접한 정수 좌표인 것을 특징으로 하는 어안 렌즈 왜곡 영상 처리 방법.
The method according to claim 1,
Wherein the interpolating comprises:
Storing the distortion image nearest integer coordinates (D k N (x d k , y d k )) corresponding to the corrected image nearest real number coordinates (C k N (x c k , y c k )) in a memory;
Calculating a coordinate distance (d k) between the integer coordinates in the distorted images (C (x c, y c) and the corrected image closest real coordinates (C k N (x c k , y c k)), and the coordinate distance ( calculating the interpolation coefficient (iC k) using the d k), and further comprising the step of storing the interpolation coefficients a (iC k) in the memory,
The distortion image nearest integer coordinates (D k N (x d k , y d k )) corresponding to the corrected image nearest real number coordinates (C k N (x c k , y c k ) Wherein when the real coordinates (C k N (x c k , y c k )) are transformed into the distorted image coordinates, the transformed distortion image coordinates are closest to the transformed distortion image coordinates.
제 3 항에 있어서,
상기 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))를 메모리부터 독출하는 단계;
상기 보간 계수(iCk)를 메모리부터 독출하는 단계; 및
상기 보간 계수(iCk)와 상기 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))의 화소값(Q(xc k,yc k))을 이용하여 상기 정수 좌표(C(xc,yc))의 화소값(P(xc,yc))을 계산하는 단계를 더 포함하는 것을 특징으로 하는 어안 렌즈 왜곡 영상 처리 방법.
The method of claim 3,
Reading the distorted image nearest integer coordinates (D k N (x d k , y d k )) from the memory;
Reading the interpolation coefficient (i C k ) from a memory; And
Using the pixel values (Q (x c k , y c k )) of the interpolation coefficient (i C k ) and the distortion image nearest integer coordinates (D k N (x d k , y d k ) Further comprising the step of calculating a pixel value (P (x c , y c )) of the pixel value (C (x c , y c )).
제 1 항에 있어서,
상기 보간하는 단계는:
보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))에 대응하는 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))의 패턴을 결정하고, 상기 패턴을 패턴 메모리에 패턴 데이터로 저장하고,
보간할 정수 좌표(C(xc,yc)에 대응하는 패턴 어드레스 메모리가 상기 패턴 테이터를 가지는 패턴 메모리를 지시하도록 설정하는 단계를 더 포함하고,
상기 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))에 대응하는 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))는 상기 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))가 왜곡 영상 좌표로 변환되는 경우, 변환된 왜곡 영상 좌표에 가장 근접한 정수 좌표인 것을 특징으로 하는 어안 렌즈 왜곡 영상 처리 방법.
The method according to claim 1,
Wherein the interpolating comprises:
Determines a pattern of the distorted image nearest integer coordinates (D k N (x d k , y d k )) corresponding to the corrected image nearest real number coordinate (C k N (x c k , y c k ) The pattern is stored as pattern data in the pattern memory,
Pattern corresponding to the integer coordinates (C (x c, y c) to interpolate the address memory, and further comprising the step of setting to indicate the pattern memory having the pattern mutator,
The distortion image nearest integer coordinates (D k N (x d k , y d k )) corresponding to the corrected image nearest real number coordinates (C k N (x c k , y c k ) Wherein when the real coordinates (C k N (x c k , y c k )) are transformed into the distorted image coordinates, the transformed distortion image coordinates are closest to the transformed distortion image coordinates.
제 5 항에 있어서,
상기 보간하는 단계는:
상기 정수 좌표(C(xc,yc))가 가리키는 상기 패턴 메모리의 값으로 패턴 메모리를 접근하여 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))의 패턴 데이터를 독출하는 단계;
상기 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))의 패턴 데이터로부터 상기 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))를 계산하는 단계;
상기 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))에 대응하는 상기 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))를 계산하는 단계;
상기 보정 영상의 상기 정수좌표(C(xc,yc))와 상기 보정 영상 최근접 실수 좌표들(Ck N(xc k,yc k)) 사이의 좌표 거리(dk)를 계산하고, 상기 좌표 거리(dk)에 반비례하는 보간 계수(iCk)를 산출하는 단계;및
상기 보간 계수(iCk)와 상기 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))의 화소값(Q(xc k,yc k))을 이용하여 상기 정수 좌표(C(xc,yc))의 화소값(P(xc,yc))을 계산하는 단계를 더 포함하고,
상기 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))에 대응하는 상기 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))는 상기 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))가 보정 영상 좌표로 변환되는 경우, 변환된 보정 영상 좌표에 가장 근접한 정수 좌표인 것을 특징으로 하는 어안 렌즈 왜곡 영상 처리 방법.
6. The method of claim 5,
Wherein the interpolating comprises:
The pattern memory is accessed with the value of the pattern memory pointed to by the integer coordinates C (x c , y c ) and the pattern data of the distortion image nearest integer coordinates (D k N (x d k , y d k ) Reading stage;
Calculating the distortion image nearest integer coordinates (D k N (x d k , y d k )) from the pattern data of the distortion image nearest integer coordinates (D k N (x d k , y d k ) ;
Calculating the corrected image nearest real number coordinate (C k N (x c k , y c k )) corresponding to the distortion image nearest integer coordinates (D k N (x d k , y d k ));
Calculates a coordinate distance (d k ) between the integer coordinates (C (x c , y c )) of the corrected image and the corrected image nearest real coordinates (C k N (x c k , y c k ) Calculating an interpolation coefficient (i C k ) inversely proportional to the coordinate distance (d k ); and
Using the pixel value (Q (x c k, y c k)) of the interpolation coefficient (iC k) and the distortion closest integer coordinates (D k N (x d k , y d k)) The integral coordinate (c (x c, y c )) further comprises the step of calculating the pixel values (P (x c, y c )) , and of,
The corrected image nearest real number coordinates (C k N (x c k , y c k )) corresponding to the distortion image nearest integer coordinates (D k N (x d k , y d k ) Wherein when the closest integer coordinates (D k N (x d k , y d k )) are converted into corrected image coordinates, the closest integer coordinates to the converted corrected image coordinates are obtained.
제1 항에 있어서,
상기 교정(calibration)은 구면 투영법을 사용하는 것을 특징으로 하는 어안 렌즈 왜곡 영상 처리 방법.
The method according to claim 1,
Wherein the calibration uses a spherical projection method.
어안렌즈로 획득한 왜곡 영상을 보정 영상으로 보정하는 어안 렌즈 왜곡 영상 처리 방법에 있어서,
상기 보정 영상에서 보간할 정수 좌표(C(xc,yc))를 왜곡 영상 실수 좌표(D(xd,yd))로 변환하는 단계;
상기 왜곡 영상 실수 좌표(D(xd,yd)) 주위의 적어도 2개의 왜곡 영상 정수 좌표(Dk(xd k,yd k))를 보정 영상 실수 좌표(Ck(xc k,yc k))로 변환하는 단계;
상기 보정 영상 실수 좌표들(Ck(xc k,yc k)) 중에서 상기 정수 좌표(C(xc,yc))에 가장 근접한 적어도 1 개의 변환된 보정 영상 실수 좌표를 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))로 설정하는 단계; 및
상기 보정 영상에서 보간할 정수 좌표(C(xc,yc))의 화소값을 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))에 대응하는 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))의 화소값(Q(xc k,yc k))을 이용하여 보간하는 단계를 포함하고,
상기 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))에 대응하는 왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))는 상기 보정 영상 최근접 실수 좌표(Ck N(xc k,yc k))가 왜곡 영상 좌표로 변환되는 경우, 변환된 왜곡 영상 좌표에 가장 근접한 정수 좌표인 것을 특징으로 하는 어안 렌즈 왜곡 영상 처리 방법.
A fisheye lens distortion image processing method for correcting a distortion image acquired by a fisheye lens with a correction image,
Transforming the integer coordinates C (x c , y c ) to be interpolated in the corrected image into distorted image real coordinates (D (x d , y d ));
The distortion real coordinates (D (x d, y d )) at least two distortion integer coordinates around (D k (x d k, y d k)) corrected video real coordinates (C k (x c k, y c k ));
At least one converted corrected image real number coordinate closest to the integer coordinates C (x c , y c ) among the corrected image real number coordinates C k (x c k , y c k ) And setting real coordinates (C k N (x c k , y c k )); And
A pixel value of an integer coordinate (C (x c , y c ) to be interpolated in the corrected image is referred to as a nearest integer of a distorted image corresponding to a corrected image nearest real number coordinate (C k N (x c k , y c k ) Using the pixel values (Q (x c k , y c k )) of the coordinates (D k N (x d k , y d k )),
The distortion image nearest integer coordinates (D k N (x d k , y d k )) corresponding to the corrected image nearest real number coordinates (C k N (x c k , y c k ) Wherein when the real coordinates (C k N (x c k , y c k )) are transformed into the distorted image coordinates, the transformed distortion image coordinates are closest to the transformed distortion image coordinates.
제 8 항에 있어서,
왜곡 영상 최근접 정수 좌표(Dk N(xd k,yd k))를 룩업 테이블 메모리에 저장하는 단계를 더 포함하는 것을 특징으로 하는 어안 렌즈 왜곡 영상 처리 방법.
9. The method of claim 8,
Further comprising the step of storing the distorted image nearest integer coordinates (D k N (x d k , y d k )) in a look-up table memory.
KR1020120139983A 2012-12-05 2012-12-05 Distorted Image Processing Method For Fish-Eye Lens KR101465607B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020120139983A KR101465607B1 (en) 2012-12-05 2012-12-05 Distorted Image Processing Method For Fish-Eye Lens

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020120139983A KR101465607B1 (en) 2012-12-05 2012-12-05 Distorted Image Processing Method For Fish-Eye Lens

Publications (2)

Publication Number Publication Date
KR20140072470A KR20140072470A (en) 2014-06-13
KR101465607B1 true KR101465607B1 (en) 2014-11-27

Family

ID=51126312

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020120139983A KR101465607B1 (en) 2012-12-05 2012-12-05 Distorted Image Processing Method For Fish-Eye Lens

Country Status (1)

Country Link
KR (1) KR101465607B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101964214B1 (en) 2017-11-17 2019-04-01 주식회사 포텍 Measuring method of lens meter using damaged multi-light tracing

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017092631A1 (en) * 2015-11-30 2017-06-08 宁波舜宇光电信息有限公司 Image distortion correction method for fisheye image, and calibration method for fisheye camera
KR102028469B1 (en) 2018-01-15 2019-10-04 주식회사 스트리스 System and Method for Removing Distortion of Fisheye Lens and Omnidirectional Image
KR102070974B1 (en) * 2018-01-17 2020-01-29 국방과학연구소 Method and apparatus for correcting geometric distortion
CN113643205B (en) * 2021-08-17 2024-03-22 安徽农业大学 Full-field image distortion correction method for fisheye lens

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11510342A (en) * 1995-07-27 1999-09-07 センサーマティック・エレクトロニクス・コーポレーション Image division, image formation and processing apparatus and method using camera without moving parts
JPH11510341A (en) * 1995-07-27 1999-09-07 センサーマティック・エレクトロニクス・コーポレーション Image forming and processing apparatus and method using camera without moving parts
KR101053506B1 (en) 2009-12-16 2011-08-03 (주) 에투시스템 Method for adjusting parameters in distortion calibration of image acquired by camera having fish eye lens

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11510342A (en) * 1995-07-27 1999-09-07 センサーマティック・エレクトロニクス・コーポレーション Image division, image formation and processing apparatus and method using camera without moving parts
JPH11510341A (en) * 1995-07-27 1999-09-07 センサーマティック・エレクトロニクス・コーポレーション Image forming and processing apparatus and method using camera without moving parts
KR101053506B1 (en) 2009-12-16 2011-08-03 (주) 에투시스템 Method for adjusting parameters in distortion calibration of image acquired by camera having fish eye lens

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101964214B1 (en) 2017-11-17 2019-04-01 주식회사 포텍 Measuring method of lens meter using damaged multi-light tracing

Also Published As

Publication number Publication date
KR20140072470A (en) 2014-06-13

Similar Documents

Publication Publication Date Title
JP4657367B2 (en) Image processing apparatus, imaging apparatus, and image distortion correction method
KR101465607B1 (en) Distorted Image Processing Method For Fish-Eye Lens
CN110276734B (en) Image distortion correction method and device
JP4661829B2 (en) Image data conversion device and camera device provided with the same
JP5046132B2 (en) Image data converter
CN104917955A (en) Image Transformation And Multi-View Output Systems And Methods
JP2012105246A (en) Image correction method and related image correction system
US20160078590A1 (en) Coordinate computation device and method, and an image processing device and method
EP3540684B1 (en) Image processing apparatus and image processing method
KR20090078463A (en) Distorted image correction apparatus and method
US8610801B2 (en) Image processing apparatus including chromatic aberration correcting circuit and image processing method
US7499082B2 (en) Distortion correction circuit for generating distortion-corrected image using data for uncorrected image
CN111292278B (en) Image fusion method and device, storage medium and terminal
CN112508783B (en) Image processing method based on direction interpolation, computer device and computer readable storage medium
EP3523777A1 (en) System and method for rectifying a wide-angle image
US10395337B2 (en) Image processing apparatus, image processing method, and storage medium
JP2013218654A (en) Image processing device
JP2010170514A (en) Image data conversion device
US8385686B2 (en) Image processing method based on partitioning of image data, image processing device based on partitioning image data and program
JPH11250239A (en) Digital image pickup device for operating distortion correction by yuv data
EP3916670A1 (en) System and method for correcting geometric distortion in images
CN114648458A (en) Fisheye image correction method and device, electronic equipment and storage medium
JP2008298589A (en) Device and method for detecting positions
US20200294208A1 (en) Image processing apparatus and distortion correction coefficient calculation method
JP4664259B2 (en) Image correction apparatus and image correction method

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20171106

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20191104

Year of fee payment: 6