[go: up one dir, main page]

KR101945233B1 - Method and Apparatus for Stabilizing Video - Google Patents

Method and Apparatus for Stabilizing Video Download PDF

Info

Publication number
KR101945233B1
KR101945233B1 KR1020160002314A KR20160002314A KR101945233B1 KR 101945233 B1 KR101945233 B1 KR 101945233B1 KR 1020160002314 A KR1020160002314 A KR 1020160002314A KR 20160002314 A KR20160002314 A KR 20160002314A KR 101945233 B1 KR101945233 B1 KR 101945233B1
Authority
KR
South Korea
Prior art keywords
frame
path
image
matrix
frames
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
KR1020160002314A
Other languages
Korean (ko)
Other versions
KR20170082945A (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 KR1020160002314A priority Critical patent/KR101945233B1/en
Publication of KR20170082945A publication Critical patent/KR20170082945A/en
Application granted granted Critical
Publication of KR101945233B1 publication Critical patent/KR101945233B1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B20/00Signal processing not specific to the method of recording or reproducing; Circuits therefor
    • G11B20/00007Time or data compression or expansion
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B20/00Signal processing not specific to the method of recording or reproducing; Circuits therefor
    • G11B20/00086Circuits for prevention of unauthorised reproduction or copying, e.g. piracy
    • G11B20/00166Circuits for prevention of unauthorised reproduction or copying, e.g. piracy involving measures which result in a restriction to authorised contents recorded on or reproduced from a record carrier, e.g. music or software
    • G11B20/00181Circuits for prevention of unauthorised reproduction or copying, e.g. piracy involving measures which result in a restriction to authorised contents recorded on or reproduced from a record carrier, e.g. music or software using a content identifier, e.g. an international standard recording code [ISRC] or a digital object identifier [DOI]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8455Structuring of content, e.g. decomposing content into time segments involving pointers to the content, e.g. pointers to the I-frames of the video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/91Television signal processing therefor
    • H04N5/915Television signal processing therefor for field- or frame-skip recording or reproducing
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B20/00Signal processing not specific to the method of recording or reproducing; Circuits therefor
    • G11B20/00007Time or data compression or expansion
    • G11B2020/00072Time or data compression or expansion the compressed signal including a video signal

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Security & Cryptography (AREA)
  • Studio Devices (AREA)

Abstract

영상 안정화 방법 및 장치를 개시한다.
프레임 간의 변화량을 기반으로 카메라 경로를 계산하는 경우 오류가 누적 문제를 해결하고자 각 프레임별 경로를 계산하여 최적화한 후 복원하여 배속 재생되는 영상이 안정화(Stabilization)되도록 하는 영상 안정화 방법 및 장치를 제공한다.
An image stabilization method and apparatus are disclosed.
There is provided an image stabilization method and an apparatus for stabilizing an image to be reproduced at a speed that is obtained by calculating a path for each frame to recover an error when calculating a camera path based on a variation amount between frames, .

Description

영상 안정화 방법 및 장치{Method and Apparatus for Stabilizing Video}[0001] The present invention relates to an image stabilization method and apparatus,

본 실시예는 영상 안정화 방법 및 장치에 관한 것이다.This embodiment relates to an image stabilization method and apparatus.

이하에 기술되는 내용은 단순히 본 실시예와 관련되는 배경 정보만을 제공할 뿐 종래기술을 구성하는 것이 아니다. The contents described below merely provide background information related to the present embodiment and do not constitute the prior art.

일반적으로 ‘타임-랩스’(Time Lapse)란 인터벌(Interval)을 두고 정지 화상 데이터를 연속적으로 촬영하여 한 개의 동영상 데이터로 기록하는 촬영 방식이다. 예컨대, ‘타임-랩스’는 식물의 성장의 과정이나 날씨 변화를 소정의 시간 간격(인터벌)으로 촬영한 후 한 개의 동영상 데이터로 저장하는 촬영 방식이다.Generally, "Time Lapse" is an imaging method in which still image data is continuously shot with an interval and recorded as one moving image data. For example, "time-lapse" is a photographing method in which a process of growing a plant or a change in weather is photographed at a predetermined time interval (interval) and then stored as one moving image data.

최근 들어, 핸드헬드(Handheld) 카메라 또는 고프로 히어로(GoPro HERO)와 같은 ‘스포츠’/‘액션’/‘생활’ 캠코더, ‘웨어러블 카메라’ 또는 ‘스마트폰’ 등과 같은 일반적인 촬영 장비가 발전함에 따라 일상생활, 극한의 상황, 촬영 불가능한 스포츠 등을 빈번하게 촬영, 저장 및 공유하고 있는 추세이다. 하지만, 일반적인 촬영 장비(‘스포츠’/‘액션’/‘생활’ 캠코더 또는 ‘스마트폰’)로 촬영한 영상은 나중에 사용자가 시청하기에는 영상이 너무 길거나 복잡하고, 단조로운 문제가 있다.In recent years, as general imaging equipment such as 'sports' / 'action' / 'life' camcorders such as a handheld camera or GoPro HERO, a 'wearable camera' It is a tendency to frequently record, store and share everyday life, extreme situations, and non-shootable sports. However, images taken with a general shooting device (such as a 'sports' / 'action' / 'life' camcorder or a 'smart phone') have a problem that the image is too long or complicated and monotonous for the user to watch later.

전술한 문제점을 해결하기 위한 종래기술로는 일반적인 촬영 장비(‘스포츠’/‘액션’/‘생활’ 캠코더 또는 ‘스마트폰’)로 촬영한 영상을 전문가의 편집이 없이 타임-랩스를 적용하여 기 설정된 배속(예컨대, ‘10 배속’)에 해당하는 프레임만을 샘플링하는 기술이 이용되어 왔다. 다시 말해, 전문가가 촬영하여 편집하지 않은 대다수의 비디오는 그 길이가 길고 보기에 단조롭기 때문에 특정 업체에서 비디오 길이를 줄여주는 타임-랩스 기능을 제공하고 있다.Conventional techniques for solving the above-mentioned problems include a technique of applying a time-lapse image to an image photographed by general photography equipment ('sports' / 'action' / 'living' camcorder or 'smart phone' A technique of sampling only a frame corresponding to a set speed (for example, " 10 times speed ") has been used. In other words, the vast majority of videos that have not been edited and edited by professionals are long-lived and monotonous, providing a time-lapse feature that reduces video length for certain vendors.

하지만, 단순히 기 설정된 배속에 해당하는 프레임을 샘플링하여 재생(영상 배속 재생)하는 경우, 영상이 흔들려 보이거나 불안정(Shaky)해 보이게 된다. 다시 말해, 타임-랩스는 사용자 지정 배속에 따라 프레임을 스킵(Skip)하게 되는데, 촬영 장비를 안정화하는 전문적인 장비없이 촬영자가 이동하면서 촬영한 영상의 경우, 불안한 카메라 경로를 갖게 되어 시청하기에 불편한 문제가 있다. 특히, 고정형 카메라가 아닌 이동상황에서 촬영한 영상을 배속 재생하는 경우, 타임-랩스가 적용된 최종 결과물에 해당하는 영상이 크게 흔들릴 수 있다. However, when a frame corresponding to a predetermined speed is simply sampled and played back (image playback speed), the image may appear shaky or shaky. In other words, the time-lapse skips the frame according to the user-specified speed. In the case of the image taken while the photographer moves without the professional equipment for stabilizing the photographing equipment, it is inconvenient to view the camera because the camera has an unstable camera path there is a problem. Especially, in the case of playing back an image captured in a moving state rather than a fixed camera at a speed of 2x, the image corresponding to the final result applied with time-lapse may be largely shaken.

본 실시예는 프레임 간의 변화량을 기반으로 카메라 경로를 계산하는 경우 오류가 누적 문제를 해결하고자 각 프레임별 경로를 계산하여 최적화한 후 복원하여 배속 재생되는 영상이 안정화(Stabilization)되도록 하는 영상 안정화 방법 및 장치를 제공하는 데 목적이 있다.In this embodiment, when a camera path is calculated on the basis of a change amount between frames, an image stabilization method is performed in which an image to be reproduced at a speed is stabilized by calculating and optimizing paths for each frame in order to solve the cumulative error, The purpose of the device is to provide.

본 실시예의 일 측면에 의하면, 영상 배속 재생 장치가 영상을 안정화하는 방법에 있어서, 입력된 영상의 프레임(Frame) 중 일부 선택된 프레임들을 입력받는 입력 과정; 상기 선택된 프레임에 대한 상관관계 매트릭스의 모션 모델을 기반으로 상기 프레임을 분해하여 상기 선택된 프레임들마다 프레임별 카메라 경로를 생성하는 프레임별 경로 생성과정; 상기 프레임별 카메라 경로마다 라인 피팅(Line Fitting)을 적용하거나 평활화 필터를 적용하여 최적화를 수행한 최적화 경로들을 생성하는 최적화 과정; 상기 최적화 경로들을 매트릭스(Matrix)로 복원(Compose)한 후 안정화 경로를 생성하는 안정화 과정; 및 상기 선택된 프레임에 상기 안정화 경로를 적용하여 안정화된 결과 영상을 출력하는 렌더링 과정을 포함하는 것을 특징으로 하는 영상 안정화 방법을 제공한다.According to an aspect of the present invention, there is provided a method of stabilizing an image by a video double speed playback apparatus, the method comprising: inputting a selected one of frames of an input image; A frame-by-frame path generation step of generating a frame-by-frame camera path for each of the selected frames by decomposing the frame based on a motion model of a correlation matrix for the selected frame; An optimization process of optimizing paths by applying line fitting or applying a smoothing filter to each camera path for each frame; A stabilization process for generating a stabilization path after the optimizing paths are restored to a matrix; And a rendering step of applying a stabilization path to the selected frame and outputting a stabilized result image.

본 실시에의 다른 측면에 의하면, 하드웨어와 결합되어, 입력된 영상의 프레임(Frame) 중 일부 선택된 프레임들을 입력받는 입력 과정; 상기 선택된 프레임에 대한 상관관계 매트릭스의 모션 모델을 기반으로 상기 프레임을 분해하여 상기 선택된 프레임들마다 프레임별 카메라 경로를 생성하는 프레임별 경로 생성과정; 상기 프레임별 카메라 경로마다 라인 피팅(Line Fitting)을 적용하거나 평활화 필터를 적용하여 최적화를 수행한 최적화 경로들을 생성하는 최적화 과정; 상기 최적화 경로들을 매트릭스(Matrix)로 복원(Compose)한 후 안정화 경로를 생성하는 안정화 과정; 및 상기 선택된 프레임에 상기 안정화 경로를 적용하여 안정화된 결과 영상을 출력하는 렌더링 과정을 실행시키기 위하여 기록매체에 저장된 컴퓨터프로그램을 제공한다.According to another aspect of the present invention, there is provided an image processing method comprising: inputting, in combination with hardware, inputting a selected one of frames of an input image; A frame-by-frame path generation step of generating a frame-by-frame camera path for each of the selected frames by decomposing the frame based on a motion model of a correlation matrix for the selected frame; An optimization process of optimizing paths by applying line fitting or applying a smoothing filter to each camera path for each frame; A stabilization process for generating a stabilization path after the optimizing paths are restored to a matrix; And a rendering process of outputting a stabilized result image by applying the stabilization path to the selected frame.

본 실시에의 다른 측면에 의하면, 입력된 영상의 프레임(Frame) 중 일부 선택된 프레임들을 입력받는 프레임 입력부; 상기 선택된 프레임에 대한 상관관계 매트릭스의 모션 모델을 기반으로 상기 프레임을 분해하여 상기 선택된 프레임들마다 프레임별 카메라 경로를 생성하는 프레임별 경로 분해부; 상기 프레임별 카메라 경로마다 라인 피팅(Line Fitting)을 적용하거나 평활화 필터를 적용하여 최적화를 수행한 최적화 경로들을 생성하는 경로 최적화부; 상기 최적화 경로들을 매트릭스(Matrix)로 복원(Compose)한 후 안정화 경로를 생성하는 복원부; 및 상기 선택된 프레임에 상기 안정화 경로를 적용하여 안정화된 결과 영상을 출력하는 렌더링부를 포함하는 것을 특징으로 하는 영상 배속 재생 장치를 제공한다.According to another aspect of the present invention, there is provided an image processing apparatus including: a frame input unit receiving a selected one of frames of an input image; A frame decomposing unit for decomposing the frame based on the motion model of the correlation matrix for the selected frame to generate a camera path for each selected frame; A path optimizing unit for optimizing paths by applying line fitting or applying a smoothing filter to each of the frame-by-frame camera paths; A restoration unit for restoring the optimization paths to a matrix and generating a stabilization path; And a rendering unit for applying the stabilization path to the selected frame and outputting a stabilized resultant image.

이상에서 설명한 바와 같이 본 실시예에 의하면, 프레임 간의 변화량을 기반으로 카메라 경로를 계산하는 경우 오류가 누적 문제를 해결하고자 각 프레임별 경로를 계산하여 최적화한 후 복원하여 배속 재생되는 영상이 안정화되도록 하는 효과가 있다.As described above, according to the present embodiment, when the camera path is calculated based on the amount of change between frames, in order to solve the cumulative error, the route for each frame is calculated, optimized, and restored to stabilize the image It is effective.

도 1a 및 도 1b는 본 실시예에 따른 영상 배속 재생 장치를 개략적으로 나타낸 블럭 구성도이다.
도 2는 본 실시예에 따른 영상 배속 재생 과정을 전반적으로 설명하기 위한 순서도이다.
도 3a 내지 도 3c는 영상 배속 재생에 따른 일반적인 카메라 경로, 안정화된 카메라 경로를 비교 설명하기 위한 도면이다.
도 4는 본 실시예에 따른 프레임 매칭 과정을 설명하기 위한 순서도이다.
도 5는 본 실시예에 따른 프레임 선택 과정을 설명하기 위한 순서도이다.
도 6은 본 실시예에 따른 경로 안정화 과정을 설명하기 위한 순서도이다.
도 7은 본 실시예에 따른 부드러운 경로에 대해 설명하기 위한 도면이다.
도 8은 본 실시예에 따른 렌더링 과정을 설명하기 위한 순서도이다.
도 9는 본 실시예에 따른 비용 매트릭스를 설명하기 위한 예시도이다.
도 10a 내지 도 10b는 정배속 재생시 프레임 선택과 본 실시예에 따른 프레임 선택을 비교 설명하기 위한 도면이다.
FIGS. 1A and 1B are block diagrams schematically showing a video double speed playback apparatus according to the present embodiment.
FIG. 2 is a flowchart for explaining the video double speed playback process according to the present embodiment.
FIGS. 3A to 3C are diagrams for explaining a comparison between a general camera path and a stabilized camera path according to image double speed playback.
FIG. 4 is a flowchart for explaining a frame matching process according to the present embodiment.
5 is a flowchart illustrating a frame selection process according to the present embodiment.
6 is a flowchart for explaining a path stabilization process according to the present embodiment.
7 is a view for explaining a smooth path according to the present embodiment.
8 is a flowchart illustrating a rendering process according to the present embodiment.
9 is an exemplary diagram for explaining a cost matrix according to the present embodiment.
FIGS. 10A and 10B are diagrams for explaining a comparison between frame selection during normal speed reproduction and frame selection according to the present embodiment.

이하, 본 실시예를 첨부된 도면을 참조하여 상세하게 설명한다.Hereinafter, the present embodiment will be described in detail with reference to the accompanying drawings.

본 실시예에 기재된 ‘배속 재생’은 기본적으로 스피드 업 비디오(Seep Up Video)를 제공할 뿐 아니라, 안정된 카메라 모션(Stable Camera Motion)으로 동작하는 영상을 의미한다. 다시 말해, 본 실시예에 기재된 ‘배속 재생’은 안정적인 카메라 경로에서 움직이는 빠른 영상(안정적으로 빠르게 재생되는 영상)을 의미한다.The 'double speed reproduction' described in the present embodiment basically means a video which operates not only in a speed up video but also in a stable camera motion. In other words, the 'speed reproduction' described in this embodiment means a fast image (stable and fast reproduced image) moving in a stable camera path.

본 실시예에 기재된 ‘안정적인 영상’이란 전문가가 촬영한 카메라 경로에 부합하는 영상이 출력되는 것을 의미한다. 통상 전문가는 이동하면서 촬영하는 경우에 촬영 보조 기구를 이용하여 영상이 흔들리지 않는 카메라 경로로 촬영한다.The 'stable image' described in this embodiment means that an image matching the camera path photographed by the expert is output. Normally, a specialist shoots a moving camera path that does not shake the image by using an imaging assistant when shooting while moving.

본 실시예에 기재된 ‘상관관계 매트릭스(Homography)’는 인접 프레임 간의 변화량 파라미터를 포함한 매트릭스를 의미한다. ‘상관관계 매트릭스’는 x축 이동량(tx) 파라미터, y축 이동량(ty) 파라미터, 회전 각도(Angle)(θ) 파라미터, 크기(Scale) 파라미터, 종횡비(Aspect Ratio) 파라미터, 전단(Shear) 파라미터 및 사영(Perspective) 파라미터 중 적어도 두 개 이상의 파라미터를 포함한다. ‘상관관계 매트릭스’는 3×3 매트릭스일 수 있다. ‘상관관계 매트릭스’는 한 번만 계산해서 저장하면 다시 계산할 필요가 없다. 'Correlation matrix (homography)' described in this embodiment means a matrix including variation parameter between adjacent frames. "Correlation matrix" is x-axis shift amount (t x) parameters, y-axis movement amount (t y) parameters, the rotational angle (Angle) (θ) parameters, the size (Scale) parameter, the aspect ratio (Aspect Ratio) parameters, the front end (Shear ) ≪ / RTI > parameter and a perspective parameter. The 'correlation matrix' may be a 3 × 3 matrix. The 'correlation matrix' does not need to be recalculated once it is calculated and saved.

본 실시예에 기재된 ‘비용 매트릭스(Cost Matrix)’는 기준 프레임의 상관관계 매트릭스와 나머지 프레임의 상관관계 매트릭스를 비교한 일종의 스칼라값을 의미한다. ‘비용 매트릭스’는 사용자가 입력한 배속에 따라 기 저장된 ‘상관관계 매트릭스’를 이용하여 새롭게 계산된다. ‘비용 매트릭스’를 계산하는 과정에서 연산 속도를 빠르게 하기 위해 인접 프레임 간의 상관관계 매트릭스에 연쇄법칙(Chain Rule)이 적용될 수 있다. The 'cost matrix' described in this embodiment means a kind of scalar value obtained by comparing the correlation matrix of the reference frame with the correlation matrix of the remaining frames. The 'cost matrix' is newly calculated using the pre-stored 'correlation matrix' according to the speed that the user inputs. A chain rule may be applied to the correlation matrix between neighboring frames in order to speed up the computation speed in calculating the 'cost matrix'.

도 1a 및 도 1b는 본 실시예에 따른 영상 배속 재생 장치를 개략적으로 나타낸 블럭 구성도이다.FIGS. 1A and 1B are block diagrams schematically showing a video double speed playback apparatus according to the present embodiment.

본 실시예에 따른 영상 배속 재생 장치(100)는 입력부(110), 프레임 매칭부(120), 프레임 선택부(130), 경로 안정화부(140) 및 렌더링부(150)를 포함한다. 영상 배속 재생 장치(100)에 포함된 구성요소는 반드시 이에 한정되는 것은 아니다.The video double speed playback apparatus 100 according to the present embodiment includes an input unit 110, a frame matching unit 120, a frame selecting unit 130, a path stabilizing unit 140, and a rendering unit 150. The constituent elements included in the image data playback device 100 are not limited thereto.

영상 배속 재생 장치(100)에 포함된 각 구성요소는 장치 내부의 소프트웨어적인 모듈 또는 하드웨어적인 모듈을 연결하는 통신 경로에 연결되어 상호 간에 유기적으로 동작할 수 있다. 이러한 구성요소는 하나 이상의 통신 버스, 신호선 또는 무선통신을 이용하여 통신한다.Each component included in the image data playback device 100 may be connected to a communication path connecting a software module or a hardware module in the device so as to operate organically with each other. These components communicate using one or more communication buses, signal lines, or wireless communications.

도 1에 도시된 영상 배속 재생 장치(100)의 각 구성요소는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 소프트웨어적인 모듈, 하드웨어적인 모듈 또는 소프트웨어와 하드웨어의 결합으로 구현될 수 있다.Each component of the video playback device 100 shown in FIG. 1 refers to a unit for processing at least one function or operation, and may be implemented as a software module, a hardware module, or a combination of software and hardware.

본 실시예에 기재된 영상 배속 재생 장치(100)는 기본적으로 스피드 업 비디오를 제공할 뿐 아니라, 안정된 카메라 경로로 영상(안정적으로 빠르게 재생되는 영상)을 출력하는 장치를 의미한다. The video double speed playback apparatus 100 according to the present embodiment basically means a device that not only provides speed up video but also outputs a video (a video that is stably and quickly reproduced) in a stable camera path.

영상 배속 재생 장치(100)는 (ⅰ) 각종 기기 또는 유무선 네트워크와 통신을 수행하기 위한 통신 모뎀 등의 통신 장치, (ⅱ) 각종 프로그램과 데이터를 저장하기 위한 메모리, (ⅲ) 프로그램을 실행하여 연산 및 제어하기 위한 마이크로프로세서 등을 구비하는 다양한 장치이다. 적어도 일 실시예에 따르면, 메모리는 램(Random Access Memory: RAM), 롬(Read Only Memory: ROM), 플래시 메모리, 광 디스크, 자기 디스크, 솔리드 스테이트 디스크(Solid State Disk: SSD) 등의 컴퓨터로 판독 가능한 기록/저장매체일 수 있다. 적어도 일 실시예에 따르면, 마이크로프로세서는 명세서상에 기재된 동작과 기능을 하나 이상 선택적으로 수행하도록 프로그램될 수 있다. 적어도 일 실시예에 따르면, 마이크로프로세서는 전체 또는 부분적으로 특정한 구성의 주문형반도체(Application Specific Integrated Circuit: ASIC) 등의 하드웨어로써 구현될 수 있다. 영상 배속 재생 장치(100)의 구성 요소가 소프트웨어적인 모듈로 구현된 경우, 메모리 내에 저장될 수 있다.The video image playback apparatus 100 is provided with (i) a communication device such as a communication modem for performing communication with various devices or wired / wireless networks, (ii) a memory for storing various programs and data, (iii) And a microprocessor for controlling the microprocessor and the like. According to at least one embodiment, the memory may be a computer such as a random access memory (RAM), a read only memory (ROM), a flash memory, an optical disk, a magnetic disk, or a solid state disk Readable recording / storage medium. According to at least one embodiment, a microprocessor can be programmed to selectively perform one or more of the operations and functions described in the specification. In accordance with at least one embodiment, the microprocessor may be implemented in hardware, such as an Application Specific Integrated Circuit (ASIC), in wholly or partially of a particular configuration. If the components of the image-speed playback apparatus 100 are implemented as software modules, they can be stored in the memory.

입력부(110)는 원본 영상을 입력받는다.The input unit 110 receives the original image.

프레임 매칭부(120)는 원본 영상의 프레임(Frame) 각각에 대한 특징점(Feature Point)을 서로 비교하는 방식으로 매칭(Matching)하여 상관관계 매트릭스(Homography)를 계산한다. 프레임 매칭부(120)는 특징점 추출부(122), 서술자 확인부(124) 및 상관관계 계산부(126)를 포함한다. The frame matching unit 120 calculates a correlation matrix by matching feature points of each frame of the original image with each other. The frame matching unit 120 includes a feature point extracting unit 122, a descriptor checking unit 124, and a correlation calculating unit 126.

특징점 추출부(122)는 원본 영상에 포함된 모든 프레임 각각에 대한 특징점을 추출한다. 서술자 확인부(124)는 모든 프레임 각각에 대한 특징점 별로 서술자(Descriptor)를 확인한다.The feature point extracting unit 122 extracts feature points for all the frames included in the original image. The descriptor confirmation unit 124 confirms a descriptor for each minutiae of each frame.

상관관계 계산부(126)는 모든 프레임 중 인접 프레임 간에 서술자들을 서로 비교하는 방식으로 매칭하여 프레임 간의 상관관계 매트릭스를 계산한다. 상관관계 매트릭스는 3×3 매트릭스로서, 인접 프레임 간의 변화량 파라미터로서, x축 이동량(tx) 파라미터, y축 이동량(ty) 파라미터, 회전 각도(θ) 파라미터, 크기 파라미터, 종횡비 파라미터, 전단 파라미터 및 사영 파라미터 중 적어도 두 개 이상의 파라미터를 포함한다. 상관관계 계산부(126)는 인접 프레임 간의 서술자를 비교하는 방식으로 매칭할 때 무작위 샘플 데이터에서 최대 컨센서스(Consensu)를 갖는 모델을 선택하는 알고리즘을 이용하여 오류(Outlier)를 제거하는 과정을 선택적으로 수행한다.The correlation calculation unit 126 calculates correlation matrices between frames by matching descriptors among neighboring frames among all frames. Correlation matrix is a 3 × 3 matrix, a change amount parameter between adjacent frames, x-axis movement amount (t x) parameters, y-axis movement amount (t y) parameters, the angle of rotation (θ) parameters, size parameters, and the aspect ratio parameter, shear parameters And a projection parameter. The correlation calculation unit 126 may selectively remove an outlier using an algorithm for selecting a model having a maximum consensus in random sample data when matching the descriptors between neighboring frames. .

프레임 선택부(130)는 상관관계 매트릭스를 기반으로 프레임 간의 연관성을 비교한 비용 매트릭스(Cost Matrix)를 계산하고, 비용 매트릭스를 기반으로 프레임 간의 연관성이 가장 높은 경로 프레임만을 선택한다. 프레임 선택부(130)는 연관성 계산부(132), 가중치 계산부(134) 및 비용 계산부(136)를 포함한다.The frame selector 130 calculates a cost matrix comparing the associativity between frames based on the correlation matrix, and selects only the path frame having the highest correlation among the frames based on the cost matrix. The frame selection unit 130 includes a relevance calculation unit 132, a weight calculation unit 134, and a cost calculation unit 136. [

연관성 계산부(132)는 첫 번째 프레임의 상관관계 매트릭스를 기준으로 이후 프레임이 재생 배속의 두 배가 되는 프레임까지의 상관관계 매트릭스를 각각 비교한 변화값들로 프레임 간 연관성을 계산한다. 연관성 계산부(132)는 프레임의 상관관계 매트릭스와 이후 프레임들의 상관관계 매트릭스를 곱하여 프레임 간 연관성을 계산한다.The relevancy calculator 132 calculates inter-frame associations based on the correlation matrix of the first frame and the correlation values of the correlation matrix up to the frame in which the frame is twice as large as the playback speed. The relevancy calculator 132 calculates inter-frame associations by multiplying the correlation matrix of the frame by the correlation matrix of the subsequent frames.

가중치 계산부(134)는 프레임 별로 사용자가 기 설정한 배속을 만족시키기 위한 값을 계산한다. 가중치 계산부(134)는 i번째 프레임 인덱스(i), j번째 프레임 인덱스(j), 사용자가 설정 배속 재생 값(v), 임계치(τs)에 근거하여 사용자가 기 설정한 배속을 만족시키기 위한 배속 만족값(Cs)을 계산한다.The weight calculation unit 134 calculates a value for satisfying the speed set by the user for each frame. The weight calculation section 134 to on the basis of the i-th frame index (i), j-th frame index (j), the user sets playback speed value (v), the threshold value (τ s) satisfy the speed the user has preset (C s ) for the first time.

비용 계산부(136)는 프레임 간 연관성과 사용자가 기 설정한 배속을 만족시키기 위한 값을 조합하여 비용 매트릭스를 계산하고, 비용 매트릭스 중 최소값을 갖는 프레임을 경로 프레임으로 선택하는 과정을 마지막 프레임까지 반복 수행한다. 비용 계산부(136)는 영상 이동량과 겹침 정도에 대한 양(Cm), 배속을 지키는 값에 대한 가중치(λs), 사용자가 기 설정한 배속을 만족시키기 위한 배속 만족값(Cs)에 근거하여 비용 매트릭스를 계산한다.The cost calculation unit 136 calculates the cost matrix by combining the inter-frame relevance and the values for satisfying the speed set by the user, and repeats the process of selecting the frame having the minimum value among the cost matrices as the path frame to the last frame . The cost calculation unit 136 calculates the amount of image movement and the amount of overlapping (C m ) for the amount of overlapping, the weight (? S ) for the value for keeping the speed, and the double speed satisfaction value (C s ) for satisfying the speed set by the user Based on the cost matrix is calculated.

경로 안정화부(140)는 프레임 선택부(130)로부터 수신된 경로 프레임을 기반으로 카메라 경로를 최적화 및 안정화한다. 경로 안정화부(140)가 영상 배속 재생 장치(100)에 포함되는 것으로 기재하고 있으나, 경로 안정화부(140)는 반드시 이에 한정되는 것은 아니며, 경로 안정화부(140)는 독립적인 모듈(소프트웨어, 하드웨어)로 운용되도록 구현될 수 있다. 또한, 경로 안정화부(140)는 프레임 선택부(130)로부터 수신된 프레임을 기준으로 안정화를 수행하므로, 프레임 매칭부(120)의 상관관계 매트릭스 계산과, 프레임 선택부(130)의 비용 매트릭스의 계산과 무관하게 동작할 수 있다.The path stabilizing unit 140 optimizes and stabilizes the camera path based on the path frame received from the frame selecting unit 130. Although the path stabilizing unit 140 is described as being included in the video playback device 100, the path stabilizing unit 140 is not necessarily limited to this. The path stabilizing unit 140 may be an independent module ). ≪ / RTI > Since the path stabilizing unit 140 performs stabilization based on the frame received from the frame selecting unit 130, the path stabilizing unit 140 calculates the correlation matrix of the frame matching unit 120 and the cost matrix of the frame selecting unit 130 It can operate independently of the calculation.

경로 안정화부(140)는 프레임 입력부(142), 경로 분해부(144), 경로 최적화부(146) 및 경로 복원부(148)를 포함한다. 프레임 입력부(142)는 프레임 선택부(130)로부터 모든 프레임 중 일부 선택된 경로 프레임들을 입력받는다. 프레임 입력부(142)는 프레임 선택부(130)로부터 모든 프레임 중 가변적인 간격으로 선택된 경로 프레임들을 입력받는다. 경로 분해부(144)는 프레임들마다 프레임별 경로를 생성한다. 경로 분해부(144)는 프레임에 대한 상관관계 매트릭스의 모션 모델을 기반으로 상기 프레임을 분해(Decompose)하여 프레임별 경로를 생성한다. 경로 분해부(144)는 상관관계 매트릭스에 포함된 파라미터의 개수에 대응하는 개수로 경로 프레임을 분해하여 프레임별 경로를 생성한다. 경로 최적화부(146)는 프레임별 경로마다 최적화를 수행한 최적화 경로들을 생성한다. 경로 최적화부(146)는 프레임별 경로마다 라인 피팅(Line Fitting)을 적용하거나 평활화 필터를 적용하여 최적화를 수행한 결과인 부드러운 경로(Smooth Path)를 계산한다. 경로 복원부(148)는 최적화 경로들을 매트릭스(Matrix)로 복원(Compose)한 후 안정화된 경로를 생성한다. 경로 복원부(148)는 프레임별 경로마다 최적화된 부드러운 경로를 매트릭스로 복원한 와핑(Warping) 매트릭스를 계산한다.The path stabilization unit 140 includes a frame input unit 142, a path decomposition unit 144, a path optimization unit 146, and a path restoration unit 148. The frame input unit 142 receives some selected path frames from all of the frames from the frame selecting unit 130. [ The frame input unit 142 receives the path frames selected at variable intervals among all the frames from the frame selecting unit 130. [ The path decomposition unit 144 generates a frame-by-frame path for each frame. The path decomposition unit 144 decomposes the frame based on the motion model of the correlation matrix for the frame to generate a frame-by-frame path. The path decomposing unit 144 decomposes the number of path frames corresponding to the number of parameters included in the correlation matrix to generate a frame-by-frame path. The path optimization unit 146 generates optimization paths that are optimized for each frame-by-frame path. The path optimizing unit 146 calculates a smooth path, which is a result of performing line fitting or applying a smoothing filter to each frame for each frame. The path restoring unit 148 restores the optimization paths to a matrix, and then generates a stabilized path. The path restoration unit 148 calculates a warping matrix in which a smooth path optimized for each frame-specific path is restored into a matrix.

렌더링부(150)는 안정화된 카메라 경로를 기반으로 배속 재생을 위한 영상을 렌더링(Rendering)한다. 렌더링부(150)는 경로 프레임의 모든 픽셀값에 와핑 매트릭스(B(t))를 곱해서 출력되는 좌표로 프레임의 픽셀값을 이동하도록 영상을 렌더링한다.The rendering unit 150 renders an image for double speed playback based on the stabilized camera path. The rendering unit 150 multiplies all the pixel values of the path frame by the wavelet matrix B (t), and renders the image so as to move the pixel values of the frame to the output coordinates.

도 2는 본 실시예에 따른 영상 배속 재생 과정을 전반적으로 설명하기 위한 순서도이다.FIG. 2 is a flowchart for explaining the video double speed playback process according to the present embodiment.

영상 배속 재생 장치(100)는 원본 영상(촬영된 영상)을 입력받는다(S210). 예컨대, 영상 배속 재생 장치(100)는 1초에 30 FPS(Frame Per Second)를 갖는 1분짜리 동영상의 원본 영상(1,800 개의 프레임)을 입력받는다. 단계 S210에서, 원본 영상은 고정형 카메라가 아닌 일반적인 촬영 장비에서 별도의 안정화 장비 없이 촬영한 영상을 의미한다. The video-image playback device 100 receives the original video (captured video) (S210). For example, the image double speed playback apparatus 100 receives an original image (1,800 frames) of one minute of video having 30 frames per second (FPS) per second. In step S210, the original image refers to an image photographed by a general photographing apparatus, not a fixed type camera, without a separate stabilizing apparatus.

영상 배속 재생 장치(100)는 원본 영상에 포함된 프레임(1,800 개의 프레임) 각각의 특징점(Feature Point)을 추출한다. 영상 배속 재생 장치(100)는 각각의 프레임의 특징점을 이용하여 인접 프레임 간에 매칭을 수행한다(S220). 예컨대, 영상 배속 재생 장치(100)는 모든 프레임(1,800 개의 프레임) 중 인접 프레임(‘1~2번째 프레임’, ‘2~3번째 프레임’, ‘3~4번째 프레임’… ‘1,799~1,800번째 프레임’) 간의 프레임 매칭을 수행한다. 영상 배속 재생 장치(100)는 인접 프레임(‘1~2번째 프레임’, ‘2~3번째 프레임’, ‘3~4번째 프레임’… ‘1,799~1,800번째 프레임’) 간의 상관관계 매트릭스를 계산한다. 인접 프레임 간의 상관관계 매트릭스는 한 번만 계산해 놓으면 다시 계산할 필요가 없다. 단계 S220에서, 영상 배속 재생 장치(100)는 원본 영상의 프레임 각각에 대한 특징점을 서로 비교하는 방식으로 매칭하여 상관관계 매트릭스를 계산한다. 상관관계 매트릭스를 계산하는 구체적인 동작 방법은 이하, 도 4에서 설명하도록 한다.The image-speed playback apparatus 100 extracts feature points of each of the frames (1,800 frames) included in the original image. The image data playback device 100 performs matching between adjacent frames using the minutiae of each frame (S220). For example, the image double speed playback apparatus 100 may be configured to select one of the adjacent frames ('first to second frame', 'second to third frame', 'third to fourth frame' Frame '). The image quality playback apparatus 100 calculates a correlation matrix between adjacent frames (first to second frame, second to third frame, third to fourth frame, ..., 1,799 to 1,800 th frame) . Correlation matrices between adjacent frames need not be recalculated once calculated. In step S220, the image quality doubling playback apparatus 100 calculates correlation matrices by matching feature points of each frame of the original image with each other. A concrete operation method of calculating the correlation matrix will be described below with reference to FIG.

영상 배속 재생 장치(100)는 매칭된 프레임 중 연관성이 가장 높은 프레임을 경로 프레임으로 선택한다(S230). 단계 S230에서 영상 배속 재생 장치(100)는 상관관계 매트릭스를 기반으로 프레임 간의 연관성을 비교한 비용 매트릭스를 계산한다. 영상 배속 재생 장치(100)는 비용 매트릭스를 이용하여 프레임 간의 연관성이 가장 높은 프레임을 경로 프레임으로 선택한다. 예컨대, 영상 배속 재생 장치(100)는 배속 재생이 16배속으로 설정된 경우, 1번째 프레임(기준 프레임)과 2~32번째 프레임(배속 × 2)을 비교하여 1번째 프레임(기준 프레임)과 연관성이 가장 높은 프레임을 경로 프레임으로 선택한다.The image data playback device 100 selects a frame having the highest relevance among the matched frames as a path frame (S230). In step S230, the image quality playback apparatus 100 calculates a cost matrix in which associations among frames are compared based on a correlation matrix. The image-quality playback apparatus 100 selects a frame having the highest correlation among frames as a path frame by using a cost matrix. For example, when the double-speed reproduction is set to 16-times speed, the image-type double-speed playback apparatus 100 compares the first frame (reference frame) with the second through the 32nd frame (double speed x 2) The highest frame is selected as the route frame.

영상 배속 재생 장치(100)는 1번째 프레임(기준 프레임)과 2~32번째 프레임(배속 × 2)의 연관성을 확인하기 위해 비용 매트릭스를 계산한다. 예컨대, 배속 재생이 16배속으로 설정된 경우, 영상 배속 재생 장치(100)는 1번째 프레임(기준 프레임)과 2~32번째 프레임(배속의 2배)까지를 비교하는 비용 매트릭스를 계산한다.The video image playback device 100 calculates a cost matrix to check the association between the first frame (reference frame) and the second to 32 < th > frame (double speed x 2). For example, when the double speed reproduction is set to the 16x speed, the image double speed playback apparatus 100 calculates a cost matrix for comparing the first frame (reference frame) to the second to the 32nd frame (twice the speed).

먼저, 영상 배속 재생 장치(100)는 ‘1번째 프레임’과 ‘2번째 프레임’의 변화량을 확인하고, ‘1번째 프레임’과 ‘3번째 프레임’의 변화량을 확인하고, ‘1번째 프레임’과 ‘4번째 프레임’의 변화량을 확인하고, ... ‘1번째 프레임’과 ‘32번째 프레임’의 변화량을 확인한다. 이후, 영상 배속 재생 장치(100)는 변화량 중 최소값을 갖는 프레임이 ‘1번째 프레임’과 연관성이 가장 높은 경로 프레임으로 선택한다. 비용 매트릭스를 계산하는 구체적인 방법은 이하, 도 5에서 설명하도록 한다.First, the image data playback device 100 checks the amount of change between the 'first frame' and the 'second frame', checks the amount of change of the 'first frame' and the 'third frame' Check the amount of change of the 'fourth frame', and check the amount of change of the 'first frame' and the '32nd frame'. Then, the image data playback device 100 selects the frame having the minimum value among the variation amounts as the path frame having the highest correlation with the 'first frame'. A specific method of calculating the cost matrix will be described below with reference to FIG.

영상 배속 재생 장치(100)는 단계 S220에서 인접 프레임 간의 상관관계 매트릭스를 모두 계산해 놓기 때문에, 단계 S230에서는 사용자가 선택한 배속에 따른 비용 매트릭스만을 계산하여 배속에 따라 연관성이 높은 프레임으로 이루어진 최적 경로를 쉽게 확인할 수 있다.Since the image multiplier 100 calculates all of the correlation matrices between adjacent frames in step S220, only the cost matrix corresponding to the speed selected by the user is calculated in step S230, and the optimum path made of the frames having high relevance is easily Can be confirmed.

영상 배속 재생 장치(100)는 연산 속도를 빠르게 하기 위해 인접 프레임 간의 상관관계 매트릭스에 연쇄법칙을 적용할 수 있다. 예컨대, 영상 배속 재생 장치(100)는 ‘1번째 프레임’과 ‘10번째 프레임’이 얼마나 차이가 나는지 확인하고자 하는 경우, ‘1~2번째 프레임의 상관관계 매트릭스’, ‘2~3번째 프레임의 상관관계 매트릭스’, ‘3~4번째 프레임의 상관관계 매트릭스’ ... ‘9~10번째 프레임의 상관관계 매트릭스’를 모두 곱하는 ‘연쇄법칙’을 적용하여 ‘1번째 프레임’과 ‘10번째 프레임’의 차이를 빠르게 계산할 수 있다.In order to speed up the computation speed, the image-based double-speed playback apparatus 100 may apply the chain rule to the correlation matrix between neighboring frames. For example, when it is desired to check how much the '1 st frame' and the '10 th frame' are different from each other, the image data playback apparatus 100 may calculate the correlation matrix of the 1 st and 2 nd frames, 1 < th > frame and the 10 < th > frame by applying a 'chaining principle' which multiplies all of the 'correlation matrix' of ' 'Can be calculated quickly.

인접 프레임 간의 상관관계 매트릭스는 한 번만 계산해 놓으면 다시 계산할 필요가 없기 때문에, 사용자가 설정하는 배속에 따라서 비용 매트릭스만을 다시 계산하여 사용자가 배속을 조절할 때마다 빠르게 연산 처리를 수행할 수 있다.Since the correlation matrix between neighboring frames does not need to be recalculated once calculated, only the cost matrix is re-calculated according to the speed set by the user, and the computation processing can be performed quickly each time the user controls the speed.

영상 배속 재생 장치(100)는 기본 프레임 및 경로 프레임을 기반으로 계산된 최적 경로를 안정화한다(S240).The image data rate reproduction apparatus 100 stabilizes the calculated optimal path based on the basic frame and the path frame (S240).

영상 배속 재생 장치(100)는 안정화된 경로를 기반으로 영상을 렌더링한다(S250). 단계 S250에서 영상 배속 재생 장치(100)는 단계 S240을 경유하지 않고 경로 프레임을 기반으로 배속 재생을 위한 영상을 렌더링할 수 있다.The image double speed playback apparatus 100 renders an image based on the stabilized path (S250). In step S250, the image-double-speed playback apparatus 100 may render an image for double-speed playback based on the path frame without passing through step S240.

도 2에서는 단계 S210 내지 단계 S250을 순차적으로 실행하는 것으로 기재하고 있으나, 반드시 이에 한정되는 것은 아니다. 다시 말해, 도 2에 기재된 단계를 변경하여 실행하거나 하나 이상의 단계를 병렬적으로 실행하는 것으로 적용 가능할 것이므로, 도 2는 시계열적인 순서로 한정되는 것은 아니다.Although it is described in Fig. 2 that steps S210 to S250 are sequentially executed, the present invention is not limited thereto. In other words, Fig. 2 is not limited to the time-series order, as it would be applicable to changing and executing the steps described in Fig. 2 or executing one or more steps in parallel.

전술한 바와 같이 도 2에 기재된 본 실시예에 따른 영상 배속 재생의 전반적인 동작 과정은 프로그램으로 구현되고 컴퓨터로 읽을 수 있는 기록매체에 기록될 수 있다. 본 실시예에 따른 영상 배속 재생의 전반적인 동작 과정을 구현하기 위한 프로그램이 기록되고 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. As described above, the overall operation of the image double speed playback according to the embodiment described in FIG. 2 can be implemented by a program and recorded on a computer-readable recording medium. The program for realizing the overall operation of the image double speed reproduction according to the present embodiment is recorded, and the computer readable recording medium includes all kinds of recording devices for storing data that can be read by the computer system.

도 3a 내지 도 3c는 영상 배속 재생에 따른 일반적인 카메라 경로, 안정화된 카메라 경로를 비교 설명하기 위한 도면이다.FIGS. 3A to 3C are diagrams for explaining a comparison between a general camera path and a stabilized camera path according to image double speed playback.

도 3a는 일반적인 촬영 방식으로 영상을 촬영한 경우의 카메라 경로를 나타낸 도면이다. 핸드헬드 카메라 또는 고프로 히어로와 같은 촬영 장비로 일상생활, 극한의 상황, 촬영이 불가능한 스포츠 등을 촬영하고, 촬영된 영상을 재생하는 경우, 영상이 너무 길거나 복잡하고, 단조로운 문제가 있다. 다시 말해, 전문적인 보조 장비 없이 일반적인 촬영 장비로 촬영한 영상은 전문가의 편집이 없기 때문에, 도 3a에 도시된 바와 같이, 불안한(Shaky) 카메라 경로를 갖게 된다. 3A is a diagram showing a camera path when an image is photographed by a general photographing method. In the case of shooting everyday life, extreme situations, sports which can not be photographed, and the like, with a photographing device such as a handheld camera or a kohf hero, the image is too long, complex, and monotonous. In other words, a video shot with a common imaging device without professional assistant equipment has a shaky camera path, as shown in FIG. 3A, because there is no professional editing.

도 3b는 일반적인 촬영 방식으로 촬영한 카메라 경로를 하나의 부드러운 카메라 경로(Smooth Camera Path)로 나타낸 도면이다. 일반적으로 도 3a에 도시된 바와 같은 불안정한 카메라 경로를 안정화하는 경우, 도 3b에 도시된 바와 같이, 부드러운 카메라 경로가 생성된다.FIG. 3B is a view showing a camera path photographed in a general photographing mode by a single smooth camera path (Smooth Camera Path). Generally, when stabilizing an unstable camera path as shown in FIG. 3A, a smooth camera path is generated as shown in FIG. 3B.

도 3c는 불안한(shaky) 경로가 안정화(Stabilized) 경도를 갖도록 변화된 예시를 나타낸 도면이다. 본 실시예에 기재된 영상 배속 재생 장치(100)는 단순히 기 설정된 배속에 해당하는 프레임을 샘플링하여 재생(영상 배속 재생)하는 것이 아니라, 원본 영상의 프레임 각각에 대한 특징점을 서로 비교하는 방식으로 매칭하여 상관관계 매트릭스를 계산하고, 상관관계 매트릭스를 기반으로 프레임 간의 연관성을 비교한 비용 매트릭스를 계산한 후 비용 매트릭스를 기반으로 프레임 간에 연관성이 가장 높은 경로 프레임만을 선택하기 때문에, 도 3c에 도시된 바와 같이, 부드러운 카메라 경로로 변경된다. 예컨대, 일반적으로 영상에 비디오 안정화를 수행한 후 타임 랩스(예컨대, 10 배속)를 수행하거나 영상을 빠르게 기 설정된 배속으로 재생한 후 영상 안정화를 수행할 수 있으나, 모두 불안정한 카메라 경로가 크게 안정화되지는 않는다. 하지만, 본 실시예에서는 단순히 사용자가 입력한 정배속에 해당하는 프레임만을 샘플링하는 것이 아니라 계산된 상관관계 매트릭스를 이용해 비용 매트릭스를 계산한 후 사용자가 설정한 재생 배속과 프레임간 정합도를 고려하여 가변적인 간격으로 프레임 선택하므로, 불안정한 카메라 경로가 크게 안정화된다. 본 실시예의 경우, 영상 배속 재생 장치(100)가 불안정한 카메라 경로를 안정화시키기 위해 별도의 캘리브레이션(Calibration)을 수행하거나 카메라의 포컬 랭스(Focal Length) 등을 확인할 필요가 없다.3C is a diagram showing an example in which the shaky path is changed to have a stabilized hardness. The image double speed playback apparatus 100 according to the present embodiment does not simply sample a frame corresponding to a preset speed and reproduce it (image double speed playback), but performs matching by matching feature points of each frame of the original image with each other After calculating the correlation matrix and calculating the cost matrix in which the associations among the frames are compared based on the correlation matrix, only the path frame with the highest correlation among the frames is selected based on the cost matrix, , A smooth camera path is changed. For example, in general, it is possible to perform time stabilization (e.g., 10 times speed) after performing video stabilization on an image or perform image stabilization after rapidly reproducing an image at a predetermined speed. However, since unstable camera paths are largely stabilized Do not. However, in the present embodiment, instead of sampling only the frame corresponding to the user's input data, the cost matrix is calculated using the calculated correlation matrix, and then the cost matrix is calculated by considering the playback speed and the frame- Since the frame is selected at intervals, unstable camera paths are largely stabilized. In the case of this embodiment, the image double speed playback apparatus 100 does not need to perform a separate calibration to stabilize the unstable camera path or to check the focal length or the like of the camera.

도 4는 본 실시예에 따른 프레임 매칭 과정을 설명하기 위한 순서도이다.FIG. 4 is a flowchart for explaining a frame matching process according to the present embodiment.

영상 배속 재생 장치(100)는 원본 영상에 포함된 모든 프레임(1,800 개의 프레임) 각각에 대한 특징점을 추출한다(S410). 예컨대, 단계 S410에서, 영상 배속 재생 장치(100)는 1번째 프레임에서 ‘500개’의 특징점을 추출할 수 있고, 2번째 프레임에서 ‘495개’의 특징점을 추출할 수 있고, 3번째 프레임에서 ‘497개’의 특징점을 추출할 수 있고, .... 1,800 번째 프레임에서 ‘490개’의 특징점을 추출할 수 있다.The image double speed playback apparatus 100 extracts minutiae for each of all the frames (1,800 frames) included in the original image (S410). For example, in step S410, the image double speed playback apparatus 100 can extract '500' feature points in the first frame, extract '495 feature points' in the second frame, The feature points of '497' can be extracted, and the feature points of '490' can be extracted from the 1,800th frame.

영상 배속 재생 장치(100)는 모든 프레임 각각에 대한 특징점 별로 서술자(Descriptor)를 확인한다(S420). 서술자는 해당 특징점에 대한 일종의 속성 정보 또는 특징 정보(Uniqueness)를 포함한다. 예컨대, 단계 S420에서, 영상 배속 재생 장치(100)는 1번째 프레임에서 추출한‘500개’의 특징점에 대한 ‘500개’의 서술자를 확인하고, 2번째 프레임에서 추출한 ‘495개’의 특징점에 대한 ‘495개’의 서술자를 확인하고, 3번째 프레임에서 추출한 ‘497개’의 특징점에 대한 ‘497개’의 서술자를 확인하고, ... 1,800 번째 프레임에서 추출한 ‘490개’의 특징점에 대한 ‘490개’의 서술자를 확인한다.The image data playback device 100 confirms a descriptor for each minutiae of each frame (S420). The descriptor includes a kind of attribute information or feature information for the feature point. For example, in step S420, the image double-speed playback apparatus 100 confirms 500 descriptors of '500' feature points extracted from the first frame and extracts '500' descriptors of '495' feature points extracted from the second frame 497 descriptors of 497 feature points extracted from the third frame, and 497 feature descriptors of 490 feature points extracted from the 1,800th frame. Identify the 490 descriptors.

영상 배속 재생 장치(100)는 모든 프레임 중 인접 프레임 간에 서술자들을 서로 비교하는 방식으로 매칭하여 인접 프레임 간의 상관관계 매트릭스를 계산한다(S430). 예컨대, 단계 S430에서, 영상 배속 재생 장치(100)는 인접 프레임인 ‘1~2번째 프레임’, ‘2~3번째 프레임’, ‘3~4번째 프레임’… ‘1,799~1,800번째 프레임’ 간의 서술자 비교하는 방식으로 매칭하여 각 프레임에 대한 상관관계 매트릭스를 계산한 후 저장한다. 영상 배속 재생 장치(100)는 ‘1,800 개의 프레임’에 대해 단계 S430을 수행한 결과로 ‘1,799 개’의 상관관계 매트릭스를 계산하여 저장한다.The video image playback apparatus 100 calculates a correlation matrix between neighboring frames by matching the descriptors among neighboring frames of all the frames in a method of comparing them (S430). For example, in step S430, the video playback apparatus 100 transmits the first frame and the second frame, which are adjacent frames, the second through third frames, the third through fourth frames, And '1,799 ~ 1,800th frame', and calculates and stores a correlation matrix for each frame. The image-quality playback apparatus 100 calculates and stores '1, 799' correlation matrices as a result of performing Step S430 for '1,800 frames'.

단계 S430에서, 영상 배속 재생 장치(100)는 인접 프레임 간의 서술자를 비교하는 방식으로 매칭할 때 무작위 샘플 데이터에서 최대 컨센서스(Consensu)를 갖는 모델을 선택하는 알고리즘(RANSAC(RANdom SAmple Consensu) 알고리즘)을 이용하여 오류(Outlier)를 제거하는 과정을 선택적으로 수행한다.In step S430, the image-wattening reproduction apparatus 100 performs an algorithm (RANSAC (RANdom SAmple Consensu) algorithm) for selecting a model having the maximum consensus from the random sample data when matching the descriptors between adjacent frames in a matching manner And selectively removes an outlier from the image.

상관관계 매트릭스는 3×3 매트릭스로서, 3×3 매트릭스에서 1개를 제외한 최대 8개의 변화값 파라미터를 포함한다. 상관관계 매트릭스는 3×3 매트릭스로서, 인접 프레임 간의 변화량 파라미터로서, x축 이동량(tx) 파라미터, y축 이동량(ty) 파라미터, 회전 각도(θ) 파라미터, 크기 파라미터, 종횡비 파라미터, 전단 파라미터 및 사영 파라미터 중 적어도 두 개 이상의 파라미터를 포함한다.The correlation matrix is a 3x3 matrix and includes up to eight change value parameters excluding one in a 3x3 matrix. Correlation matrix is a 3 × 3 matrix, a change amount parameter between adjacent frames, x-axis movement amount (t x) parameters, y-axis movement amount (t y) parameters, the angle of rotation (θ) parameters, size parameters, and the aspect ratio parameter, shear parameters And a projection parameter.

이하, 상관관계 매트릭스(H(t))에 대해 설명한다.Hereinafter, the correlation matrix H (t) will be described.

상관관계 매트릭스(H(t))가 2 DOF(Degree Of Freedom)를 포함하는 변환 모션 모델(Translation Motion Model)로 이루어진 경우, x축 이동량(tx) 파라미터, y축 이동량(ty) 파라미터를 포함한다.When the correlation matrix H (t) is composed of a translation motion model including 2 DOF (Degree of Freedom), the x-axis movement amount (t x ) parameter and the y-axis movement amount (t y ) .

Figure 112016001888972-pat00001
Figure 112016001888972-pat00001

상관관계 매트릭스(H(t))가 3 DOF를 포함하는 기하학 모션 모델(Euclidean Motion Model)로 이루어진 경우, x축 이동량(tx) 파라미터, y축 이동량(ty) 파라미터, 회전 각도(θ) 파라미터를 포함한다.Correlation matrix (H (t)) a geometric motion model comprising a 3 DOF (Euclidean Motion Model), x-axis movement amount (t x) parameters, y-axis movement amount (t y) parameters, the rotational angle (θ) have been made to Parameters.

Figure 112016001888972-pat00002
Figure 112016001888972-pat00002

상관관계 매트릭스(H(t))가 4 DOF를 포함하는 유사성 모션 모델(Similarity Motion Model)로 이루어진 경우, x축 이동량(tx) 파라미터, y축 이동량(ty) 파라미터, 회전 각도(θ) 파라미터, 크기 파라미터를 포함한다.Correlation matrix (H (t)) is the similarity motion model comprising a 4 DOF (Similarity Motion Model), x-axis movement amount (t x) parameters, y-axis movement amount (t y) parameters, the rotational angle (θ) have been made to Parameters, and size parameters.

Figure 112016001888972-pat00003
Figure 112016001888972-pat00003

상관관계 매트릭스(H(t))가 6 DOF를 포함하는 어파인 모션 모델(Affine Motion Model)로 이루어진 경우, x축 이동량(tx) 파라미터, y축 이동량(ty) 파라미터, 회전 각도(θ) 파라미터, 크기 파라미터, 종횡비 파라미터, 전단 파라미터를 포함한다. 어파인 모션 모델의 경우 평행선이 보존된다.If made of a correlation matrix (H (t)) the affine motion model including a 6 DOF (Affine Motion Model), x-axis movement amount (t x) parameters, y-axis movement amount (t y) parameters, the rotation angle (θ ) Parameters, size parameters, aspect ratio parameters, and shear parameters. Parallel lines are preserved for affine motion models.

Figure 112016001888972-pat00004
Figure 112016001888972-pat00004

상관관계 매트릭스(H(t))가 8 DOF를 포함하는 사영 모션 모델(Perspective Motion Model)로 이루어진 경우, x축 이동량(tx) 파라미터, y축 이동량(ty) 파라미터, 회전 각도(θ) 파라미터, 크기 파라미터, 종횡비 파라미터, 전단 파라미터, 사영 파라미터를 포함한다. 사영 모션 모델의 경우 평행선이 보존되지 않는다.Correlation matrix (H (t)) is the projection motion model (Perspective Motion Model), x-axis movement amount (t x) parameters, y-axis movement amount (t y) parameters, the rotational angle (θ) have been made by including a 8 DOF Parameters, size parameters, aspect ratio parameters, shear parameters, and projective parameters. Parallel lines are not preserved for the projective motion model.

Figure 112016001888972-pat00005
Figure 112016001888972-pat00005

도 4에서는 단계 S410 내지 단계 S430을 순차적으로 실행하는 것으로 기재하고 있으나, 반드시 이에 한정되는 것은 아니다. 다시 말해, 도 4에 기재된 단계를 변경하여 실행하거나 하나 이상의 단계를 병렬적으로 실행하는 것으로 적용 가능할 것이므로, 도 4는 시계열적인 순서로 한정되는 것은 아니다.4, steps S410 to S430 are sequentially executed. However, the present invention is not limited to this. In other words, Fig. 4 is not limited to the time-series order, since it would be applicable to changing or executing the steps described in Fig. 4 or executing one or more steps in parallel.

전술한 바와 같이 도 4에 기재된 본 실시예에 따른 프레임 매칭 과정은 프로그램으로 구현되고 컴퓨터로 읽을 수 있는 기록매체에 기록될 수 있다. 본 실시예에 따른 프레임 매칭 과정을 구현하기 위한 프로그램이 기록되고 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. As described above, the frame matching process according to the present embodiment described in FIG. 4 can be implemented as a program and recorded in a computer-readable recording medium. A program for implementing the frame matching process according to the present embodiment is recorded, and a computer-readable recording medium includes all kinds of recording devices for storing data that can be read by a computer system.

도 5는 본 실시예에 따른 프레임 선택 과정을 설명하기 위한 순서도이다.5 is a flowchart illustrating a frame selection process according to the present embodiment.

영상 배속 재생 장치(100)는 상관관계 매트릭스를 기반으로 프레임 간의 상관관계 매트릭스를 이용하여 프레임 간의 연관성(Cm)을 계산한다(S510). 단계 S510에서, 영상 배속 재생 장치(100)는 프레임 간의 상관관계 매트릭스를 기준으로 첫 번째 프레임과 이후 프레임이 최대 재생 배속의 두 배가 되는 프레임까지의 상관관계 매트릭스를 비교한 변화값들로 프레임 간의 연관성(Cm)을 계산한다. 일반적으로 최대 재생 배속은 16 또는 32의 값을 가진다.The image-quality playback apparatus 100 calculates associations (C m ) between frames using a correlation matrix between frames based on the correlation matrix (S510). In step S510, the image-quality-of-view playback apparatus 100 determines whether or not the correlation between the first frame and the subsequent frames based on the correlation matrix between the frames is the change value obtained by comparing the correlation matrix up to the frame having twice the maximum playback speed (C m ). In general, the maximum reproduction speed has a value of 16 or 32. [

프레임 간의 연관성(관계)을 찾는 과정으로서, 영상 배속 재생 장치(100)가 16배속으로 영상 재생 시 ‘1번째 프레임’과 ‘2~32번째 프레임’을 비교하여 프레임 간의 연관성을 계산한다.The relation between the frames is calculated by comparing the 'first frame' and the 'second to 32nd frame' when the image double speed playback apparatus 100 reproduces an image at 16 × speed.

일반적인 방식으로 ‘1번째 프레임’과 ‘10번째 프레임’의 연관성을 확인하기 위해서는 ‘1번째 프레임’에서 추출한 ‘500개’의 특징점과 서술자 조합을 ‘10번째 프레임’에서 추출한 모든 특징점과 서술자 조합을 비교하는 방식으로 매칭하여 매트릭스를 계산해야 한다.In order to confirm the association between the 'first frame' and the 'tenth frame' in general, it is necessary to combine all the feature points and descriptor combinations extracted from the 'tenth frame' The matrices must be matched to calculate the matrices in a comparative manner.

하지만, 본 실시예에서는 단계 S430을 수행하여 미리 계산한 ‘1,799개’의 상관관계 매트릭스를 이용하여 빠르게 사용자가 입력한 배속에 해당하는 비용 매트릭스를 계산할 수 있다. However, in this embodiment, the cost matrix corresponding to the speed input by the user can be quickly calculated by using the correlation matrix of '1,799' previously calculated by performing step S430.

단계 S510에서 영상 배속 재생 장치(100)는 연산 속도를 빠르게 하기 위해 인접 프레임 간의 상관관계 매트릭스에 연쇄 법칙을 적용할 수 있다. 예컨대, 영상 배속 재생 장치(100)는 ‘1번째 프레임’과 ‘10번째 프레임’이 얼마나 차이가 나는지 확인하고자 하는 경우, ‘1~2번째 프레임의 상관관계 매트릭스’, ‘2~3번째 프레임의 상관관계 매트릭스’, ‘3~4번째 프레임의 상관관계 매트릭스’ ... ‘9~10번째 프레임의 상관관계 매트릭스’를 모두 곱하는 연쇄 법칙을 적용하여 ‘1번째 프레임’과 ‘10번째 프레임’의 차이를 빠르게 계산할 수 있다. 인접 프레임 간의 상관관계 매트릭스는 한 번만 계산해 놓으면 다시 계산할 필요가 없기 때문에, 사용자가 설정하는 배속에 따라서 비용 매트릭스만을 다시 계산하여 사용자가 배속을 조절할 때마다 빠르게 연산 처리를 수행할 수 있다.In step S510, the video double-speed playback apparatus 100 may apply a chaining rule to a correlation matrix between neighboring frames in order to increase the computation speed. For example, when it is desired to check how much the '1 st frame' and the '10 th frame' are different from each other, the image data playback apparatus 100 may calculate the correlation matrix of the 1 st and 2 nd frames, The correlation matrix for multiplying the correlation matrix of the ninth to tenth frames by the correlation law of the correlation matrix of the third to fourth frames, The difference can be calculated quickly. Since the correlation matrix between neighboring frames does not need to be recalculated once calculated, only the cost matrix is re-calculated according to the speed set by the user, and the computation processing can be performed quickly each time the user controls the speed.

일반적인 프레임 비교 방식으로 계산하는 경우 ‘1~2번째 프레임’을 비교하는 방식으로 매칭하여 상관관계 매트릭스 계산하고, ‘1~3번째 프레임’을 비교하는 방식으로 매칭하여 상관관계 매트릭스 계산하는 방식으로 계산할 수 있다. 전술한 방식으로 상관관계 매트릭스를 계산하는 경우 연산량이 많아지게 되므로, 본 실시예와 같은 ‘1,799개’의 상관관계 매트릭스를 계산하는 것이 아니라 ‘57,568개’의 상관관계 매트릭스를 계산해야 한다. 영상 배속 재생 장치(100)는 첫 번째 프레임의 상관관계 매트릭스와 이후 프레임의 상관관계 매트릭스를 곱하여 프레임 각각의 비용 매트릭스를 계산할 수 있다.In the case of calculation using a general frame comparison method, a correlation matrix is calculated by a method of comparing 'first to second frame', and a correlation matrix is calculated by matching the 'first to third frame' . In the case of calculating the correlation matrix in the above-described manner, the calculation amount becomes large. Therefore, the correlation matrix of '57, 568' should be calculated instead of calculating the correlation matrix of '1,799' as in the present embodiment. The image quality playback apparatus 100 may calculate the cost matrix of each frame by multiplying the correlation matrix of the first frame by the correlation matrix of the subsequent frame.

단계 S510에서 영상 배속 재생 장치(100)에서 프레임 간의 연관성(Cm)을 계산하는 방법은 [수학식 1]과 같다. In step S510, a method for calculating the correlation (C m ) between frames in the image-by-picture playback apparatus 100 is as shown in the following equation (1).

Figure 112016001888972-pat00006
Figure 112016001888972-pat00006

Cr: i번째 프레임과 j번째 프레임 사이의 영상 이동량, T: i번째 프레임과 j번째 프레임 사이의 상관관계 함수, i: i번째 프레임 인덱스(Index), j: j번째 프레임 인덱스, C0: i번째 프레임과 j번째 프레임 사이의 영상 겹침 정도에 대한 양, x0: 영상의 중심 x 좌표값, y0: 영상의 중심 y 좌표값, Cm: 프레임 간의 연관성으로서, 영상 이동량과 겹침 정도에 대한 양으로 전체 이동 수준을 결정하는 값, Γ: 최대 임계치. 예컨대, Cr(i,j) 값이 τc 보다 큰 경우 최대값으로 Γ의 값을 사용한다. τc: 임계치(Threshold)C r: i image shift amount between the first frame and the j th frame, T: i-th frame and the correlation between the j-th frame related functions, i: i-th frame index (Index), j: j-th frame index, C 0: x 0 is the center x coordinate value of the image, y 0 is the center y coordinate value of the image, C m is the correlation between the frames, and the amount of overlap between the image and the moving image is A value that determines the total movement level in terms of the amount, and Γ is the maximum threshold. For example, when the value of C r (i, j) is larger than τ c , the value of Γ is used as the maximum value. τ c : Threshold

일반적으로 프레임 간의 연관성이 높은 프레임을 계산 방식은 2D 기하학적인 재투영 에러(Geometric Re-projection Error)의 평균값을 사용하기 위해 모든 특징점들에 대한 연산을 수행해야 하며, 빠른 연산을 위한 연쇄법칙을 적용하지 못한다. 본 실시예에 따른 영상 배속 재생 장치(100)는 모션 매트릭스(Motion Matrix)의 기하학적인 dx, dy 매그니튜드(Magnitude)를 특징값으로 사용하기 때문에, ‘연쇄법칙’에 의해 빠른 연산이 가능하다.Generally, frames that have a high correlation between frames must be computed for all feature points in order to use the average value of geometric re-projection errors, and a chain rule for fast operations is applied can not do. Since the image double speed playback apparatus 100 according to the present embodiment uses the geometric dx and dy magnitude of the motion matrix as feature values, it is possible to perform fast operation by the 'chain rule'.

영상 배속 재생 장치(100)는 프레임 별로 사용자가 기 설정한 배속을 만족시키기 위한 배속 만족값(Cs)을 계산한다(S520). 단계 S520에서, 영상 배속 재생 장치(100)는 i번째 프레임 인덱스(i), j번째 프레임 인덱스(j), 사용자가 기 설정한 배속 재생 값(v), 임계치(τs)에 근거하여 사용자가 기 설정한 배속을 만족시키기 위한 배속 만족값(Cs)을 계산한다. 보다 구체적으로 영상 배속 재생 장치(100)는 [수학식 2]를 이용하여 사용자가 기 설정한 배속을 만족시키기 위한 배속 만족값(Cs)을 계산한다.Double-speed video player 100 calculates a speed satisfying value (C s) to satisfy the speed the user has preset for each frame (S520). In step S520, based on the i-th frame index i, the j-th frame index j, the user-preset double speed playback value v, and the threshold value? S , (C s ) for satisfying the preset speed. More specifically, the image double speed playback apparatus 100 calculates a double speed satisfaction value (C s ) for satisfying the speed set by the user using the formula (2).

단계 S520에서 영상 배속 재생 장치(100)는 16배속으로 영상을 재생하는 경우, 16배속을 만족시키기 위한 배속 만족값(Cs)을 계산한다. 예컨대, 프레임 간 스킵 정도에 있어서 유사도 만을 고려 해버리면 사용자가 원하는 배속을 만족 시키기 어렵기 때문에, [수학식 2]를 이용하여 종합 비용을 계산한다. 영상 배속 재생 장치(100)가 계산하는 비용 매트릭스의 종합 비용 함수는 [수학식 2]와 같다.In step S520, when the image is reproduced at the 16x speed, the image quality doubling playback apparatus 100 calculates a double speed satisfaction value ( Cs ) for satisfying the 16x speed. For example, if only the degree of similarity in the degree of skipping between frames is considered, it is difficult for the user to satisfy the desired speed. Therefore, the total cost is calculated using [Equation 2]. The combined cost function of the cost matrix computed by the image-speed-double playback apparatus 100 is expressed by Equation (2).

Figure 112016001888972-pat00007
Figure 112016001888972-pat00007

i: i번째 프레임 인덱스, j: j번째 프레임 인덱스, v: 사용자가 설정 배속 재생 값. 예컨대, 2, 4, 8, 16 등의 값이 입력된다. Cm: 영상 이동량과 겹침 정도에 대한 양으로 i번째 영상과 j번째 영상 간의 전체 이동 수준을 결정하는 값, λs: 배속을 지키는 값에 대한 가중치로서, 0.0 ~ 1.0 사이의 값을 주로 사용한다. Cs: 사용자가 기 설정한 배속을 만족시키기 위한 배속 보정값. 예컨대, 사용자의 희망 배속이 8인 경우, Cs값은 i와 j의 차이가 8일 때 가장 작은 값이 된다. Cs값이 필요한 이유는 영상 간의 일치도가 가장 인접한 프레임일수록 가장 높을 확률을 갖는데, 가장 인접한 프레임만 선택을 하게 되면 사용자가 원하는 배속을 만족할 수 없기 때문이다. C(i,j,v): 최종적으로 비용 매트릭스에서 사용하는 값. C(i,j,v)값은 영상의 일치도와 프레임 점프(스킵) 수준을 포함하는 값이다. C(i,j,v)값은 추후 최적화 경로 계산을 할 때, C(i,j,v)값을 최소가 되도록 하는 i,j값을 찾아내는 방식으로 이용된다. τs: 임계치(Threshold)로서, 프레임 재생 배속의 가중치 값이 너무 커지면 프레임을 결정하는데 영향을 미치기 때문에 기 설정한 상한값이다. τs는 일반적으로 200의 값을 사용할 수 있으나, 구체적인 수치는 설정에 따라 변경될 수 있다.i: i-th frame index, j: j-th frame index, v: user-defined double speed playback value. For example, values of 2, 4, 8, and 16 are input. C m is a value for determining the total movement level between the i-th image and the j-th image in terms of the amount of image movement and the amount of overlapping, and λ s is a weight for keeping the speed, and a value between 0.0 and 1.0 is mainly used . C s : Speed correction value to satisfy the speed set by the user. For example, when the user's desired speed is 8, the value of C s is the smallest value when the difference between i and j is 8. The reason why the value of C s is required is that the matching degree of the images is the highest in the nearest frame, and the user can not satisfy the desired speed if only the nearest frame is selected. C (i, j, v): The value used in the final cost matrix. The value of C (i, j, v) is a value including the degree of matching of the image and the frame jump (skip) level. The value of C (i, j, v) is used to find the value of i, j so as to minimize the value of C (i, j, v) τ s is a threshold value, which is a preset upper limit value because it affects the determination of the frame if the weight value of the frame playback speed is too large. τ s can generally be a value of 200, but specific values can be changed depending on the setting.

영상 배속 재생 장치(100)는 단계 S510에서 계산한 프레임 간의 연관성(Cm)과 단계 S520에서 계산한 배속 만족값(Cs)을 조합하여 비용 매트릭스를 계산한다. 영상 배속 재생 장치(100)는 비용 매트릭스 중 최소값을 갖는 프레임을 경로 프레임으로 선택하는 과정을 마지막 프레임까지 반복하여 경로 프레임만으로 이루어진 최적 경로를 계산한다(S530). 단계 S530에서 영상 배속 재생 장치(100)는 단계 S510에서 계산한 프레임 간의 연관성(Cm), 단계 S520에서 계산한 배속 만족값(Cs)을 조합하여 비용 매트릭스를 계산한다. 보다 구체적으로 영상 배속 재생 장치(100)는 [수학식 2]를 이용하여 비용 매트릭스(C(i,j,v))를 계산한다.Video speed reproduction apparatus 100 is a combination of the speed values calculated at the correlation satisfies (C m) and step S520 between the frames calculated at step S510 (C s) and calculates the cost matrix. The image-speed-playback apparatus 100 calculates an optimal path consisting only of the path frame by repeating the process of selecting the frame having the minimum value among the cost matrix as the path frame until the last frame (S530). Double-speed image reproducing apparatus 100 in step S530 is a combination of a speed calculated from a value satisfying relationship (C m), step S520 between the frames calculated at step S510 (C s) and calculates the cost matrix. More specifically, the image-speed-double playback apparatus 100 calculates the cost matrix C (i, j, v) using the equation (2).

영상 배속 재생 장치(100)는 단계 S530에서 계산된 비용 매트릭스 중 최소값을 갖는 프레임을 경로 프레임으로 선택한다. 영상 배속 재생 장치(100)는 경로 프레임만으로 최적 경로를 계산한다. 예컨대, 영상 배속 재생 장치(100)는 배속 재생이 16배속으로 설정된 경우, 영상 배속 재생 장치(100)는 1번째 프레임과 2~32번째 프레임(배속의 2배)까지를 비교하는 프레임 간 연관성(Cm)을 계산한다.The image data playback device 100 selects a frame having the minimum value among the cost matrices calculated in step S530 as a path frame. The image-speed-double playback apparatus 100 calculates an optimal path only with the path frame. For example, when the double speed reproduction is set to 16x speed, the image double speed playback apparatus 100 sets the frame inter-frame relevance (i.e., the frame rate of the first frame to the second frame to the 32nd frame C m ).

먼저, 영상 배속 재생 장치(100)는 ‘1번째 프레임’과 ‘2번째 프레임’의 변화량을 확인하고, ‘1번째 프레임’과 ‘3번째 프레임’의 변화량을 확인하고, ‘1번째 프레임’과 ‘4번째 프레임’의 변화량을 확인하고, ... ‘1번째 프레임’과 ‘32번째 프레임’의 변화량을 확인한다.First, the image data playback device 100 checks the amount of change between the 'first frame' and the 'second frame', checks the amount of change of the 'first frame' and the 'third frame' Check the amount of change of the 'fourth frame', and check the amount of change of the 'first frame' and the '32nd frame'.

영상 배속 재생 장치(100)는 프레임 별로 사용자가 기 설정한 배속을 만족시키기 위한 배속 만족값(Cs)을 계산한다. 이후, 영상 배속 재생 장치(100)는 1번째 프레임과 2~32번째 프레임(배속의 2배)까지를 비교하는 프레임 간 연관성(Cm), 배속을 지키는 값에 대한 가중치(λs), 사용자가 기 설정한 배속을 만족시키기 위한 배속 만족값(Cs)에 근거하여 비용 매트릭스를 계산한다. The video-image playback device 100 calculates a double-speed satisfaction value (C s ) for satisfying the speed set by the user for each frame. Then, the image-speed-increase playback apparatus 100 calculates inter-frame relevance (C m ) for comparing the first frame with the second to the 32nd frame (twice the speed), the weight (λ s ) And calculates a cost matrix based on a doubling satisfaction value (C s ) for satisfying a predetermined double speed.

영상 배속 재생 장치(100)는 1번째 프레임과 2~32번째 프레임까지를 비교한 비용 매트릭스에서 최소값을 갖는 프레임이 ‘1번째 프레임’과 연관성이 가장 높은 경로 프레임으로 선택한다.The image-quality playback apparatus 100 selects the frame having the minimum value in the cost matrix in which the first frame is compared with the second through the 32nd frames as the route frame having the highest correlation with the 'first frame'.

영상 배속 재생 장치(100)는 단계 530에서 계산한 최적 경로를 프로그래밍(Greedy Programming)한다. 프로그래밍 예시는 다음과 같다.The image-speed playback apparatus 100 programs the optimal path calculated in operation 530 (Greedy Programming). A programming example is as follows.

Figure 112016001888972-pat00008
Figure 112016001888972-pat00008

영상 배속 재생 장치(100)는 [수학식 2]를 이용하여 계산한 비용 매트릭스를 를 기반으로 최적화 경로 계산을 진행한다. The image double speed playback apparatus 100 proceeds to the optimization path calculation based on the cost matrix calculated by using Equation (2).

영상 배속 재생 장치(100)는 DTW(Dynamic Time Warping) 방식과는 다르게 탐욕적(Greedy) 방식으로 최적화 경로를 찾아낸다. 탐욕적인 알고리즘의 특성상 완벽한 최적화 값을 계산할 수는 없지만 최적화에 가까운 값을 높은 확률로 효과적으로 찾아낼 수 있다.The image quality playback apparatus 100 finds an optimization path in a greedy manner unlike the DTW (Dynamic Time Warping) scheme. Due to the nature of greedy algorithms, it is not possible to calculate the perfect optimization value, but it is possible to find a value close to the optimization with high probability.

도 5에서는 단계 S510 내지 단계 S530을 순차적으로 실행하는 것으로 기재하고 있으나, 반드시 이에 한정되는 것은 아니다. 다시 말해, 도 5에 기재된 단계를 변경하여 실행하거나 하나 이상의 단계를 병렬적으로 실행하는 것으로 적용 가능할 것이므로, 도 5는 시계열적인 순서로 한정되는 것은 아니다.Although it is described in Fig. 5 that steps S510 to S530 are sequentially executed, the present invention is not limited thereto. In other words, Fig. 5 is not limited to a time series order, since it would be applicable to changing and executing the steps described in Fig. 5 or executing one or more steps in parallel.

전술한 바와 같이 도 5에 기재된 본 실시예에 따른 프레임 선택 과정은 프로그램으로 구현되고 컴퓨터로 읽을 수 있는 기록매체에 기록될 수 있다. 본 실시예에 따른 프레임 선택 과정을 구현하기 위한 프로그램이 기록되고 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. As described above, the frame selection process according to the present embodiment described in FIG. 5 can be implemented as a program and recorded in a computer-readable recording medium. A program for implementing the frame selection process according to the present embodiment is recorded, and a computer-readable recording medium includes all kinds of recording devices for storing data that can be read by a computer system.

도 6은 본 실시예에 따른 경로 안정화 과정을 설명하기 위한 순서도이다.6 is a flowchart for explaining a path stabilization process according to the present embodiment.

영상 배속 재생 장치(100)는 프레임 선택부(130)로부터 모든 프레임 중 일부 선택된 경로 프레임(가변적인 간격으로 선택된 경로 프레임)들을 입력받는다(S610). The image data playback device 100 receives some selected path frames (path frames selected at variable intervals) of all the frames from the frame selecting unit 130 (S610).

영상 배속 재생 장치(100)는 입력된 프레임들마다 프레임별 경로를 생성한다(S620). 단계 S620에서 영상 배속 재생 장치(100)는 프레임에 대한 상관관계 매트릭스의 모션 모델을 기반으로 상기 프레임을 분해하여 프레임별 경로를 생성한다. 상관관계 매트릭스는 x축 이동량(tx) 파라미터, y축 이동량(ty) 파라미터, 회전 각도(θ) 파라미터, 크기 파라미터, 종횡비 파라미터, 전단 파라미터 및 사영 파라미터 중 적어도 두 개 이상의 파라미터를 포함하는데, 영상 배속 재생 장치(100)는 상관관계 매트릭스에 포함된 파라미터의 개수에 대응하는 개수로 경로 프레임을 분해하여 프레임별 경로를 생성한다.The image-type double speed playback apparatus 100 generates a frame-by-frame path for each input frame (S620). In step S620, the image-double-speed playback apparatus 100 decomposes the frame based on the motion model of the correlation matrix for the frame to generate a frame-by-frame path. Correlation matrix to contain at least two or more parameters of the x-axis shift amount (t x) parameters, y-axis movement amount (t y) parameters, the angle of rotation (θ) parameters, size parameters, and the aspect ratio parameter, the front end parameters and the projection parameter, The image double speed playback apparatus 100 decomposes the number of path frames corresponding to the number of parameters included in the correlation matrix to generate a frame-by-frame path.

영상 배속 재생 장치(100)는 입력된 원본 영상의 모든 프레임 중 각각의 인접 프레임 간의 특징점을 추출하고, 특징점 별로 서술자를 확인한다. 영상 배속 재생 장치(100)는 인접 프레임 간에 서술자들을 서로 비교하는 방식으로 매칭(각 특징점들의 대응점을 찾아 매칭)하는 RANSAC 알고리즘을 이용하여 원본 영상 내의 모든 프레임 간의 상관관계 매트릭스를 산출한다.The image-speed-increase playback apparatus 100 extracts the minutiae between adjacent frames of all the frames of the input original image, and confirms the descriptor per minutiae. The image quality playback apparatus 100 calculates a correlation matrix between all the frames in the original image using a RANSAC algorithm for matching (matching and matching the corresponding points of the respective feature points) in a manner of comparing descriptors among adjacent frames.

‘t-1번째 프레임’과 ‘t번째 프레임’ 사이의 상관관계 매트릭스를 H(t-1)이라고 정의하면, 영상 배속 재생 장치(100)는 ‘t번째 프레임’에서의 카메라의 카메라 경로 C(t)를 [수학식 3]을 이용하여 계산한다.if the correlation matrix between the t-th frame and the t-th frame is defined as H (t-1), then the image-for-picture double-speed playback apparatus 100 sets the camera path C ( t) is calculated using Equation (3).

Figure 112016001888972-pat00009
Figure 112016001888972-pat00009

C(t): ‘t번째 프레임’의 카메라 경로C (t): Camera path of 't-th frame'

C(t-1): ‘t-1번째 프레임’의 카메라 경로C (t-1): Camera path of the (t-1) th frame

H(t-1): ‘t-1번째 프레임’과 ‘t번째 프레임’ 사이의 상관관계 매트릭스H (t-1): a correlation matrix between the 't-1 th frame' and the 't th frame'

Total Path: 실제로 경로는 연속적인 값이 아닌 프레임 별로 하나의 값을 갖는 디지털 값의 집합이다. 다시 말해, ‘t번째 프레임’의 카메라 경로(C(t)(는 3×3 매트릭스로 표현되고 전체 프레임인 ‘1번째 프레임’부터 ‘t번째 프레임’까지의 전체 경로는 각각의 카메라 경로인 C(0), C(1), …, C(t)의 집합이라고 할 수 있다. 예컨대, 전체 영상의 x 방향 움직임을 모든 프레임에 대해서 그래프로 표현한다면 C(0)의 (1,3) 원소, C(1)의 (1,3) 원소, …, C(t)의 (1,3) 원소가 그래프로 표현된다. 단, ‘t번째 프레임’의 카메라 경로(C(t))안에 경로 개수는 상관관계 매트릭스를 계산할 때 이용하는 ‘모션 모델’에 따라 달라진다. Total Path: Actually, a path is a set of digital values with one value per frame, not a continuous value. In other words, the entire path from the first frame to the t-th frame, which is represented by a 3 × 3 matrix and is a whole frame, of the camera path C (t) of the 't th frame' (0, 0), C (1), ..., C (t), for example, if the x- , (1,3) elements of C (t) in C (1) are represented by graphs. However, in the camera path C (t) The number depends on the 'motion model' used to calculate the correlation matrix.

예컨대, 상관관계 매트릭스를 계산할 때 2 DOF를 포함하는 변환 모션 모델을 이용하는 경우 2개의 경로가 생성된다. 상관관계 매트릭스를 계산할 때 4 DOF를 포함하는 유사성 모션 모델을 이용하는 경우 4개의 경로가 생성되고, 6 DOF를 포함하는 어파인 모션 모델을 이용하는 경우 6개의 경로가 생성되고, 8 DOF를 포함하는 사영 모션 모델을 이용하는 경우 8개의 경로가 생성된다.For example, when using a transformed motion model that includes 2 DOFs when calculating the correlation matrix, two paths are created. In calculating the correlation matrix, four paths are generated when using a similarity motion model including four DOFs, and six paths are generated when an affine motion model including six DOFs is used. In the case of the projective motion including eight DOFs When using the model, eight paths are created.

영상 배속 재생 장치(100)는 프레임별 경로마다 최적화를 수행한 최적화 경로들을 생성한다(S630). 단계 S630에서, 영상 배속 재생 장치(100)는 프레임별 경로마다 라인 피팅을 적용하거나 평활화 필터를 적용하여 최적화를 수행한 결과인 부드러운 경로(P(t))를 계산한다.The image-quality-speed playback apparatus 100 generates optimization paths that have been optimized for each frame-by-frame path (S630). In step S630, the image quality doubling playback apparatus 100 calculates a smooth path P (t), which is a result of applying line fitting for each frame or applying a smoothing filter to optimize each frame.

영상 배속 재생 장치(100)는 최적화 경로들을 매트릭스로 복원한 후 안정화된 경로를 생성한다(S640). 단계 S640에서 영상 배속 재생 장치(100)는 프레임별 경로마다 최적화된 부드러운 경로를 매트릭스로 복원한 와핑 매트릭스를 계산한다.The image data playback apparatus 100 reconstructs the optimization paths into a matrix and generates a stabilized path (S640). In step S640, the image quality doubling playback apparatus 100 calculates a weighting matrix in which a smooth path optimized for each frame-specific path is restored into a matrix.

영상 배속 재생 장치(100)가 [수학식 3]을 이용하여 계산된 카메라 경로(C(t))에 최적화 방법을 적용하는 경우, 도 7a에 도시된 바와 같이 부드러운 경로(P(t))가 계산된다.When the image-speed playback apparatus 100 applies the optimization method to the camera path C (t) calculated using Equation (3), a smooth path P (t) is obtained as shown in FIG. 7A .

영상 배속 재생 장치(100)는 최종적으로 각 프레임(프레임 선택부(130)로부터 수신된 경로 프레임)에 [수학식4]로 계산된 와핑 매트릭스(B(t))를 적용하여 안정화된 결과 영상을 얻는다.The image-quality playback apparatus 100 finally applies the wobbing matrix B (t) calculated by the equation (4) to each frame (the path frame received from the frame selector 130) .

Figure 112016001888972-pat00010
Figure 112016001888972-pat00010

C(t), P(t), B(t) 모두 3×3 매트릭스이다.C (t), P (t), and B (t) are all 3 × 3 matrices.

B(t): ‘t번째 프레임’에서 렌더링시 원본 영상에 적용할 와핑 매트릭스(Warping Matrix), P(t): ‘t번째 프레임’의 부드러운 경로(Smooth path), C(t): ‘t번째 프레임’의 카메라 경로, C-1(t): ‘t번째 프레임’의 카메라 경로의 역행렬(T): Smooth path of 't-th frame', C (t): 't (t): Warping matrix to be applied to the original image at rendering in' Th frame ', C -1 (t): Inverse of the camera path of the' t-th frame '

와핑 매트릭스(B(t))는 다음과 같이 표현될 수 있다.The warping matrix B (t) can be expressed as:

Figure 112016001888972-pat00011
Figure 112016001888972-pat00011

B(0): ‘0번째 프레임’의 와핑 매트릭스, B(1): ‘1번째 프레임’의 와핑 매트릭스, B(t-1): ‘t-1번째 프레임’의 와핑 매트릭스, B(t): ‘t번째 프레임’의 와핑 매트릭스, P(0): ‘0번째 프레임’의 부드러운 경로, P(1): ‘1번째 프레임’의 부드러운 경로, P(t-1): ‘t-1번째 프레임’의 부드러운 경로, P(t): ‘t번째 프레임’의 부드러운 경로, C-1(0): ‘0번째 프레임’의 카메라 경로의 역행렬, C-1(1): ‘1번째 프레임’의 카메라 경로의 역행렬, C-1(t-1): ‘t-1번째 프레임’의 카메라 경로의 역행렬, C-1(t): ‘t번째 프레임’의 카메라 경로의 역행렬B (t) is the Wapping matrix of the '0th frame', B (1) is the Wapping matrix of the 1st frame, B (t- : soft path of '0th frame', P (1): smooth path of '1st frame', P (t-1) C 1 (0): Inverse of the camera path of the '0 th frame', C -1 (1): '1 st frame' C -1 (t-1): Inverse of the camera path of the 't-1 th frame', C -1 (t): Inverse of the camera path of the 't th frame'

일반적인 환경에서 [수학식 4]를 이용한 부드러운 경로(P(t))의 계산이 가능하지만, 본 실시예에서와 같이 영상을 안정화하면서 배속 재생을 위해 모션을 구해야 하는 프레임 간의 간격이 클 경우에는 모션 추정값(Motion Estimation)인 상관관계 매트릭스(H(t))안에 오류(Error)가 필연적으로 발생하게 된다.It is possible to calculate a smooth path P (t) using [Equation 4] in a general environment. However, if the interval between frames for which motion is to be sought for the double speed reproduction is large as in the present embodiment, An error will inevitably occur in the correlation matrix H (t), which is the estimated value (Motion Estimation).

상관관계 매트릭스(H(t)) 내에서의 오류는 [수학식 3]과 같이 지속적으로 오류가 누적해서 곱해지는 구조이기 때문에 영상의 길이가 길어질수록 카메라 경로(C(t))는 점점 이탈하게 된다. 오류로 인해 이탈해 버린 카메라 경로(C(t))를 이용하여 부드러운 경로(P(t))를 계산하기 때문에, 계산된 부드러운 경로(P(t)) 역시 많은 오류를 포함하게 된다. 오류를 포함한 부드러운 경로(P(t))로 인해 최종적으로 구해진 와핑 매트릭스(B(t))를 영상에 적용하면 도 7b에 도시된 바와 같이 영상 내에 많은 홀(Hole)이 발생하게 된다. Since the error in the correlation matrix H (t) is a structure in which the error is continuously multiplied by the cumulative error as shown in Equation (3), the camera path C (t) do. The calculated smooth path P (t) also contains a large number of errors because the smooth path P (t) is calculated using the camera path C (t) that has deviated due to the error. A large number of holes are generated in the image as shown in FIG. 7B when the final weighting matrix B (t) obtained by the smooth path P (t) including the error is applied to the image.

본 실시예에 따른 영상 배속 재생 장치(100)는 영상 내에 발생하는 홀을 해결하기 위해 프레임 별 경로 최적화(Frame-Wise Path Optimization)를 수행한다. 본 실시예에 따른 영상 배속 재생 장치(100)는 일반적인 영상 처리 방식에서 생성되는 글로벌 경로(Global Path)가 가지고 있는 오류 누적 문제를 해결하고자 각 프레임 별로 경로를 계산한다. The image-quality playback apparatus 100 according to the present embodiment performs frame-by-frame path optimization to resolve holes generated in an image. The image quality doubling playback apparatus 100 according to the present embodiment calculates a path for each frame to solve an error accumulation problem of a global path generated in a general image processing method.

영상 배속 재생 장치(100)는 프레임 선택부(130)로부터 입력된 경로 프레임 별 상관관계 매트릭스를 분해(Decomposieion) 하고 최적화한 후 복원(Compose)하여 와핑(Warping matrix)를 계산하여 상관관계 매트릭스에 오류가 발생하더라도 오류가 누적되지 않도록 한다.The image data playback apparatus 100 decodes the correlation matrix for each path frame input from the frame selection unit 130, optimizes and then compiles it to calculate a warping matrix, So that errors do not accumulate.

다시 말해, 일반적인 영상 처리 방식에서는 단, 1개의 최적 경로(글로벌 경로)를 이용하여 1개의 부드러운 경로를 구했다면, 본 실시예에 따른 영상 배속 재생 장치(100)가 N개의 프레임에 대한 N개의 경로를 생성하고 각 경로당 한 개의 대표값을 이용하여 부드러운 경로(P(t))를 계산한다. N개의 프레임 각각 경로를 생성하므로 M개의 모션 모델(Motion Model)을 이용할 경우, 본 실시예에는 총 M×N = MN개의 경로를 생성하게 된다. 일반적인 영상 처리 방식은 M 개의 경로만 생성한다.In other words, in the general image processing method, if one smooth path is obtained by using one optimum path (global path), the image-rearranging playback apparatus 100 according to the present embodiment sets N paths And calculates a smooth path P (t) using one representative value per path. Since N paths are generated for each of the N frames, when M motion models are used, a total of M x N = MN paths are generated in this embodiment. A general image processing method generates only M paths.

사용자 지정 윈도우(Window) 사이즈(앞뒤로 얼마나 볼 것인지 설정, r값이 클수록 안정화가 더 많이 되지만 홀이 발생할 가능성이 커짐, 실제 구현상으로는 15를 사용할 수 있다)를 ‘r’이라고 하면 각각의 프레임 t에서의 카메라 경로 Patht,r은 [수학식 6]과 같이 정의할 수 있다.Let r be the custom window size (set how much you want to see back and forth, r will be more stabilized but more likely to cause holes, you can use 15 in actual implementation) The camera path Path t, r can be defined as Equation (6).

Figure 112016001888972-pat00012
Figure 112016001888972-pat00012

Patht,r : 각각의 프레임에서의 카메라 경로, C(t): ‘t번째 프레임’의 카메라 경로, C(t-1): ‘t-1번째 프레임’의 카메라 경로, C(t-2): ‘t-2번째 프레임’의 카메라 경로, C(t-r): ‘t-r번째 프레임’의 카메라 경로, r: 사용자 지정 윈도우의 사이즈, H-1(t): ‘t번째 프레임’과 ‘t+1번째 프레임’ 간의 상관관계 매트리스의 역행렬, H-1(t+1): ‘t+1번째 프레임’과 ‘t+2번째 프레임’ 간의 상관관계 매트리스의 역행렬, H-1(t+r-1): ‘t+r-1번째 프레임’과 ‘t+r번째 프레임’ 간의 상관관계 매트리스의 역행렬, H(t+r-1): ‘t+r-1번째 프레임’과 ‘t+r번째 프레임’ 간의 상관관계 매트리스, H(t+1): ‘t+1번째 프레임’과 ‘t+2번째 프레임’ 간의 상관관계 매트리스, I3 × 3: 3×3 항등행렬(Identity Matrix)

Figure 112016001888972-pat00013
Path t, r: in each frame the camera path, C (t): the "t-th frame, the camera path, C (t-1): camera path" t-1 th frame ", C (t-2 ): Camera path of 't-2 nd frame', C (tr): Camera path of 'tr th frame', r: Size of user specified window, H -1 (t) "the inverse matrix of the correlation relationship between the mattress, H -1 (t + 1) : '+1 th frame t + 1 the inverse of the first frame, and" t + 2 the correlation between the second frame, between the mattress, H -1 (t + r -1: the inverse matrix of the correlation mattress, H (t + r-1): 't + r-1' th frame and t + r- (t + 1): correlation mattress between 't + 1' th frame and 't + 2 th frame', I 3 × 3 : 3 × 3 Identity Matrix,
Figure 112016001888972-pat00013

영상 배속 재생 장치(100)는 프레임별 경로 최적화 방법을 사용하여 [수학식 7]과 같이 ‘t번째 프레임’의 카메라 패스(C(t))를 계산한다.The image quality doubling playback apparatus 100 calculates the camera path C (t) of the 't-th frame' using Equation (7) using the frame-specific path optimization method.

Figure 112016001888972-pat00014
Figure 112016001888972-pat00014

영상 배속 재생 장치(100)는 먼저, 3×3 매트릭스내 최대 8개의 경로는 모션 추정 모델에 따라 각기 다른 방식의 최적화 방법을 적용할 수 있다. 이하, 설명하는 방식은 실시예일 뿐이므로, 실제 경로의 개수 및 최적화 방식은 달라질 수 있다.In the image-aspect-fast playback apparatus 100, a maximum of eight paths in a 3 × 3 matrix can be applied to different optimization methods according to a motion estimation model. Since the method described below is only an embodiment, the number of actual paths and the optimization method can be changed.

영상 배속 재생 장치(100)는 상관관계 매트릭스를 추정(Estimation)할 때 3 DOF를 포함하는 기하학 모션 모델을 사용했다고 가정하는 경우, 영상 배속 재생 장치(100)는 x축 이동량(tx) 파라미터, y축 이동량(ty) 파라미터, 회전 각도(θ) 파라미터는 [수학식 8]을 이용하여 분해할 수 있다. When it is assumed that the image-speed playback apparatus 100 uses a geometric motion model including three DOFs when estimating the correlation matrix, the image-double-speed playback apparatus 100 sets the x-axis movement amount (t x ) the y-axis movement amount (t y ) parameter, and the rotation angle (?) parameter can be decomposed using the following equation (8).

Figure 112016001888972-pat00015
Figure 112016001888972-pat00015

회전 각도(θ) 파라미터의 변화가 심할수록 사용자가 느끼기에 영상이 안정적이지 않다고 판단하게 되므로, 영상 배속 재생 장치(100)는 회전 각도(θ) 파라미터에 대응하는 1개의 경로에 대해서는 L1-절대값 선 피팅(L1-Norm Line Fitting)을 적용하여 부드러운 경로(P(t))를 구한다. Since the image is judged to be unstable by the user as the change in the rotation angle? Parameter is greater, the image double speed playback apparatus 100 sets the L1-absolute value? 1 for one path corresponding to the rotation angle? Apply smooth path (P (t)) by applying line fitting (L1-Norm Line Fitting).

단, 부정확하게 계산된 카메라 경로(C(t))로 인해 발생하는 오류를 최소화 하기 위해, 영상 배속 재생 장치(100)는 라인 피팅(Line Fitting)을 계산할 때 n개의 포인트(Point) (n < 2× r + 1)를 랜덤하게 선택하는 RANSAC 알고리즘 및 IRLS(Iteratively Reweighted Least Squares)방식을 사용한다. However, in order to minimize the error caused by the incorrectly calculated camera path C (t), the image-speed-double playback apparatus 100 calculates n points (n < 2 × r + 1) is randomly selected, and an IRLS (Iteratively Reweight Least Squares) method is used.

또한, 영상 배속 재생 장치(100)는 실제 프레임의 차이는 1이라고 하더라도 라인 필터링에 들어가는 x 위치(Position)에는 적절한 인터벌(Interval)(예컨대, 5)을 곱해주어 세밀한 x 간격으로 인한 영향을 제거해 준다. In addition, the image double speed playback apparatus 100 multiplies the x position (Position) entering the line filtering by an appropriate interval (for example, 5) even if the difference of the actual frame is 1, thereby eliminating the influence due to the fine x interval .

또한, x축 이동량(tx) 파라미터, y축 이동량(ty) 파라미터는 로테이션(Rotation)에 비해 그 변화량이 크기 때문에, 영상 배속 재생 장치(100)는 평활화 필터인 사비츠키-골레이 필터(Savitzky-Golay Filter)를 이용하여 최적화를 진행한다.In addition, x-axis movement amount (t x) parameters, y-axis movement amount (t y) parameters are due to its variation in size compared to the rotation (Rotation), imaging speed playback device 100 is a four Bits key smoothing filter-Golay filter (Savitzky-Golay Filter).

영상 배속 재생 장치(100)는 최적화를 통해 부드러운 경로(P(t))를 구했다면 최종적으로 결과 영상에 적용할 와핑 매트릭스(B(t))는 [수학식9]를 이용하여 계산할 수 있다. If the image-speed-increase playback apparatus 100 obtains the smooth path P (t) through optimization, the weighting matrix B (t) to be finally applied to the resultant image can be calculated using Equation (9).

Figure 112016001888972-pat00016
Figure 112016001888972-pat00016

C(t): ‘t번째 프레임’의 카메라 경로, C-1(t): ‘t번째 프레임’의 카메라 경로의 역행렬, I3×3 - 1: 3×3 항등행렬의 역행렬 =

Figure 112016001888972-pat00017
, I 3: 3×3 항등행렬 =
Figure 112016001888972-pat00018
, P(t): ‘t번째 프레임’의 부드러운 경로, B(t): ‘t번째 프레임’에서 렌더링시 원본 영상에 적용할 와핑 매트릭스C (t): the camera path for the "t th frame ', C -1 (t): ' t -th frame, the inverse matrix of the camera path, I 3 × 3 - 1: 3 × 3 identity matrix in the inverse matrix =
Figure 112016001888972-pat00017
, I 3 × 3 : 3 × 3 identity matrix =
Figure 112016001888972-pat00018
, T (t): smooth path of 't-th frame', B (t)

영상 배속 재생 장치(100)는 마지막으로 일반적인 영상 처리 방법에서 많이 사용되는 코너(Corner)점 추출 및 광 흐름 매칭(Optical Flow Matching) 방식은 배속 재생시 모션(Motion)이 큰 환경에서는 적합하지 않기 때문에, 본 실시예에서는 ORB(Oriented FAST and Rotated BRIEF) 알고리즘을 이용하여 빠르게 프레임 각각의 특징점을 추출하고, 특징점 별 서술자를 확인하여 인접 프레임을 서로 비교하는 방식으로 매칭한다.In the video double speed playback apparatus 100, since a corner point extraction and an optical flow matching method, which are often used in general image processing methods, are not suitable in an environment in which motion is large during double speed reproduction In the present embodiment, the feature points of each frame are extracted quickly using an ORB (Oriented FAST and Rotated BRIEF) algorithm, and the neighboring frames are compared with each other by checking the descriptors according to the feature points.

도 6에서는 단계 S610 내지 단계 S640을 순차적으로 실행하는 것으로 기재하고 있으나, 반드시 이에 한정되는 것은 아니다. 다시 말해, 도 6에 기재된 단계를 변경하여 실행하거나 하나 이상의 단계를 병렬적으로 실행하는 것으로 적용 가능할 것이므로, 도 6은 시계열적인 순서로 한정되는 것은 아니다.Although it is described in Fig. 6 that steps S610 to S640 are sequentially executed, the present invention is not limited thereto. In other words, Fig. 6 is not limited to the time-series order, since it would be applicable to changing or executing the steps described in Fig. 6 or executing one or more steps in parallel.

전술한 바와 같이 도 6에 기재된 본 실시예에 따른 경로 안정화 과정은 프로그램으로 구현되고 컴퓨터로 읽을 수 있는 기록매체에 기록될 수 있다. 본 실시예에 따른 경로 안정화 과정을 구현하기 위한 프로그램이 기록되고 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. As described above, the path stabilization process according to the present embodiment described in FIG. 6 can be implemented by a program and recorded on a computer-readable recording medium. A program for implementing the path stabilization process according to the present embodiment is recorded, and a computer-readable recording medium includes all kinds of recording devices for storing data that can be read by a computer system.

도 8은 본 실시예에 따른 렌더링 과정을 설명하기 위한 순서도이다.8 is a flowchart illustrating a rendering process according to the present embodiment.

영상 배속 재생 장치(100)는 경로 안정화부(140)로부터 수신된 안정화 경로를 수신하여 디코딩을 수행한다(S810).The image data playback apparatus 100 receives the stabilization path received from the path stabilization unit 140 and performs decoding (S810).

영상 배속 재생 장치(100)는 디코딩된 안정화 카메라 경로를 기반으로 배속 재생을 위한 영상을 렌더링한다(S820). 단계 S820에서, 영상 배속 재생 장치(100)는 경로 프레임의 모든 픽셀값에 와핑 매트릭스(B(t))를 곱해서 출력되는 좌표로 프레임의 픽셀값을 이동하도록 영상을 렌더링한다.The image double speed playback apparatus 100 renders an image for double speed playback based on the decoded stabilized camera path (S820). In step S820, the image-quality playback apparatus 100 multiplies all the pixel values of the path frame by the wavelet matrix B (t), and renders the image so as to move the pixel values of the frame to the output coordinates.

단계 S820에서, 영상 배속 재생 장치(100)는 [수학식 9]를 이용하여 와핑 매트릭스(B(t))와 동일한 값을 갖는 부드러운 경로(P(t))를 해당 프레임에 곱해주면 안정화 영상이 출력된다.In step S820, the image playback apparatus 100 multiplies the corresponding frame by the smooth path P (t) having the same value as the weighting matrix B (t) using Equation (9) .

영상 배속 재생 장치(100)는 경로 프레임에 해당하는 모든 픽셀값에 부드러운 경로(P(t))의 3×3 매트릭스를 곱해서 출력된 출력되는 좌표로 프레임의 픽셀값을 이동하면 안정화 경로에 해당하는 영상이 출력된다. The image multiplier 100 multiplies all pixel values corresponding to the path frame by a 3 × 3 matrix of smooth paths P (t) and moves the pixel values of the frame to the output coordinates to output Video is output.

단계 S820을 수학식으로 표현하면 [수학식 10]과 같다. [수학식 9]를 이용하여 프레임별 경로를 생성할 경우 부드러운 경로(P(t))와 와핑 매트릭스(B(t))가 동일한 3×3 매트릭스를 나타냄을 확인하였으므로, 최종적으로 안정된 결과 영상을 얻기 위해 와핑 매트릭스(B(t))를 곱하는 것과 부드러운 경로(P(t))를 곱하는 것이 동일한 결과를 얻게 된다.Step S820 is expressed by the following equation (10). Since we have confirmed that the smooth path P (t) and the wavelet matrix B (t) represent the same 3 × 3 matrix when generating a frame-by-frame path using Equation 9, Multiplying the warping matrix B (t) by the soft path P (t) to obtain the same result.

Figure 112016001888972-pat00019
Figure 112016001888972-pat00019

영상 배속 재생 장치(100)는 안정화 경로가 적용된 프레임을 인코딩한다(S830).The image-aspect-fast playback apparatus 100 encodes a frame to which the stabilization path is applied (S830).

도 8에서는 단계 S810 내지 단계 S830을 순차적으로 실행하는 것으로 기재하고 있으나, 반드시 이에 한정되는 것은 아니다. 다시 말해, 도 8에 기재된 단계를 변경하여 실행하거나 하나 이상의 단계를 병렬적으로 실행하는 것으로 적용 가능할 것이므로, 도 8은 시계열적인 순서로 한정되는 것은 아니다.Although it is described in Fig. 8 that steps S810 to S830 are sequentially executed, it is not limited thereto. In other words, Fig. 8 is not limited to the time-series order, since it would be applicable to changing and executing the steps described in Fig. 8 or executing one or more steps in parallel.

전술한 바와 같이 도 8에 기재된 본 실시예에 따른 렌더링 과정은 프로그램으로 구현되고 컴퓨터로 읽을 수 있는 기록매체에 기록될 수 있다. 본 실시예에 따른 렌더링 과정을 구현하기 위한 프로그램이 기록되고 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. As described above, the rendering process according to the present embodiment described in FIG. 8 can be implemented as a program and recorded in a computer-readable recording medium. A program for implementing the rendering process according to the present embodiment is recorded, and a computer-readable recording medium includes all kinds of recording devices for storing data that can be read by a computer system.

도 9는 본 실시예에 따른 비용 매트릭스를 설명하기 위한 예시도이다.9 is an exemplary diagram for explaining a cost matrix according to the present embodiment.

영상 배속 재생 장치(100)는 입력된 원본 영상에서 모든 프레임의 모션 정보를 계산한다. 일반적인 모션 정보 계산 방법은 HARRIS + BRIEF 방식에 RANSAC 알고리즘을 이용하여 모션 정보를 계산하는 방식이나, 본 실시예에서는 ORB(Oriented FAST and Rotuted BRIEF) 특징점과 RANSAC 알고리즘을 활용하여 모션 정보를 계산하는 방식이다.The image-aspect-ratio playback apparatus 100 calculates motion information of all frames in the input original image. The general motion information calculation method is a method of calculating motion information using the RANSAC algorithm in the HARRIS + BRIEF method, but in the present embodiment, the motion information is calculated using the ORB (Oriented FAST and Rotated BRIEF) feature points and the RANSAC algorithm .

영상 배속 재생 장치(100)는 계산한 모션 정보를 기반으로 비용 매트릭스를 계산한다. 영상 배속 재생 장치(100)는 비용 매트릭스 계산에 있어서 기존의 동적 프로그래밍(Dynamic programming) 방식이 아닌 탐욕적인(Greedy) 방식으로 필요한 프레임에 대해서만 계산을 수행한다. 영상 배속 재생 장치(100)는 획득한 경로 정보를 기반으로 안정화된 결과 영상을 생성한다.The image-speed-double playback apparatus 100 calculates a cost matrix based on the calculated motion information. The image quality doubling reproduction apparatus 100 performs calculation only on a frame required in a greedy scheme rather than a conventional dynamic programming scheme in cost matrix calculation. The image-speed-playback device 100 generates a stabilized result image based on the obtained path information.

영상 배속 재생 장치(100)는 1초에 30 FPS(Frame Per Second)를 갖는 1분짜리 동영상의 원본 영상(1,800 개의 프레임)을 입력받는다. 영상 배속 재생 장치(100)는 원본 영상에 포함된 모든 프레임(1,800 개의 프레임) 각각에 대한 특징점을 추출한다. 영상 배속 재생 장치(100)는 예컨대, 1번째 프레임에서 ‘500개’의 특징점을 추출할 수 있고, 2번째 프레임에서 ‘495개’의 특징점을 추출할 수 있고, 3번째 프레임에서 ‘497개’의 특징점을 추출할 수 있고, .... 1,800 번째 프레임에서 ‘490개’의 특징점을 추출할 수 있다.The video image playback device 100 receives an original image (1,800 frames) of one minute of video having 30 frames per second (FPS) per second. The image-speed-increase playback apparatus 100 extracts feature points for all the frames (1,800 frames) included in the original image. The video image reproducing apparatus 100 can extract '500' feature points from the first frame, extract '495 feature points from the second frame, extract' 497 'images from the third frame, , And extracts feature points of '490' from the 1,800th frame.

영상 배속 재생 장치(100)는 모든 프레임 각각에 대한 특징점 별로 서술자를 확인한다. 영상 배속 재생 장치(100)는 1번째 프레임에서 추출한‘500개’의 특징점에 대한 ‘500개’의 서술자를 확인하고, 2번째 프레임에서 추출한 ‘495개’의 특징점에 대한 ‘495개’의 서술자를 확인하고, 3번째 프레임에서 추출한 ‘497개’의 특징점에 대한 ‘497개’의 서술자를 확인하고, ... 1,800 번째 프레임에서 추출한 ‘490개’의 특징점에 대한 ‘490개’의 서술자를 확인한다.The image data playback device 100 confirms the descriptors for each of the minutiae for each frame. The image double speed playback apparatus 100 confirms 500 descriptors for the 500 feature points extracted in the first frame and 495 descriptors for the 495 feature points extracted in the second frame 497 pieces of descriptors were extracted from the 497 pieces of feature points extracted from the 3rd frame and ... 490 pieces of descriptors were extracted from the 490 pieces of feature points extracted from the 1,800th frame Check.

영상 배속 재생 장치(100)는 모든 프레임 중 인접 프레임 간에 서술자들을 서로 비교하는 방식으로 매칭하여 인접 프레임(‘1~2번째 프레임’, ‘2~3번째 프레임’, ‘3~4번째 프레임’… ‘1,799~1,800번째 프레임’) 간의 상관관계 매트릭스를 계산한다. 영상 배속 재생 장치(100)는 ‘1,800 개의 프레임’중 인접 프레임 간에 서술자들을 서로 비교하는 방식으로 매칭하여 ‘1,799 개’의 상관관계 매트릭스를 계산하여 저장한다. 상관관계 매트릭스는 한 번만 계산해서 저장해 놓으면 다시 계산할 필요가 없다. 이후 사용자가 설정한 배속에 따라서 배속에 따라 비용 매트릭스를 바로바로 계산하여 영상을 렌더링할 수 있다. 일반적인 방식에서는 모든 프레임에 대한 비용 매트릭스 전체를 계산해야 하지만, 본 발명에서는 전체 비용 매트릭스를 계산할 필요가 없는 것이다.The image data playback apparatus 100 matches the descriptors among neighboring frames of all the frames in a manner of comparing the neighboring frames, and outputs the neighboring frames ('1 st to 2 nd frame', '2 nd to 3 rd frame', '3 rd to 4 th frame' '1,799 to 1,800 th frame'). The image quality playback apparatus 100 calculates and stores '1, 799' correlation matrices by matching descriptors among adjacent frames among 1,800 frames. Correlation matrices do not need to be recalculated once they are calculated and stored. Then, according to the speed set by the user, the cost matrix can be immediately calculated according to the speed, and the image can be rendered. In the general scheme, the entire cost matrix for all the frames has to be calculated, but the present invention does not need to calculate the entire cost matrix.

이하, 비용 매트릭스 계산 방식에 대해 설명한다.Hereinafter, the cost matrix calculation method will be described.

도 9에 도시된 바와 같이, 영상 배속 재생 장치(100)는 ‘1번째 프레임’의 상관관계 매트릭스를 기준으로 이후 프레임이 재생 배속의 두 배가 되는 프레임(‘2~32번째 프레임’)까지의 상관관계 매트릭스를 비교한 변화값들로 프레임 간의 연관성(비용 매트릭스)을 계산한다.As shown in FIG. 9, the image double-speed playback apparatus 100 determines a correlation (hereinafter, referred to as &quot; first frame &quot;) from a correlation matrix of a first frame to a frame The correlation between the frames (cost matrix) is calculated by the change values comparing the relation matrix.

도 9에 도시된 바와 같이, 영상 배속 재생 장치(100)는 연산량을 빠르게 처리하기 위해 인접 프레임 간의 상관관계 매트릭스에 연쇄 법칙을 적용할 수 있다. 예컨대, 영상 배속 재생 장치(100)는 ‘1번째 프레임’과 ‘15번째 프레임’이 얼마나 차이가 나는지 확인하고자 하는 경우, ‘1~2번째 프레임의 상관관계 매트릭스’, ‘2~3번째 프레임의 상관관계 매트릭스’, ‘3~4번째 프레임의 상관관계 매트릭스’ ... ‘14~15번째 프레임의 상관관계 매트릭스’를 모두 곱하는 연쇄 법칙을 적용하여 ‘1번째 프레임’과 ‘15번째 프레임’의 차이를 빠르게 계산할 수 있다. As shown in FIG. 9, the image double-speed playback apparatus 100 may apply the chain rule to the correlation matrix between neighboring frames in order to quickly process a computation amount. For example, when it is desired to check how much the '1 st frame' and the '15 th frame' are different from each other, the image-wise playback apparatus 100 may calculate the correlation matrix of the 1 st and 2 nd frames, The correlation matrix for multiplying the correlation matrix of the 14th to the 15th frame is applied to calculate the correlation matrix of the first frame and the 15th frame The difference can be calculated quickly.

영상 배속 재생 장치(100)는 ‘1번째 프레임’의 상관관계 매트릭스를 기준으로 이후 프레임이 재생 배속의 두 배가 되는 프레임(‘2~32번째 프레임’)까지의 상관관계 매트릭스를 비교한 변화값 중 최소값을 갖는 프레임(‘15번째 프레임’)을 ‘1번째 프레임’과 연관성이 가장 높은 프레임으로 인식하여 경로 프레임으로 선택한다.The image double speed playback apparatus 100 determines whether or not the correlation matrix of the '1 st frame' is used as a reference and the correlation matrix of the frame whose frame is twice the playback speed ('2 to 32 th frame' The frame having the minimum value ('15th frame') is recognized as a frame having the highest correlation with the '1 st frame', and is selected as a path frame.

이후 도 9에 도시된 바와 같이, 영상 배속 재생 장치(100)는 경로 프레임(‘15번째 프레임’)의 상관관계 매트릭스를 기준으로 이후 프레임이 재생 배속의 두 배가 되는 프레임(‘16~47번째 프레임’)까지의 상관관계 매트릭스를 비교한 변화값들을 비용 매트릭스로 계산한다.Then, as shown in FIG. 9, the video double-speed playback apparatus 100 refers to the correlation matrix of the path frame ('15th frame'), ') Are calculated as cost matrices.

도 9에 도시된 바와 같이, 영상 배속 재생 장치(100)는 연산 속도를 빠르게 하기 위해 인접 프레임 간의 상관관계 매트릭스에 연쇄 법칙을 적용할 수 있다. 예컨대, 영상 배속 재생 장치(100)는 ‘15번째 프레임’과 ‘23번째 프레임’이 얼마나 차이가 나는지 확인하고자 하는 경우, ‘15~16번째 프레임의 상관관계 매트릭스’, ‘16~17번째 프레임의 상관관계 매트릭스’, ‘17~18번째 프레임의 상관관계 매트릭스’ ... ‘23~24번째 프레임의 상관관계 매트릭스’를 모두 곱하는 연쇄 법칙을 적용하여 ‘15번째 프레임’과 ‘23번째 프레임’의 차이를 빠르게 계산할 수 있다. As shown in FIG. 9, the image double-speed playback apparatus 100 may apply the chain rule to the correlation matrix between neighboring frames in order to increase the computation speed. For example, when it is desired to check how much the '15th frame' and the '23rd frame' are different from each other, the image-rearrangement playback apparatus 100 may calculate the correlation matrix of the 15th to 16th frames, The correlation matrix for multiplying the correlation matrix of the 23rd to the 24th frame is applied to calculate the correlation matrix of the 15th frame and the 23rd frame The difference can be calculated quickly.

영상 배속 재생 장치(100)는 경로 프레임(‘15번째 프레임’)의 상관관계 매트릭스를 기준으로 이후 프레임이 재생 배속의 두 배가 되는 프레임(‘16~47번째 프레임’)까지의 상관관계 매트릭스를 비교한 변화값 중 최소값을 갖는 프레임(‘23번째 프레임’)이 비용 매트릭스에서 첫 번째 선택된 경로 프레임(‘15번째 프레임’)과 연관성이 가장 높은 프레임으로 인식하여 두 번째 경로 프레임으로 선택한다.The image data playback apparatus 100 compares a correlation matrix from a correlation matrix of a path frame ('15th frame') to a frame ('16th to 47th frame') in which the frame is twice the playback speed ('23rd frame') having the minimum value of one change value is recognized as a frame having the highest correlation with the first selected route frame ('15th frame') in the cost matrix, and is selected as the second route frame.

본 실시예에 따른 영상 배속 재생 장치(100)는 모든 프레임에 대해서 비용 매트릭스를 계산하는 것이 아니라, 선택된 프레임부터 배속의 두 배만큼의 상관관계 매트릭스를 비교하여 비용 매트릭스를 계산하는 방식이다. 일반적인 방식은 16배속으로 가정하는 경우, ‘1번째 프레임’과 ‘2~32번째 프레임’을 비교한 후 다시 ‘2번째 프레임’과 ‘3~32번째 프레임’을 비교하는 과정을 마지막 프레임까지 비교해야 한다. 즉, 모든 비교를 수행해야 한다. 하지만, 본 실시예에 따른 영상 배속 재생 장치(100)는 ‘1번째 프레임’과 ‘2~32번째 프레임’(배속 두 배)을 비교하여 비용 매트릭스를 계산한다. 이후 영상 배속 재생 장치(100)는 ‘1번째 프레임’과 연관성이 높은 프레임을 경로 프레임으로 선택하며, 이후 선택된 경로 프레임과 나머지 프레임의 비용 매트릭스를 계산하는 점에서 연산량을 크게 줄일 수 있는 차이점이 존재한다. 예컨대, 프레임 간의 변화량을 한번 비교하는데 1 MS(Milli-Second)가 소요되는 것으로 가정하더라도 32번을 수행하면, 32 MS가 소요되므로, 비용 매트릭스를 계산하는데 많은 리소스가 소모되어 속도 저하가 발생하게 된다.The image double speed playback apparatus 100 according to the present embodiment is not a method of calculating a cost matrix for all frames but a method of calculating a cost matrix by comparing correlation matrices twice as fast as a selected frame from a selected frame. In the general method, when the 16-times speed is assumed, the process of comparing the 'second frame' and the 'third to 32nd frame' after comparing the 'first frame' and the ' Should be. That is, all comparisons must be performed. However, the image double-speed playback apparatus 100 according to the present embodiment compares the 'first frame' with the 'second to 32nd frame' (twice the speed) to calculate a cost matrix. Thereafter, the video playback apparatus 100 selects a frame having a high correlation with the 'first frame' as a path frame, and thereafter, there is a difference in that the computation amount can be greatly reduced in calculating the cost matrix of the selected path frame and the remaining frames do. For example, even if it is assumed that 1 MS (Milli-Second) is required to compare the amount of change between frames, performing 32 times requires 32 MSs, so that a large amount of resources are consumed for calculating the cost matrix, .

도 10a 내지 도 10b는 정배속 재생시 프레임 선택과 본 실시예에 따른 프레임 선택을 비교 설명하기 위한 도면이다.FIGS. 10A and 10B are diagrams for explaining a comparison between frame selection during normal speed reproduction and frame selection according to the present embodiment.

도 10a는 영상의 배속 재생시 선택된 프레임을 비교 설명하기 위한 도면이다. 도 10a에 도시된 점선은 실제 사람이 런닝(Running)할 때 카메라가 얼마만큼 ‘y축’ 방향으로 움직였는지를 관찰한 값을 토대로 재구성한 그래프이다. 실제 사람이 런닝중이므로, ‘y축’은 ‘50 프레임’ 내에서도 ‘-100 내지 100’의 픽셀 범위로 움직임이 나타나고 있다. 즉, 점선 그래프로 볼 때 영상이 많이 흔들리는 것을 알 수 있다. 10A is a diagram for explaining comparison of selected frames during double speed reproduction of an image. The dotted line shown in FIG. 10A is a graph reconstructed based on a value obtained by observing how much the camera moved in the 'y-axis' direction when an actual person is running. Since the actual person is running, the 'y axis' shows motion in the pixel range of '-100 to 100' within '50 frames'. In other words, it can be seen that the image is greatly shaken by the dotted line graph.

도 10a에 도시된 원형점(○)은 정배속으로 프레임을 선택한 경우를 나타낸 그래프이다. 예컨대, ‘8 배속’의 타임 랩스의 경우, ‘16 프레임’, ‘24 프레임’, ‘32 프레임’ 등을 선택하는 경우, 도 10a에 도시된 원형점(○)과 같이 선택된 프레임으로 안정화를 하더라도, 안정화 결과가 좋지 못하다.The circular point (O) shown in FIG. 10A is a graph showing a case where a frame is selected at a normal speed. For example, in the case of time-lapse of '8x speed', in the case of selecting '16 frames', '24 frames', '32 frames' or the like, even if the frame is stabilized with the selected circle as shown in FIG. , The stabilization result is not good.

도 10a에 도시된 별모양점(*)은 본 실시예에 따른 방식으로 프레임을 선택한 경우를 나타낸 그래프이다. 도 10a에 도시된 별모양점(*)과 같이, 배속 재생을 위해 프레임을 선택할 때 ‘8 배속’이라고 하더라도, 한번은 ‘15 프레임’으로 선택했다가 한번은 ‘30 프레임’으로 선택하여 프레임 간의 연관성이 높은 프레임이 선택되도록 한다. 즉,‘8 배속’보다 좀 지난 후의 위치한 프레임을 선택하거나, 지나지 전의 프레임을 선택하여 프레임 간의 연관성이 높은 프레임을 선택할 수 있다. 다시 말해, 본 실시예에 따른 영상 배속 재생 장치(100)는 프레임을 스킵(Skip)할 때, 정배속 간격으로 선택하는 것이 아니라, 가변적으로 프레임을 선택하게 된다.A star point (*) shown in FIG. 10A is a graph showing a case where a frame is selected in a manner according to the present embodiment. Even when the frame is selected for the double speed reproduction as in the star point (*) shown in FIG. 10A, even if the frame is selected as '8x', one frame is selected as '15 frames' So that a high frame is selected. That is, it is possible to select a frame positioned after the '8x speed', or to select a frame with a high correlation among frames by selecting a frame before the '8x speed'. In other words, when the frame is skipped, the video double-speed playback apparatus 100 according to the present embodiment does not select the frames at regular speed intervals, but selects frames variably.

도 10b에 도시된 실선 그래프 상의 원형점(○)이 정배속으로 프레임을 선택한 결과이고, 실선 그래프 상의 별모양점(*)이 가변적인 간격으로 프레임을 선택한 결과이다.10A is a result of selecting a frame at a normal speed and a star point (*) on a solid line graph is a result of selecting a frame at a variable interval.

도 10b에 도시된 원형점이 표시된 그래프와 별모양점이 표시된 그래프를 비교하는 경우, 가변적인 간격으로 프레임을 선택하는 경우에 안정성이 높은 것을 알 수 있다. 3차원 카메라 패스를 추정하는 경우 정확도를 높일 수 있지만 연산량이 너무 많아서 속도가 너무 느리게 된다. 본 실시예에서는 2차원 방식으로 배속 재생을 구현하지만, 연산량을 줄여서 빠른 계산이 가능하다.In the case of comparing the graph with circular points shown in FIG. 10B and the graph with star points, it can be seen that stability is high when a frame is selected at variable intervals. When estimating a three-dimensional camera path, accuracy can be improved, but the speed is too slow due to too much computation. In this embodiment, double speed reproduction is implemented in a two-dimensional manner, but the calculation amount can be reduced to enable quick calculation.

본 실시예에서는 영상 배속 재생 장치(100)가 프레임 간에 연관성이 높은 프레임을 선택하기 위해 도 10b와 같이 비용 매트릭스를 계산한다. 예컨대, 16 배속의 경우, 영상 배속 재생 장치(100)가 1번째 프레임과 2~32번째 프레임까지를 비교(배속의 2배)한다. 영상 배속 재생 장치(100)는 미리 계산된 인접 프레임 간의 상호관계 매트릭스를 기반으로 배속의 2배까지의 프레임과의 변화량을 비용 매트릭스로 계산한다. 이후, 영상 배속 재생 장치(100)는 비용 매트릭스를 이용하여 ‘1번째 프레임’과 ‘2번째 프레임’의 변화량을 확인하고, ‘1번째 프레임’과 ‘3번째 프레임’의 변화량을 확인하고, ‘1번째 프레임’과 ‘4번째 프레임’의 변화량을 확인하고, ... ‘1번째 프레임’과 ‘32번째 프레임’의 변화량을 확인한다. 이때, 각 프레임의 변화량은 인접 프레임 간의 상관관계 매트릭스로 이미 다 계산해 놓는다. 즉, 영상 배속 재생 장치(100) 1번째 프레임과 2~32번째 프레임까지를 확인한 결과 변화량이 가장 적은 프레임을 연관성이 가장 높은 프레임으로 선택하게 되는 것이다.In the present embodiment, the video double speed playback apparatus 100 calculates a cost matrix as shown in FIG. 10B in order to select a frame having a high correlation among frames. For example, in the case of a 16-times speed, the image-speed-doubling playback apparatus 100 compares the first frame with the second to the 32-th frame (twice the speed). The image-speed-up playback apparatus 100 calculates the amount of change with the frame up to twice the double speed based on the correlation matrix between adjacent frames calculated in advance as a cost matrix. Then, the image data playback device 100 confirms the amount of change of the 'first frame' and the 'second frame' using the cost matrix, checks the amount of change of the 'first frame' and the 'third frame' 1 &quot; and &quot; 4th frame &quot;, and confirms the amount of change of the 'first frame' and the '32nd frame'. At this time, the amount of change of each frame is already calculated by a correlation matrix between adjacent frames. That is, as a result of checking the first frame and the second through the 32nd frames of the image data playback apparatus 100, the frame having the smallest change amount is selected as the frame having the highest correlation.

도 10b에 도시된 바와 같이, 정배속으로 프레임을 선택한 경우의 원형점 그래프와 가변적인 간격으로 프레임을 선택한 별모양점 그래프를 비교하는 경우, 해칭선의 그래프가 배속 재생을 위해 프레임을 선택할 때 ‘16 배속’이라고 하더라도, ‘16 배속’보다 좀 전에 위치한 프레임을 선택하거나, 좀더 지난 후의 프레임을 선택한 것을 알 수 있다.As shown in FIG. 10B, when comparing a circular point graph when a frame is selected at a normal speed and a star point graph selected at a variable interval, the graph of the hatched line indicates' 16 Quot ;, it is possible to select a frame located before the &quot; 16x speed &quot;, or to select a frame after a longer time.

도 10a의 이점쇄선과 같이 최적 프레임 선택만을 통해서도 y축 이동량의 변화가 적은 안정적인 결과가 생성됨을 확인할 수 있다. 즉, 배속 재생을 위해 프레임을 선택할 때 가변적인 간격으로 프레임을 선택하여 연관성이 높은 프레임을 선택할 수 있으며, 결과적으로 배속 재생시 안정적인 결과물을 출력할 수 있다.It can be confirmed that a stable result with little change in the y-axis movement amount is generated by only selecting the optimum frame as shown by the dotted line in FIG. 10A. That is, when selecting a frame for double speed reproduction, a frame having a high correlation can be selected by selecting a frame at a variable interval, and as a result, a stable result can be output at the time of double speed reproduction.

이상의 설명은 본 실시예의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 실시예가 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 실시예의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 실시예들은 본 실시예의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 실시예의 기술 사상의 범위가 한정되는 것은 아니다. 본 실시예의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 실시예의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The foregoing description is merely illustrative of the technical idea of the present embodiment, and various modifications and changes may be made to those skilled in the art without departing from the essential characteristics of the embodiments. Therefore, the present embodiments are to be construed as illustrative rather than restrictive, and the scope of the technical idea of the present embodiment is not limited by these embodiments. The scope of protection of the present embodiment should be construed according to the following claims, and all technical ideas within the scope of equivalents thereof should be construed as being included in the scope of the present invention.

이상에서 설명한 바와 같이 본 실시예는 컴퓨터 그래픽스 분야 중 영상 분석(Scene Analysis) 분야에 적용되어, 각 프레임별 경로를 계산하여 최적화한 후 복원하여 배속 재생되는 영상이 안정화되도록 하는 효과를 발생하는 유용한 발명이다.As described above, the present embodiment is applied to the field of scene analysis in the field of computer graphics, and a useful invention which generates an effect of stabilizing images reproduced after being optimized by calculating a path for each frame, to be.

100: 배속 재생 장치
110: 입력부 120: 프레임 매칭부
130: 프레임 선택부 140: 경로 안정화부
150: 렌더링부
142: 프레임 입력부 144: 경로 분해부
146: 경로 최적화부 148: 경로 복원부
100:
110: input unit 120: frame matching unit
130: frame selecting unit 140: path stabilizing unit
150:
142: frame input unit 144:
146: Path optimizing unit 148: Path optimizing unit

Claims (8)

영상 배속 재생 장치가 영상을 안정화하는 방법에 있어서,
입력된 영상의 프레임(Frame) 중 일부 선택된 프레임들을 입력받는 입력 과정;
상기 선택된 프레임에 대한 상관관계 매트릭스의 모션 모델을 기반으로 상기 프레임을 분해하여 상기 선택된 프레임들마다 프레임별 카메라 경로를 생성하는 프레임별 경로 생성과정;
상기 프레임별 카메라 경로마다 라인 피팅(Line Fitting)을 적용하거나 평활화 필터를 적용하여 최적화를 수행한 최적화 경로들을 생성하는 최적화 과정;
상기 최적화 경로들을 매트릭스(Matrix)로 복원(Compose)한 후 안정화 경로를 생성하는 안정화 과정; 및
상기 선택된 프레임에 상기 안정화 경로를 적용하여 안정화된 결과 영상을 출력하는 렌더링 과정
을 포함하는 것을 특징으로 하는 영상 안정화 방법.
A method for image stabilization by a video double speed playback apparatus,
An input process of receiving some selected frames among frames of an input image;
A frame-by-frame path generation step of generating a frame-by-frame camera path for each of the selected frames by decomposing the frame based on a motion model of a correlation matrix for the selected frame;
An optimization process of optimizing paths by applying line fitting or applying a smoothing filter to each camera path for each frame;
A stabilization process for generating a stabilization path after the optimizing paths are restored to a matrix; And
And outputting a stabilized result image by applying the stabilization path to the selected frame
The image stabilization method comprising:
제 1 항에 있어서,
상기 경로 생성과정은,
상기 선택된 프레임에 대한 상관관계 매트릭스(Homography)의 모션 모델(Motion Model)을 기반으로 상기 선택된 프레임을 분해(Decompose)하여 상기 프레임별 카메라 경로를 생성하는 것을 특징으로 하는 영상 안정화 방법.
The method according to claim 1,
The path generation process includes:
Wherein the selected camera frame is generated by decomposing the selected frame based on a motion model of a correlation matrix for the selected frame.
제 2 항에 있어서,
상기 상관관계 매트릭스는 x축 이동량(tx) 파라미터, y축 이동량(ty) 파라미터, 회전 각도(Angle)(θ) 파라미터, 크기(Scale) 파라미터, 종횡비(Aspect Ratio) 파라미터, 전단(Shear) 파라미터 및 사영(Perspective) 파라미터 중 적어도 두 개 이상의 파라미터를 포함하며,
상기 경로 생성과정은 상기 상관관계 매트릭스에 포함된 파라미터의 개수에 대응하는 개수로 상기 선택된 프레임을 분해하여 상기 프레임별 카메라 경로를 생성하는 것을 특징으로 하는 영상 안정화 방법.
3. The method of claim 2,
The correlation matrix is the x-axis shift amount (t x) parameters, y-axis movement amount (t y) parameters, the rotational angle (Angle) (θ) parameters, the size (Scale) parameter, the aspect ratio (Aspect Ratio) parameters, the front end (Shear) Parameter and a perspective parameter, the parameter including at least two parameters,
Wherein the path generation step decomposes the selected frames into a number corresponding to the number of parameters included in the correlation matrix to generate the camera path for each frame.
제 1 항에 있어서,
상기 최적화 과정은,
상기 최적화를 수행한 결과인 부드러운 경로(Smooth Path)(P(t))를 계산하는 것을 특징으로 하는 영상 안정화 방법.
The method according to claim 1,
The optimization process includes:
And calculating a smooth path P (t) as a result of performing the optimization.
제 4 항에 있어서,
상기 안정화 과정은,
상기 프레임별 카메라 경로마다 최적화된 상기 부드러운 경로(P(t))를 매트릭스로 복원한 와핑 매트릭스(Warping Matrix)(B(t))를 계산하는 것을 특징으로 하는 영상 안정화 방법.
5. The method of claim 4,
In the stabilization process,
And a warping matrix (B (t)) obtained by restoring the smooth path P (t) optimized for each frame-by-frame camera path into a matrix is calculated.
제 5 항에 있어서,
상기 렌더링 과정은,
상기 선택된 프레임의 모든 픽셀값에 상기 와핑 매트릭스(B(t))를 곱해서 출력되는 좌표로 상기 선택된 프레임의 픽셀값을 이동하도록 영상을 렌더링하는 것을 특징으로 하는 영상 안정화 방법.
6. The method of claim 5,
In the rendering process,
Wherein the image is rendered to multiply all the pixel values of the selected frame by the wiping matrix B (t) and move the pixel values of the selected frame to the output coordinates.
하드웨어와 결합되어,
입력된 영상의 프레임(Frame) 중 일부 선택된 프레임들을 입력받는 입력 과정;
상기 선택된 프레임에 대한 상관관계 매트릭스의 모션 모델을 기반으로 상기 프레임을 분해하여 상기 선택된 프레임들마다 프레임별 카메라 경로를 생성하는 프레임별 경로 생성과정;
상기 프레임별 카메라 경로마다 라인 피팅(Line Fitting)을 적용하거나 평활화 필터를 적용하여 최적화를 수행한 최적화 경로들을 생성하는 최적화 과정;
상기 최적화 경로들을 매트릭스(Matrix)로 복원(Compose)한 후 안정화 경로를 생성하는 안정화 과정; 및
상기 선택된 프레임에 상기 안정화 경로를 적용하여 안정화된 결과 영상을 출력하는 렌더링 과정
을 실행시키기 위하여 기록매체에 저장된 컴퓨터프로그램.
Combined with hardware,
An input process of receiving some selected frames among frames of an input image;
A frame-by-frame path generation step of generating a frame-by-frame camera path for each of the selected frames by decomposing the frame based on a motion model of a correlation matrix for the selected frame;
An optimization process of optimizing paths by applying line fitting or applying a smoothing filter to each camera path for each frame;
A stabilization process for generating a stabilization path after the optimizing paths are restored to a matrix; And
And outputting a stabilized result image by applying the stabilization path to the selected frame
The computer program being stored on a recording medium.
입력된 영상의 프레임(Frame) 중 일부 선택된 프레임들을 입력받는 프레임 입력부;
상기 선택된 프레임에 대한 상관관계 매트릭스의 모션 모델을 기반으로 상기 프레임을 분해하여 상기 선택된 프레임들마다 프레임별 카메라 경로를 생성하는 프레임별 경로 분해부;
상기 프레임별 카메라 경로마다 라인 피팅(Line Fitting)을 적용하거나 평활화 필터를 적용하여 최적화를 수행한 최적화 경로들을 생성하는 경로 최적화부;
상기 최적화 경로들을 매트릭스(Matrix)로 복원(Compose)한 후 안정화 경로를 생성하는 복원부; 및
상기 선택된 프레임에 상기 안정화 경로를 적용하여 안정화된 결과 영상을 출력하는 렌더링부
를 포함하는 것을 특징으로 하는 영상 배속 재생 장치.
A frame input unit for receiving a selected one of the frames of the input image;
A frame decomposing unit for decomposing the frame based on the motion model of the correlation matrix for the selected frame to generate a camera path for each selected frame;
A path optimizing unit for optimizing paths by applying line fitting or applying a smoothing filter to each of the frame-by-frame camera paths;
A restoration unit for restoring the optimization paths to a matrix and generating a stabilization path; And
And outputting a stabilized result image by applying the stabilization path to the selected frame,
Wherein the video playback apparatus comprises:
KR1020160002314A 2016-01-07 2016-01-07 Method and Apparatus for Stabilizing Video Active KR101945233B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020160002314A KR101945233B1 (en) 2016-01-07 2016-01-07 Method and Apparatus for Stabilizing Video

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020160002314A KR101945233B1 (en) 2016-01-07 2016-01-07 Method and Apparatus for Stabilizing Video

Publications (2)

Publication Number Publication Date
KR20170082945A KR20170082945A (en) 2017-07-17
KR101945233B1 true KR101945233B1 (en) 2019-02-07

Family

ID=59443130

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020160002314A Active KR101945233B1 (en) 2016-01-07 2016-01-07 Method and Apparatus for Stabilizing Video

Country Status (1)

Country Link
KR (1) KR101945233B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20230053178A (en) * 2021-10-14 2023-04-21 네이버 주식회사 Method and system for image translation

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113744277B (en) * 2020-05-29 2024-07-02 广州汽车集团股份有限公司 A video de-shaking method and system based on local path optimization
CN113938576A (en) * 2021-11-30 2022-01-14 国网四川省电力公司南充供电公司 Wide-angle view-based helmet video anti-shake method and system
KR102820474B1 (en) * 2022-01-26 2025-06-12 국방과학연구소 Moving object detection method and apparatus for image stabilization

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101396838B1 (en) * 2013-01-24 2014-05-19 전자부품연구원 Video stabilization method and system by selection one of various motion models

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR19990047793A (en) * 1997-12-05 1999-07-05 윤종용 Camera Alarm System and Method Using Video Level
KR20140042283A (en) * 2012-09-28 2014-04-07 에스케이텔레콤 주식회사 Method and device for image stabilizing based on sampling image frame
KR101458099B1 (en) * 2013-04-24 2014-11-05 전자부품연구원 Image Stabilization Method and Image Processing Apparatus usign the smae
KR101883481B1 (en) * 2013-07-12 2018-07-31 한화에어로스페이스 주식회사 Apparatus and method for stabilizing image

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101396838B1 (en) * 2013-01-24 2014-05-19 전자부품연구원 Video stabilization method and system by selection one of various motion models

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20230053178A (en) * 2021-10-14 2023-04-21 네이버 주식회사 Method and system for image translation
JP2023059243A (en) * 2021-10-14 2023-04-26 ネイバー コーポレーション Image translation method and system
KR102575743B1 (en) * 2021-10-14 2023-09-06 네이버 주식회사 Method and system for image translation
JP7572130B2 (en) 2021-10-14 2024-10-23 ネイバー コーポレーション Image translation method and system

Also Published As

Publication number Publication date
KR20170082945A (en) 2017-07-17

Similar Documents

Publication Publication Date Title
US10841494B2 (en) Motion vector estimation for video image stabilization
US7768551B2 (en) Method to stabilize digital video motion
EP3334149B1 (en) Methods and systems for processing a video for stablization using dynamic crop
US7548256B2 (en) Image processing scheme
US9013634B2 (en) Methods and apparatus for video completion
US10210620B2 (en) Method and system for generating adaptive fast forward of egocentric videos
US10734025B2 (en) Seamless output video variations for an input video
US20080001950A1 (en) Producing animated scenes from still images
KR101945233B1 (en) Method and Apparatus for Stabilizing Video
US9672866B2 (en) Automated looping video creation
US9177406B2 (en) Image mosaicing utilizing motion of scene content between successive images
US10176845B2 (en) Seamless forward-reverse video loops
US20090079836A1 (en) Image processing apparatus, method, and computer program product
JP2016201617A (en) Moving picture reproducing apparatus and method
US7221390B1 (en) Computer-assisted motion compensation of a digitized image
US20060215036A1 (en) Method and apparatus for video stabilization
KR101945243B1 (en) Method and Apparatus For Providing Multiple-Speed Reproduction of Video
KR102467673B1 (en) Deep Iterative Frame Interpolation Based Video Stabilization Method
JP2009065619A (en) Camera shake correction apparatus and imaging apparatus
EP3352133B1 (en) An efficient patch-based method for video denoising
CN114677301B (en) A video deblurring method and computer readable storage medium
JP2004274460A (en) Key frame selection device and key frame selection method
KR20070089314A (en) Apparatus and method for providing subject movement information

Legal Events

Date Code Title Description
PA0109 Patent application

Patent event code: PA01091R01D

Comment text: Patent Application

Patent event date: 20160107

A201 Request for examination
PA0201 Request for examination

Patent event code: PA02012R01D

Patent event date: 20170712

Comment text: Request for Examination of Application

Patent event code: PA02011R01I

Patent event date: 20160107

Comment text: Patent Application

PG1501 Laying open of application
E902 Notification of reason for refusal
PE0902 Notice of grounds for rejection

Comment text: Notification of reason for refusal

Patent event date: 20180830

Patent event code: PE09021S01D

E701 Decision to grant or registration of patent right
PE0701 Decision of registration

Patent event code: PE07011S01D

Comment text: Decision to Grant Registration

Patent event date: 20190121

GRNT Written decision to grant
PR0701 Registration of establishment

Comment text: Registration of Establishment

Patent event date: 20190129

Patent event code: PR07011E01D

PR1002 Payment of registration fee

Payment date: 20190129

End annual number: 3

Start annual number: 1

PG1601 Publication of registration
PR1001 Payment of annual fee

Payment date: 20220103

Start annual number: 4

End annual number: 4