KR20230082921A - Method and computer program for calculating moving speed of video recording device and learning method thereof - Google Patents

Method and computer program for calculating moving speed of video recording device and learning method thereof Download PDF

Info

Publication number
KR20230082921A
KR20230082921A KR1020210170884A KR20210170884A KR20230082921A KR 20230082921 A KR20230082921 A KR 20230082921A KR 1020210170884 A KR1020210170884 A KR 1020210170884A KR 20210170884 A KR20210170884 A KR 20210170884A KR 20230082921 A KR20230082921 A KR 20230082921A
Authority
KR
South Korea
Prior art keywords
video
speed
subject
calculating
moving
Prior art date
Application number
KR1020210170884A
Other languages
Korean (ko)
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 KR1020210170884A priority Critical patent/KR20230082921A/en
Publication of KR20230082921A publication Critical patent/KR20230082921A/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01PMEASURING LINEAR OR ANGULAR SPEED, ACCELERATION, DECELERATION, OR SHOCK; INDICATING PRESENCE, ABSENCE, OR DIRECTION, OF MOVEMENT
    • G01P3/00Measuring linear or angular speed; Measuring differences of linear or angular speeds
    • G01P3/36Devices characterised by the use of optical means, e.g. using infrared, visible, or ultraviolet light
    • G01P3/38Devices characterised by the use of optical means, e.g. using infrared, visible, or ultraviolet light using photographic means
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01PMEASURING LINEAR OR ANGULAR SPEED, ACCELERATION, DECELERATION, OR SHOCK; INDICATING PRESENCE, ABSENCE, OR DIRECTION, OF MOVEMENT
    • G01P3/00Measuring linear or angular speed; Measuring differences of linear or angular speeds
    • G01P3/64Devices characterised by the determination of the time taken to traverse a fixed distance
    • G01P3/68Devices characterised by the determination of the time taken to traverse a fixed distance using optical means, i.e. using infrared, visible, or ultraviolet light
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration by the use of local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion

Abstract

본 발명은 동영상 촬영 주체의 이동 속도 산출 방법, 컴퓨터 프로그램 및 그에 대한 학습 방법에 관한 것으로서, 보다 구체적으로는 촬영된 동영상으로부터 동영상 촬영 주체의 이동 속도를 산출할 수 있는 동영상 촬영 주체의 이동 속도 산출 방법, 컴퓨터 프로그램 및 그에 대한 학습 방법에 관한 것이다.
본 발명에서는, 속도 산출 시스템에서 동영상 촬영 주체의 이동 속도를 산출하는 방법에 있어서, 상기 영상 촬영 주체에 의해 촬영된 동영상에서 고정체를 식별하는 단계; 상기 고정체를 기준으로 상기 동영상에 마스크를 적용하는 단계; 및 미리 학습된 속도 산출 엔진을 이용하여 상기 마스크가 적용된 동영상을 기초로 상기 동영상 촬영 주체의 이동 속도를 산출하는 단계;를 포함하는 속도 산출 방법을 개시한다.
The present invention relates to a method for calculating the moving speed of a subject taking a video, a computer program and a method for learning the same, and more specifically, a method for calculating the moving speed of a subject taking a video that can calculate the moving speed of a subject taking a video from a captured video. , computer programs and learning methods for them.
In the present invention, a method for calculating a movement speed of a video capture subject in a speed calculation system includes the steps of identifying a stationary object in a video captured by the video capture subject; applying a mask to the video based on the fixed body; and calculating a moving speed of the moving subject based on the moving picture to which the mask is applied by using a previously learned speed calculating engine.

Description

동영상 촬영 주체의 이동 속도 산출 방법, 컴퓨터 프로그램 및 그에 대한 학습 방법 {Method and computer program for calculating moving speed of video recording device and learning method thereof}Method and computer program for calculating moving speed of video recording device and learning method thereof}

본 발명은 동영상 촬영 주체의 이동 속도 산출 방법, 컴퓨터 프로그램 및 그에 대한 학습 방법에 관한 것으로서, 보다 구체적으로는 촬영된 동영상으로부터 동영상 촬영 주체의 이동 속도를 산출할 수 있는 동영상 촬영 주체의 이동 속도 산출 방법, 컴퓨터 프로그램 및 그에 대한 학습 방법에 관한 것이다.The present invention relates to a method for calculating the moving speed of a subject taking a video, a computer program and a method for learning the same, and more specifically, a method for calculating the moving speed of a subject taking a video that can calculate the moving speed of a subject taking a video from a captured video. , computer programs and learning methods for them.

최근 스마트폰 등 다양한 이동 단말이 폭넓게 확산되면서 상기 이동 단말을 이용하여 다양한 서비스가 제공되고 있다.Recently, as various mobile terminals such as smart phones are widely spread, various services are provided using the mobile terminals.

이때, 상기 이동 단말은 이동하면서 컨텐츠를 재생하거나 동영상을 촬영하는 등 다양한 동작 환경에서 구동될 수 있다. At this time, the mobile terminal may be driven in various operating environments such as playing content or taking a video while moving.

보다 구체적으로, 사용자는 이동하면서 스마트폰을 사용하여 주변 풍경을 촬영할 수 있으며, 또한 자동차에 장착되는 블랙박스 등에서도 주행 중에 동영상을 촬영할 수 있다.More specifically, a user may capture a surrounding landscape using a smartphone while moving, and may also capture a video while driving in a black box mounted on a vehicle.

그런데, 이와 같이 촬영된 동영상을 분석하여 상기 이동 단말 등 동영상 촬영 주체의 이동 속도를 파악할 수 있다면 매우 다양한 용도로 활용이 가능할 수 있다.However, if it is possible to analyze the captured video and determine the moving speed of the subject of video recording, such as the mobile terminal, it can be used for a wide variety of purposes.

그러나, 종래에는 동영상을 분석하여 동영상에 촬영된 이동체의 이동 속도를 산출하는 기법 등은 종종 시도되었으나, 이동 단말의 이동 속도는 GPS 등 별도의 센서 데이터를 이용하여 산출하였을 뿐 동영상을 분석하여 이동 단말 등 동영상 촬영 주체의 이동 속도를 산출하기는 어려웠다.However, in the past, a technique of analyzing a video and calculating the moving speed of a moving object photographed in a video has been often attempted, but the moving speed of a mobile terminal was only calculated using separate sensor data such as GPS, and the mobile terminal analyzed the video. It was difficult to calculate the moving speed of the subject of video recording.

그런데, 이동 단말에 GPS 등 이동 속도를 측정할 수 있는 별도의 센서가 구비되더라도, 상기 센서에서 측정되는 이동 속도는 동영상 촬영 시점에 동시에 측정되어야 하여, 동영상 촬영시에 상기 GPS 등에서 측정된 센서 데이터를 저장해 두지 않는다면 촬영 이후에 상기 이동 단말의 상기 동영상 촬영 시 이동 속도를 산출하기는 어렵다.However, even if the mobile terminal is provided with a separate sensor capable of measuring the movement speed, such as GPS, the movement speed measured by the sensor must be measured simultaneously at the time of video recording, so that the sensor data measured by the GPS or the like If it is not stored, it is difficult to calculate the moving speed of the mobile terminal when capturing the video after capturing.

또한, 동영상을 분석하여 이동 단말 등 동영상 촬영 주체의 이동 속도를 산출할 수 있다면, GPS 등 센서가 없거나 건물 내부 등 동작이 어려운 상황에서도 이동 속도를 산출할 수 있을 뿐만 아니라, 상기 GPS 등 센서에서 측정된 데이터를 보정하여 정확도를 개선할 수도 있다는 장점을 가질 수 있다.In addition, if the moving speed of a subject such as a mobile terminal can be calculated by analyzing the video, the moving speed can be calculated even in situations where there is no sensor such as GPS or in a difficult operation such as inside a building, and it can be measured by the sensor such as GPS. It can have the advantage that accuracy can be improved by correcting the data.

나아가, 동영상 촬영 주체의 이동 속도를 알 수 있다면 촬영된 동영상의 보정, 변환 및 복원을 효율적으로 수행할 수 있고, 동영상 압축도 보다 높은 효율로 처리할 수 있을 뿐만 아니나, 이외에도 메타버스 서비스 등에서 더욱 실감나는 동작 환경을 제공하는 등 매우 폭넓은 서비스로의 적용이 가능하게 된다.Furthermore, if the moving speed of the subject of the video recording can be known, correction, conversion, and restoration of the recorded video can be efficiently performed, and video compression can be processed with higher efficiency. It can be applied to a very wide range of services, such as providing an operating environment.

대한민국 공개특허공보 제10-2020-0030429호(2020년 3월 20일 공개)Republic of Korea Patent Publication No. 10-2020-0030429 (published on March 20, 2020)

본 발명은 상기와 같은 종래 기술의 문제점을 해결하기 위해 창안된 것으로, 촬영된 동영상으로부터 동영상 촬영 주체의 이동 속도를 산출할 수 있는 동영상 촬영 주체의 이동 속도 산출 방법, 컴퓨터 프로그램을 제공하는 것을 목적으로 한다.The present invention has been devised to solve the problems of the prior art as described above, and an object of the present invention is to provide a moving speed calculation method and computer program of a video recording subject capable of calculating the moving speed of a moving picture subject from a captured video. do.

또한, 본 발명에서는 촬영된 동영상으로부터 동영상 촬영 주체의 이동 속도를 산출할 수 있는 속도 산출 엔진을 학습할 수 있는 학습 방법을 제공하는 것을 목적으로 한다.In addition, an object of the present invention is to provide a learning method capable of learning a speed calculation engine capable of calculating the moving speed of a subject taking a video from a captured video.

또한, 본 발명에서는 동영상 촬영 주체의 이동 속도를 이용하여 동영상을 보다 효율적으로 압축하거나, 동영상의 보정, 변환 및 복원을 효과적으로 수행할 수 있도록 하는 것을 목적으로 한다.In addition, an object of the present invention is to compress a video more efficiently or to perform correction, conversion, and restoration of a video more efficiently by using the movement speed of a subject taking a video.

그 외 본 발명의 세부적인 목적은 아래에 기재되는 구체적인 내용을 통하여 이 기술 분야의 전문가나 연구자에게 자명하게 파악되고 이해될 수 있을 것이다.Other detailed objects of the present invention will be clearly identified and understood by experts or researchers in the art through the specific details described below.

상기 과제를 해결하기 위한 본 발명의 한 측면에 따른 속도 산출 방법은, 속도 산출 시스템에서 동영상 촬영 주체의 이동 속도를 산출하는 방법에 있어서, 상기 영상 촬영 주체에 의해 촬영된 동영상에서 고정체를 식별하는 단계; 상기 고정체를 기준으로 상기 동영상에 마스크를 적용하는 단계; 및 미리 학습된 속도 산출 엔진을 이용하여 상기 마스크가 적용된 동영상을 기초로 상기 동영상 촬영 주체의 이동 속도를 산출하는 단계;를 포함한다.A speed calculation method according to an aspect of the present invention for solving the above problems is a method for calculating a moving speed of a video recording subject in a speed calculation system, wherein a stationary object is identified in a video captured by the video recording subject. step; applying a mask to the video based on the fixed body; and calculating a moving speed of the moving subject based on the moving picture to which the mask is applied by using a previously learned speed calculation engine.

이때, 상기 이동 속도를 산출하는 단계는, 상기 마스크가 적용된 동영상을 미리 학습된 광학 흐름(optical flow) 산출 엔진에 입력하여 광학 흐름 영상을 산출하는 단계; 및 상기 속도 산출 엔진에서 상기 광학 흐름 영상에 기초하여 상기 동영상 촬영 주체의 이동 속도를 산출하는 단계;를 포함할 수 있다.In this case, the calculating of the movement speed may include inputting the video to which the mask is applied to a pre-learned optical flow calculation engine to calculate an optical flow image; and calculating a moving speed of the moving subject based on the optical flow image in the speed calculating engine.

또한, 상기 마스크를 적용하는 단계에서는, 상기 동영상에 대하여 상기 마스크에 해당하는 영역에 제1 가중치를 적용하고 나머지 영역에 상기 제1 가중치보다 낮은 제2 가중치를 적용할 수 있다.In addition, in the step of applying the mask, a first weight may be applied to a region corresponding to the mask with respect to the video, and a second weight lower than the first weight may be applied to remaining regions.

또한, 상기 고정체를 식별하는 단계에서는, 미리 학습된 고정체 식별 엔진을 이용하여 상기 동영상에서 상기 고정체를 식별할 수 있다.Also, in the step of identifying the fixed object, the fixed object may be identified in the video using a pre-learned fixed object identification engine.

여기서, 상기 고정체 식별 엔진에서는, 상기 동영상의 연속하는 프레임에서 시간 흐름에 따른 변위가 식별 가능하도록 불연속적으로 위치하는 객체 중 상기 고정체를 식별할 수 있다.Here, the stationary body identification engine may identify the stationary body among discontinuously positioned objects so that displacement over time can be identified in successive frames of the video.

또한, 상기 광학 흐름 영상은, 상기 동영상에서의 시간 흐름에 따른 상기 고정체의 변위 방향과 크기가 색좌표계를 이용하여 영상으로 표현될 수 있다.In addition, in the optical flow image, the displacement direction and size of the fixture according to the lapse of time in the video may be expressed as an image using a color coordinate system.

이때, 상기 광학 흐름 영상은, HSV 색좌표계의 색상(Hue), 채도(Saturation), 명도(Value) 중 하나 이상을 이용하여 영상으로 표현될 수 있다.In this case, the optical flow image may be expressed as an image using one or more of Hue, Saturation, and Value of the HSV color coordinate system.

또한, 상기 이동 속도를 산출하는 단계에서는, 상기 속도 산출 엔진으로 입력되는 동영상의 개별 프레임 단위로 상기 동영상 촬영 주체의 이동 속도를 산출할 수 있다.In addition, in the step of calculating the moving speed, the moving speed of the subject capturing the video may be calculated in units of individual frames of the video input to the speed calculating engine.

또한, 상기 이동 속도를 산출하는 단계에서는, 상기 동영상의 미리 정해진 기준점에서 상기 고정체를 연결하는 직선의 시간 흐름에 따른 각속도 변화 정보를 함께 상기 속도 산출 엔진에 입력하여 상기 동영상 촬영 주체의 이동 속도를 산출할 수 있다.In addition, in the step of calculating the moving speed, the moving speed of the moving subject of the moving subject is determined by inputting angular velocity change information according to the lapse of time of a straight line connecting the fixed body from a predetermined reference point of the video to the speed calculating engine. can be calculated

이때, 상기 이동 속도를 산출하는 단계에서는, 상기 동영상의 상기 기준점에서 상기 고정체를 연결하는 직선의 시간 흐름에 따른 길이 변화 정보도 상기 속도 산출 엔진에 입력하여 상기 동영상 촬영 주체의 이동 속도를 산출할 수 있다.At this time, in the step of calculating the moving speed, the length change information according to the lapse of time of a straight line connecting the fixed body from the reference point of the video is also input to the speed calculation engine to calculate the moving speed of the subject taking the video. can

또한, 상기 기준점은 상기 동영상의 상하 방향 중심축 상에 위치할 수 있다.Also, the reference point may be located on a central axis in the vertical direction of the video.

또한, 상기 기준점은 상기 동영상의 상하 방향 중심축 상의 최하단에 위치할 수 있다.Also, the reference point may be positioned at the lowest end of the central axis in the vertical direction of the video.

또한, 본 발명의 다른 측면에 따른 속도 산출 엔진 학습 방법은, 학습 시스템에서 동영상 촬영 주체의 이동 속도를 산출하는 속도 산출 엔진을 학습하는 방법에 있어서, 상기 동영상 촬영 주체에 의해 촬영된 동영상에서 고정체를 식별하는 단계; 상기 고정체를 기준으로 상기 동영상에 마스크를 적용하는 단계; 상기 마스크가 적용된 동영상을 기초로 상기 동영상 촬영 주체의 이동 속도 데이터를 태깅하는 단계; 및 상기 태깅된 동영상 촬영 주체의 이동 속도 데이터를 이용하여 상기 동영상 촬영 주체의 이동 속도를 산출하는 속도 산출 엔진을 학습하는 단계;를 포함한다.In addition, a method for learning a speed calculation engine according to another aspect of the present invention is a method for learning a speed calculation engine that calculates a moving speed of a subject taking a video in a learning system, wherein a stationary object is detected in a video captured by the subject taking the video. identifying; applying a mask to the video based on the fixed body; tagging movement speed data of the subject of the video recording based on the video to which the mask is applied; and learning a speed calculation engine that calculates the moving speed of the subject taking the video using the moving speed data of the tagged subject taking the video.

이때, 상기 이동 속도를 산출하는 단계는, 상기 마스크가 적용된 동영상을 미리 학습된 광학 흐름(optical flow) 산출 엔진에 입력하여 광학 흐름 영상을 산출하는 단계; 및 상기 광학 흐름 영상에 대하여 상기 동영상 촬영 주체의 이동 속도 데이터를 태깅하는 단계;를 포함할 수 있다.In this case, the calculating of the moving speed may include inputting the video to which the mask is applied to a pre-learned optical flow calculation engine to calculate an optical flow image; and tagging the movement speed data of the subject of the video recording with respect to the optical flow image.

또한, 본 발명의 또 다른 측면에 따른 컴퓨터 프로그램은, 컴퓨터에서 상기 기재된 방법의 각 단계를 실행시키기 위한 컴퓨터로 판독 가능한 매체에 저장된 컴퓨터 프로그램인 것을 특징으로 한다.In addition, a computer program according to another aspect of the present invention is characterized in that it is a computer program stored in a computer readable medium for executing each step of the method described above on a computer.

이에 따라, 본 발명의 일 실시예에 따른 동영상 촬영 주체의 이동 속도 산출 방법, 컴퓨터 프로그램 및 그에 대한 학습 방법에서는, 촬영된 동영상으로부터 동영상 촬영 주체의 이동 속도를 산출할 수 있게 된다.Accordingly, in the moving speed calculation method, computer program, and learning method of a subject capturing a video according to an embodiment of the present invention, it is possible to calculate the moving speed of a subject capturing a video from a captured video.

또한, 본 발명의 일 실시예에 따른 동영상 촬영 주체의 이동 속도 산출 방법, 컴퓨터 프로그램 및 그에 대한 학습 방법에서는, 촬영된 동영상으로부터 동영상 촬영 주체의 이동 속도를 산출할 수 있는 속도 산출 엔진을 학습할 수 있게 된다.In addition, in the method, computer program, and learning method for calculating the movement speed of a subject capturing a video according to an embodiment of the present invention, a speed calculation engine capable of calculating the moving speed of a subject capturing a video from a captured video may be learned. there will be

또한, 본 발명의 일 실시예에 따른 동영상 촬영 주체의 이동 속도 산출 방법, 컴퓨터 프로그램 및 그에 대한 학습 방법에서는, 동영상 촬영 주체의 이동 속도를 이용하여 동영상을 보다 효율적으로 압축하거나, 동영상의 보정, 변환 및 복원을 효과적으로 수행할 수 있게 된다.In addition, in the moving speed calculation method, computer program, and learning method of a subject capturing a video according to an embodiment of the present invention, a moving speed of a subject capturing a video is used to compress a video more efficiently, or to correct or convert a video. and restoration can be effectively performed.

본 발명에 관한 이해를 돕기 위해 상세한 설명의 일부로 포함되는, 첨부도면은 본 발명에 대한 실시예를 제공하고, 상세한 설명과 함께 본 발명의 기술적 사상을 설명한다.
도 1은 본 발명의 일 실시예에 따른 속도 산출 시스템(100)의 구성을 예시하는 도면이다.
도 2 는 본 발명의 일 실시예에 따른 속도 산출 방법의 순서도이다.
도 3은 본 발명의 일 실시예에 따른 속도 산출 방법의 동작을 예시하는 도면이다.
도 4 내지 도 5는 본 발명의 일 실시예에 따른 속도 산출 방법에서 고정체를 식별해 마스크를 적용하는 과정을 예시하는 도면이다.
도 6 내지 도 7은 본 발명의 일 실시예에 따른 광학 흐름 산출 엔진의 동작을 설명하는 도면이다.
도 8 내지 도 10은 본 발명의 일 실시예에 따른 속도 산출 방법에서 고정체의 각속도 및 길이 변화를 반영하는 과정을 예시하는 도면이다.
도 11은 본 발명의 일 실시예에 따른 속도 산출 엔진 학습 방법의 순서도이다.
도 12는 본 발명의 일 실시예에 따른 속도 산출 방법의 학습 과정 및 속도 산출 과정을 예시하는 도면이다.
The accompanying drawings, which are included as part of the detailed description to aid understanding of the present invention, provide examples of the present invention and explain the technical idea of the present invention together with the detailed description.
1 is a diagram illustrating the configuration of a speed calculation system 100 according to an embodiment of the present invention.
2 is a flowchart of a speed calculation method according to an embodiment of the present invention.
3 is a diagram illustrating the operation of a speed calculation method according to an embodiment of the present invention.
4 and 5 are diagrams illustrating a process of identifying a stationary body and applying a mask in a speed calculation method according to an embodiment of the present invention.
6 and 7 are diagrams illustrating the operation of an optical flow calculation engine according to an embodiment of the present invention.
8 to 10 are diagrams illustrating a process of reflecting changes in angular velocity and length of a fixed body in a speed calculation method according to an embodiment of the present invention.
11 is a flowchart of a method for learning a speed calculation engine according to an embodiment of the present invention.
12 is a diagram illustrating a learning process and a speed calculation process of a speed calculation method according to an embodiment of the present invention.

본 발명은 다양한 변환을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 이하에서는 특정 실시예들을 첨부된 도면을 기초로 상세히 설명하고자 한다.The present invention can apply various transformations and can have various embodiments. Hereinafter, specific embodiments will be described in detail based on the accompanying drawings.

이하의 실시예는 본 명세서에서 기술된 방법, 장치 및/또는 시스템에 대한 포괄적인 이해를 돕기 위해 제공된다. 그러나 이는 예시에 불과하며 본 발명은 이에 제한되지 않는다.The following examples are provided to facilitate a comprehensive understanding of the methods, apparatus and/or systems described herein. However, this is only an example and the present invention is not limited thereto.

본 발명의 실시예들을 설명함에 있어서, 본 발명과 관련된 공지기술에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략하기로 한다. 그리고, 후술되는 용어들은 본 발명에서의 기능을 고려하여 정의된 용어들로서 이는 사용자, 운용자의 의도 또는 관례 등에 따라 달라질 수 있다. 그러므로 그 정의는 본 명세서 전반에 걸친 내용을 토대로 내려져야 할 것이다. 상세한 설명에서 사용되는 용어는 단지 본 발명의 실시 예들을 기술하기 위한 것이며, 결코 제한적이어서는 안 된다. 명확하게 달리 사용되지 않는 한, 단수 형태의 표현은 복수 형태의 의미를 포함한다. 본 설명에서, "포함" 또는 "구비"와 같은 표현은 어떤 특성들, 숫자들, 단계들, 동작들, 요소들, 이들의 일부 또는 조합을 가리키기 위한 것이며, 기술된 것 이외에 하나 또는 그 이상의 다른 특성, 숫자, 단계, 동작, 요소, 이들의 일부 또는 조합의 존재 또는 가능성을 배제하도록 해석되어서는 안 된다. In describing the embodiments of the present invention, if it is determined that the detailed description of the known technology related to the present invention may unnecessarily obscure the subject matter of the present invention, the detailed description will be omitted. In addition, terms to be described later are terms defined in consideration of functions in the present invention, which may vary according to the intention or custom of a user or operator. Therefore, the definition should be made based on the contents throughout this specification. Terms used in the detailed description are only for describing the embodiments of the present invention, and should not be limiting. Unless expressly used otherwise, singular forms of expression include plural forms. In this description, expressions such as "comprising" or "comprising" are intended to indicate any characteristic, number, step, operation, element, portion or combination thereof, one or more other than those described. It should not be construed to exclude the existence or possibility of any other feature, number, step, operation, element, part or combination thereof.

또한, 제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되는 것은 아니며, 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다.In addition, terms such as first and second may be used to describe various components, but the components are not limited by the terms, and the terms are used for the purpose of distinguishing one component from another. used only as

이하, 본 발명의 일 실시예에 따른 동영상 촬영 주체의 이동 속도 산출 방법, 컴퓨터 프로그램 및 그에 대한 학습 방법에 대한 예시적인 실시 형태들을 첨부된 도면을 참조하여 차례로 설명한다.Hereinafter, exemplary embodiments of a method for calculating a movement speed of a subject capturing a video, a computer program, and a method for learning the same according to an embodiment of the present invention will be sequentially described with reference to the accompanying drawings.

먼저, 도 1에서는 본 발명의 일 실시예에 따른 동영상 촬영 주체의 속도 산출 시스템(100)의 구성을 예시하고 있다. 도 1에서 볼 수 있는 바와 같이, 본 발명의 일 실시예에 따른 속도 산출 시스템(100)은 카메라 등 동영상 촬영 장치를 구비하는 하나 이상의 단말(110), 상기 하나 이상의 단말(110)에서 촬영된 동영상을 분석하여 상기 단말(110) 등 동영상 촬영 주체의 이동 속도를 산출하는 서버(120)를 포함하여 구성될 수 있다. 이때, 상기 단말(110)과 서버(120)는 통신 네트워크(130)를 통해 데이터를 주고 받으면서 연동되어 동작할 수 있다.First, FIG. 1 illustrates the configuration of a system 100 for calculating the speed of a subject taking a video according to an embodiment of the present invention. As can be seen in FIG. 1, the speed calculation system 100 according to an embodiment of the present invention includes one or more terminals 110 equipped with a video recording device such as a camera, and a video captured by the one or more terminals 110. It may be configured to include a server 120 that analyzes and calculates the moving speed of a subject such as the terminal 110 or the like. At this time, the terminal 110 and the server 120 may operate in conjunction with each other while exchanging data through the communication network 130 .

그러나, 본 발명이 반드시 이에 한정되는 것은 아니며, 상기 속도 산출 시스템(110)은 상기 단말(110)에서 동영상을 직접 분석하여 상기 단말(110) 등 동영상 촬영 주체의 이동 속도를 산출하는 형태로 구성될 수도 있으며, 또는 상기 속도 산출 시스템(110)은 상기 서버(120)에서 통신 네트워크(130) 등을 통하지 않고 직접 동영상을 입력받아 독립적으로 상기 동영상을 분석하여 동영상 촬영 주체의 이동 속도를 산출할 수도 있으며, 나아가 상기 단말(110)에서 촬영되고 있는 동영상을 분석하면서 상기 단말(110)의 이동 속도를 실시간으로 산출하는 등 다양한 형태로 구현 가능하다.However, the present invention is not necessarily limited to this, and the speed calculation system 110 may be configured in such a way that the terminal 110 directly analyzes the video and calculates the moving speed of the subject such as the terminal 110. Alternatively, the speed calculation system 110 may receive a video directly from the server 120 without going through the communication network 130, etc., and independently analyze the video to calculate the moving speed of the subject of the video recording. Furthermore, it can be implemented in various forms, such as calculating the moving speed of the terminal 110 in real time while analyzing a video being captured by the terminal 110.

이때, 상기 단말(110)은 이동하면서 동영상 촬영이 가능한 스마트폰, 태블릿 PC, 노트북 PC, 랩탑 컴퓨터(laptop computer) 등이 될 수 있으나, 본 발명이 반드시 이에 한정되는 것은 아니며, 이외에도 차량 등에 장착되는 블랙박스 등 다양한 단말이 사용될 수도 있다.At this time, the terminal 110 may be a smartphone, a tablet PC, a notebook PC, a laptop computer, etc. capable of capturing a video while moving, but the present invention is not necessarily limited thereto, and in addition, mounted on a vehicle, etc. Various terminals such as a black box may be used.

또한, 상기 서버(120)는 하나의 물리적인 서버 컴퓨터로 구현되거나, 둘 이상의 서버 컴퓨터가 연동되어 구현될 수도 있으며, 상기 서버 컴퓨터의 예로는 서버 컴퓨팅 디바이스, 개인용 컴퓨터, 미니 컴퓨터, 및/또는 메인프레임 컴퓨터를 포함할 수 있지만 이러한 것으로만 한정되는 것은 아니고, 상기 서버 컴퓨터는 분산형 시스템일 수 있으며, 나아가 클라우드 시스템을 이용하여 구현되거나 전용 하드웨어 등을 사용하여 별도의 장치로 구현되는 등 매우 다양한 형태로 구현하는 것이 가능하다.In addition, the server 120 may be implemented as a single physical server computer, or may be implemented by linking two or more server computers. Examples of the server computer include a server computing device, a personal computer, a mini computer, and/or a main computer. It may include a frame computer, but is not limited thereto, and the server computer may be a distributed system, and may be implemented using a cloud system or implemented as a separate device using dedicated hardware. It is possible to implement with

또한, 상기 통신 네트워크(130)로서는 유선 네트워크와 무선 네트워크를 포함할 수 있으며, 구체적으로, 근거리 통신망 (LAN: Local Area Network), 도시권 통신망 (MAN: Metropolitan Area Network), 광역 통신망 (WAN: Wide Area Network) 등의 다양한 통신망을 포함할 수 있다. 또한, 상기 통신 네트워크(130)는 공지의 월드 와이드 웹(WWW: World Wide Web)을 포함할 수도 있다. 그러나, 본 발명에서 통신 네트워크(130)는 상기 열거된 네트워크에 국한되지 않고, 공지의 무선 데이터 네트워크나 공지의 전화 네트워크 또는 공지의 유무선 텔레비전 네트워크를 적어도 일부로 포함할 수도 있다.In addition, the communication network 130 may include a wired network and a wireless network, and specifically, a local area network (LAN), a metropolitan area network (MAN), and a wide area network (WAN). Network) may include various communication networks. In addition, the communication network 130 may include the well-known World Wide Web (WWW). However, in the present invention, the communication network 130 is not limited to the networks listed above, and may include at least a part of a known wireless data network, a known telephone network, or a known wired/wireless television network.

또한, 도 2에서는 본 발명의 일 실시예에 따른 속도 산출 방법의 순서도를 예시하고 있다. 도 2에서 볼 수 있는 바와 같이, 본 발명의 일 실시예에 따른 속도 산출 방법은, 속도 산출 시스템(100)에서 동영상 촬영 주체의 이동 속도를 산출하는 방법에 있어서, 상기 영상 촬영 주체에 의해 촬영된 동영상에서 고정체를 식별하는 단계(S110), 상기 고정체를 기준으로 상기 동영상에 마스크를 적용하는 단계(S120) 및 미리 학습된 속도 산출 엔진을 이용하여 상기 마스크가 적용된 동영상을 기초로 상기 동영상 촬영 주체의 이동 속도를 산출하는 단계(S130)를 포함할 수 있다.2 illustrates a flowchart of a speed calculation method according to an embodiment of the present invention. As can be seen in FIG. 2 , in the method for calculating the speed according to an embodiment of the present invention, in the method for calculating the movement speed of a video recording subject in the speed calculation system 100, Identifying a fixed body in a video (S110), applying a mask to the video based on the fixed body (S120), and capturing the video based on the video to which the mask is applied using a pre-learned speed calculation engine. A step of calculating the movement speed of the subject (S130) may be included.

나아가, 본 발명의 일 실시예에 따른 속도 산출 방법에서, 상기 이동 속도를 산출하는 단계(S130)는, 상기 마스크가 적용된 동영상을 미리 학습된 광학 흐름(optical flow) 산출 엔진에 입력하여 광학 흐름 영상을 산출하는 단계(미도시) 및 상기 속도 산출 엔진에서 상기 광학 흐름 영상에 기초하여 상기 동영상 촬영 주체의 이동 속도를 산출하는 단계(미도시)를 포함할 수 있다.Furthermore, in the speed calculation method according to an embodiment of the present invention, in the step of calculating the movement speed (S130), the mask-applied video is input to a pre-learned optical flow calculation engine to obtain an optical flow image. Calculating (not shown) and calculating the movement speed of the moving subject based on the optical flow image in the speed calculation engine (not shown).

또한, 본 발명의 일 실시예에 따른 속도 산출 방법에서, 상기 이동 속도를 산출하는 단계(S130)에서는, 상기 동영상의 미리 정해진 기준점에서 상기 고정체를 연결하는 직선의 시간 흐름에 따른 각속도 변화 정보를 함께 상기 속도 산출 엔진에 입력하여 상기 동영상 촬영 주체의 이동 속도를 산출할 수 있으며, 더 나아가 상기 동영상의 상기 기준점에서 상기 고정체를 연결하는 직선의 시간 흐름에 따른 길이 변화 정보도 상기 속도 산출 엔진에 입력하여 상기 동영상 촬영 주체의 이동 속도를 산출할 수도 있다.In addition, in the speed calculation method according to an embodiment of the present invention, in the step of calculating the moving speed (S130), angular speed change information according to the passage of time of a straight line connecting the stationary body from a predetermined reference point of the video is Together, input to the speed calculation engine can calculate the movement speed of the moving subject of the video recording, and furthermore, length change information over time of a straight line connecting the stationary body from the reference point of the video is also sent to the speed calculation engine. It is also possible to calculate the moving speed of the subject of the video recording by inputting the input.

이에 따라, 본 발명의 일 실시예에 따른 속도 산출 방법에서는, 도 3에서 볼 수 있는 바와 같이 촬영된 동영상을 분석하여 동영상 촬영 주체의 이동 속도를 산출할 수 있으며, 나아가 상기 동영상 촬영 주체의 이동 속도를 이용하여 동영상을 보다 효율적으로 압축하거나, 동영상의 보정, 변환 및 복원을 효과적으로 수행할 수 있게 된다.Accordingly, in the speed calculation method according to an embodiment of the present invention, as shown in FIG. 3 , it is possible to analyze the captured video to calculate the movement speed of the video recording subject, and furthermore, the moving speed of the video recording subject. By using, it is possible to more efficiently compress a video or effectively perform correction, conversion, and restoration of a video.

이하, 도면을 참조하여 본 발명의 일 실시예에 따른 동영상 촬영 주체에 대한 이동 속도 산출 방법을 보다 자세하게 살핀다.Hereinafter, a moving speed calculation method for a subject capturing a video according to an embodiment of the present invention will be described in more detail with reference to the drawings.

먼저, 상기 S110 단계에서는 카메라가 부착된 단말(110) 등 영상 촬영 주체에 의해 촬영된 동영상에서 고정체를 식별하게 된다.First, in the step S110, a stationary object is identified in a video captured by a subject such as the camera-attached terminal 110 or the like.

여기서, 고정체는 이동이 불가하여 고정된 위치에 존재하는 물체를 의미하며, 도 4에서 볼 수 있는 바와 같이, 차선, 가드레일, 가로수, 신호등 등이 될 수 있으나, 본 발명이 반드시 이이 한정되는 것은 아니다.Here, the stationary body means an object that cannot be moved and exists in a fixed position, and as can be seen in FIG. 4, it may be a lane, a guardrail, a street tree, a traffic light, etc., but the present invention is necessarily limited to this It is not.

이때, 상기 S110 단계에서는 미리 학습된 고정체 식별 엔진을 이용하여 상기 동영상에서 상기 고정체를 식별할 수 있으나, 본 발명이 반드시 이에 한정되는 것은 아니며, 적용되는 어플리케이션에 따라서는 패턴 매칭 등 다양한 기법을 적용하여 고정체를 식별할 수도 있다.At this time, in the step S110, the stationary object may be identified in the video using a pre-trained stationary identification engine, but the present invention is not necessarily limited thereto, and various techniques such as pattern matching may be used depending on the applied application. It can also be applied to identify fixtures.

이때, 도 4에서 볼 수 있는 바와 같이, 상기 고정체 식별 엔진은 도로 상의 차선(도 4의 (a)), 신호등(도 4의 (c)), 가드레일의 다리, 도로변의 표지판(도 4의 (b)), 가로수(도 4의 (d)), 벤치 등 미리 정해진 개체를 검출하도록 학습된 신경망(neural network)을 이용하여 구현될 수 있다.At this time, as can be seen in FIG. 4, the stationary identification engine detects lanes on the road (FIG. 4(a)), traffic lights (FIG. 4(c)), guardrail bridges, and roadside signs (FIG. 4(c)). (b)), street trees ((d) of FIG. 4), and benches, etc. may be implemented using a neural network trained to detect predetermined objects.

특히, 본 발명의 일 실시예에 따른 속도 산출 방법에서, 촬영된 동영상으로부터 고정체를 식별하는 이유는 이동하는 이동체를 기준으로 하는 경우 동영상 촬영 주체의 절대 속도가 아닌 이동체와 동영상 촬영 주체 간의 상대 속도가 반영되면서 산출되는 동영상 촬영 주체의 이동 속도에 오차를 유발할 수 있게 때문이다.In particular, in the speed calculation method according to an embodiment of the present invention, the reason for identifying a stationary object from a captured video is the relative speed between the moving object and the video capturing subject, not the absolute speed of the moving object when the moving object is the reference. This is because it may cause an error in the moving speed of the moving subject of the video recording subject calculated by reflecting the .

이에 따라, 본 발명의 일 실시예에 따른 속도 산출 방법에서는, 위와 같이 고정체 식별 엔진 등을 이용하여 동영상에서 고정체를 식별하고 이를 이용하여 동영상 촬영 주체의 이동 속도를 산출함으로써 보다 정확한 이동 속도를 산출할 수 있게 된다.Accordingly, in the speed calculation method according to an embodiment of the present invention, a more accurate moving speed is obtained by identifying a fixed object in a video using a fixed object identification engine and calculating the moving speed of a moving subject using this. be able to derive

나아가, 본 발명의 일 실시예에 따른 속도 산출 방법에서, 상기 고정체 식별 엔진에서는 상기 동영상의 연속하는 프레임에서 시간 흐름에 따른 변위가 식별 가능하도록 불연속적으로 위치하는 객체 중 상기 고정체를 식별할 수 있다.Furthermore, in the speed calculation method according to an embodiment of the present invention, the stationary body identification engine identifies the stationary body among discontinuously positioned objects so that displacement over time can be identified in successive frames of the video. can

보다 구체적인 예를 들어, 동영상의 도로 상에 차선이 존재하는 경우, 상기 차선이 불연속적인 점선 형태인 경우에는 동영상의 연속하는 프레임에서 시간적으로 선행하는 제1 프레임과 후속하는 제2 프레임에서 상기 차선의 변위를 용이하게 식별할 수 있겠으나, 만약 차선이 연속하는 선의 형태인 경우 상기 제1 프레임과 제2 프레임에서 시간의 흐름에 따른 변위가 어느 정도인지 식별하기가 어려워지는 문제가 따를 수 있다.For more specific example, if there is a lane on the road of the video, and the lane is in the form of a discontinuous dotted line, the first frame temporally preceding and the second frame succeeding in successive frames of the video show the shape of the lane. Displacement can be easily identified, but if the lane is in the form of a continuous line, it may be difficult to identify the degree of displacement over time in the first frame and the second frame.

이에 따라, 본 발명의 일 실시예에 따른 속도 산출 방법에서는, 차선 중 점선 형태를 가지는 경우와 같이 시간 흐름에 따른 변위가 식별 가능하도록 불연속적으로 위치하는 객체를 고정체로 식별하도록 하는 것이 바람직하다.Accordingly, in the speed calculation method according to an embodiment of the present invention, it is preferable to identify an object positioned discontinuously as a fixed body so that displacement over time can be identified, such as in the case of a dotted line among traffic lanes.

이어서, S120 단계에서는 상기 고정체를 기준으로 상기 동영상에 마스크를 적용하게 된다.Subsequently, in step S120, a mask is applied to the video based on the fixed body.

이때, 상기 마스크는 도 5에서 볼 수 있는 바와 같이 사각 형태의 바운딩 박스(bounding box)로 구현될 수 있으나, 본 발명이 반드시 이에 한정되는 것은 아니다.In this case, the mask may be implemented as a quadrangular bounding box as shown in FIG. 5, but the present invention is not necessarily limited thereto.

또한, 본 발명에서 동영상에 마스크를 적용한다는 것은 동영상의 특정 영역에 높은 가중치를 적용하고 나머지 영역에 낮은 가중치를 적용하여, 특정 영역이 강조된 영상을 생성하는 것을 의미할 수 있다.Also, in the present invention, applying a mask to a video may mean generating an image in which a specific region is emphasized by applying a high weight to a specific region of the video and applying a low weight to the remaining regions.

보다 구체적으로, 동영상에서 고정체가 식별되면, 도 5에서 볼 수 있는 바와 같이, 상기 고정체를 포함하는 바운딩 박스(bounding box)를 생성하여 마스크로 사용할 수 있다. 이때, 상기 마스크는 도 5에 예시된 바와 같이 사각형 형태일 수 있으나, 본 발명이 반드시 이에 한정되는 것은 아니며, 다각형, 원형, 타원형 등의 형상으로 구현하는 것도 가능하며, 나아가 상기 고정체의 형태에 대응하도록 상기 마스크의 형상을 구성하여 고정체 이외의 개체에 의한 영향을 최소화하는 것도 가능하다.More specifically, when a fixture is identified in a video, as shown in FIG. 5 , a bounding box including the fixture may be created and used as a mask. At this time, the mask may have a rectangular shape as illustrated in FIG. 5, but the present invention is not necessarily limited thereto, and may be implemented in a polygonal shape, a circular shape, an elliptical shape, and the like. It is also possible to configure the shape of the mask to correspond to minimize the influence by objects other than the fixed body.

이에 따라, 상기 마스크를 적용하는 단계에서는, 상기 동영상에 대하여 상기 마스크에 해당하는 영역에 제1 가중치를 적용하고 나머지 영역에 상기 제1 가중치보다 낮은 제2 가중치를 적용하여 각 영역의 투명도를 조절하여 결합하는 알파 블렌딩(alpha blending) 기법 등이 적용될 수 있다.Accordingly, in the step of applying the mask, a first weight is applied to a region corresponding to the mask with respect to the video and a second weight lower than the first weight is applied to the remaining regions to adjust the transparency of each region. Combining alpha blending techniques and the like may be applied.

보다 구체적인 예를 들어, 본 발명의 일 실시예에 따른 속도 산출 방법에서 상기 마스크를 적용하는 과정은, 동영상의 일련의 프레임에 대하여 식별된 고정체가 위치하는 바운딩 박스의 내부 영역(예를 들어, 도 5(a)의 주황색 영역)을 분리하여 제1 이미지를 생성하고, 상기 바운딩 박스의 내부 영역이 제외된 외부 영역으로 제2 이미지를 생성하여, 상기 제1 이미지에 대해서는 90%의 가중치를 부여하고, 상기 제2 이미지에 대해서는 10%의 가중치를 부여하여, 상기 제1 이미지와 상기 제2 이미지의 투명도를 조절한 후, 상기 제1 이미지와 상기 제2 이미지를 결합하여, 상기 동영상에서 상기 고정체가 위치하는 내부 영역은 강조하고, 나머지 외부 영역은 흐릿하게 처리할 수 있다.For a more specific example, the process of applying the mask in the speed calculation method according to an embodiment of the present invention includes the inner region of the bounding box where the identified stationary object is located (for example, A first image is created by separating the orange area of FIG. 5 (a)), a second image is created with an outer area excluding the inner area of the bounding box, and a weight of 90% is applied to the first image. and, for the second image, a weight of 10% is given to adjust the transparency of the first image and the second image, and then the first image and the second image are combined, and the high The inner area where the congestion is located can be emphasized, and the rest of the outer area can be blurred.

그러나, 본 발명이 반드시 이에 한정되는 것은 아니며, 상기 고정체가 위치하는 바운딩 박스의 내부 영역에는 80%의 가중치를 부여하고 나머지 외부 영역에는 20%의 가중치를 부여할 수도 있고, 적용되는 어플리케이션의 동작 환경을 고려하여 상기 고정체가 위치하는 바운딩 박스의 내부 영역과 나머지 외부 영역에 적용되는 가중치를 증감할 수 있다.However, the present invention is not necessarily limited to this, and a weight of 80% may be assigned to the inner region of the bounding box where the fixture is located and a weight of 20% may be assigned to the remaining outer region. Considering the environment, the weight applied to the inner region and the remaining outer regions of the bounding box where the fixture is located may be increased or decreased.

나아가, 본 발명에서는 위와 같이 동영상에서 상기 가중치에 따라 투명도를 조절하는 방식 이외에, 상기 가중치에 따라 픽셀 값을 증감하는 방식으로 특정 영역이 강조된 영상을 생성하는 것도 가능하다.Furthermore, in the present invention, in addition to the method of adjusting the transparency according to the weight in the video as described above, it is also possible to create an image in which a specific region is emphasized by increasing or decreasing a pixel value according to the weight.

보다 구체적인 예를 들어, HSV 색좌표계를 사용하는 동영상의 각 프레임에 대하여, 고정체가 위치하는 바운딩 박스의 내부 영역에 대해서는 픽셀의 명도(V) 또는 채도(S) 값에 0.8를 곱하여 원래의 명도(V) 또는 채도(S) 값에 근접한 값을 가지도록 하고, 상기 바운딩 박스의 외부 영역에 대해서는 픽셀의 명도(V) 또는 채도(S) 값에 0.2를 곱하여 명도(V) 또는 채도(S) 값을 크게 변화시켜 줌으로써, 나머지 영역에 대비하여 고정체가 강조된 영상을 생성할 수도 있다.As a more specific example, for each frame of a video using the HSV color coordinate system, the brightness (V) or saturation (S) value of a pixel is multiplied by 0.8 for the inner area of the bounding box where the fixture is located to obtain the original brightness. (V) or saturation (S) value, and for the outer region of the bounding box, the brightness (V) or saturation (S) value of the pixel is multiplied by 0.2 to obtain the brightness (V) or saturation (S) value. By greatly changing the value, an image in which the fixture is emphasized in contrast to the remaining area may be created.

나아가, 본 발명의 일 실시예에 따른 속도 산출 방법에서는 상기 동영상의 전체 프레임에 대하여 동영상 촬영 주체의 이동 속도를 산출할 수도 있겠으나, 본 발명이 반드시 이에 한정되는 것은 아니며, 동영상의 전체 프레임 중 일부 프레임에 대해서만 동영상 촬영 주체의 이동 속도를 산출할 수도 있고, 또한 특정한 프레임에 대해서만 동영상 촬영 주체의 이동 속도를 산출할 수도 있으므로, 반드시 상기 동영상의 전체 프레임에 대하여 위와 같이 마스크를 적용하여야 하는 것은 아니며, 적용되는 어플리케이션에 따라 상기 동영상의 전체 프레임 중 전부 또는 일부에 대하여 마스크를 적용할 수 있다.Furthermore, in the speed calculation method according to an embodiment of the present invention, the movement speed of the moving subject of the video recording subject may be calculated for all frames of the video, but the present invention is not necessarily limited thereto, and some of the entire frames of the video Since the moving speed of a subject capturing a video may be calculated only for a frame, or the moving speed of a subject capturing a video may be calculated only for a specific frame, the mask does not necessarily have to be applied to all frames of the video as described above, Depending on the applied application, a mask may be applied to all or part of all frames of the video.

이와 같이, 본 발명의 일 실시예에 따른 속도 산출 방법에서는 상기 동영상의 일련의 프레임 전부 또는 일부에 대하여 마스크를 적용하여 고정체가 강조된 동영상을 생성하고, 이를 이용하여 상기 동영상을 촬영한 촬영 주체의 이동 속도를 산출할 수 있게 된다.As described above, in the speed calculation method according to an embodiment of the present invention, a mask is applied to all or part of a series of frames of the video to generate a video in which the stationary body is emphasized, and by using this, the subject of the video is captured. Movement speed can be calculated.

이에 따라, 상기 마스크가 적용된 동영상은 미리 학습된 속도 산출 엔진으로 입력되어, 상기 고정체의 변위 정도를 고려하여 상기 동영상 촬영 주체의 이동 속도를 산출하는데 사용될 수 있다.Accordingly, the video to which the mask is applied may be input to a pre-learned speed calculation engine, and may be used to calculate the moving speed of the subject taking the video in consideration of the degree of displacement of the fixed body.

나아가, 본 발명의 일 실시예에 따른 속도 산출 방법에는, 상기 마스크가 적용된 동영상을 미리 학습된 광학 흐름(optical flow) 산출 엔진에 입력하여 광학 흐름 영상을 산출하는 단계(미도시)가 더 포함될 수 있다.Furthermore, the speed calculation method according to an embodiment of the present invention may further include a step (not shown) of calculating an optical flow image by inputting the video to which the mask is applied to a previously learned optical flow calculation engine. there is.

여기서, 광학 흐름(optical flow)란 동영상의 연속하는 프레임 사이의 객체 또는 픽셀의 움직임을 나타내는 패턴을 의미하며, 보다 구체적으로 도 6(a)에서 볼 수 있는 바와 같이 동영상에서 객체의 움직임 방향 및 크기를 나타낼 수 있다.Here, the optical flow means a pattern representing the movement of an object or pixel between successive frames of a video, and more specifically, as shown in FIG. can represent

이에 따라, 본 발명의 일 실시예에 따른 속도 산출 방법에서는, 도 5(b)에서 볼 수 있는 바와 같이, 상기 마스크가 적용된 동영상을 미리 학습된 광학 흐름(optical flow) 산출 엔진(12)에 입력하여 광학 흐름 영상을 산출할 수 있다.Accordingly, in the speed calculation method according to an embodiment of the present invention, as shown in FIG. 5 (b), the mask-applied video is input to the pre-learned optical flow calculation engine 12. Thus, an optical flow image can be calculated.

이때, 도 5(b)에 도시된 바와 같이, 상기 광학 흐름 산출 엔진(12)은 복수의 히든 레이어(hidden layer)를 구비하는 심층 신경망일 수 있으나, 본 발명이 반드시 이에 한정되는 것은 아니다.In this case, as shown in FIG. 5( b ), the optical flow calculation engine 12 may be a deep neural network having a plurality of hidden layers, but the present invention is not necessarily limited thereto.

나아가, 도 6(b)에서 볼 수 있는 바와 같이, 상기 광학 흐름 영상은, 상기 동영상에서의 시간 흐름에 따른 상기 고정체의 변위 방향과 크기가 색좌표계를 이용하여 영상으로 표현될 수 있다.Furthermore, as can be seen in FIG. 6(b), in the optical flow image, the displacement direction and size of the fixed body according to the lapse of time in the video can be expressed as an image using a color coordinate system.

보다 구체적으로, 상기 광학 흐름 영상은 HSV 색좌표계의 색상(Hue), 채도(Saturation), 명도(Value) 중 하나 이상을 이용하여 영상으로 표현될 수 있으며, 예를 들어 도 6(b)에 도시된 바와 같이 상기 HSV 색좌표계의 색상(Hue)은 객체의 이동 방향에 대응될 수 있고(예를 들어, 도 6(b)에서 소년은 오른쪽으로 이동하므로 적색으로 표현), 상기 HSV 색좌표계의 채도(Saturation) 또는 명도(Value)는 상기 객체의 이동의 크기에 대응될 수 있다.More specifically, the optical flow image may be expressed as an image using one or more of Hue, Saturation, and Value of the HSV color coordinate system. For example, shown in FIG. 6 (b) As described above, the hue (Hue) of the HSV color coordinate system may correspond to the moving direction of the object (for example, in FIG. 6 (b), the boy moves to the right, so it is expressed as red), and the saturation (Saturation) or brightness (Value) may correspond to the size of the movement of the object.

또한, 상기 광학 흐름 산출 엔진(12)은 CNN(Convolutional Neural Network) 등 신경망(예를 들어, flownet 등)을 이용하여 구현하는 것도 가능하나, 본 발명이 반드시 이에 한정되는 것은 아니다.In addition, the optical flow calculation engine 12 can be implemented using a neural network (eg, flownet, etc.) such as a convolutional neural network (CNN), but the present invention is not necessarily limited thereto.

이에 따라, 본 발명의 일 실시예에 따른 속도 산출 방법에서는, 도 7에 도시된 바와 같이, 동영상에 대한 광학 흐름 영상을 산출할 수 있게 된다.Accordingly, in the speed calculation method according to an embodiment of the present invention, as shown in FIG. 7, it is possible to calculate an optical flow image for a video.

보다 구체적으로, 도 7(a)에서는 마스크를 적용하지 않은 경우에 대한 광학 흐름 영상을 예시하고 있으며, 도 7(b)에서는 마스크를 적용한 경우에 대한 광학 흐름 영상을 예시하고 있다.More specifically, FIG. 7(a) illustrates an optical flow image when no mask is applied, and FIG. 7(b) illustrates an optical flow image when a mask is applied.

도 7(a)를 살펴보면 동영상에 존재하는 다양한 개체가 광학 흐름 영상에 포함되어 있음을 알 수 있는데, 이에 반해 도 7(b)를 살펴보면 차선, 가드레일 등 고정체에 마스크를 적용하여 고정체가 강조된 광학 흐름 영상을 구성하고 있음을 확인할 수 있다.Looking at FIG. 7 (a), it can be seen that various objects existing in the video are included in the optical flow image. On the other hand, looking at FIG. It can be confirmed that the enhanced optical flow image is constituted.

나아가, 동영상 프레임에서 고정체가 검출되지 않는 경우가 발생하면, 상기 동영상 프레임에 대한 광학 흐름 영상을 생성하는 과정에서는 사용되는 관련 동영상 프레임에 마스크를 적용하지 않고 처리할 수 있다.Furthermore, if a case in which a fixed object is not detected in a video frame occurs, a process of generating an optical flow image for the video frame may be processed without applying a mask to the used video frame.

보다 구체적으로, 동영상의 제1 프레임에서 고정체가 검출된 경우 마스크를 적용하여 상기 고정체가 강조된 영상을 사용하게 되는데, 상기 제1 프레임에 후속하는 제2 프레임에서 고정체가 검출되지 않는 경우 제1 프레임에 대해서는 마스크가 적용되어 고정체가 강조되고, 제2 프레임에 대해서는 마스크가 적용되지 않으면서, 상기 제1 프레임과 제2 프레임 간의 비교를 통해 산출되는 광학 흐름 영상에 노이즈가 크게 유발되는 문제가 따르게 된다.More specifically, when a stationary object is detected in the first frame of the video, an image in which the stationary object is emphasized by applying a mask is used. A problem in which a mask is applied to the first frame to emphasize the stationary body, and a mask is not applied to the second frame, causing a large amount of noise in the optical flow image calculated through comparison between the first frame and the second frame. will follow

이에 따라, 본 발명의 일 실시예에 따른 속도 산출 방법에서는 동영상 프레임에서 고정체가 검출되지 않는 경우 상기 동영상 프레임에 대한 광학 흐름 영상을 생성하는 과정에서는 사용되는 관련 동영상 프레임에 마스크를 적용하지 않고 처리함으로써, 광학 흐름 영상에서 노이즈가 발생하는 것을 방지할 수 있게 된다.Accordingly, in the speed calculation method according to an embodiment of the present invention, when a stationary object is not detected in a video frame, in the process of generating an optical flow image for the video frame, a mask is not applied to the related video frame. By doing so, it is possible to prevent noise from occurring in the optical flow image.

이에 따라, 상기 S130 단계에서는 미리 학습된 속도 산출 엔진을 이용하여 상기 마스크가 적용된 동영상을 기초로 상기 동영상 촬영 주체의 이동 속도를 산출하게 된다.Accordingly, in the step S130, the movement speed of the moving subject of the video recording subject is calculated based on the video to which the mask is applied using the previously learned speed calculation engine.

이때, 상기 마스크가 적용된 동영상이 상기 속도 산출 엔진으로 입력되는 경우에는, 상기 속도 산출 엔진에서는 마스크가 적용된 복수의 동영상 프레임을 이용해 시간의 흐름에 따른 고정체의 변위를 고려하여 상기 동영상 촬영 주체의 이동 속도를 산출하게 된다.In this case, when the video to which the mask is applied is input to the speed calculation engine, the speed calculation engine uses a plurality of video frames to which the mask is applied and considers the displacement of the stationary body over time to move the moving subject of the video recording. speed will be calculated.

반면, 상기 광학 흐름 영상이 상기 속도 산출 엔진으로 입력되는 경우에는, 상기 광학 흐름 영상의 각 프레임에는 이미 고정체의 변위, 즉 이동 방향 및 크기가 반영되어 있으므로, 상기 속도 산출 엔진에서는 각 프레임을 입력받아 상기 동영상 촬영 주체의 이동 속도를 산출할 수 있다. On the other hand, when the optical flow image is input to the velocity calculation engine, since the displacement of the fixed body, that is, the movement direction and size, is already reflected in each frame of the optical flow image, the velocity calculation engine inputs each frame. received, the moving speed of the subject of the video recording may be calculated.

이에 따라, 본 발명의 일 실시예에 따른 속도 산출 방법에서는, 상기 속도 산출 엔진으로 입력되는 동영상의 개별 프레임 단위로 상기 동영상 촬영 주체의 이동 속도를 산출할 수 있게 된다.Accordingly, in the speed calculation method according to an embodiment of the present invention, it is possible to calculate the movement speed of the moving picture subject in units of individual frames of the moving picture input to the speed calculation engine.

그러나, 본 발명이 반드시 이에 한정되는 것은 아니며, 상기 속도 산출 엔진에서는 상기 광학 흐름 영상에서 복수의 프레임을 함께 고려하여 상기 동영상 촬영 주체의 이동 속도를 산출할 수도 있으며, 이외에도 다양한 데이터를 함께 고려하여 산출되는 이동 속도의 정확도를 개선하는 것도 가능하다.However, the present invention is not necessarily limited to this, and the speed calculation engine may calculate the moving speed of the moving subject by considering a plurality of frames in the optical flow image together, and calculating the moving speed by considering various other data together. It is also possible to improve the accuracy of the moving speed.

나아가, 상기 속도 산출 엔진에서는 상기 동영상의 단위 시간당 촬영 속도(Frame Per Second, FPS)를 고려하여 상기 동영상 촬영 주체의 이동 속도를 산출할 수 있으며, 또는 상기 동영상의 단위 시간당 촬영 속도(FPS)를 미리 정해진 규격(예를 들어, 30 또는 60 FPS)으로 변환하여 사용하도록 하는 것도 가능하다.Furthermore, the speed calculation engine may calculate the moving speed of the subject taking the video in consideration of the shooting speed per unit time (Frame Per Second, FPS) of the video, or may calculate the shooting speed per unit time (FPS) of the video in advance. It is also possible to use it after converting it to a predetermined standard (eg, 30 or 60 FPS).

보다 구체적으로, 상기 속도 산출 엔진은 복수의 히든 레이어(hidden layer)를 구비하는 심층 신경망(Deep Neural Network)일 수 있으나, 본 발명이 반드시 이에 한정되는 것은 아니다.More specifically, the speed calculation engine may be a deep neural network having a plurality of hidden layers, but the present invention is not necessarily limited thereto.

또한, 본 발명의 일 실시예에 따른 속도 산출 방법에서, 상기 이동 속도를 산출하는 단계(S130)에서는, 상기 동영상의 미리 정해진 기준점에서 상기 고정체를 연결하는 직선의 시간 흐름에 따른 각속도 변화 정보를 함께 상기 속도 산출 엔진에 입력하여 상기 동영상 촬영 주체의 이동 속도를 산출할 수 있으며, 더 나아가 상기 동영상의 상기 기준점에서 상기 고정체를 연결하는 직선의 시간 흐름에 따른 길이 변화 정보도 상기 속도 산출 엔진에 입력하여 상기 동영상 촬영 주체의 이동 속도를 산출할 수도 있다.In addition, in the speed calculation method according to an embodiment of the present invention, in the step of calculating the moving speed (S130), angular speed change information according to the passage of time of a straight line connecting the stationary body from a predetermined reference point of the video is Together, input to the speed calculation engine can calculate the movement speed of the moving subject of the video recording, and furthermore, length change information over time of a straight line connecting the stationary body from the reference point of the video is also sent to the speed calculation engine. It is also possible to calculate the moving speed of the subject of the video recording by inputting the input.

나아가, 본 발명의 일 실시예에 따른 속도 산출 방법에서는, 상기 고정체에 대한 각속도의 변화 정보 또는 이에 더하여 상기 고정체에 대한 길이 변화 정보와 함께 상기 고정체에 대한 광학 흐름 영상을 동시에 고려하여 상기 동영상 촬영 주체의 이동 속도를 산출할 수도 있다.Furthermore, in the speed calculation method according to an embodiment of the present invention, the optical flow image of the fixture is simultaneously considered together with change information of the angular velocity of the fixture or, in addition, length change information of the fixture. It is also possible to calculate the moving speed of the subject of video recording.

보다 구체적인 예를 들어, 도 8에서 볼 수 있는 바와 같이, 상기 동영상의 각 프레임에서 고정체가 검출될 수 있고, 시간의 흐름에 따른 일련의 프레임에서 고정체의 위치가 변화하게 된다.For a more specific example, as shown in FIG. 8 , a stationary object may be detected in each frame of the video, and the location of the stationary body changes in a series of frames over time.

이에 따라, 본 발명의 일 실시예에 따른 속도 산출 방법에서는, 동영상의 미리 정해진 기준점(예를 들어, 도 8(a), (b)의 영상 중심 하단의 적색점)에서 상기 고정체를 연결하는 직선의 각속도 변화 정보(예를 들어, 도 8(b)에서 좌측 차선(점선)의 θ1, θ2, 우측 차선(점선)의 θ5, θ6, 가드레일의 θ3, θ4)를 함께 상기 속도 산출 엔진으로 입력하여 상기 동영상 촬영 주체의 이동 속도를 산출하도록 할 수 있다.Accordingly, in the speed calculation method according to an embodiment of the present invention, connecting the fixture at a predetermined reference point of the video (eg, a red dot at the bottom of the center of the video in FIGS. 8(a) and (b)) Angular velocity change information of a straight line (eg, θ 1 , θ 2 of the left lane (dotted line) in FIG. 8 (b), θ 5 , θ 6 of the right lane (dotted line), θ 3 , θ 4 of the guardrail) Together, they may be input to the speed calculation engine to calculate the movement speed of the subject of the video recording.

나아가, 본 발명의 일 실시예에 따른 속도 산출 방법에서는, 동영상의 미리 정해진 기준점(예를 들어, 도 8(a), (b)의 영상 중심 하단의 적색점)에서 상기 고정체를 연결하는 직선의 길이 변화 정보(예를 들어, 도 8(b)에서 좌측 차선(점선)의 L1, L2, L3, 우측 차선(점선)의 L7, L8, L9, 가드레일의 L4, L5, L3)도 함께 상기 속도 산출 엔진으로 입력하여 상기 동영상 촬영 주체의 이동 속도를 산출하도록 할 수 있다Furthermore, in the speed calculation method according to an embodiment of the present invention, a straight line connecting the fixture at a predetermined reference point of the video (for example, a red dot at the lower center of the video in FIGS. 8(a) and (b)) Length change information (eg, L 1 , L 2 , L 3 of the left lane (dotted line) in FIG. 8 (b), L 7 , L 8 , L 9 of the right lane (dotted line), L 4 of the guardrail , L 5 , and L 3 ) may also be input to the speed calculation engine to calculate the moving speed of the moving subject.

보다 구체적으로, 도 9에서 볼 수 있는 바와 같이, 본 발명의 일 실시예에 따른 속도 산출 방법에서는, 고정체 검출 후 마스킹된 동영상에서 연속하는 복수의 프레임을 대비하여(도 9의 (a)), 광학 흐름 영상을 산출하게 된다(도 9의 (b)).More specifically, as can be seen in FIG. 9, in the speed calculation method according to an embodiment of the present invention, after detecting a stationary object, a plurality of consecutive frames in a masked video are compared (FIG. 9(a)) , an optical flow image is calculated (Fig. 9(b)).

나아가, 본 발명의 일 실시예에 따른 속도 산출 방법에서는, 상기 복수의 프레임을 대비하여 상기 고정체에 대한 이동의 변화량(즉, 각속도 변화 정보 및 길이 변화 정보)를 산출할 수 있다(도 9의 (c)).Furthermore, in the speed calculation method according to an embodiment of the present invention, it is possible to calculate the amount of movement change (ie, angular velocity change information and length change information) with respect to the fixed body by comparing the plurality of frames (see FIG. 9 ). (c)).

이어서, 상기 광학 흐름 영상과 상기 고정체의 각속도 변화 정보 및 길이 변화 정보는 속도 산출 엔진으로 입력되어 상기 동영상 촬영 주체의 이동 속도를 산출하게 된다.Subsequently, the optical flow image and the angular velocity change information and length change information of the fixed body are input to a speed calculation engine to calculate the moving speed of the subject taking the video.

이때, 상기 속도 산출 엔진에서는 상기 광학 흐름 영상으로부터 상기 고정체의 이동 방향(색상)과 이동 변화량(채도)을 고려하여 상기 동영상 촬영 주체의 이동 속도를 산출하는데 반영할 수 있으며(도 9의 (d)), 나아가 상기 고정체의 각속도 변화 정보(사잇각 변화량) 및 길이 변화 정보(기준점으로부터의 거리 및 거리 변화량)을 함께 고려하여 상기 동영상 촬영 주체의 이동 속도를 산출하는데 반영할 수 있다(도 9의 (e)).At this time, the speed calculation engine may consider the movement direction (color) and movement variation (saturation) of the fixed body from the optical flow image and reflect them in calculating the movement speed of the moving subject (Fig. 9(d) )), and furthermore, the angular velocity change information (interval angle change amount) and the length change information (distance from the reference point and distance change amount) of the fixed body may be taken into account to calculate the moving speed of the moving subject (FIG. 9). (e)).

이때, 도 9에서 볼 수 있는 바와 같이, 상기 속도 산출 엔진은 5층의 전체 연결 레이어(fully connected layer) 구조를 가지는 심층 신경망으로 구성될 수 있으며, 각 레이어의 노드는 10, 16, 32, 16, 10일 수 있으나, 본 발명이 반드시 이에 한정되는 것은 아니다.At this time, as can be seen in FIG. 9, the speed calculation engine can be composed of a deep neural network having a fully connected layer structure of 5 layers, and the nodes of each layer are 10, 16, 32, 16 , 10, but the present invention is not necessarily limited thereto.

또한, 도 8에서는 상기 기준점이 동영상 프레임의 중심 하단(즉, 동영상 프레임의 상하 방향 중심축 상의 최하단)에 위치하는 경우를 들어 설명하고 있으나, 본 발명이 반드시 이에 한정되는 것은 아니다.In addition, although FIG. 8 describes the case where the reference point is located at the lower center of the video frame (ie, the lowermost end on the central axis in the vertical direction of the video frame), the present invention is not necessarily limited thereto.

나아가, 도 10에서 볼 수 있는 바와 같이 상기 기준점은 동영상 프레임의 상하 방향 중심축 상에 위치할 수도 있으며, 이때, 상기 기준점의 위치는 적용되는 어플리케이션 및 동영상의 특성에 따라 정해질 수 있다.Furthermore, as shown in FIG. 10 , the reference point may be located on the central axis of the video frame in the vertical direction, and in this case, the position of the reference point may be determined according to the characteristics of the applied application and video.

또한, 도 11에서는 본 발명의 일 실시예에 따른 속도 산출 엔진 학습 방법의 순서도를 예시하고 있다.11 illustrates a flowchart of a method for learning a speed calculation engine according to an embodiment of the present invention.

도 11에서 볼 수 있는 바와 같이, 본 발명의 일 실시예에 따른 속도 산출 엔진 학습 방법은, 학습 시스템에서 동영상 촬영 주체의 이동 속도를 산출하는 속도 산출 엔진을 학습하는 방법에 있어서, 상기 동영상 촬영 주체에 의해 촬영된 동영상에서 고정체를 식별하는 단계(S210), 상기 고정체를 기준으로 상기 동영상에 마스크를 적용하는 단계(S220), 상기 마스크가 적용된 동영상을 기초로 상기 동영상 촬영 주체의 이동 속도 데이터를 태깅하는 단계(S230) 및 상기 태깅된 동영상 촬영 주체의 이동 속도 데이터를 이용하여 상기 동영상 촬영 주체의 이동 속도를 산출하는 속도 산출 엔진을 학습하는 단계(S240)를 포함할 수 있다.As can be seen in FIG. 11, the method for learning a speed calculation engine according to an embodiment of the present invention is a method for learning a speed calculation engine for calculating a movement speed of a subject taking a video in a learning system. Identifying a stationary object in the video captured by (S210), applying a mask to the video based on the stationary body (S220), and moving speed data of the moving subject based on the video to which the mask is applied. It may include tagging (S230) and learning a speed calculation engine that calculates the moving speed of the video capturing subject using the tagged moving speed data of the video capturing subject (S240).

나아가, 본 발명의 일 실시예에 따른 속도 산출 엔진 학습 방법에서, 상기 이동 속도 데이터를 태깅하는 단계(S230)는, 상기 마스크가 적용된 동영상을 미리 학습된 광학 흐름(optical flow) 산출 엔진에 입력하여 광학 흐름 영상을 산출하는 단계(미도시) 및 상기 광학 흐름 영상에 대하여 상기 동영상 촬영 주체의 이동 속도 데이터를 태깅하는 단계(미도시)를 포함할 수 있다.Furthermore, in the speed calculation engine learning method according to an embodiment of the present invention, in the tagging of the movement speed data (S230), the mask-applied video is input to a pre-learned optical flow calculation engine A step of calculating an optical flow image (not shown) and a step of tagging movement speed data of the subject taking the video with respect to the optical flow image (not shown) may be included.

또한, 도 12에서는 본 발명의 일 실시예에 따른 속도 산출 방법의 학습 과정 및 속도 산출 과정을 예시하고 있다.12 illustrates a learning process and a speed calculation process of the speed calculation method according to an embodiment of the present invention.

이하, 도 11 및 도 12를 참조하여 본 발명의 일 실시예에 따른 속도 산출 방법의 학습 과정 및 속도 산출 과정을 살핀다. 이때, 앞서 본 발명의 일 실시예에 따른 속도 산출 방법에 대하여 자세하게 설명한 바, 통상의 기술자라면 이를 속도 산출 엔진 학습 방법에 참조할 수 있으므로, 아래에서는 본 발명의 일 실시예에 따른 속도 산출 엔진 학습 방법의 요지를 중심으로 설명한다.Hereinafter, with reference to FIGS. 11 and 12, a learning process and a speed calculation process of a speed calculation method according to an embodiment of the present invention will be described. In this case, since the speed calculation method according to an embodiment of the present invention has been described in detail above, a person skilled in the art can refer to the speed calculation engine learning method, so below, the speed calculation engine learning method according to an embodiment of the present invention The main points of the method will be explained.

먼저, 상기 S210 단계에서는, 상기 동영상 촬영 주체에 의해 촬영된 동영상에서 고정체를 식별하게 된다.First, in the step S210, a stationary body is identified in a video captured by the subject of the video recording.

이때, 도 12(a)에서 볼 수 있는 바와 같이, 상기 S210 단계에서는, 도 12(a)에서 볼 수 있는 바와 같이, 고정체 검출 엔진(11)을 이용하여 상기 동영상에서 고정체를 식별할 수 있으나, 본 발명이 반드시 이에 한정되는 것은 아니다.At this time, as shown in FIG. 12(a), in step S210, as shown in FIG. 12(a), a fixed object may be identified in the video using the fixed object detection engine 11. However, the present invention is not necessarily limited thereto.

이어서, 상기 S220 단계에서는 상기 고정체를 기준으로 상기 동영상에 마스크를 적용하게 된다.Subsequently, in step S220, a mask is applied to the video based on the fixed body.

이에 따라, 상기 S230 단계에서는 상기 마스크가 적용된 동영상을 기초로 상기 동영상 촬영 주체의 이동 속도 데이터를 태깅하게 된다.Accordingly, in the step S230, movement speed data of the subject of the video recording is tagged based on the video to which the mask is applied.

이때, 상기 S230 단계는, 도 12(a)에서 볼 수 있는 바와 같이, 상기 마스크가 적용된 동영상을 미리 학습된 광학 흐름(optical flow) 산출 엔진에 입력하여 광학 흐름 영상을 산출하는 단계(미도시) 및 상기 광학 흐름 영상에 대하여 상기 동영상 촬영 주체의 이동 속도 데이터를 태깅하는 단계 (미도시)를 포함할 수 있다.At this time, the step S230 is a step of calculating an optical flow image by inputting the video to which the mask is applied to a pre-learned optical flow calculation engine, as shown in FIG. 12(a) (not shown). and tagging (not shown) movement speed data of the subject of the video recording with respect to the optical flow image.

이때, 상기 광학 흐름 영상의 참값(ground truth)은 수작업으로 획득하기 어려운 문제가 있는데, 이에 대하여 본 발명에서는 독일 프라이부르크 대학교의 Flying Dataset를 사용하여 문제를 해결하였다.At this time, it is difficult to obtain the ground truth of the optical flow image manually, but the present invention solved the problem by using the Flying Dataset of the University of Freiburg, Germany.

상기 광학 흐름 영상을 산출하는 경우, 상기 S230 단계에서는 상기 광학 흐름 영상에 상기 동영상 촬영 주체의 이동 속도 데이터의 참값(ground truth)을 태깅하게 된다.In the case of calculating the optical flow image, in step S230, the optical flow image is tagged with the ground truth of the moving speed data of the moving subject.

또한, 도 12(a)에서 볼 수 있는 바와 같이, 상기 학습 과정에서는 속도계를 사용하여 상기 동영상 촬영 주체의 이동 속도 데이터의 참값(ground truth)을 측정하고, 측정된 이동 속도 데이터를 상기 광학 흐름 영상에 태깅할 수도 있다.In addition, as shown in FIG. 12(a), in the learning process, a speedometer is used to measure the ground truth of the moving speed data of the subject taking the video, and the measured moving speed data is used as the optical flow image. You can also tag

이에 따라, 상기 학습 과정에서는 영상의 프레임별 속도(FPS), 영상 하단의 중점 등 기준점과 고정체 간의 각속도, 길이 변화량, 광학 흐름 영상의 고정체의 이동 방향 및 크기 등의 정보(13)를 반영하여 속도 산출 엔진(14)을 학습시킬 수 있다.Accordingly, in the learning process, information 13 such as the frame-by-frame speed (FPS) of the image, the angular velocity between the reference point and the fixture, such as the midpoint at the bottom of the image, the amount of change in length, and the moving direction and size of the fixture in the optical flow video are reflected. Thus, the speed calculation engine 14 can be trained.

이어서, 속도 산출 과정에서는 위와 같이 학습된 속도 산출 엔진(14)을 이용하여 동영상 촬영 주체의 이동 속도를 산출하게 된다(도 12의 (b)).Subsequently, in the speed calculation process, the moving speed of the moving subject of the moving image is calculated using the speed calculation engine 14 learned as above (FIG. 12(b)).

먼저, 동영상 촬영 주체의 이동 속도를 산출하고자 하는 동영상(21)이 입력되면, 상기 동영상은 고정체 검출 엔진(22)을 거쳐 동영상에서 고정체를 검출하게 된다.First, when a video 21 to calculate the moving speed of a subject taking a video is input, the video passes through the stationary object detection engine 22 to detect a stationary object in the video.

이때, 상기 동영상에서 복수개의 인스턴스(즉, 동일한 카테고리에 속하는 복수의 개체, 예를 들어 하나의 동영상 프레임에 복수개의 점선 형태 차선이 검출되는 경우의 각 점선)가 검출되는 경우에는 영상의 중심 하단 등 기준점에서 가장 가까운 인스턴스만을 활용할 수 있다.At this time, when a plurality of instances (that is, a plurality of entities belonging to the same category, for example, each dotted line when a plurality of dotted lanes are detected in one video frame) are detected in the video, the bottom center of the video, etc. Only instances closest to the reference point can be utilized.

또한, 본 발명에서 학습 과정에서 사용되는 단위 시간당 촬영 속도(FPS)가 속도 산출 과정에서 사용되는 단위 시간당 촬영 속도(FPS)와 동일하거나, 그 차이를 고려한 보정을 거쳐야 한다.In addition, in the present invention, the shooting speed per unit time (FPS) used in the learning process should be the same as the shooting speed (FPS) per unit time used in the speed calculation process, or it should be corrected considering the difference.

이어서, 도 12(b)에서 볼 수 있는 바와 같이, 고정체가 검출되어 마스킹된 동영상은 광학 흐름 산출 엔진으로 입력되어 광학 흐름 영상을 산출하게 된다.Subsequently, as can be seen in FIG. 12(b), the motion picture masked by the detection of the fixture is input to the optical flow calculation engine to calculate the optical flow image.

또한, 상기 고정체가 검출되어 마스킹된 동영상에서 영상 하단 중점 등 기준점과 고정체 간의 각속도, 길이 변화량을 산출할 수 있다.In addition, the angular velocity and length variation between a fixed object and a reference point, such as a midpoint at the bottom of the image, can be calculated in the video masked after the fixed object is detected.

보다 구체적으로, 앞서 도 8에서 살펴본 바와 같이, 입력되는 동영상에서 검출된 점선 형태의 차선 등 고정체는 시간의 흐름에 따라 이동하게 되며, 이에 따라 상기 기준점에서 상기 고정체를 연결하는 직선(이때, 상기 직선은 상기 기준점과 상기 고정체의 바운딩 박스에서 특정한 변의 중점을 연결하는 직선이 될 수 있다)의 각속도(도 8의 θ1 등) 및 길이(도 8의 L1 등) 변화를 산출할 수 있게 된다. 이때, 상기 고정체가 상기 기준점에 가까워질수록 위와 같은 변화량은 더욱 커질 수 있다. More specifically, as described in FIG. 8 above, fixtures such as dotted lanes detected in an input video move over time, and accordingly, a straight line connecting the fixtures at the reference point (at this time, The straight line may be a straight line connecting the reference point and the midpoint of a specific side in the bounding box of the fixed body) angular velocity (θ 1 in FIG. 8 , etc.) and length (L 1 in FIG. 8 , etc.) change can be calculated. there will be In this case, as the fixture approaches the reference point, the above variation may increase.

이에 따라, 상기 고정체의 시간 흐름에 따른 이동에 의한 광학 흐름 영상 및 상기 각속도 및 길이 변화 정보를 학습 데이터로 사용하여 변화량에 따라 바뀌는 특성과 속도를 매핑시키면서 상기 속도 산출 엔진(14)에 대한 학습을 수행하고, 학습된 속도 산출 엔진(14)을 사용하여 동영상으로부터 동영상 촬영 주체의 이동 속도를 산출할 수 있게 된다.Accordingly, the speed calculation engine 14 learns while mapping the speed and characteristics that change according to the amount of change by using the optical flow image and the angular velocity and length change information by the movement of the fixed body over time as learning data. , and using the learned speed calculation engine 14, it is possible to calculate the movement speed of the moving subject from the video.

나아가, 본 발명의 일 실시예에 따른 속도 산출 방법에서는 동영상의 각 프레임에 대하여 산출된 이동 속도에 대하여 복수의 프레임의 이동 속도를 평균하거나, 가중치를 부여하는 방식으로 동영상 촬영 주체의 이동 속도를 산출함으로써 노이즈 등에 의하여 특정 프레임에서 발생할 수 있는 오차에 의한 영향을 억제할 수도 있다(예를 들어, 5 프레임의 이동 속도를 평균하거나, 나아가 상기 5 프레임 중 당해 프레임의 가중치를 반영하는 방식도 가능).Furthermore, in the speed calculation method according to an embodiment of the present invention, the moving speed of a subject capturing a video is calculated by averaging or weighting the moving speed of a plurality of frames with respect to the moving speed calculated for each frame of the video. By doing so, it is possible to suppress the influence of errors that may occur in a specific frame due to noise or the like (for example, a method of averaging the movement speed of 5 frames or further reflecting the weight of the frame among the 5 frames is also possible).

또한, 본 발명의 또 다른 측면에 따른 컴퓨터 프로그램은 앞서 살핀 속도 산출 및 학습 방법의 각 단계를 컴퓨터에서 실행시키기 위하여 컴퓨터로 판독 가능한 매체에 저장된 컴퓨터 프로그램인 것을 특징으로 한다. 상기 컴퓨터 프로그램은 컴파일러에 의해 만들어지는 기계어 코드를 포함하는 컴퓨터 프로그램뿐만 아니라, 인터프리터 등을 사용해서 컴퓨터에서 실행될 수 있는 고급 언어 코드를 포함하는 컴퓨터 프로그램일 수도 있다. 이때, 상기 컴퓨터로서는 퍼스널 컴퓨터(PC)나 노트북 컴퓨터 등에 한정되지 아니하며, 서버, 통신용 장비, 스마트폰, 태블릿 PC, PDA, 휴대전화 등 중앙처리장치(CPU)를 구비하여 컴퓨터 프로그램을 실행할 수 있는 일체의 정보처리 장치를 포함한다. 또한, 상기 컴퓨터로 판독 가능한 매체는 전자적 기록 매체(예를 들면, 롬, 플래시 메모리, 등), 마그네틱 저장매체(예를 들면, 플로피 디스크, 하드디스크 등) 및 광학적 판독 매체(예를 들면, 시디롬, 디브이디 등)와 같이 컴퓨터로 판독이 가능한 일체의 저장매체를 포함할 수 있다.In addition, the computer program according to another aspect of the present invention is characterized in that it is a computer program stored in a computer readable medium in order to execute each step of the above salpin speed calculation and learning method on a computer. The computer program may be a computer program including machine language code generated by a compiler, as well as a computer program including high-level language code that can be executed on a computer using an interpreter or the like. At this time, the computer is not limited to a personal computer (PC) or a notebook computer, and is equipped with a central processing unit (CPU) such as a server, communication equipment, smart phone, tablet PC, PDA, mobile phone, etc. to execute a computer program. of the information processing device. In addition, the computer-readable medium includes electronic recording media (eg, ROM, flash memory, etc.), magnetic storage media (eg, floppy disk, hard disk, etc.) and optical reading media (eg, CD-ROM) , DVD, etc.) may include any computer-readable storage medium.

이에 따라, 본 발명의 일 실시예에 따른 동영상 촬영 주체의 이동 속도 산출 방법, 컴퓨터 프로그램 및 그에 대한 학습 방법에서는, 촬영된 동영상으로부터 동영상 촬영 주체의 이동 속도를 산출할 수 있는 속도 산출 엔진을 학습하고, 또한 상기 학습된 속도 산출 엔진을 이용하여 동영상 촬영 주체의 이동 속도를 산출할 수 있게 된다.Accordingly, in the method, computer program, and learning method for calculating the movement speed of a subject capturing a video according to an embodiment of the present invention, a speed calculation engine capable of calculating the moving speed of a subject capturing a video from a captured video is learned, In addition, it is possible to calculate the moving speed of the moving subject using the learned speed calculation engine.

또한, 본 발명의 일 실시예에 따른 동영상 촬영 주체의 이동 속도 산출 방법, 컴퓨터 프로그램 및 그에 대한 학습 방법에서는, 동영상 촬영 주체의 이동 속도를 이용하여 동영상을 보다 효율적으로 압축하거나, 동영상 촬영 주체의 움직임에 따라 발생할 수 있는 오류의 보정하거나 복원할 수 있고, 나아가 2차원 영상의 3차원 영상 등으로의 변환하여 가상 환경에 적용하거나 게임, 로드뷰, 길안내 등 다양한 서비스에서 활용 가능하도록 효과적으로 변환하는 것도 가능하게 된다.In addition, in the moving speed calculation method, computer program, and learning method of a subject capturing a video according to an embodiment of the present invention, a moving speed of a subject capturing a video is used to more efficiently compress a video or the motion of a subject capturing a video It is possible to correct or restore errors that may occur according to the video, and furthermore convert 2D images into 3D images and apply them to virtual environments or convert them effectively so that they can be used in various services such as games, road views, and navigation. It becomes possible.

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

11 : 고정체 검출 엔진
12 : 광학 흐름 산출 엔진
14 : 속도 산출 엔진
21 : 입력 동영상
22 : 속도 산출 시스템
23 : 출력 속도
100 : 속도 산출 시스템
110, 110a, 110b : 단말
120 : 서버
130 : 통신 네트워크
11: Fixed object detection engine
12: optical flow calculation engine
14: speed calculation engine
21: input video
22: speed calculation system
23: output speed
100: speed calculation system
110, 110a, 110b: Terminal
120: server
130: communication network

Claims (15)

속도 산출 시스템에서 동영상 촬영 주체의 이동 속도를 산출하는 방법에 있어서,
상기 영상 촬영 주체에 의해 촬영된 동영상에서 고정체를 식별하는 단계;
상기 고정체를 기준으로 상기 동영상에 마스크를 적용하는 단계; 및
미리 학습된 속도 산출 엔진을 이용하여 상기 마스크가 적용된 동영상을 기초로 상기 동영상 촬영 주체의 이동 속도를 산출하는 단계;를 포함하는 속도 산출 방법.
A method for calculating the movement speed of a moving subject in a speed calculation system,
identifying a stationary object in a video taken by the subject of the video recording;
applying a mask to the video based on the fixed body; and
and calculating a moving speed of the moving subject based on the moving picture to which the mask is applied by using a previously learned speed calculating engine.
제1항에 있어서,
상기 이동 속도를 산출하는 단계는,
상기 마스크가 적용된 동영상을 미리 학습된 광학 흐름(optical flow) 산출 엔진에 입력하여 광학 흐름 영상을 산출하는 단계; 및
상기 속도 산출 엔진에서 상기 광학 흐름 영상에 기초하여 상기 동영상 촬영 주체의 이동 속도를 산출하는 단계;를 포함하는 것을 특징으로 하는 속도 산출 방법.
According to claim 1,
Calculating the moving speed,
Calculating an optical flow image by inputting the video to which the mask is applied to a pre-learned optical flow calculation engine; and
and calculating a moving speed of the moving subject of the video recording subject based on the optical flow image in the speed calculating engine.
제1항에 있어서,
상기 마스크를 적용하는 단계에서는,
상기 동영상에 대하여 상기 마스크에 해당하는 영역에 제1 가중치를 적용하고 나머지 영역에 상기 제1 가중치보다 낮은 제2 가중치를 적용하는 것을 특징으로 하는 속도 산출 방법.
According to claim 1,
In the step of applying the mask,
A speed calculation method characterized in that for the video, a first weight is applied to a region corresponding to the mask and a second weight lower than the first weight is applied to remaining regions.
제1항에 있어서,
상기 고정체를 식별하는 단계에서는,
미리 학습된 고정체 식별 엔진을 이용하여 상기 동영상에서 상기 고정체를 식별하는 것을 특징으로 하는 속도 산출 방법.
According to claim 1,
In the step of identifying the fixture,
A method for calculating speed, characterized in that the fixed object is identified in the video using a pre-learned fixed object identification engine.
제4항에 있어서,
상기 고정체 식별 엔진에서는,
상기 동영상의 연속하는 프레임에서 시간 흐름에 따른 변위가 식별 가능하도록 불연속적으로 위치하는 객체 중 상기 고정체를 식별하는 것을 특징으로 하는 속도 산출 방법.
According to claim 4,
In the fixed body identification engine,
The speed calculation method characterized in that for identifying the stationary body among objects that are discontinuously positioned so that displacement over time can be identified in successive frames of the video.
제2항에 있어서,
상기 광학 흐름 영상은,
상기 동영상에서의 시간 흐름에 따른 상기 고정체의 변위 방향과 크기가 색좌표계를 이용하여 영상으로 표현되는 것을 특징으로 하는 속도 산출 방법.
According to claim 2,
The optical flow image,
The speed calculation method characterized in that the displacement direction and size of the fixed body according to the lapse of time in the video is expressed as an image using a color coordinate system.
제6항에 있어서,
상기 광학 흐름 영상은,
HSV 색좌표계의 색상(Hue), 채도(Saturation), 명도(Value) 중 하나 이상을 이용하여 영상으로 표현되는 것을 특징으로 하는 속도 산출 방법.
According to claim 6,
The optical flow image,
A speed calculation method characterized in that it is expressed as an image using one or more of hue, saturation, and value of the HSV color coordinate system.
제6항에 있어서,
상기 이동 속도를 산출하는 단계에서는,
상기 속도 산출 엔진으로 입력되는 동영상의 개별 프레임 단위로 상기 동영상 촬영 주체의 이동 속도를 산출하는 것을 특징으로 하는 속도 산출 방법.
According to claim 6,
In the step of calculating the moving speed,
The speed calculation method characterized in that for calculating the moving speed of the moving subject of the moving picture in units of individual frames of the moving picture input to the speed calculation engine.
제1항에 있어서,
상기 이동 속도를 산출하는 단계에서는,
상기 동영상의 미리 정해진 기준점에서 상기 고정체를 연결하는 직선의 시간 흐름에 따른 각속도 변화 정보를 함께 상기 속도 산출 엔진에 입력하여 상기 동영상 촬영 주체의 이동 속도를 산출하는 것을 특징으로 하는 속도 산출 방법.
According to claim 1,
In the step of calculating the moving speed,
and calculating the movement speed of the moving subject by inputting angular velocity change information according to the lapse of time of a straight line connecting the stationary body from a predetermined reference point of the video to the speed calculation engine.
제9항에 있어서,
상기 이동 속도를 산출하는 단계에서는,
상기 동영상의 상기 기준점에서 상기 고정체를 연결하는 직선의 시간 흐름에 따른 길이 변화 정보도 상기 속도 산출 엔진에 입력하여 상기 동영상 촬영 주체의 이동 속도를 산출하는 것을 특징으로 하는 속도 산출 방법.
According to claim 9,
In the step of calculating the moving speed,
and calculating the movement speed of the moving subject by inputting length change information over time of a straight line connecting the stationary body from the reference point of the video to the speed calculation engine.
제9항에 있어서,
상기 기준점은 상기 동영상의 상하 방향 중심축 상에 위치하는 것을 특징으로 하는 속도 산출 방법.
According to claim 9,
The speed calculation method, characterized in that the reference point is located on the central axis of the vertical direction of the video.
제11항에 있어서,
상기 기준점은 상기 동영상의 상하 방향 중심축 상의 최하단에 위치하는 것을 특징으로 하는 속도 산출 방법.
According to claim 11,
The speed calculation method, characterized in that the reference point is located at the lowermost end on the central axis of the vertical direction of the video.
학습 시스템에서 동영상 촬영 주체의 이동 속도를 산출하는 속도 산출 엔진을 학습하는 방법에 있어서,
상기 동영상 촬영 주체에 의해 촬영된 동영상에서 고정체를 식별하는 단계;
상기 고정체를 기준으로 상기 동영상에 마스크를 적용하는 단계;
상기 마스크가 적용된 동영상을 기초로 상기 동영상 촬영 주체의 이동 속도 데이터를 태깅하는 단계; 및
상기 태깅된 동영상 촬영 주체의 이동 속도 데이터를 이용하여 상기 동영상 촬영 주체의 이동 속도를 산출하는 속도 산출 엔진을 학습하는 단계;를 포함하는 속도 산출 엔진 학습 방법.
A method for learning a speed calculation engine that calculates a moving speed of a moving subject in a learning system,
identifying a stationary body in a video captured by the subject of the video recording;
applying a mask to the video based on the fixed body;
tagging movement speed data of the subject of the video recording based on the video to which the mask is applied; and
and learning a speed calculation engine that calculates the movement speed of the subject taking the video using the moving speed data of the subject taking the video.
제13항에 있어서,
상기 이동 속도 데이터를 태깅하는 단계는,
상기 마스크가 적용된 동영상을 미리 학습된 광학 흐름(optical flow) 산출 엔진에 입력하여 광학 흐름 영상을 산출하는 단계; 및
상기 광학 흐름 영상에 대하여 상기 동영상 촬영 주체의 이동 속도 데이터를 태깅하는 단계;를 포함하는 것을 특징으로 하는 속도 산출 엔진 학습 방법.
According to claim 13,
The step of tagging the movement speed data,
Calculating an optical flow image by inputting the video to which the mask is applied to a pre-learned optical flow calculation engine; and
and tagging the movement speed data of the subject of the video recording with respect to the optical flow image.
컴퓨터에서 제1항 내지 제14항에 기재된 방법의 각 단계를 실행시키기 위한 컴퓨터로 판독 가능한 매체에 저장된 컴퓨터 프로그램.A computer program stored in a computer readable medium for executing each step of the method according to claims 1 to 14 on a computer.
KR1020210170884A 2021-12-02 2021-12-02 Method and computer program for calculating moving speed of video recording device and learning method thereof KR20230082921A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020210170884A KR20230082921A (en) 2021-12-02 2021-12-02 Method and computer program for calculating moving speed of video recording device and learning method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210170884A KR20230082921A (en) 2021-12-02 2021-12-02 Method and computer program for calculating moving speed of video recording device and learning method thereof

Publications (1)

Publication Number Publication Date
KR20230082921A true KR20230082921A (en) 2023-06-09

Family

ID=86765282

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210170884A KR20230082921A (en) 2021-12-02 2021-12-02 Method and computer program for calculating moving speed of video recording device and learning method thereof

Country Status (1)

Country Link
KR (1) KR20230082921A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200030429A (en) 2018-09-04 2020-03-20 씨드로닉스(주) Method for acquiring movement attributes of moving object and apparatus for performing the same

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200030429A (en) 2018-09-04 2020-03-20 씨드로닉스(주) Method for acquiring movement attributes of moving object and apparatus for performing the same

Similar Documents

Publication Publication Date Title
US10769480B2 (en) Object detection method and system
US10880524B2 (en) System and method for activity monitoring using video data
WO2019218824A1 (en) Method for acquiring motion track and device thereof, storage medium, and terminal
US11003956B2 (en) System and method for training a neural network for visual localization based upon learning objects-of-interest dense match regression
US10037604B2 (en) Multi-cue object detection and analysis
US11094112B2 (en) Intelligent capturing of a dynamic physical environment
Weinzaepfel et al. Visual localization by learning objects-of-interest dense match regression
Wojek et al. Monocular 3d scene understanding with explicit occlusion reasoning
Benenson et al. Stixels estimation without depth map computation
US9104919B2 (en) Multi-cue object association
CN111174782B (en) Pose estimation method and device, electronic equipment and computer readable storage medium
CN107944437B (en) A kind of Face detection method based on neural network and integral image
WO2023124133A1 (en) Traffic behavior detection method and apparatus, electronic device, storage medium, and computer program product
WO2021249114A1 (en) Target tracking method and target tracking device
CN111382637A (en) Pedestrian detection tracking method, device, terminal equipment and medium
CN114969221A (en) Method for updating map and related equipment
CN105225248A (en) The method and apparatus of the direction of motion of recognition object
CN111767854A (en) SLAM loop detection method combined with scene text semantic information
US20230394686A1 (en) Object Identification
CN110009683B (en) Real-time on-plane object detection method based on MaskRCNN
KR20230082921A (en) Method and computer program for calculating moving speed of video recording device and learning method thereof
Bensebaa et al. Direction estimation of moving pedestrian groups for intelligent vehicles
Dijk et al. Image processing in aerial surveillance and reconnaissance: from pixels to understanding
CN112257485A (en) Object detection method and device, storage medium and electronic equipment
Li et al. TFNet: Exploiting Temporal Cues for Fast and Accurate LiDAR Semantic Segmentation