KR20180059108A - Apparatus for correcting video and method for using the same - Google Patents

Apparatus for correcting video and method for using the same Download PDF

Info

Publication number
KR20180059108A
KR20180059108A KR1020160158284A KR20160158284A KR20180059108A KR 20180059108 A KR20180059108 A KR 20180059108A KR 1020160158284 A KR1020160158284 A KR 1020160158284A KR 20160158284 A KR20160158284 A KR 20160158284A KR 20180059108 A KR20180059108 A KR 20180059108A
Authority
KR
South Korea
Prior art keywords
image
time
line
minutiae
feature point
Prior art date
Application number
KR1020160158284A
Other languages
Korean (ko)
Other versions
KR102002531B1 (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 KR1020160158284A priority Critical patent/KR102002531B1/en
Publication of KR20180059108A publication Critical patent/KR20180059108A/en
Application granted granted Critical
Publication of KR102002531B1 publication Critical patent/KR102002531B1/en

Links

Images

Classifications

    • G06T3/18
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/0093Geometric image transformation in the plane of the image for image warping, i.e. transforming by individually repositioning each pixel
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/0012Context preserving transformation, e.g. by using an importance map
    • G06T3/04
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • G06T7/33Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Abstract

An image correction apparatus and method are disclosed. The image correction apparatus according to an aspect of the present invention comprises a feature point extracting part that acquires the image of a target photographed from a camera, selects a mode according to the type of target, and extracts a plurality of feature points forming a quadrangle; a geometry changing part for obtaining a rectangular image by performing a geometry change based on the plurality of feature points on the image of the target; and a color changing part for changing the color of the quadrangle based on a predetermined preset parameter and outputting a corrected image. It is possible to perform geometric and color correction of the image.

Description

영상 보정 장치 및 방법 {APPARATUS FOR CORRECTING VIDEO AND METHOD FOR USING THE SAME}TECHNICAL FIELD [0001] The present invention relates to an image correcting apparatus and method,

본 발명은 영상 보정 기술에 관한 것으로, 보다 상세하게는 영상 기하 및 컬러 보정 기술에 관한 것이다.The present invention relates to image correction techniques, and more particularly, to image geometry and color correction techniques.

종래의 스마트폰 기반에서 영상을 보정하는 기술은 명함을 인식할 수 있게 하기 위해 영상을 보정하고, 책을 스캔하는 등 다양한 분야에서 사용되고 있다.Conventional smartphone-based image correction techniques are used in various fields such as correcting images, scanning books, and so on to recognize business cards.

현재 학교 현장에서 다양한 학습 방법이 실시 되면서 이에 따른 영상 보정 기술도 빠르고 안정적으로 동작되어야 한다.As the various learning methods are implemented in the school scene, the image correction technology should be operated quickly and stably.

일반적으로 영상을 획득하는 경우 카메라의 기울어짐에 따라 영상의 왜곡이 발생한다. 즉, 사각형을 촬영하여도 사각형이 아닌 다른 형태의 영상이 획득됨으로 기하변경을 통해 다시 사각형을 보정하는 것이 필요하다.Generally, when the image is acquired, the image is distorted according to the inclination of the camera. That is, it is necessary to correct the rectangle again through the geometry change by acquiring images other than the rectangle even when the rectangle is photographed.

또한, 학교 교육현장은 실내에서 수업이 진행되며, 조명 환경이 거의 일정하다고 볼 수 있다. 따라서 색상변경을 위해서는 프리셋 기반의 색상 변경을 이용할 수 있다.Also, in the school education field, lessons are being held indoors and the lighting environment is almost constant. Therefore, you can use preset-based color change for color change.

즉, 학교 현장에서 카메라로 영상 획득 시 주변 환경에 따라 그림자, 색상 등의 변화가 있음에 따라 색상을 변화시키는 것이 중요하다.In other words, it is important to change the color depending on the surrounding environment when there is a change in shadows, colors, etc. at the time of image acquisition with a camera at a school site.

한편, 한국공개특허 제 10-2013-0142027 호"영상보정 시스템, 영상보정방법 및 스마트 영상획득 장치"는 영상보정 시스템, 영상보정방법 및 스마트 영상획득 장치에 관한 것으로서, 보다 구체적으로 영상보정 시스템, 이 시스템을 이용한 영상보정방법 및 이 시스템을 통해 영상을 보정하는 스마트 영상획득 장치에 관하여 개시하고 있다.Korean Patent Application No. 10-2013-0142027 entitled " Image correction system, image correction method and smart image acquisition apparatus "relates to an image correction system, an image correction method, and a smart image acquisition apparatus. More particularly, An image correction method using this system, and a smart image acquisition apparatus for correcting an image through this system.

그러나, 한국공개특허 제 10-2013-0142027 호는 대용량 비정형 데이터 및 데이터베이스에 기반하여 사용자를 분석하여 영상 보정을 실시하는 것으로 학교 교육현장에서 간편하고 빠르게 영상 보정을 수행하기에는 한계가 있다.However, in Korean Patent Laid-Open No. 10-2013-0142027, image correction is performed by analyzing a user on the basis of large-volume unstructured data and a database, which makes it difficult to perform image correction easily and quickly in a school education field.

본 발명은 실내 교실 환경에서 교육 주체인 선생님 또는 학생이 촬영한 영상물을 준실시간으로 스마트폰 카메라를 이용하여 취득한 영상의 기하 및 컬러보정을 수행하는 것을 목적으로 한다.An object of the present invention is to perform geometric and color correction of an image captured by a teacher or a student who is a subject of education in an indoor classroom environment using a smartphone camera in a quasi-real-time manner.

또한, 본 발명은 영상 기하 및 컬러 보정이 수행된 영상을 실내 교실의 전자칠판 등에 투사하여 교육의 효과를 극대화하는 것을 목적으로 한다.It is another object of the present invention to maximize the effect of education by projecting an image subjected to image geometry and color correction to an electronic blackboard of an indoor classroom.

상기한 목적을 달성하기 위한 본 발명의 일실시예에 따른 수동상호변조왜곡신호 측정 장치는 수동상호변조왜곡(Passive Intermodulation distortion, PIMD) 신호를 측정하기 위한 인덱스 별로 저장된 파라미터를 전달하는 중앙 처리부; 상기 파라미터에 기반한 중심 주파수에 상응하는 신호를 급전선에 송신하는 신호 송신부 및 상기 파라미터에 기반한 레퍼런스 신호를 생성하여 급전선으로부터 수신한 상기 수동상호변조왜곡 신호를 발생시킨 수동소자의 위치를 산출하는 신호 수신부를 포함한다.According to an aspect of the present invention, there is provided an apparatus for measuring a passive intermodulation distortion (PIMD) signal, the apparatus comprising: a central processing unit for transmitting a parameter stored for each index for measuring a passive intermodulation distortion (PIMD) signal; A signal transmitter for transmitting a signal corresponding to a center frequency based on the parameter to a feeder line and a signal receiver for generating a reference signal based on the parameter and calculating a position of a passive element that generates the passive intermodulation distortion signal received from the feeder line .

본 발명은 실내 교실 환경에서 교육 주체인 선생님 또는 학생이 촬영한 영상물을 준실시간으로 스마트폰 카메라를 이용하여 취득한 영상의 기하 및 컬러보정을 수행할 수 있다.The present invention can perform geometric and color correction of an image captured by a teacher or a student who is a subject of education in an indoor classroom environment using a smartphone camera in a quasi-real-time manner.

또한, 본 발명은 영상 기하 및 컬러 보정이 수행된 영상을 실내 교실의 전자칠판 등에 투사하여 교육의 효과를 극대화할 수 있다.In addition, the present invention can maximize the effect of education by projecting the image subjected to the image geometry and color correction to the electronic blackboard of the indoor classroom.

도 1은 본 발명의 일실시예에 따른 영상 보정 장치를 나타낸 블록도이다.
도 2 내지 도 4는 본 발명의 일실시예에 따른 영상 보정의 대상이 되는 대상체들을 나타낸 도면이다.
도 5는 본 발명의 일실시예에 따른 BOOK 대상체의 특징점 추출 과정을 나타낸 도면이다.
도 6은 본 발명의 일실시예에 따른 BOOK 대상체의 영역 분할 과정을 나타낸 도면이다.
도 7은 본 발명의 일실시예에 따른 영상 보정 방법을 나타낸 동작흐름도이다.
도 8은 도 7에 도시된 특징점 추출 단계의 일 예를 세부적으로 나타낸 동작흐름도이다.
도 9는 도 8에 도시된 FLAT 모드 수행 단계의 일 예를 세부적으로 나타낸 동작흐름도이다.
도 10은 도 8에 도시된 BOARD 모드 수행 단계의 일 예를 세부적으로 나타낸 동작흐름도이다.
도 11은 도 8에 도시된 BOOK 모드 수행 단계의 일 예를 세부적으로 나타낸 동작흐름도이다.
도 12는 본 발명의 일실시예에 따른 컴퓨터 시스템을 나타낸 블록도이다.
1 is a block diagram illustrating an image correction apparatus according to an exemplary embodiment of the present invention.
2 to 4 are views showing objects to be subjected to image correction according to an embodiment of the present invention.
FIG. 5 is a diagram illustrating a feature point extraction process of a BOOK object according to an exemplary embodiment of the present invention. Referring to FIG.
FIG. 6 is a diagram illustrating a region partitioning process of a BOOK object according to an exemplary embodiment of the present invention. Referring to FIG.
7 is a flowchart illustrating an image correction method according to an embodiment of the present invention.
FIG. 8 is an operation flowchart illustrating in detail an example of the feature point extracting step shown in FIG.
FIG. 9 is an operation flowchart illustrating an exemplary FLAT mode execution step shown in FIG. 8 in detail.
FIG. 10 is an operation flow chart illustrating an example of the BOARD mode execution step shown in FIG. 8 in detail.
FIG. 11 is a flowchart illustrating an example of the BOOK mode execution step shown in FIG. 8 in detail.
12 is a block diagram illustrating a computer system in accordance with an embodiment of the present invention.

본 발명을 첨부된 도면을 참조하여 상세히 설명하면 다음과 같다. 여기서, 반복되는 설명, 본 발명의 요지를 불필요하게 흐릴 수 있는 공지 기능, 및 구성에 대한 상세한 설명은 생략한다. 본 발명의 실시형태는 당 업계에서 평균적인 지식을 가진 자에게 본 발명을 보다 완전하게 설명하기 위해서 제공되는 것이다. 따라서, 도면에서의 요소들의 형상 및 크기 등은 보다 명확한 설명을 위해 과장될 수 있다.The present invention will now be described in detail with reference to the accompanying drawings. Hereinafter, a repeated description, a known function that may obscure the gist of the present invention, and a detailed description of the configuration will be omitted. Embodiments of the present invention are provided to more fully describe the present invention to those skilled in the art. Accordingly, the shapes and sizes of the elements in the drawings and the like can be exaggerated for clarity.

명세서 전체에서, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성 요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다.Throughout the specification, when an element is referred to as "comprising ", it means that it can include other elements as well, without excluding other elements unless specifically stated otherwise.

이하, 본 발명에 따른 바람직한 실시예를 첨부된 도면을 참조하여 상세하게 설명한다.Hereinafter, preferred embodiments according to the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명의 일실시예에 따른 영상 보정 장치를 나타낸 블록도이다. 도 2 내지 도 4는 본 발명의 일실시예에 따른 영상 보정의 대상이 되는 대상체들을 나타낸 도면이다. 도 5는 본 발명의 일실시예에 따른 BOOK 대상체의 특징점 추출 과정을 나타낸 도면이다. 도 6은 본 발명의 일실시예에 따른 BOOK 대상체의 영역 분할 과정을 나타낸 도면이다.1 is a block diagram illustrating an image correction apparatus according to an exemplary embodiment of the present invention. 2 to 4 are views showing objects to be subjected to image correction according to an embodiment of the present invention. FIG. 5 is a diagram illustrating a feature point extraction process of a BOOK object according to an exemplary embodiment of the present invention. Referring to FIG. FIG. 6 is a diagram illustrating a region partitioning process of a BOOK object according to an exemplary embodiment of the present invention. Referring to FIG.

도 1을 참조하면, 본 발명의 일실시예에 따른 영상 보정 장치는 특징점 추출부(110), 기하 변경부(120) 및 색상 변경부(130)를 포함한다.Referring to FIG. 1, an image correction apparatus according to an embodiment of the present invention includes a feature point extracting unit 110, a geometry changing unit 120, and a color changing unit 130.

특징점 추출부(110)는 카메라로부터 촬영된 대상체의 영상을 획득하여 대상체 종류에 따라 모드를 선택하여 사각형을 이루는 복수개의 특징점들을 추출할 수 있다.The feature point extracting unit 110 may extract a plurality of feature points that form a quadrangle by acquiring an image of a photographed object from a camera and selecting a mode according to the object type.

카메라는 스마트폰, 태블릿, 캠코더 및 PC 캠 등 다양한 이미지 및 영상 획득 장치에도 상응할 수 있다.The camera can also correspond to a variety of image and image acquisition devices such as smart phones, tablets, camcorders and PC cams.

특징점 추출부(110)는 에지 추출을 위한 고주파 필터(High Pass Filter)를 이용하여 영상을 필터링 할 수 있다.The feature point extraction unit 110 may filter an image using a high pass filter for edge extraction.

이 때, 특징점 추출부(110)는 NxM형태의 필터 메트릭스를 생성하여 필터 연산을 수행할 수 있다.In this case, the feature point extraction unit 110 may generate filter matrices of NxM type to perform filter operation.

또한, 특징점 추출부(110)는 적응적 이진화를 수행할 수 있다.In addition, the feature point extraction unit 110 may perform adaptive binarization.

이 때, 특징점 추출부(110)는 이진화 임계값(Tth)을 적응적으로 산출할 수 있다. 예를 들어, 입력 영상은 하얀색 배경위에 다양한 문자 혹은 그림, 표 등이 작성되었다고 가정하면, 특징점 추출부(110)는 적응적 이진화를 위하여, 어두운 영역은 고주파 필터의 결과값이 낮을 수 있기 때문에, Tth 를 다른 영역보다 낮게 설정할 수 있다. 이를 위해, 특징점 추출부(110)는 전체 영역을 타일 형태로 분리하여 각 영역별 Tth 를 계산할 수 있다. Tth 는 각 영역의 평균 밝기값에 반비례하게 설정될 수 있다.At this time, the feature point extraction unit 110 can adaptively calculate the binarization threshold T th . For example, assuming that various characters, figures, tables, and the like are created on a white background of the input image, the feature point extracting unit 110 may have a low value for the adaptive binarization and a low value for the high frequency filter, T th can be set lower than other regions. To this end, the feature point extracting unit 110 may calculate the T th for each region by dividing the entire region into tiles. T th may be set in inverse proportion to the average brightness value of each region.

또한, 특징점 추출부(110)는 특징점 추출을 위한 대상체의 종류에 따라 모드를 선택할 수 있다.In addition, the minutiae point extraction unit 110 can select a mode according to the type of target object for minutiae extraction.

이 때, 특징점 추출부(110)는 대상체의 종류에 따라 FLAT 모드, BOARD 모드 및 BOOK 모드 중 어느 하나의 모드를 선택할 수 있다.At this time, the feature point extraction unit 110 can select one of the FLAT mode, the BOARD mode, and the BOOK mode according to the type of the object.

도 2를 참조하면, 카메라가 A4 용지를 촬영한 것을 알 수 있다.Referring to FIG. 2, it can be seen that the camera has photographed A4 paper.

도 2에 도시된 바와 같이, 특징점 추출부(110)는 입력된 영상이 일반적인 A4 용지인 경우 FLAT 모드를 선택할 수 있다.As shown in FIG. 2, the feature point extracting unit 110 can select the FLAT mode when the input image is a general A4 paper.

또한, 특징점 추출부(110)는 선택한 FLAT 모드를 수행할 수 있다.In addition, the feature point extraction unit 110 can perform the selected FLAT mode.

이 때, 특징점 추출부(110)는 먼저 라인 피팅을 수행할 수 있다.At this time, the feature point extraction unit 110 may first perform line fitting.

라인 피팅은 허프변환 (Hough Transform)을 이용하거나, 임의의 직선으로 매핑하는 최적화 알고리즘이 사용될 수 있다. 이때 매핑된 라인의 길이는 기설정된 길이 이상의 크기인 경우만 사용될 수 있다. 예를 들어 영상의 가로길이 및 세로길이 중 길이가 긴 쪽의 1/5정도를 사용할 수 있다. The line fitting can be an optimization algorithm that uses a Hough Transform or maps to arbitrary straight lines. At this time, the length of the mapped line can be used only when the length is equal to or larger than a predetermined length. For example, one-fifth of the width and length of the image may be used.

또한, 특징점 추출부(110)는 라인 정렬을 수행할 수 있다.In addition, the feature point extraction unit 110 may perform line alignment.

특징점 추출부(110)는 일정 길이 이상의 라인으로 영상을 피팅하면 여러 개의 선분들이 생성될 수 있다. 이 선분을 순서대로 정렬할 수 있다The feature point extraction unit 110 may generate a plurality of line segments by fitting an image to a line having a predetermined length or longer. You can sort these segments in order

이 때, 특징점 추출부(110)는 정렬된 라인을 두 개씩 선택하여 교점을 산출 할 수 있다.At this time, the minutiae point extracting unit 110 can select two aligned lines to calculate an intersection point.

이 때, 특징점 추출부(110)는 산출된 교점을 특징점 후보로 정의할 수 있다. At this time, the feature point extraction unit 110 can define the calculated intersection point as a feature point candidate.

이 때, 특징점 추출부(110)는 특징점 후보를 정의한 선분의 쌍 중에서 두 선분이 이루는 각이 기설정된 값 이상 혹은 이하인 특징점 후보는 제외할 수 있다.In this case, the feature point extracting unit 110 may exclude feature point candidates whose angle formed by the two line segments out of the pair of line segments defining the feature point candidate is greater than or equal to a predetermined value.

즉, 특징점 추출부(110)는 카메라를 너무 기울인 것임으로 기하보정을 해도 영상 보정이 성공할 수 없기 때문에, 의미 없는 특징점 후보로 간주하여 기설정된 값 이상 혹은 이하인 특징점 후보는 제거될 수 있다.That is, since the feature point extracting unit 110 tilts the camera too far, the image correction can not be successfully performed even if the geometric correction is performed. Therefore, the feature point candidate that is equal to or less than a predetermined value can be eliminated.

이 때, 특징점 추출부(110)는 특징점 후보를 제외하고, 남은 특징점 후보들이 사각형을 이루는지 판단하여 각각을 복수개의 최종 특징점들로 추출할 수 있다.At this time, the feature point extracting unit 110 can extract each of the feature points as a plurality of final feature points by judging whether or not the remaining feature point candidates form a quadrangle, excluding the feature point candidates.

기하 변경부(120)는 대상체의 영상에 상기 복수개의 특징점들에 기반한 기하 변경을 수행하여 사각형의 영상을 획득할 수 있다.The geometry changing unit 120 may obtain a quadrangle image by performing a geometry change based on the plurality of feature points on an image of a target object.

즉, 기하 변경부(120)는 사각형의 영상을 촬영하였으나 기하 변형이 발생한 경우, 사각형으로 변경할 수 있다.That is, the geometry changing unit 120 captures an image of a quadrangle, but can change it to a quadrangle when geometric deformation occurs.

이 때, 기하 변경부(120)는 4개의 좌표 혹은 4개 이상(영상을 끝부분이 휘어져서 영역별 보정이 필요한 경우)의 복수개의 특징점들의 좌표를 입력 받을 수 있다.At this time, the geometry changing unit 120 may receive the coordinates of a plurality of minutiae points of four coordinates or more than four minutiae (when the end portion of the image is warped and the area-specific correction is necessary).

이 때, 기하 변경부(120)는 입력된 복수개의 특징점들의 좌표에 기반하여 사각형의 영상을 생성할 수 있다.In this case, the geometry changing unit 120 may generate a rectangular image based on the coordinates of the input minutiae points.

색상 변경부(130)는 사각형의 영상을 기설정된 프리셋 파라메터에 기반하여 색상을 변경하여 보정 영상을 출력할 수 있다.The color changing unit 130 may output a corrected image by changing a color based on a predetermined preset parameter of a rectangular image.

색상 변경부(130)는 만약 실내 환경이 변경되는 경우, 기설정된 실내 환경 설정값에 기반하여 프리셋 파라메터를 변경할 수 있다.If the indoor environment is changed, the color changing unit 130 may change the preset parameter based on the predetermined indoor environment setting value.

색상 변경부(130)는 프리셋을 재설정하기 위해 기설정된 채도, 색조, 명암, 대비등의 값으로 기하 보정된 사각형의 영상을 변경할 수 있고, 사용자가 수동으로 설정할 수 도 있다.The color changing unit 130 may change the image of the rectangle geometrically corrected to a value such as predetermined saturation, hue, contrast, contrast, etc. in order to reset the preset, or may be manually set by the user.

이 후, 색상 변경부(130)는 색상 변경된 사각형의 영상을 영상 출력 장치를 이용하여 출력할 수 있다.Thereafter, the color changing unit 130 can output a quadrangle-modified image using the image output device.

영상 출력 장치는 모니터, 스마트폰 화면, 프로젝터 등에 상응할 수 있다.The video output device may correspond to a monitor, a smartphone screen, a projector, and the like.

도 3을 참조하면, 카메라가 외곽선이 있는 칠판을 촬영한 것을 알 수 있다.Referring to FIG. 3, it can be seen that the camera photographs a blackboard having an outline.

도 3에 도시된 바와 같이, 특징점 추출부(110)는 입력된 영상이 외곽선을 가지고 있는 평면인 경우, BOARD 모드를 선택할 수 있다.As shown in FIG. 3, the feature point extraction unit 110 can select a BOARD mode when the input image is a plane having an outline.

또한, 특징점 추출부(110)는 선택한 BOARD 모드를 수행할 수 있다.In addition, the feature point extraction unit 110 may perform the selected BOARD mode.

이 때, 특징점 추출부(110)는 먼저 패턴 매칭 모드와 라인 피팅 모드 중 어느 하나의 모드를 선택할 수 있다.At this time, the feature point extraction unit 110 may first select any one of the pattern matching mode and the line fitting mode.

이 때, 특징점 추출부(110)는 선택한 패턴 매칭 모드를 수행할 수 있다.At this time, the feature point extracting unit 110 can perform the selected pattern matching mode.

이 때, 특징점 추출부(110)는 입력된 대상체의 4개의 코너에 존재하는 특징점들을 가장 중요한 특징점으로 판단할 수 있다.At this time, the feature point extracting unit 110 can determine the feature points existing at the four corners of the inputted object as the most important feature points.

이 때, 특징점 추출부(110)는 4개의 코너의 존재하는 특징점들을 패턴 매칭의 트레이닝셋으로 삽입할 수 있다.At this time, the feature point extracting unit 110 may insert the existing feature points of the four corners into the training set of the pattern matching.

이 때, 특징점 추출부(110)는 기설정된 다양한 기울기에 상응하는 정보를 함께 삽입할 수도 있다.At this time, the feature point extracting unit 110 may insert information corresponding to various predetermined slopes.

이 때, 특징점 추출부(110)는 이진화된 영상을 대상으로 하기 때문에 다양한 조명에 대해서는 패턴 매칭을 수행할 필요가 없을 수도 있다.At this time, the feature point extracting unit 110 may target the binarized image, so it may not be necessary to perform pattern matching for various kinds of illumination.

다만, 특징점 추출부(110)는 패턴 매칭을 위하여 다양한 기울기 정보가 입력되어야 하며, 패턴 매칭이 수행된 영상을 본 발명에서 사용하는 알고리즘에 따라 수행한 후 잘라서 넣는다. However, the feature point extracting unit 110 must input various slope information for pattern matching, and performs the pattern matching on the image according to the algorithm used in the present invention and then cuts it.

즉, 특징점 추출부(110)는 본 발명에서 사용되는 이진화 방법에 의해 이진화된 영상을 가지고 패턴 매칭을 수행하면, 탐색 공간이 작아져 특징점을 정밀하게 찾을 수 있다.That is, when the feature point extracting unit 110 performs pattern matching with the binarized image by the binarization method used in the present invention, the search space is reduced, and the feature point can be searched precisely.

이 때, 특징점 추출부(110)는 도 3에 도시된 칠판과 같이 끝(모서리)이 둥그런 모양을 입력으로 넣고, 끝이 직각이 경우면, 같은 모양을 실제로 다양한 각도로 사진을 찍어 넣을 수 있다. 끝 부분(모서리)은 어떠한 형태이더라도, 패턴 매칭에 의해 인식될 수 있는 것이면 된다.In this case, the feature point extracting unit 110 may insert a circular shape as an input as shown in the blackboard shown in FIG. 3, and if the end is at right angles, the same shape can be actually photographed at various angles have. The end portion (edge) may be any shape, as long as it can be recognized by pattern matching.

이 때, 특징점 추출부(110)는 패턴 매칭에 사용되는 것은 다양한 학습 알고리즘을 사용할 수 있다. At this time, the feature point extracting unit 110 can use various learning algorithms used for pattern matching.

또한, 특징점 추출부(110)는 후보군 후처리를 수행할 수 있다.In addition, the feature point extracting unit 110 may perform a candidate group post-processing.

즉, 특징점 추출부(110)는 패턴 매칭하여 대상체의 형태가 인식 한 이후, 후보군 후처리를 수행하여 특징점의 위치를 찾을 수 있다.That is, after the feature point extracting unit 110 recognizes the shape of the target object by pattern matching, it can perform post-processing of the candidate group to locate the feature point.

이 때, 특징점 추출부(110)는 여러 개의 패턴 매칭된 후보군 중에서 사각형을 이루는 4개의 패턴의 위치를 찾고, 이를 기반으로 코너 위치의 복수개의 최종 특징점들을 추출할 수 있다.At this time, the feature point extracting unit 110 finds the positions of the four patterns constituting the quadrangle among the plurality of pattern-matched candidate groups, and extracts a plurality of final feature points at the corner positions based on the positions.

또한, 특징점 추출부(110)는 선택한 라인 피팅 모드를 수행할 수 있다.In addition, the feature point extraction unit 110 may perform the selected line fitting mode.

라인 피팅은 허프변환 (Hough Transform)을 이용하거나, 임의의 직선으로 매핑하는 최적화 알고리즘이 사용될 수 있다. 이때 매핑된 라인의 길이는 기설정된 길이 이상의 크기인 경우만 사용될 수 있다. 예를 들어 영상의 가로길이 및 세로길이 중 길이가 긴 쪽의 1/5정도를 사용할 수 있다. The line fitting can be an optimization algorithm that uses a Hough Transform or maps to arbitrary straight lines. At this time, the length of the mapped line can be used only when the length is equal to or larger than a predetermined length. For example, one-fifth of the width and length of the image may be used.

또한, 특징점 추출부(110)는 라인 정렬을 수행할 수 있다.In addition, the feature point extraction unit 110 may perform line alignment.

특징점 추출부(110)는 일정 길이 이상의 라인으로 영상을 피팅하면 여러 개의 선분들이 생성될 수 있다. 이 선분을 순서대로 정렬할 수 있다The feature point extraction unit 110 may generate a plurality of line segments by fitting an image to a line having a predetermined length or longer. You can sort these segments in order

이 때, 특징점 추출부(110)는 정렬된 라인을 두 개씩 선택하여 교점을 산출 할 수 있다.At this time, the minutiae point extracting unit 110 can select two aligned lines to calculate an intersection point.

이 때, 특징점 추출부(110)는 산출된 교점을 특징점 후보로 정의할 수 있다. At this time, the feature point extraction unit 110 can define the calculated intersection point as a feature point candidate.

이 때, 특징점 추출부(110)는 특징점 후보를 정의한 선분의 쌍 중에서 두 선분이 이루는 각이 기설정된 값 이상 혹은 이하인 특징점 후보는 제외할 수 있다.In this case, the feature point extracting unit 110 may exclude feature point candidates whose angle formed by the two line segments out of the pair of line segments defining the feature point candidate is greater than or equal to a predetermined value.

즉, 특징점 추출부(110)는 카메라를 너무 기울인 것임으로 기하보정을 해도 영상 보정이 성공할 수 없기 때문에, 의미 없는 특징점 후보로 간주하여 기설정된 값 이상 혹은 이하인 특징점 후보는 제거될 수 있다.That is, since the feature point extracting unit 110 tilts the camera too far, the image correction can not be successfully performed even if the geometric correction is performed. Therefore, the feature point candidate that is equal to or less than a predetermined value can be eliminated.

이 때, 특징점 추출부(110)는 특징점 후보를 제외하고, 남은 특징점 후보들이 사각형을 이루는지 판단하여 각각을 복수개의 특징점들로 추출할 수 있다.At this time, the feature point extracting unit 110 can extract the feature points as a plurality of feature points by judging whether the remaining feature point candidates form a quadrangle, excluding the feature point candidates.

또한, 특징점 추출부(110)는 이중 구조를 검색할 수 있다.In addition, the feature point extraction unit 110 can search for a dual structure.

즉, 특징점 추출부(110)는 도 3에 도시된 바와 같이 외곽선을 기준으로 2개의 사각형(내부, 외부)가 생성되기 때문에, 2개의 사각형과 비슷한 위치에 있는 사각형을 검색할 수 있다.That is, as shown in FIG. 3, the feature point extracting unit 110 can search for a quadrangle at a position similar to two quadrangles, because two quadrangles (inside and outside) are generated based on the outline.

이 때, 특징점 추출부(110)는 정렬된 라인을 두 개씩 선택하여 2개의 사각형을 생성할 수도 있다.At this time, the feature point extracting unit 110 may generate two rectangles by selecting two aligned lines.

이 때, 특징점 추출부(110)는 2개의 사각형 중에 내부의 사각형을 리턴할 수 있다.At this time, the feature point extracting unit 110 may return an inner square among the two rectangles.

이 때, 특징점 추출부(110)는 내부의 사각형의 모서리를 기준으로 최종 특징점들을 추출할 수 있다.At this time, the feature point extracting unit 110 can extract final feature points based on the corners of the inner square.

또한, 특징점 추출부(110)는 approxPolyDP 함수를 이용하여 2개의 사각형을 한번에 처리하여 출력된 트리구조체를 분석하여 최종 특징점들을 추출할 수 있다.In addition, the feature point extraction unit 110 may process the two rectangles at once using the approxPolyDP function, and analyze the output tree structure to extract final feature points.

나아가, 특징점 추출부(110)는 패턴 매칭 모드를 수행하여 추출한 최종 특징점들과 라인 피팅 모드를 수행하여 추출한 최종 특징점들의 정확도를 비교하여 정확도가 높은 특징점들을 결정할 수도 있다.Further, the feature point extracting unit 110 may determine the feature points having high accuracy by comparing the extracted final feature points with the extracted final feature points by performing the line fitting mode.

기하 변경부(120)는 대상체의 영상에 상기 복수개의 특징점들에 기반한 기하 변경을 수행하여 사각형의 영상을 획득할 수 있다.The geometry changing unit 120 may obtain a quadrangle image by performing a geometry change based on the plurality of feature points on an image of a target object.

즉, 기하 변경부(120)는 사각형의 영상을 촬영하였으나 기하 변형이 발생한 경우, 사각형으로 변경할 수 있다.That is, the geometry changing unit 120 captures an image of a quadrangle, but can change it to a quadrangle when geometric deformation occurs.

이 때, 기하 변경부(120)는 4개의 좌표 혹은 4개 이상(영상을 끝부분이 휘어져서 영역별 보정이 필요한 경우)의 복수개의 특징점들의 좌표를 입력 받을 수 있다.At this time, the geometry changing unit 120 may receive the coordinates of a plurality of minutiae points of four coordinates or more than four minutiae (when the end portion of the image is warped and the area-specific correction is necessary).

이 때, 기하 변경부(120)는 입력된 복수개의 특징점들의 좌표에 기반하여 사각형의 영상을 생성할 수 있다.In this case, the geometry changing unit 120 may generate a rectangular image based on the coordinates of the input minutiae points.

색상 변경부(130)는 사각형의 영상을 기설정된 프리셋 파라메터에 기반하여 색상을 변경하여 보정 영상을 출력할 수 있다.The color changing unit 130 may output a corrected image by changing a color based on a predetermined preset parameter of a rectangular image.

색상 변경부(130)는 만약 실내 환경이 변경되는 경우, 기설정된 실내 환경 설정값에 기반하여 프리셋 파라메터를 변경할 수 있다.If the indoor environment is changed, the color changing unit 130 may change the preset parameter based on the predetermined indoor environment setting value.

색상 변경부(130)는 프리셋을 재설정하기 위해 기설정된 채도, 색조, 명암, 대비등의 값으로 기하 보정된 사각형의 영상을 변경할 수 있고, 사용자가 수동으로 설정할 수 도 있다.The color changing unit 130 may change the image of the rectangle geometrically corrected to a value such as predetermined saturation, hue, contrast, contrast, etc. in order to reset the preset, or may be manually set by the user.

이 후, 색상 변경부(130)는 색상 변경된 사각형의 영상을 영상 출력 장치를 이용하여 출력할 수 있다.Thereafter, the color changing unit 130 can output a quadrangle-modified image using the image output device.

영상 출력 장치는 모니터, 스마트폰 화면, 프로젝터 등에 상응할 수 있다.The video output device may correspond to a monitor, a smartphone screen, a projector, and the like.

도 4를 참조하면, 카메라가 펼쳐진 책을 촬영한 것을 알 수 있다.Referring to FIG. 4, it can be seen that the camera has taken the opened book.

도 4에 도시된 바와 같이, 특징점 추출부(110)는 입력된 영상이 책인 경우 BOOK 모드를 선택할 수 있다.As shown in FIG. 4, the feature point extracting unit 110 can select the BOOK mode when the input image is a book.

또한, 특징점 추출부(110)는 선택한 BOOK 모드를 수행할 수 있다.In addition, the feature point extracting unit 110 may perform the selected BOOK mode.

이 때, 특징점 추출부(110)는 먼저 입력된 영상을 분할 할 수 있다.At this time, the feature point extraction unit 110 can divide the input image first.

도 5에 도시된 바와 같이, 특징점 추출부(110)는 영역분할선을 기준으로 좌측은 책의 중앙 부분, 우측의 책의 바깥부분으로 분할하여 영역을 분할할 수 있다.As shown in FIG. 5, the feature point extracting unit 110 may divide the area by dividing the left side into the center part of the book and the outer part of the right side book with reference to the area dividing line.

이 때, 특징점 추출부(110)는 중앙선 및 모서리를 추출할 수 있다.At this time, the feature point extracting unit 110 can extract a center line and a corner.

즉, 특징점 추출부(110)는 먼저 상기 설명한 라인 피팅 및 패턴 매칭을 이용하여 좌측 부분의 중앙선과 우측 부분의 모서리를 추출할 수 있다.That is, the feature point extracting unit 110 may first extract the corners of the center line and the right portion of the left part using the above-described line fitting and pattern matching.

이 때, 특징점 추출부(110)는 책의 한 면만 보정하기 때문에, 중앙선과 모서리는 반드시 각각 1개씩만 추출할 수 있다.At this time, since the feature point extracting unit 110 corrects only one side of the book, only one center line and one corner can be extracted.

또한, 특징점 추출부(110)는 라인 에지를 추출할 수 있다.In addition, the feature point extraction unit 110 can extract a line edge.

이 때, 특징점 추출부(110)는 중앙선 쪽 라인 에지와 모서리 쪽 라인 에지를 각각 추출할 수 있다.At this time, the feature point extracting unit 110 can extract the line edge on the center line and the line edge on the corner, respectively.

이 때, 특징점 추출부(110)는 도 5에 도시된 바와 같이 잘못된 모서리가 추출될 가능성이 있기 때문에, 라인 에지의 변화량에 기반하여 모서리를 새롭게 추출할 수도 있다.At this time, as shown in FIG. 5, the feature point extracting unit 110 may extract an incorrect corner, so that it is possible to newly extract an edge based on the amount of change of the line edge.

또한, 특징점 추출부(110)는 컨트롤 포인트를 삽입할 수 있다.In addition, the feature point extraction unit 110 may insert a control point.

도 6에 도시된 바와 같이, 특징점 추출부(110)는 중앙선 쪽 라인 에지는 책이 많이 휘어져 있는 부분이기 때문에 컨트롤 포인트를 좁게 삽입할 수 있다.As shown in FIG. 6, the feature point extracting unit 110 can insert the control point narrowly because the line edge on the center line is a portion where the book is bent much.

이 때, 특징점 추출부(110)는 모서리 쪽 라인 에지는 책이 적게 휘어져 있는 부분이기 때문에 컨트롤 포인트를 넓게 삽입할 수 있다.At this time, the feature point extracting unit 110 can insert the control point widely because the corner line edge is a portion in which the book is slightly curved.

이 때, 특징점 추출부(110)는 속도 향상을 위해 중앙선 쪽과 모서리 쪽 영역 분리의 콘트롤 포인트를 삽입할 영역을 같은 넓이로 설정할 수도 있다.At this time, the feature point extracting unit 110 may set the area to be inserted with the control point of the center line side and the edge side area separation to the same width for the purpose of improving the speed.

또한, 특징점 추출부(110)는 영역을 분리할 수 있다.In addition, the feature point extracting unit 110 can separate regions.

이 때, 특징점 추출부(110)는 중앙선 쪽 컨트롤 포인트가 삽입된 영역과 모서리 쪽 컨트롤 포인트가 삽입된 영역을 분리하여 각각 기하 변경부(120)에 입력할 수 있다.In this case, the feature point extracting unit 110 may separate the center line control point insertion area and the edge control point insertion area and input them to the geometry changing unit 120, respectively.

기하 변경부(120)는 입력된 컨트롤 포인트에 기반하여 기하곡선 피팅을 수행할 수 있다. The geometry changing unit 120 may perform geometric curve fitting based on the input control point.

이 때, 기하 변경부(120)는 중앙선 쪽 컨트롤 포인트와 모서리 쪽 컨트롤 포인트에 대하여 각각 기하 곡선 피팅을 수행할 수 있다.At this time, the geometry changing unit 120 may perform geometric curve fitting for the center line control point and the corner control point, respectively.

이 때, 기하 변경부(120)는 중앙선 쪽 컨트롤 포인트는 좁게 삽입되어 있으므로 3차원 기하곡선 피팅을 수행할 수 있다.At this time, since the center line control point is inserted narrowly, the geometry changing unit 120 can perform three-dimensional geometric curve fitting.

예를 들어, 기하 변경부(120)는 도 6에 도시된 바와 같이, 중앙선 쪽 영역에서, 컨트롤 포인트들(c1-c2-c7-c6)을 사각형의 영역을 분할하여 기하곡선 피팅을 수행할 수 있다.For example, as shown in FIG. 6, the geometry changing unit 120 may perform geometric curve fitting by dividing a rectangular area of the control points (c1-c2-c7-c6) have.

이 때, 기하 변경부(120)는 컨트롤 포인트들(c2-c3-c8-c7)을 사각형의 영역을 분할하여 기하곡선 피팅을 수행할 수 있다.At this time, the geometry changing unit 120 may perform the geometric curve fitting by dividing the rectangular area of the control points c2-c3-c8-c7.

즉, 기하 변경부(120)는 중앙선에 가장 가까운 컨트롤 포인트부터 우측 방향으로 기설정된 포인트씩 다음 컨트롤 포인트를 선택하면서 사각형의 영역으로 분할하여 기하곡선 피팅을 수행할 수 있다.That is, the geometry changing unit 120 may perform geometric curve fitting by dividing the control point into a rectangular area while selecting the next control point by predetermined points in the right direction from the control point closest to the center line.

또한, 기하 변경부(120)는 모서리 쪽 컨트롤 포인트는 넓게 삽입되어 있으므로 2차원 기하곡선 피팅을 수행할 수 있다.In addition, the geometry changing unit 120 can perform the two-dimensional geometric curve fitting since the corner control point is inserted widely.

나아가, 기하 변경부(120)는 중앙선 쪽 기하곡선 피팅이 완료된 사각형의 영상과 모서리 쪽 기하곡선 피팅이 완료된 사각형의 영상을 결합하여, 도 5에 도시된 검은 영역과 같은 기하곡선 피팅이 완료된 사각형의 영상을 생성할 수 있다.Further, the geometry changing unit 120 may combine the image of the rectangle completing the geometric curve fitting on the center line and the image of the rectangle completing the fitting of the geometric curve on the corner to obtain a rectangle having the same geometric curve fitting as the black region shown in FIG. 5 Images can be generated.

색상 변경부(130)는 사각형의 영상을 기설정된 프리셋 파라메터에 기반하여 색상을 변경하여 보정 영상을 출력할 수 있다.The color changing unit 130 may output a corrected image by changing a color based on a predetermined preset parameter of a rectangular image.

색상 변경부(130)는 만약 실내 환경이 변경되는 경우, 기설정된 실내 환경 설정값에 기반하여 프리셋 파라메터를 변경할 수 있다.If the indoor environment is changed, the color changing unit 130 may change the preset parameter based on the predetermined indoor environment setting value.

색상 변경부(130)는 프리셋을 재설정하기 위해 기설정된 채도, 색조, 명암, 대비등의 값으로 기하 보정된 사각형의 영상을 변경할 수 있고, 사용자가 수동으로 설정할 수 도 있다.The color changing unit 130 may change the image of the rectangle geometrically corrected to a value such as predetermined saturation, hue, contrast, contrast, etc. in order to reset the preset, or may be manually set by the user.

이 후, 색상 변경부(130)는 색상 변경된 사각형의 영상을 영상 출력 장치를 이용하여 출력할 수 있다.Thereafter, the color changing unit 130 can output a quadrangle-modified image using the image output device.

영상 출력 장치는 모니터, 스마트폰 화면, 프로젝터 등에 상응할 수 있다.The video output device may correspond to a monitor, a smartphone screen, a projector, and the like.

도 7은 본 발명의 일실시예에 따른 영상 보정 방법을 나타낸 동작흐름도이다.7 is a flowchart illustrating an image correction method according to an embodiment of the present invention.

도 7을 참조하면, 본 발명의 일실시예에 따른 영상 보정 방법은 먼저 영상을 입력 받을 수 있다(S210).Referring to FIG. 7, an image correction method according to an exemplary embodiment of the present invention may first receive an image (S210).

즉, 단계(S210)는 카메라로부터 촬영된 대상체의 영상을 획득할 수 있다.That is, the step S210 can acquire the image of the object photographed from the camera.

카메라는 스마트폰, 태블릿, 캠코더 및 PC 캠 등 다양한 이미지 및 영상 획득 장치에도 상응할 수 있다.The camera can also correspond to a variety of image and image acquisition devices such as smart phones, tablets, camcorders and PC cams.

또한, 본 발명의 일실시예에 따른 영상 보정 방법은 특징점을 추출할 수 있다(S220).In addition, the image correction method according to an embodiment of the present invention can extract feature points (S220).

즉, 단계(S220)는 대상체 종류에 따라 모드를 선택하여 사각형을 이루는 복수개의 특징점들을 추출할 수 있다.That is, in step S220, a plurality of minutiae forming a quadrangle can be extracted by selecting a mode according to the object type.

이 때, 단계(S220)는 먼저 모드를 선택할 수 있다(S221).At this time, the step S220 may first select the mode (S221).

이 때, 단계(S221)는 에지 추출을 위한 고주파 필터(High Pass Filter)를 이용하여 영상을 필터링 할 수 있다.At this time, in step S221, an image can be filtered using a high pass filter for edge extraction.

이 때, 단계(S221)는 NxM형태의 필터 메트릭스를 생성하여 필터 연산을 수행할 수 있다.At this time, the step S221 may generate the filter matrix of the NxM type to perform the filter operation.

또한, 단계(S221)는 적응적 이진화를 수행할 수 있다.Also, step S221 may perform adaptive binarization.

이 때, 단계(S221)는 이진화 임계값(Tth)을 적응적으로 산출할 수 있다. 예를 들어, 입력 영상은 하얀색 배경위에 다양한 문자 혹은 그림, 표 등이 작성되었다고 가정하면, 단계(S221)는 적응적 이진화를 위하여, 어두운 영역은 고주파 필터의 결과값이 낮을 수 있기 때문에, Tth 를 다른 영역보다 낮게 설정할 수 있다. 이를 위해, 단계(S221)는 전체 영역을 타일 형태로 분리하여 각 영역별 Tth 를 계산할 수 있다. Tth 는 각 영역의 평균 밝기값에 반비례하게 설정될 수 있다.At this time, the binarization threshold T th may be adaptively calculated in step S221. For example, since the input image is because assuming that the various character or figure, table created on white background, to the step (S221) is adaptive binarization, the dark area can lower the result of the high-frequency filter, T th Can be set lower than other regions. For this purpose, in step S221, the entire area can be divided into tiles to calculate T th for each area. T th may be set in inverse proportion to the average brightness value of each region.

이 때, 단계(S221)는 특징점 추출을 위한 대상체의 종류에 따라 모드를 선택할 수 있다.At this time, the step S221 can select a mode according to the type of object for extracting the minutiae.

즉, 단계(S221)는 대상체의 종류에 따라 FLAT 모드, BOARD 모드 및 BOOK 모드 중 어느 하나의 모드를 선택할 수 있다.That is, in step S221, any one of the FLAT mode, the BOARD mode, and the BOOK mode may be selected according to the type of the object.

도 2를 참조하면, 카메라가 A4 용지를 촬영한 것을 알 수 있다.Referring to FIG. 2, it can be seen that the camera has photographed A4 paper.

도 2에 도시된 바와 같이, 단계(S221)는 입력된 영상이 일반적인 A4 용지인 경우 FLAT 모드를 선택할 수 있다(S222).As shown in FIG. 2, in step S221, the FLAT mode can be selected when the input image is a general A4 paper (S222).

또한, 단계(S220)는 선택한 FLAT 모드를 수행할 수 있다(S224).In addition, the step S220 can perform the selected FLAT mode (S224).

이 때, 단계(S224)는 먼저 라인 피팅을 수행할 수 있다(S224a).In this case, step S224 may first perform line fitting (S224a).

라인 피팅은 허프변환 (Hough Transform)을 이용하거나, 임의의 직선으로 매핑하는 최적화 알고리즘이 사용될 수 있다. 이때 매핑된 라인의 길이는 기설정된 길이 이상의 크기인 경우만 사용될 수 있다. 예를 들어 영상의 가로길이 및 세로길이 중 길이가 긴 쪽의 1/5정도를 사용할 수 있다. The line fitting can be an optimization algorithm that uses a Hough Transform or maps to arbitrary straight lines. At this time, the length of the mapped line can be used only when the length is equal to or larger than a predetermined length. For example, one-fifth of the width and length of the image may be used.

또한, 단계(S224)는 라인 정렬을 수행할 수 있다(S224b).In addition, step S224 may perform line alignment (S224b).

즉, 단계(S224b)는 일정 길이 이상의 라인으로 영상을 피팅하면 여러 개의 선분들이 생성될 수 있다. 단계(S224b)는 이 선분들을 순서대로 정렬할 수 있다That is, in step S224b, if an image is fitted to a line having a predetermined length or more, a plurality of line segments can be generated. Step S224b may sort these lines in order

또한, 단계(S224)는 선분들의 교점을 선택할 수 있다(S224c)In addition, step S224 can select the intersection of line segments (S224c)

즉, 단계(S224c)는 정렬된 라인을 두 개씩 선택하여 교점을 산출 할 수 있다.That is, in step S224c, it is possible to calculate the intersection by selecting two aligned lines.

이 때, 단계(S224c)는 산출된 교점을 특징점 후보로 정의할 수 있다. At this time, the calculated intersection point can be defined as a minutia point candidate in step S224c.

이 때, 단계(S224c)는 특징점 후보를 정의한 선분의 쌍 중에서 두 선분이 이루는 각이 기설정된 값 이상 혹은 이하인 특징점 후보는 제외할 수 있다.At this time, step S224c may exclude minutiae candidates whose angle formed by the two line segments out of the pair of line segments defining the minutiae candidate is equal to or less than a preset value.

즉, 단계(S224c)는 카메라를 너무 기울인 것임으로 기하보정을 해도 영상 보정이 성공할 수 없기 때문에, 의미 없는 특징점 후보로 간주하여 기설정된 값 이상 혹은 이하인 특징점 후보는 제거될 수 있다.In other words, since the camera is too tilted in step S224c, the image correction can not be successfully performed even if the geometric correction is performed. Therefore, the minutiae point candidates that are more or less than a predetermined value can be removed by considering them as meaningless minutiae candidates.

이 때, 단계(S224c)는 특징점 후보를 제외하고, 남은 특징점 후보들이 사각형을 이루는지 판단하여 각각을 복수개의 최종 특징점들로 추출할 수 있다.At this time, the step S224c can extract the minutiae candidates as a plurality of final minutiae points, judging whether the remaining minutiae candidates form a quadrangle.

도 3을 참조하면, 카메라가 외곽선이 있는 칠판을 촬영한 것을 알 수 있다.Referring to FIG. 3, it can be seen that the camera photographs a blackboard having an outline.

도 3에 도시된 바와 같이, 단계(S220)는 입력된 영상이 외곽선을 가지고 있는 평면인 경우, BOARD 모드를 선택할 수 있다(S223).As shown in FIG. 3, in step S220, if the input image is a plane having an outline, the BOARD mode can be selected (S223).

또한, 단계(S220)는 선택한 BOARD 모드를 수행할 수 있다(S225).In addition, step S220 may perform the selected BOARD mode (S225).

즉, 단계(S225)는 먼저 패턴 매칭 모드와 라인 피팅 모드 중 어느 하나의 모드를 선택할 수 있다(S225a).That is, the step S225 can select either the pattern matching mode or the line fitting mode (S225a).

이 때, 단계(S225)는 선택한 모드가 패턴 매칭 모드인지 라인 피팅 모드 인지 판단할 수 있다(S225b).At this time, the step S225 can determine whether the selected mode is the pattern matching mode or the line fitting mode (S225b).

이 때, 단계(S225)는 선택한 패턴 매칭 모드를 수행할 수 있다(S225c).In this case, step S225 can perform the selected pattern matching mode (S225c).

이 때, 단계(S225c)는 입력된 대상체의 4개의 코너에 존재하는 특징점들을 가장 중요한 특징점으로 판단할 수 있다.In this case, the step S225c may determine the feature points existing at the four corners of the input object as the most important feature points.

이 때, 단계(S225c)는 4개의 코너의 존재하는 특징점들을 패턴 매칭의 트레이닝셋으로 삽입할 수 있다.At this time, step S225c may insert the existing minutiae of the four corners into the training set of the pattern matching.

이 때, 단계(S225c)는 기설정된 다양한 기울기에 상응하는 정보를 함께 삽입할 수도 있다.At this time, the step S225c may insert information corresponding to various preset slopes.

이 때, 단계(S225c)는 이진화된 영상을 대상으로 하기 때문에 다양한 조명에 대해서는 패턴 매칭을 수행할 필요가 없을 수도 있다.At this time, since the binarized image is targeted at step S225c, it may not be necessary to perform pattern matching for various illumination.

다만, 단계(S225c)는 패턴 매칭을 위하여 다양한 기울기 정보가 입력되어야 하며, 패턴 매칭이 수행된 영상을 본 발명에서 사용하는 알고리즘에 따라 수행한 후 잘라서 넣는다. However, in step S225c, various gradient information must be input for pattern matching, and the pattern-matched image is performed according to an algorithm used in the present invention and then cut and inserted.

즉, 단계(S225c)는 본 발명에서 사용되는 이진화 방법에 의해 이진화된 영상을 가지고 패턴 매칭을 수행하면, 탐색 공간이 작아져 특징점을 정밀하게 찾을 수 있다.That is, if the pattern matching is performed using the binarized image by the binarization method used in the present invention, the search space is reduced and the minutiae can be searched precisely in step S225c.

이 때, 단계(S225c)는 도 3에 도시된 칠판과 같이 끝(모서리)이 둥그런 모양을 입력으로 넣고, 끝이 직각이 경우면, 같은 모양을 실제로 다양한 각도로 사진을 찍어 넣을 수 있다. 끝 부분(모서리)은 어떠한 형태이더라도, 패턴 매칭에 의해 인식될 수 있는 것이면 된다.At this time, in step S225c, as shown in the blackboard shown in FIG. 3, a rounded shape is inserted as an input, and when the end is right-angled, the same shape can be actually photographed at various angles. The end portion (edge) may be any shape, as long as it can be recognized by pattern matching.

이 때, 단계(S225c)는 패턴 매칭에 사용되는 것은 다양한 학습 알고리즘을 사용할 수 있다. At this time, in step S225c, various learning algorithms used for pattern matching can be used.

또한, 단계(S225)는 후보군 후처리를 수행할 수 있다(S225d).In addition, the step S225 may perform the post-candidate group post-processing (S225d).

즉, 단계(S225d)는 패턴 매칭하여 대상체의 형태가 인식 한 이후, 후보군 후처리를 수행하여 특징점의 위치를 찾을 수 있다.That is, after recognizing the shape of the target object by pattern matching, the candidate group post-process is performed to find the location of the minutiae.

이 때, 단계(S225d)는 여러 개의 패턴 매칭된 후보군 중에서 사각형을 이루는 4개의 패턴의 위치를 찾고, 이를 기반으로 코너 위치의 복수개의 최종 특징점들을 추출할 수 있다.In this case, in step S225d, the positions of the four patterns constituting the quadrangular pattern among the pattern matching candidates may be found, and a plurality of final feature points at the corner position may be extracted based on the positions.

또한, 단계(S225)는 선택한 라인 피팅 모드를 수행할 수 있다(S225e).In addition, the step S225 can perform the selected line fitting mode (S225e).

라인 피팅은 허프변환 (Hough Transform)을 이용하거나, 임의의 직선으로 매핑하는 최적화 알고리즘이 사용될 수 있다. 이때 매핑된 라인의 길이는 기설정된 길이 이상의 크기인 경우만 사용될 수 있다. 예를 들어 영상의 가로길이 및 세로길이 중 길이가 긴 쪽의 1/5정도를 사용할 수 있다. The line fitting can be an optimization algorithm that uses a Hough Transform or maps to arbitrary straight lines. At this time, the length of the mapped line can be used only when the length is equal to or larger than a predetermined length. For example, one-fifth of the width and length of the image may be used.

또한, 단계(S225e)는 라인 정렬을 수행할 수 있다.Step S225e may also perform line alignment.

즉, 단계(S225e)는 일정 길이 이상의 라인으로 영상을 피팅하면 여러 개의 선분들이 생성될 수 있다. 단계(S225e)는 선분들을 순서대로 정렬할 수 있다That is, in step S225e, if an image is fitted to a line having a predetermined length or more, a plurality of line segments can be generated. Step S225e may sort the lines in order

이 때, 단계(S225e)는 정렬된 라인을 두 개씩 선택하여 교점을 산출 할 수 있다.At this time, in step S225e, it is possible to calculate the intersection by selecting two aligned lines.

이 때, 단계(S225e)는 산출된 교점을 특징점 후보로 정의할 수 있다. At this time, the calculated intersection point can be defined as a minutia point candidate in step S225e.

이 때, 단계(S225e)는 특징점 후보를 정의한 선분의 쌍 중에서 두 선분이 이루는 각이 기설정된 값 이상 혹은 이하인 특징점 후보는 제외할 수 있다.In this case, in step S225e, minutiae candidates having an angle formed by two line segments out of pairs of line segments that define the minutiae candidate are equal to or less than a predetermined value may be excluded.

즉, 단계(S225e)는 카메라를 너무 기울인 것임으로 기하보정을 해도 영상 보정이 성공할 수 없기 때문에, 의미 없는 특징점 후보로 간주하여 기설정된 값 이상 혹은 이하인 특징점 후보는 제거될 수 있다.In other words, since the camera is too tilted in step S225e, the image correction can not be successfully performed even if the geometric correction is performed. Therefore, the minutiae point candidate that is more or less than a preset value can be eliminated.

이 때, 단계(S225e)는 특징점 후보를 제외하고, 남은 특징점 후보들이 사각형을 이루는지 판단하여 각각을 복수개의 특징점들로 추출할 수 있다.In this case, in step S225e, it is possible to extract each of the minutiae candidates by determining whether the remaining minutiae candidates form a quadrangle, excluding the minutiae candidate.

또한, 단계(S225)는 이중 구조를 검색할 수 있다(S225f).Also, step S225 can retrieve the dual structure (S225f).

즉, 단계(S225f)는 도 3에 도시된 바와 같이 외곽선을 기준으로 2개의 사각형(내부, 외부)가 생성되기 때문에, 2개의 사각형과 비슷한 위치에 있는 사각형을 검색할 수 있다.That is, as shown in FIG. 3, in step S225f, since two rectangles (inside and outside) are generated with respect to the outline, it is possible to retrieve a rectangle at a position similar to two rectangles.

이 때, 단계(S225f)는 정렬된 라인을 두 개씩 선택하여 2개의 사각형을 생성할 수도 있다.At this time, in step S225f, two aligned lines may be selected to generate two rectangles.

이 때, 단계(S225f)는 2개의 사각형 중에 내부의 사각형을 리턴할 수 있다.At this time, step S225f may return an inner square among the two squares.

이 때, 단계(S225f)는 내부의 사각형의 모서리를 기준으로 최종 특징점들을 추출할 수 있다.In this case, the step S225f may extract the final feature points based on the corners of the inner square.

또한, 단계(S225f)는 approxPolyDP 함수를 이용하여 2개의 사각형을 한번에 처리하여 출력된 트리구조체를 분석하여 최종 특징점들을 추출할 수 있다.In addition, in step S225f, the approxPolyDP function may be used to process two squares at a time, and the output tree structure may be analyzed to extract final feature points.

나아가, 단계(S225)는 패턴 매칭 모드를 수행하여 추출한 최종 특징점들과 라인 피팅 모드를 수행하여 추출한 최종 특징점들의 정확도를 비교하여 정확도가 높은 특징점들을 결정할 수도 있다.In addition, the step S225 may determine the minutiae with high accuracy by comparing the extracted final minutiae by performing the pattern matching mode with the accuracy of the extracted minutiae by performing the line fitting mode.

도 4를 참조하면, 카메라가 펼쳐진 책을 촬영한 것을 알 수 있다.Referring to FIG. 4, it can be seen that the camera has taken the opened book.

도 4에 도시된 바와 같이, 단계(S220)는 입력된 영상이 책인 경우 BOOK 모드를 선택할 수 있다(S223).As shown in FIG. 4, in step S220, the BOOK mode can be selected when the input image is a book (S223).

또한, 단계(S220)는 선택한 BOOK 모드를 수행할 수 있다(S226).In addition, the step S220 can perform the selected BOOK mode (S226).

이 때, 단계(S226)는 먼저 입력된 영상을 분할 할 수 있다(S226a).In this case, in step S226, the input image can be divided first (S226a).

도 5에 도시된 바와 같이, 단계(S226a)는 영역분할선을 기준으로 좌측은 책의 중앙 부분, 우측의 책의 바깥부분으로 분할하여 영역을 분할할 수 있다.As shown in Fig. 5, in step S226a, the area can be divided by dividing the center part of the book, the outer part of the book on the right side, and the outer part of the book on the basis of the area dividing line.

이 때, 단계(S226)는 중앙선 및 모서리를 추출할 수 있다(S226b).At this time, the center line and the corner can be extracted in step S226 (S226b).

즉, 단계(S226b)는 먼저 상기 설명한 라인 피팅 및 패턴 매칭을 이용하여 좌측 부분의 중앙선과 우측 부분의 모서리를 추출할 수 있다.That is, in step S226b, first, the edge of the center line and the right part of the left part can be extracted using the above-described line fitting and pattern matching.

이 때, 단계(S226b)는 책의 한 면만 보정하기 때문에, 중앙선과 모서리는 반드시 각각 1개씩만 추출할 수 있다.At this time, since only one side of the book is corrected in step S226b, only one center line and one corner can be extracted.

또한, 단계(S226)는 라인 에지를 추출할 수 있다(S226c).In addition, the line edge can be extracted in step S226 (S226c).

즉, 단계(S226c)는 중앙선 쪽 라인 에지와 모서리 쪽 라인 에지를 각각 추출할 수 있다.In other words, step S226c can extract the line edge on the center line and the line edge on the corner, respectively.

이 때, 단계(S226c)는 도 5에 도시된 바와 같이 잘못된 모서리가 추출될 가능성이 있기 때문에, 라인 에지의 변화량에 기반하여 모서리를 새롭게 추출할 수도 있다.At this time, since the erroneous edge may be extracted as shown in FIG. 5, the edge may be newly extracted based on the amount of change of the line edge in step S226c.

또한, 단계(S226)는 컨트롤 포인트를 삽입할 수 있다(S226d).In addition, the control point can be inserted in the step S226 (S226d).

도 6에 도시된 바와 같이, 단계(S226d)는 중앙선 쪽 라인 에지는 책이 많이 휘어져 있는 부분이기 때문에 컨트롤 포인트를 좁게 삽입할 수 있다.As shown in Fig. 6, in step S226d, the control point can be inserted narrowly because the line edge on the center line is a portion where the book is bent much.

이 때, 단계(S226d)는 모서리 쪽 라인 에지는 책이 적게 휘어져 있는 부분이기 때문에 컨트롤 포인트를 넓게 삽입할 수 있다.At this time, in step S226d, since the corner edge line is a portion where the book is slightly curved, the control point can be inserted widely.

이 때, 단계(S226d)는 속도 향상을 위해 중앙선 쪽과 모서리 쪽 영역 분리의 콘트롤 포인트를 삽입할 영역을 같은 넓이로 설정할 수도 있다.At this time, in order to improve the speed, the step S226d may set the area for inserting the control points of the center line side and the edge side area separation to the same width.

또한, 단계(S226)는 영역을 분리할 수 있다(S226e).In addition, the step S226 can separate the regions (S226e).

즉, 단계(S226e)는 중앙선 쪽 컨트롤 포인트가 삽입된 영역과 모서리 쪽 컨트롤 포인트가 삽입된 영역을 분리하여 입력할 수 있다.That is, in step S226e, the area where the center line control point is inserted and the area where the corner side control point is inserted may be separately input.

또한, 본 발명의 일실시예에 따른 영상 보정 방법은 기하 변경을 수행할 수 있다(S230).In addition, the image correction method according to an embodiment of the present invention may perform the geometric change (S230).

즉, 단계(S230)는 모드 선택에 따라 입력된 복수의 특징점들 및 컨트롤 포인트들에 기반하여 기하곡선 피팅을 수행할 수 있다.That is, the step S230 may perform the geometric curve fitting based on the plurality of minutiae points and control points input according to the mode selection.

이 때, 단계(S230)는 영상 보정을 위해 선택된 모드가 FLAT 모드 및 BOARD 모드 중 어느 하나의 모드 인 경우, 대상체의 영상에 상기 복수개의 특징점들에 기반한 기하 변경을 수행하여 사각형의 영상을 획득할 수 있다.In this case, when the mode selected for image correction is one of the FLAT mode and the BOARD mode, the image of the object is subjected to the geometric change based on the plurality of feature points to acquire a quadrangle image .

이 때, 단계(S230)는 사각형의 영상을 촬영하였으나 기하 변형이 발생한 경우, 사각형으로 변경할 수 있다.At this time, if a rectangular image is taken in step S230 but a geometric distortion has occurred, it may be changed to a rectangle.

이 때, 단계(S230)는 4개의 좌표 혹은 4개 이상(영상을 끝부분이 휘어져서 영역별 보정이 필요한 경우)의 복수개의 특징점들의 좌표를 입력 받을 수 있다.At this time, the coordinates of the plurality of minutiae points of the four coordinates or four or more minutiae of the image (when the end portion of the image is warped and the region-specific correction is necessary) may be inputted in step S230.

이 때, 단계(S230)는 입력된 복수개의 특징점들의 좌표에 기반하여 사각형의 영상을 생성할 수 있다.At this time, the step S230 may generate a quadrangle image based on the coordinates of the input minutiae points.

또한, 단계(S230)는 영상 보정을 위해 선택된 모드가 BOOK 모드인 경우, 입력된 컨트롤 포인트에 기반하여 기하곡선 피팅을 수행할 수 있다.In step S230, if the mode selected for image correction is the BOOK mode, geometric curve fitting may be performed based on the input control point.

이 때, 단계(S230)는 중앙선 쪽 컨트롤 포인트와 모서리 쪽 컨트롤 포인트에 대하여 각각 기하 곡선 피팅을 수행할 수 있다.In this case, step S230 may perform geometric curve fitting for the center line control point and the corner control point, respectively.

이 때, 단계(S230)는 중앙선 쪽 컨트롤 포인트는 좁게 삽입되어 있으므로 3차원 기하곡선 피팅을 수행할 수 있다.At this time, since the control point on the center line is inserted narrowly in step S230, fitting of the three-dimensional geometric curve can be performed.

예를 들어, 단계(S230)는 도 6에 도시된 바와 같이, 중앙선 쪽 영역에서, 컨트롤 포인트들(c1-c2-c7-c6)을 사각형의 영역을 분할하여 기하곡선 피팅을 수행할 수 있다.For example, in step S230, as shown in FIG. 6, geometric curve fitting can be performed by dividing the rectangular area of the control points c1-c2-c7-c6 in the center line area.

이 때, 단계(S230)는 컨트롤 포인트들(c2-c3-c8-c7)을 사각형의 영역을 분할하여 기하곡선 피팅을 수행할 수 있다.In this case, step S230 may perform geometric curve fitting by dividing the rectangular area of the control points c2-c3-c8-c7.

즉, 단계(S230)는 중앙선에 가장 가까운 컨트롤 포인트부터 우측 방향으로 기설정된 포인트씩 다음 컨트롤 포인트를 선택하면서 사각형의 영역으로 분할하여 기하곡선 피팅을 수행할 수 있다.That is, in step S230, geometric curve fitting can be performed by dividing the control point into a rectangular area while selecting the next control point by preset points from the control point closest to the center line to the right.

또한, 단계(S230)는 모서리 쪽 컨트롤 포인트는 넓게 삽입되어 있으므로 2차원 기하곡선 피팅을 수행할 수 있다.In step S230, the two-dimensional geometric curve fitting can be performed since the corner control point is widely inserted.

나아가, 단계(S230)는 중앙선 쪽 기하곡선 피팅이 완료된 사각형의 영상과 모서리 쪽 기하곡선 피팅이 완료된 사각형의 영상을 결합하여, 도 5에 도시된 검은 영역과 같은 기하곡선 피팅이 완료된 사각형의 영상을 생성할 수 있다.Further, in step S230, a rectangle image of which the fitting of the center curve is completed is combined with a rectangle image of which the fitting of the geometric curve on the corner side is completed, and a rectangle image of which geometric curve fitting like the black area shown in FIG. Can be generated.

또한, 본 발명의 일실시예에 따른 영상 보정 방법은 색상을 변경할 수 있다(S240).In addition, the image correction method according to an embodiment of the present invention may change the color (S240).

즉, 단계(S240)는 사각형의 영상을 기설정된 프리셋 파라메터에 기반하여 색상을 변경할 수 있다.That is, in step S240, the color of the quadrangle image can be changed based on preset preset parameters.

이 때, 단계(S240)는 만약 실내 환경이 변경되는 경우, 기설정된 실내 환경 설정값에 기반하여 프리셋 파라메터를 변경할 수 있다.In this case, in step S240, if the indoor environment is changed, the preset parameter may be changed based on the predetermined indoor environment setting value.

이 때, 단계(S240)는 프리셋을 재설정하기 위해 기설정된 채도, 색조, 명암, 대비등의 값으로 기하 보정된 사각형의 영상을 변경할 수 있고, 사용자가 수동으로 설정할 수 도 있다.At this time, the step S240 may change the image of the rectangle geometrically corrected to a predetermined saturation, hue, contrast, contrast or the like so as to reset the preset, or may be manually set by the user.

또한, 본 발명의 일실시예에 따른 영상 보정 방법은 영상을 출력할 수 있다(S250).In addition, the image correction method according to an embodiment of the present invention may output an image (S250).

즉, 단계(S250)는 색상 변경된 사각형의 영상을 영상 출력 장치를 이용하여 출력할 수 있다.That is, in step S250, the image of the quadrangled color can be output using the image output device.

영상 출력 장치는 모니터, 스마트폰 화면, 프로젝터 등에 상응할 수 있다.The video output device may correspond to a monitor, a smartphone screen, a projector, and the like.

도 8은 도 7에 도시된 특징점 추출 단계의 일 예를 세부적으로 나타낸 동작흐름도이다.FIG. 8 is an operation flowchart illustrating in detail an example of the feature point extracting step shown in FIG.

도 8을 참조하면, 단계(S220)는 먼저 모드를 선택할 수 있다(S221).Referring to FIG. 8, step S220 may first select a mode (S221).

이 때, 단계(S221)는 에지 추출을 위한 고주파 필터(High Pass Filter)를 이용하여 영상을 필터링 할 수 있다.At this time, in step S221, an image can be filtered using a high pass filter for edge extraction.

이 때, 단계(S221)는 NxM형태의 필터 메트릭스를 생성하여 필터 연산을 수행할 수 있다.At this time, the step S221 may generate the filter matrix of the NxM type to perform the filter operation.

또한, 단계(S221)는 적응적 이진화를 수행할 수 있다.Also, step S221 may perform adaptive binarization.

이 때, 단계(S221)는 이진화 임계값(Tth)을 적응적으로 산출할 수 있다. 예를 들어, 입력 영상은 하얀색 배경위에 다양한 문자 혹은 그림, 표 등이 작성되었다고 가정하면, 단계(S221)는 적응적 이진화를 위하여, 어두운 영역은 고주파 필터의 결과값이 낮을 수 있기 때문에, Tth 를 다른 영역보다 낮게 설정할 수 있다. 이를 위해, 단계(S221)는 전체 영역을 타일 형태로 분리하여 각 영역별 Tth 를 계산할 수 있다. Tth 는 각 영역의 평균 밝기값에 반비례하게 설정될 수 있다.At this time, the binarization threshold T th may be adaptively calculated in step S221. For example, since the input image is because assuming that the various character or figure, table created on white background, to the step (S221) is adaptive binarization, the dark area can lower the result of the high-frequency filter, T th Can be set lower than other regions. For this purpose, in step S221, the entire area can be divided into tiles to calculate T th for each area. T th may be set in inverse proportion to the average brightness value of each region.

이 때, 단계(S221)는 특징점 추출을 위한 대상체의 종류에 따라 모드를 선택할 수 있다.At this time, the step S221 can select a mode according to the type of object for extracting the minutiae.

즉, 단계(S221)는 대상체의 종류에 따라 FLAT 모드, BOARD 모드 및 BOOK 모드 중 어느 하나의 모드를 선택할 수 있다.That is, in step S221, any one of the FLAT mode, the BOARD mode, and the BOOK mode may be selected according to the type of the object.

도 2를 참조하면, 카메라가 A4 용지를 촬영한 것을 알 수 있다.Referring to FIG. 2, it can be seen that the camera has photographed A4 paper.

도 2에 도시된 바와 같이, 단계(S221)는 입력된 영상이 일반적인 A4 용지인 경우 FLAT 모드를 선택할 수 있다(S222).As shown in FIG. 2, in step S221, the FLAT mode can be selected when the input image is a general A4 paper (S222).

또한, 단계(S220)는 선택한 FLAT 모드를 수행할 수 있다(S224).In addition, the step S220 can perform the selected FLAT mode (S224).

이 때, 단계(S224)는 먼저 라인 피팅을 수행할 수 있다(S224a).In this case, step S224 may first perform line fitting (S224a).

라인 피팅은 허프변환 (Hough Transform)을 이용하거나, 임의의 직선으로 매핑하는 최적화 알고리즘이 사용될 수 있다. 이때 매핑된 라인의 길이는 기설정된 길이 이상의 크기인 경우만 사용될 수 있다. 예를 들어 영상의 가로길이 및 세로길이 중 길이가 긴 쪽의 1/5정도를 사용할 수 있다. The line fitting can be an optimization algorithm that uses a Hough Transform or maps to arbitrary straight lines. At this time, the length of the mapped line can be used only when the length is equal to or larger than a predetermined length. For example, one-fifth of the width and length of the image may be used.

또한, 단계(S224)는 라인 정렬을 수행할 수 있다(S224b).In addition, step S224 may perform line alignment (S224b).

즉, 단계(S224b)는 일정 길이 이상의 라인으로 영상을 피팅하면 여러 개의 선분들이 생성될 수 있다. 단계(S224b)는 이 선분들을 순서대로 정렬할 수 있다That is, in step S224b, if an image is fitted to a line having a predetermined length or more, a plurality of line segments can be generated. Step S224b may sort these lines in order

또한, 단계(S224)는 선분들의 교점을 선택할 수 있다(S224c)In addition, step S224 can select the intersection of line segments (S224c)

즉, 단계(S224c)는 정렬된 라인을 두 개씩 선택하여 교점을 산출 할 수 있다.That is, in step S224c, it is possible to calculate the intersection by selecting two aligned lines.

이 때, 단계(S224c)는 산출된 교점을 특징점 후보로 정의할 수 있다. At this time, the calculated intersection point can be defined as a minutia point candidate in step S224c.

이 때, 단계(S224c)는 특징점 후보를 정의한 선분의 쌍 중에서 두 선분이 이루는 각이 기설정된 값 이상 혹은 이하인 특징점 후보는 제외할 수 있다.At this time, step S224c may exclude minutiae candidates whose angle formed by the two line segments out of the pair of line segments defining the minutiae candidate is equal to or less than a preset value.

즉, 단계(S224c)는 카메라를 너무 기울인 것임으로 기하보정을 해도 영상 보정이 성공할 수 없기 때문에, 의미 없는 특징점 후보로 간주하여 기설정된 값 이상 혹은 이하인 특징점 후보는 제거될 수 있다.In other words, since the camera is too tilted in step S224c, the image correction can not be successfully performed even if the geometric correction is performed. Therefore, the minutiae point candidates that are more or less than a predetermined value can be removed by considering them as meaningless minutiae candidates.

이 때, 단계(S224c)는 특징점 후보를 제외하고, 남은 특징점 후보들이 사각형을 이루는지 판단하여 각각을 복수개의 최종 특징점들로 추출할 수 있다.At this time, the step S224c can extract the minutiae candidates as a plurality of final minutiae points, judging whether the remaining minutiae candidates form a quadrangle.

도 3을 참조하면, 카메라가 외곽선이 있는 칠판을 촬영한 것을 알 수 있다.Referring to FIG. 3, it can be seen that the camera photographs a blackboard having an outline.

도 3에 도시된 바와 같이, 단계(S220)는 입력된 영상이 외곽선을 가지고 있는 평면인 경우, BOARD 모드를 선택할 수 있다(S223).As shown in FIG. 3, in step S220, if the input image is a plane having an outline, the BOARD mode can be selected (S223).

또한, 단계(S220)는 선택한 BOARD 모드를 수행할 수 있다(S225).In addition, step S220 may perform the selected BOARD mode (S225).

즉, 단계(S225)는 먼저 패턴 매칭 모드와 라인 피팅 모드 중 어느 하나의 모드를 선택할 수 있다(S225a).That is, the step S225 can select either the pattern matching mode or the line fitting mode (S225a).

이 때, 단계(S225)는 선택한 모드가 패턴 매칭 모드인지 라인 피팅 모드 인지 판단할 수 있다(S225b).At this time, the step S225 can determine whether the selected mode is the pattern matching mode or the line fitting mode (S225b).

이 때, 단계(S225)는 선택한 패턴 매칭 모드를 수행할 수 있다(S225c).In this case, step S225 can perform the selected pattern matching mode (S225c).

이 때, 단계(S225c)는 입력된 대상체의 4개의 코너에 존재하는 특징점들을 가장 중요한 특징점으로 판단할 수 있다.In this case, the step S225c may determine the feature points existing at the four corners of the input object as the most important feature points.

이 때, 단계(S225c)는 4개의 코너의 존재하는 특징점들을 패턴 매칭의 트레이닝셋으로 삽입할 수 있다.At this time, step S225c may insert the existing minutiae of the four corners into the training set of the pattern matching.

이 때, 단계(S225c)는 기설정된 다양한 기울기에 상응하는 정보를 함께 삽입할 수도 있다.At this time, the step S225c may insert information corresponding to various preset slopes.

이 때, 단계(S225c)는 이진화된 영상을 대상으로 하기 때문에 다양한 조명에 대해서는 패턴 매칭을 수행할 필요가 없을 수도 있다.At this time, since the binarized image is targeted at step S225c, it may not be necessary to perform pattern matching for various illumination.

다만, 단계(S225c)는 패턴 매칭을 위하여 다양한 기울기 정보가 입력되어야 하며, 패턴 매칭이 수행된 영상을 본 발명에서 사용하는 알고리즘에 따라 수행한 후 잘라서 넣는다. However, in step S225c, various gradient information must be input for pattern matching, and the pattern-matched image is performed according to an algorithm used in the present invention and then cut and inserted.

즉, 단계(S225c)는 본 발명에서 사용되는 이진화 방법에 의해 이진화된 영상을 가지고 패턴 매칭을 수행하면, 탐색 공간이 작아져 특징점을 정밀하게 찾을 수 있다.That is, if the pattern matching is performed using the binarized image by the binarization method used in the present invention, the search space is reduced and the minutiae can be searched precisely in step S225c.

이 때, 단계(S225c)는 도 3에 도시된 칠판과 같이 끝(모서리)이 둥그런 모양을 입력으로 넣고, 끝이 직각이 경우면, 같은 모양을 실제로 다양한 각도로 사진을 찍어 넣을 수 있다. 끝 부분(모서리)은 어떠한 형태이더라도, 패턴 매칭에 의해 인식될 수 있는 것이면 된다.At this time, in step S225c, as shown in the blackboard shown in FIG. 3, a rounded shape is inserted as an input, and when the end is right-angled, the same shape can be actually photographed at various angles. The end portion (edge) may be any shape, as long as it can be recognized by pattern matching.

이 때, 단계(S225c)는 패턴 매칭에 사용되는 것은 다양한 학습 알고리즘을 사용할 수 있다. At this time, in step S225c, various learning algorithms used for pattern matching can be used.

또한, 단계(S225)는 후보군 후처리를 수행할 수 있다(S225d).In addition, the step S225 may perform the post-candidate group post-processing (S225d).

즉, 단계(S225d)는 패턴 매칭하여 대상체의 형태가 인식 한 이후, 후보군 후처리를 수행하여 특징점의 위치를 찾을 수 있다.That is, after recognizing the shape of the target object by pattern matching, the candidate group post-process is performed to find the location of the minutiae.

이 때, 단계(S225d)는 여러 개의 패턴 매칭된 후보군 중에서 사각형을 이루는 4개의 패턴의 위치를 찾고, 이를 기반으로 코너 위치의 복수개의 최종 특징점들을 추출할 수 있다.In this case, in step S225d, the positions of the four patterns constituting the quadrangular pattern among the pattern matching candidates may be found, and a plurality of final feature points at the corner position may be extracted based on the positions.

또한, 단계(S225)는 선택한 라인 피팅 모드를 수행할 수 있다(S225e).In addition, the step S225 can perform the selected line fitting mode (S225e).

라인 피팅은 허프변환 (Hough Transform)을 이용하거나, 임의의 직선으로 매핑하는 최적화 알고리즘이 사용될 수 있다. 이때 매핑된 라인의 길이는 기설정된 길이 이상의 크기인 경우만 사용될 수 있다. 예를 들어 영상의 가로길이 및 세로길이 중 길이가 긴 쪽의 1/5정도를 사용할 수 있다. The line fitting can be an optimization algorithm that uses a Hough Transform or maps to arbitrary straight lines. At this time, the length of the mapped line can be used only when the length is equal to or larger than a predetermined length. For example, one-fifth of the width and length of the image may be used.

또한, 단계(S225e)는 라인 정렬을 수행할 수 있다.Step S225e may also perform line alignment.

즉, 단계(S225e)는 일정 길이 이상의 라인으로 영상을 피팅하면 여러 개의 선분들이 생성될 수 있다. 단계(S225e)는 선분들을 순서대로 정렬할 수 있다That is, in step S225e, if an image is fitted to a line having a predetermined length or more, a plurality of line segments can be generated. Step S225e may sort the lines in order

이 때, 단계(S225e)는 정렬된 라인을 두 개씩 선택하여 교점을 산출 할 수 있다.At this time, in step S225e, it is possible to calculate the intersection by selecting two aligned lines.

이 때, 단계(S225e)는 산출된 교점을 특징점 후보로 정의할 수 있다. At this time, the calculated intersection point can be defined as a minutia point candidate in step S225e.

이 때, 단계(S225e)는 특징점 후보를 정의한 선분의 쌍 중에서 두 선분이 이루는 각이 기설정된 값 이상 혹은 이하인 특징점 후보는 제외할 수 있다.In this case, in step S225e, minutiae candidates having an angle formed by two line segments out of pairs of line segments that define the minutiae candidate are equal to or less than a predetermined value may be excluded.

즉, 단계(S225e)는 카메라를 너무 기울인 것임으로 기하보정을 해도 영상 보정이 성공할 수 없기 때문에, 의미 없는 특징점 후보로 간주하여 기설정된 값 이상 혹은 이하인 특징점 후보는 제거될 수 있다.In other words, since the camera is too tilted in step S225e, the image correction can not be successfully performed even if the geometric correction is performed. Therefore, the minutiae point candidate that is more or less than a preset value can be eliminated.

이 때, 단계(S225e)는 특징점 후보를 제외하고, 남은 특징점 후보들이 사각형을 이루는지 판단하여 각각을 복수개의 특징점들로 추출할 수 있다.In this case, in step S225e, it is possible to extract each of the minutiae candidates by determining whether the remaining minutiae candidates form a quadrangle, excluding the minutiae candidate.

또한, 단계(S225)는 이중 구조를 검색할 수 있다(S225f).Also, step S225 can retrieve the dual structure (S225f).

즉, 단계(S225f)는 도 3에 도시된 바와 같이 외곽선을 기준으로 2개의 사각형(내부, 외부)가 생성되기 때문에, 2개의 사각형과 비슷한 위치에 있는 사각형을 검색할 수 있다.That is, as shown in FIG. 3, in step S225f, since two rectangles (inside and outside) are generated with respect to the outline, it is possible to retrieve a rectangle at a position similar to two rectangles.

이 때, 단계(S225f)는 정렬된 라인을 두 개씩 선택하여 2개의 사각형을 생성할 수도 있다.At this time, in step S225f, two aligned lines may be selected to generate two rectangles.

이 때, 단계(S225f)는 2개의 사각형 중에 내부의 사각형을 리턴할 수 있다.At this time, step S225f may return an inner square among the two squares.

이 때, 단계(S225f)는 내부의 사각형의 모서리를 기준으로 최종 특징점들을 추출할 수 있다.In this case, the step S225f may extract the final feature points based on the corners of the inner square.

또한, 단계(S225f)는 approxPolyDP 함수를 이용하여 2개의 사각형을 한번에 처리하여 출력된 트리구조체를 분석하여 최종 특징점들을 추출할 수 있다.In addition, in step S225f, the approxPolyDP function may be used to process two squares at a time, and the output tree structure may be analyzed to extract final feature points.

나아가, 단계(S225)는 패턴 매칭 모드를 수행하여 추출한 최종 특징점들과 라인 피팅 모드를 수행하여 추출한 최종 특징점들의 정확도를 비교하여 정확도가 높은 특징점들을 결정할 수도 있다.In addition, the step S225 may determine the minutiae with high accuracy by comparing the extracted final minutiae by performing the pattern matching mode with the accuracy of the extracted minutiae by performing the line fitting mode.

도 4를 참조하면, 카메라가 펼쳐진 책을 촬영한 것을 알 수 있다.Referring to FIG. 4, it can be seen that the camera has taken the opened book.

도 4에 도시된 바와 같이, 단계(S220)는 입력된 영상이 책인 경우 BOOK 모드를 선택할 수 있다(S223).As shown in FIG. 4, in step S220, the BOOK mode can be selected when the input image is a book (S223).

또한, 단계(S220)는 선택한 BOOK 모드를 수행할 수 있다(S226).In addition, the step S220 can perform the selected BOOK mode (S226).

이 때, 단계(S226)는 먼저 입력된 영상을 분할 할 수 있다(S226a).In this case, in step S226, the input image can be divided first (S226a).

도 5에 도시된 바와 같이, 단계(S226a)는 영역분할선을 기준으로 좌측은 책의 중앙 부분, 우측의 책의 바깥부분으로 분할하여 영역을 분할할 수 있다.As shown in Fig. 5, in step S226a, the area can be divided by dividing the center part of the book, the outer part of the book on the right side, and the outer part of the book on the basis of the area dividing line.

이 때, 단계(S226)는 중앙선 및 모서리를 추출할 수 있다(S226b).At this time, the center line and the corner can be extracted in step S226 (S226b).

즉, 단계(S226b)는 먼저 상기 설명한 라인 피팅 및 패턴 매칭을 이용하여 좌측 부분의 중앙선과 우측 부분의 모서리를 추출할 수 있다.That is, in step S226b, first, the edge of the center line and the right part of the left part can be extracted using the above-described line fitting and pattern matching.

이 때, 단계(S226b)는 책의 한 면만 보정하기 때문에, 중앙선과 모서리는 반드시 각각 1개씩만 추출할 수 있다.At this time, since only one side of the book is corrected in step S226b, only one center line and one corner can be extracted.

또한, 단계(S226)는 라인 에지를 추출할 수 있다(S226c).In addition, the line edge can be extracted in step S226 (S226c).

즉, 단계(S226c)는 중앙선 쪽 라인 에지와 모서리 쪽 라인 에지를 각각 추출할 수 있다.In other words, step S226c can extract the line edge on the center line and the line edge on the corner, respectively.

이 때, 단계(S226c)는 도 5에 도시된 바와 같이 잘못된 모서리가 추출될 가능성이 있기 때문에, 라인 에지의 변화량에 기반하여 모서리를 새롭게 추출할 수도 있다.At this time, since the erroneous edge may be extracted as shown in FIG. 5, the edge may be newly extracted based on the amount of change of the line edge in step S226c.

또한, 단계(S226)는 컨트롤 포인트를 삽입할 수 있다(S226d).In addition, the control point can be inserted in the step S226 (S226d).

도 6에 도시된 바와 같이, 단계(S226d)는 중앙선 쪽 라인 에지는 책이 많이 휘어져 있는 부분이기 때문에 컨트롤 포인트를 좁게 삽입할 수 있다.As shown in Fig. 6, in step S226d, the control point can be inserted narrowly because the line edge on the center line is a portion where the book is bent much.

이 때, 단계(S226d)는 모서리 쪽 라인 에지는 책이 적게 휘어져 있는 부분이기 때문에 컨트롤 포인트를 넓게 삽입할 수 있다.At this time, in step S226d, since the corner edge line is a portion where the book is slightly curved, the control point can be inserted widely.

이 때, 단계(S226d)는 속도 향상을 위해 중앙선 쪽과 모서리 쪽 영역 분리의 콘트롤 포인트를 삽입할 영역을 같은 넓이로 설정할 수도 있다.At this time, in order to improve the speed, the step S226d may set the area for inserting the control points of the center line side and the edge side area separation to the same width.

또한, 단계(S226)는 영역을 분리할 수 있다(S226e).In addition, the step S226 can separate the regions (S226e).

즉, 단계(S226e)는 중앙선 쪽 컨트롤 포인트가 삽입된 영역과 모서리 쪽 컨트롤 포인트가 삽입된 영역을 분리하여 입력할 수 있다.That is, in step S226e, the area where the center line control point is inserted and the area where the corner side control point is inserted may be separately input.

도 9는 도 8에 도시된 FLAT 모드 수행 단계의 일 예를 세부적으로 나타낸 동작흐름도이다.FIG. 9 is an operation flowchart illustrating an exemplary FLAT mode execution step shown in FIG. 8 in detail.

도 9를 참조하면, 단계(S224)는 먼저 라인 피팅을 수행할 수 있다(S224a).Referring to FIG. 9, step S224 may first perform line fitting (S224a).

라인 피팅은 허프변환 (Hough Transform)을 이용하거나, 임의의 직선으로 매핑하는 최적화 알고리즘이 사용될 수 있다. 이때 매핑된 라인의 길이는 기설정된 길이 이상의 크기인 경우만 사용될 수 있다. 예를 들어 영상의 가로길이 및 세로길이 중 길이가 긴 쪽의 1/5정도를 사용할 수 있다. The line fitting can be an optimization algorithm that uses a Hough Transform or maps to arbitrary straight lines. At this time, the length of the mapped line can be used only when the length is equal to or larger than a predetermined length. For example, one-fifth of the width and length of the image may be used.

또한, 단계(S224)는 라인 정렬을 수행할 수 있다(S224b).In addition, step S224 may perform line alignment (S224b).

즉, 단계(S224b)는 일정 길이 이상의 라인으로 영상을 피팅하면 여러 개의 선분들이 생성될 수 있다. 단계(S224b)는 이 선분들을 순서대로 정렬할 수 있다That is, in step S224b, if an image is fitted to a line having a predetermined length or more, a plurality of line segments can be generated. Step S224b may sort these lines in order

또한, 단계(S224)는 선분들의 교점을 선택할 수 있다(S224c)In addition, step S224 can select the intersection of line segments (S224c)

즉, 단계(S224c)는 정렬된 라인을 두 개씩 선택하여 교점을 산출 할 수 있다.That is, in step S224c, it is possible to calculate the intersection by selecting two aligned lines.

이 때, 단계(S224c)는 산출된 교점을 특징점 후보로 정의할 수 있다. At this time, the calculated intersection point can be defined as a minutia point candidate in step S224c.

이 때, 단계(S224c)는 특징점 후보를 정의한 선분의 쌍 중에서 두 선분이 이루는 각이 기설정된 값 이상 혹은 이하인 특징점 후보는 제외할 수 있다.At this time, step S224c may exclude minutiae candidates whose angle formed by the two line segments out of the pair of line segments defining the minutiae candidate is equal to or less than a preset value.

즉, 단계(S224c)는 카메라를 너무 기울인 것임으로 기하보정을 해도 영상 보정이 성공할 수 없기 때문에, 의미 없는 특징점 후보로 간주하여 기설정된 값 이상 혹은 이하인 특징점 후보는 제거될 수 있다.In other words, since the camera is too tilted in step S224c, the image correction can not be successfully performed even if the geometric correction is performed. Therefore, the minutiae point candidates that are more or less than a predetermined value can be removed by considering them as meaningless minutiae candidates.

이 때, 단계(S224c)는 특징점 후보를 제외하고, 남은 특징점 후보들이 사각형을 이루는지 판단하여 각각을 복수개의 최종 특징점들로 추출할 수 있다.At this time, the step S224c can extract the minutiae candidates as a plurality of final minutiae points, judging whether the remaining minutiae candidates form a quadrangle.

도 10은 도 8에 도시된 BOARD 모드 수행 단계의 일 예를 세부적으로 나타낸 동작흐름도이다.FIG. 10 is an operation flow chart illustrating an example of the BOARD mode execution step shown in FIG. 8 in detail.

도 10을 참조하면, 단계(S225)는 먼저 패턴 매칭 모드와 라인 피팅 모드 중 어느 하나의 모드를 선택할 수 있다(S225a).Referring to FIG. 10, in step S225, the pattern matching mode and the line fitting mode may be selected first (S225a).

이 때, 단계(S225)는 선택한 모드가 패턴 매칭 모드인지 라인 피팅 모드 인지 판단할 수 있다(S225b).At this time, the step S225 can determine whether the selected mode is the pattern matching mode or the line fitting mode (S225b).

이 때, 단계(S225)는 선택한 패턴 매칭 모드를 수행할 수 있다(S225c).In this case, step S225 can perform the selected pattern matching mode (S225c).

이 때, 단계(S225c)는 입력된 대상체의 4개의 코너에 존재하는 특징점들을 가장 중요한 특징점으로 판단할 수 있다.In this case, the step S225c may determine the feature points existing at the four corners of the input object as the most important feature points.

이 때, 단계(S225c)는 4개의 코너의 존재하는 특징점들을 패턴 매칭의 트레이닝셋으로 삽입할 수 있다.At this time, step S225c may insert the existing minutiae of the four corners into the training set of the pattern matching.

이 때, 단계(S225c)는 기설정된 다양한 기울기에 상응하는 정보를 함께 삽입할 수도 있다.At this time, the step S225c may insert information corresponding to various preset slopes.

이 때, 단계(S225c)는 이진화된 영상을 대상으로 하기 때문에 다양한 조명에 대해서는 패턴 매칭을 수행할 필요가 없을 수도 있다.At this time, since the binarized image is targeted at step S225c, it may not be necessary to perform pattern matching for various illumination.

다만, 단계(S225c)는 패턴 매칭을 위하여 다양한 기울기 정보가 입력되어야 하며, 패턴 매칭이 수행된 영상을 본 발명에서 사용하는 알고리즘에 따라 수행한 후 잘라서 넣는다. However, in step S225c, various gradient information must be input for pattern matching, and the pattern-matched image is performed according to an algorithm used in the present invention and then cut and inserted.

즉, 단계(S225c)는 본 발명에서 사용되는 이진화 방법에 의해 이진화된 영상을 가지고 패턴 매칭을 수행하면, 탐색 공간이 작아져 특징점을 정밀하게 찾을 수 있다.That is, if the pattern matching is performed using the binarized image by the binarization method used in the present invention, the search space is reduced and the minutiae can be searched precisely in step S225c.

이 때, 단계(S225c)는 도 3에 도시된 칠판과 같이 끝(모서리)이 둥그런 모양을 입력으로 넣고, 끝이 직각이 경우면, 같은 모양을 실제로 다양한 각도로 사진을 찍어 넣을 수 있다. 끝 부분(모서리)은 어떠한 형태이더라도, 패턴 매칭에 의해 인식될 수 있는 것이면 된다.At this time, in step S225c, as shown in the blackboard shown in FIG. 3, a rounded shape is inserted as an input, and when the end is right-angled, the same shape can be actually photographed at various angles. The end portion (edge) may be any shape, as long as it can be recognized by pattern matching.

이 때, 단계(S225c)는 패턴 매칭에 사용되는 것은 다양한 학습 알고리즘을 사용할 수 있다. At this time, in step S225c, various learning algorithms used for pattern matching can be used.

또한, 단계(S225)는 후보군 후처리를 수행할 수 있다(S225d).In addition, the step S225 may perform the post-candidate group post-processing (S225d).

즉, 단계(S225d)는 패턴 매칭하여 대상체의 형태가 인식 한 이후, 후보군 후처리를 수행하여 특징점의 위치를 찾을 수 있다.That is, after recognizing the shape of the target object by pattern matching, the candidate group post-process is performed to find the location of the minutiae.

이 때, 단계(S225d)는 여러 개의 패턴 매칭된 후보군 중에서 사각형을 이루는 4개의 패턴의 위치를 찾고, 이를 기반으로 코너 위치의 복수개의 최종 특징점들을 추출할 수 있다.In this case, in step S225d, the positions of the four patterns constituting the quadrangular pattern among the pattern matching candidates may be found, and a plurality of final feature points at the corner position may be extracted based on the positions.

또한, 단계(S225)는 선택한 라인 피팅 모드를 수행할 수 있다(S225e).In addition, the step S225 can perform the selected line fitting mode (S225e).

라인 피팅은 허프변환 (Hough Transform)을 이용하거나, 임의의 직선으로 매핑하는 최적화 알고리즘이 사용될 수 있다. 이때 매핑된 라인의 길이는 기설정된 길이 이상의 크기인 경우만 사용될 수 있다. 예를 들어 영상의 가로길이 및 세로길이 중 길이가 긴 쪽의 1/5정도를 사용할 수 있다. The line fitting can be an optimization algorithm that uses a Hough Transform or maps to arbitrary straight lines. At this time, the length of the mapped line can be used only when the length is equal to or larger than a predetermined length. For example, one-fifth of the width and length of the image may be used.

또한, 단계(S225e)는 라인 정렬을 수행할 수 있다.Step S225e may also perform line alignment.

즉, 단계(S225e)는 일정 길이 이상의 라인으로 영상을 피팅하면 여러 개의 선분들이 생성될 수 있다. 단계(S225e)는 선분들을 순서대로 정렬할 수 있다That is, in step S225e, if an image is fitted to a line having a predetermined length or more, a plurality of line segments can be generated. Step S225e may sort the lines in order

이 때, 단계(S225e)는 정렬된 라인을 두 개씩 선택하여 교점을 산출 할 수 있다.At this time, in step S225e, it is possible to calculate the intersection by selecting two aligned lines.

이 때, 단계(S225e)는 산출된 교점을 특징점 후보로 정의할 수 있다. At this time, the calculated intersection point can be defined as a minutia point candidate in step S225e.

이 때, 단계(S225e)는 특징점 후보를 정의한 선분의 쌍 중에서 두 선분이 이루는 각이 기설정된 값 이상 혹은 이하인 특징점 후보는 제외할 수 있다.In this case, in step S225e, minutiae candidates having an angle formed by two line segments out of pairs of line segments that define the minutiae candidate are equal to or less than a predetermined value may be excluded.

즉, 단계(S225e)는 카메라를 너무 기울인 것임으로 기하보정을 해도 영상 보정이 성공할 수 없기 때문에, 의미 없는 특징점 후보로 간주하여 기설정된 값 이상 혹은 이하인 특징점 후보는 제거될 수 있다.In other words, since the camera is too tilted in step S225e, the image correction can not be successfully performed even if the geometric correction is performed. Therefore, the minutiae point candidate that is more or less than a preset value can be eliminated.

이 때, 단계(S225e)는 특징점 후보를 제외하고, 남은 특징점 후보들이 사각형을 이루는지 판단하여 각각을 복수개의 특징점들로 추출할 수 있다.In this case, in step S225e, it is possible to extract each of the minutiae candidates by determining whether the remaining minutiae candidates form a quadrangle, excluding the minutiae candidate.

또한, 단계(S225)는 이중 구조를 검색할 수 있다(S225f).Also, step S225 can retrieve the dual structure (S225f).

즉, 단계(S225f)는 도 3에 도시된 바와 같이 외곽선을 기준으로 2개의 사각형(내부, 외부)가 생성되기 때문에, 2개의 사각형과 비슷한 위치에 있는 사각형을 검색할 수 있다.That is, as shown in FIG. 3, in step S225f, since two rectangles (inside and outside) are generated with respect to the outline, it is possible to retrieve a rectangle at a position similar to two rectangles.

이 때, 단계(S225f)는 정렬된 라인을 두 개씩 선택하여 2개의 사각형을 생성할 수도 있다.At this time, in step S225f, two aligned lines may be selected to generate two rectangles.

이 때, 단계(S225f)는 2개의 사각형 중에 내부의 사각형을 리턴할 수 있다.At this time, step S225f may return an inner square among the two squares.

이 때, 단계(S225f)는 내부의 사각형의 모서리를 기준으로 최종 특징점들을 추출할 수 있다.In this case, the step S225f may extract the final feature points based on the corners of the inner square.

또한, 단계(S225f)는 approxPolyDP 함수를 이용하여 2개의 사각형을 한번에 처리하여 출력된 트리구조체를 분석하여 최종 특징점들을 추출할 수 있다.In addition, in step S225f, the approxPolyDP function may be used to process two squares at a time, and the output tree structure may be analyzed to extract final feature points.

나아가, 단계(S225)는 패턴 매칭 모드를 수행하여 추출한 최종 특징점들과 라인 피팅 모드를 수행하여 추출한 최종 특징점들의 정확도를 비교하여 정확도가 높은 특징점들을 결정할 수도 있다.In addition, the step S225 may determine the minutiae with high accuracy by comparing the extracted final minutiae by performing the pattern matching mode with the accuracy of the extracted minutiae by performing the line fitting mode.

도 11은 도 8에 도시된 BOOK 모드 수행 단계의 일 예를 세부적으로 나타낸 동작흐름도이다.FIG. 11 is a flowchart illustrating an example of the BOOK mode execution step shown in FIG. 8 in detail.

도 11을 참조하면, 단계(S226)는 먼저 입력된 영상을 분할 할 수 있다(S226a).Referring to FIG. 11, in step S226, the input image can be divided first (S226a).

도 5에 도시된 바와 같이, 단계(S226a)는 영역분할선을 기준으로 좌측은 책의 중앙 부분, 우측의 책의 바깥부분으로 분할하여 영역을 분할할 수 있다.As shown in Fig. 5, in step S226a, the area can be divided by dividing the center part of the book, the outer part of the book on the right side, and the outer part of the book on the basis of the area dividing line.

이 때, 단계(S226)는 중앙선 및 모서리를 추출할 수 있다(S226b).At this time, the center line and the corner can be extracted in step S226 (S226b).

즉, 단계(S226b)는 먼저 상기 설명한 라인 피팅 및 패턴 매칭을 이용하여 좌측 부분의 중앙선과 우측 부분의 모서리를 추출할 수 있다.That is, in step S226b, first, the edge of the center line and the right part of the left part can be extracted using the above-described line fitting and pattern matching.

이 때, 단계(S226b)는 책의 한 면만 보정하기 때문에, 중앙선과 모서리는 반드시 각각 1개씩만 추출할 수 있다.At this time, since only one side of the book is corrected in step S226b, only one center line and one corner can be extracted.

또한, 단계(S226)는 라인 에지를 추출할 수 있다(S226c).In addition, the line edge can be extracted in step S226 (S226c).

즉, 단계(S226c)는 중앙선 쪽 라인 에지와 모서리 쪽 라인 에지를 각각 추출할 수 있다.In other words, step S226c can extract the line edge on the center line and the line edge on the corner, respectively.

이 때, 단계(S226c)는 도 5에 도시된 바와 같이 잘못된 모서리가 추출될 가능성이 있기 때문에, 라인 에지의 변화량에 기반하여 모서리를 새롭게 추출할 수도 있다.At this time, since the erroneous edge may be extracted as shown in FIG. 5, the edge may be newly extracted based on the amount of change of the line edge in step S226c.

또한, 단계(S226)는 컨트롤 포인트를 삽입할 수 있다(S226d).In addition, the control point can be inserted in the step S226 (S226d).

도 6에 도시된 바와 같이, 단계(S226d)는 중앙선 쪽 라인 에지는 책이 많이 휘어져 있는 부분이기 때문에 컨트롤 포인트를 좁게 삽입할 수 있다.As shown in Fig. 6, in step S226d, the control point can be inserted narrowly because the line edge on the center line is a portion where the book is bent much.

이 때, 단계(S226d)는 모서리 쪽 라인 에지는 책이 적게 휘어져 있는 부분이기 때문에 컨트롤 포인트를 넓게 삽입할 수 있다.At this time, in step S226d, since the corner edge line is a portion where the book is slightly curved, the control point can be inserted widely.

이 때, 단계(S226d)는 속도 향상을 위해 중앙선 쪽과 모서리 쪽 영역 분리의 콘트롤 포인트를 삽입할 영역을 같은 넓이로 설정할 수도 있다.At this time, in order to improve the speed, the step S226d may set the area for inserting the control points of the center line side and the edge side area separation to the same width.

또한, 단계(S226)는 영역을 분리할 수 있다(S226e).In addition, the step S226 can separate the regions (S226e).

즉, 단계(S226e)는 중앙선 쪽 컨트롤 포인트가 삽입된 영역과 모서리 쪽 컨트롤 포인트가 삽입된 영역을 분리하여 입력할 수 있다.That is, in step S226e, the area where the center line control point is inserted and the area where the corner side control point is inserted may be separately input.

도 12는 본 발명의 일실시예에 따른 컴퓨터 시스템을 나타낸 블록도이다.12 is a block diagram illustrating a computer system in accordance with an embodiment of the present invention.

도 12를 참조하면, 본 발명의 실시예는 컴퓨터로 읽을 수 있는 기록매체와 같은 컴퓨터 시스템(1100)에서 구현될 수 있다. 도 12에 도시된 바와 같이, 컴퓨터 시스템(1100)은 버스(1120)를 통하여 서로 통신하는 하나 이상의 프로세서(1110), 메모리(1130), 사용자 인터페이스 입력 장치(1140), 사용자 인터페이스 출력 장치(1150) 및 스토리지(1160)를 포함할 수 있다. 또한, 컴퓨터 시스템(1100)은 네트워크(1180)에 연결되는 네트워크 인터페이스(1170)를 더 포함할 수 있다. 프로세서(1110)는 중앙 처리 장치 또는 메모리(1130)나 스토리지(1160)에 저장된 프로세싱 인스트럭션들을 실행하는 반도체 장치일 수 있다. 메모리(1130) 및 스토리지(1160)는 다양한 형태의 휘발성 또는 비휘발성 저장 매체일 수 있다. 예를 들어, 메모리는 ROM(1131)이나 RAM(1132)을 포함할 수 있다.Referring to FIG. 12, embodiments of the present invention may be implemented in a computer system 1100, such as a computer-readable recording medium. 12, the computer system 1100 includes one or more processors 1110, a memory 1130, a user interface input device 1140, a user interface output device 1150, And storage 1160. In addition, the computer system 1100 may further include a network interface 1170 connected to the network 1180. The processor 1110 may be a central processing unit or a semiconductor device that executes the processing instructions stored in the memory 1130 or the storage 1160. Memory 1130 and storage 1160 can be various types of volatile or non-volatile storage media. For example, the memory may include ROM 1131 or RAM 1132.

이상에서와 같이 본 발명에 따른 영상 보정 장치 및 방법은 상기한 바와 같이 설명된 실시예들의 구성과 방법이 한정되게 적용될 수 있는 것이 아니라, 상기 실시예들은 다양한 변형이 이루어질 수 있도록 각 실시예들의 전부 또는 일부가 선택적으로 조합되어 구성될 수도 있다.As described above, the image correcting apparatus and method according to the present invention are not limited to the configuration and method of the embodiments described above, but the embodiments can be applied to all of the embodiments Or some of them may be selectively combined.

110: 특징점 추출부 120: 기하 변경부
130: 색상 변경부
1100: 컴퓨터 시스템 1110: 프로세서
1120: 버스 1130: 메모리
1131: 롬 1132: 램
1140: 사용자 인터페이스 입력 장치
1150: 사용자 인터페이스 출력 장치
1160: 스토리지 1170: 네트워크 인터페이스
1180: 네트워크
110: feature point extracting unit 120: geometry changing unit
130: Color changing section
1100: Computer system 1110: Processor
1120: bus 1130: memory
1131: ROM 1132: RAM
1140: User interface input device
1150: User interface output device
1160: Storage 1170: Network Interface
1180: Network

Claims (1)

카메라로부터 촬영된 대상체의 영상을 획득하여 대상체 종류에 따라 모드를선택하여 사각형을 이루는 복수개의 특징점들을 추출하는 특징점 추출부;
상기 대상체의 영상에 상기 복수개의 특징점들에 기반한 기하 변경을 수행하여 사각형의 영상을 획득하는 기하 변경부; 및
상기 사각형의 영상을 기설정된 프리셋 파라메터에 기반하여 색상을 변경하여 보정 영상을 출력하는 색상 변경부;
를 포함하는 것을 특징으로 하는 영상 보정 장치.
A feature point extracting unit for acquiring an image of a subject photographed from a camera and selecting a mode according to a target object type to extract a plurality of feature points forming a quadrangle;
A geometry changing unit for performing a geometry change based on the plurality of feature points on the image of the object to obtain a rectangular image; And
A color changing unit for changing a color of the quadrangle based on a preset parameter and outputting a corrected image;
And an image correction unit for correcting the image.
KR1020160158284A 2016-11-25 2016-11-25 Apparatus for correcting video and method for using the same KR102002531B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020160158284A KR102002531B1 (en) 2016-11-25 2016-11-25 Apparatus for correcting video and method for using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020160158284A KR102002531B1 (en) 2016-11-25 2016-11-25 Apparatus for correcting video and method for using the same

Publications (2)

Publication Number Publication Date
KR20180059108A true KR20180059108A (en) 2018-06-04
KR102002531B1 KR102002531B1 (en) 2019-07-22

Family

ID=62628153

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020160158284A KR102002531B1 (en) 2016-11-25 2016-11-25 Apparatus for correcting video and method for using the same

Country Status (1)

Country Link
KR (1) KR102002531B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050062350A (en) * 2003-12-19 2005-06-23 한국전자통신연구원 Correction method of geometrical distortion for document image by camera
JP2013089234A (en) * 2011-10-17 2013-05-13 Sharp Corp Image processing system
KR20160031966A (en) * 2014-09-15 2016-03-23 한국과학기술원 Muti-projection system and method for projector calibration thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050062350A (en) * 2003-12-19 2005-06-23 한국전자통신연구원 Correction method of geometrical distortion for document image by camera
JP2013089234A (en) * 2011-10-17 2013-05-13 Sharp Corp Image processing system
KR20160031966A (en) * 2014-09-15 2016-03-23 한국과학기술원 Muti-projection system and method for projector calibration thereof

Also Published As

Publication number Publication date
KR102002531B1 (en) 2019-07-22

Similar Documents

Publication Publication Date Title
CN108171297B (en) Answer sheet identification method
Burie et al. ICDAR2015 competition on smartphone document capture and OCR (SmartDoc)
CN110866871A (en) Text image correction method and device, computer equipment and storage medium
JP4928310B2 (en) License plate recognition device, control method thereof, computer program
US9076056B2 (en) Text detection in natural images
CN108805116B (en) Image text detection method and system
WO2014160433A2 (en) Systems and methods for classifying objects in digital images captured using mobile devices
US10504215B2 (en) Method of correcting a captured image, method of selecting a drawing sketched on a page or on two adjacent pages of a notebook, a relative app for smartphone, a hardback notebook and a hardback agenda
WO2017088637A1 (en) Method and apparatus for locating image edge in natural background
CN109559344B (en) Frame detection method, device and storage medium
CN111695540A (en) Video frame identification method, video frame cutting device, electronic equipment and medium
CN111985465A (en) Text recognition method, device, equipment and storage medium
CN111695373B (en) Zebra stripes positioning method, system, medium and equipment
CN110751146A (en) Text region detection method, text region detection device, electronic terminal and computer-readable storage medium
CN105678301B (en) method, system and device for automatically identifying and segmenting text image
CN112446262A (en) Text analysis method, text analysis device, text analysis terminal and computer-readable storage medium
US11216905B2 (en) Automatic detection, counting, and measurement of lumber boards using a handheld device
CN114387199A (en) Image annotation method and device
JP2017500662A (en) Method and system for correcting projection distortion
CN110569774A (en) Automatic line graph image digitalization method based on image processing and pattern recognition
CN104933430B (en) A kind of Interactive Image Processing method and system for mobile terminal
US10275888B2 (en) Algorithmic method for detection of documents in images
KR102002531B1 (en) Apparatus for correcting video and method for using the same
KR20190027165A (en) Image Adjustment System and Method for Unifying Features of Multiple Images
CN109919164B (en) User interface object identification method and device

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant