KR20190021009A - Image correction system and method - Google Patents

Image correction system and method Download PDF

Info

Publication number
KR20190021009A
KR20190021009A KR1020170106050A KR20170106050A KR20190021009A KR 20190021009 A KR20190021009 A KR 20190021009A KR 1020170106050 A KR1020170106050 A KR 1020170106050A KR 20170106050 A KR20170106050 A KR 20170106050A KR 20190021009 A KR20190021009 A KR 20190021009A
Authority
KR
South Korea
Prior art keywords
user terminal
moving image
data
pitch
transmitted
Prior art date
Application number
KR1020170106050A
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 KR1020170106050A priority Critical patent/KR20190021009A/en
Publication of KR20190021009A publication Critical patent/KR20190021009A/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/637Control signals issued by the client directed to the server or network components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/001Image restoration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration

Abstract

An objective of the present invention is to realize both the convenience and performance by using inertial measurement unit (IMU) sensor data in the existing application. To this end, a method for correcting a video photographed by a user terminal comprises the steps of: measuring and storing displacement data in x-axis, y-axis, and z-axis directions of a user terminal and roll, pitch, and yaw values of the user terminal by using an IMU sensor in photographing a video by the user terminal; transmitting the stored roll, pitch, and yaw values, the displacement data, and video data to a server from the user terminal; and correcting the video data transmitted from the server based on the roll, pitch, and yaw values and the displacement data to be retransmitted to the user terminal. The IMU sensor can be detachably coupled to the user terminal.

Description

동영상 보정 시스템 및 방법{IMAGE CORRECTION SYSTEM AND METHOD}[0001] IMAGE CORRECTION SYSTEM AND METHOD [0002]

본 발명은 동영상 보정 시스템 및 방법에 관한 것으로, 더욱 상세하게는 외장 IMU 센서를 이용하여 동영상 촬영 시 흔들림을 최소화하고 촬영 이후 처리를 통해 동영상을 보정하는 시스템 및 방법에 관한 것이다.The present invention relates to a moving image correction system and method, and more particularly, to a system and method for compensating a moving image using an external IMU sensor by minimizing blurring and capturing a moving image after a moving image is captured.

스마트폰이 대중화되고 스마트폰 안에 내장된 카메라의 성능이 향상되면서, 사진·동영상 촬영 시 스마트폰을 주로 이용하는 사람들이 많아졌다. 과거에는 디지털 카메라와 같이 촬영을 위한 도구를 따로 이용하는 경우가 많았지만 스마트폰이 이를 대체하게 되었다.As smart phones become more popular and the performance of built-in cameras in smart phones has improved, more people are using smart phones mainly when taking pictures and videos. In the past, tools such as digital cameras were often used separately, but smartphones replaced them.

사진·동영상 촬영 시 스마트폰 사용의 빈도가 늘어남에 따라, 촬영 시 발생할 수 있는 가장 큰 문제점인 흔들림을 보정해주는 기술도 많이 개발되고 있다. 촬영에 관심이 있는 많은 스마트폰 사용자들이 흔들림에 대한 개선을 필요로 하고 있기 때문이다. 갤럭시 S7 등 최신 휴대폰에는 손 떨림 방지 기능을 내재하여 사진 촬영 시 흔들림을 잘 보정해준다. 이처럼 사진 촬영에서 발생하는 흔들림을 보정해주는 기술은 수준 높게 구현되고 있다. 하지만 스마트폰 동영상 촬영 시 흔들림을 보정해주는 기술은 아직 완벽하게 구현되지 않고 있다. As the frequency of use of smartphones increases during photography and movie shooting, many techniques are being developed to compensate for the blur, which is the biggest problem that can occur during shooting. Many smartphone users who are interested in shooting need to improve their shake. The latest mobile phones such as the Galaxy S7 have a built-in anti-shake function that compensates for shaking when taking pictures. As such, techniques for correcting the shaking that occur in photographing are being implemented at a high level. However, the technology that compensates the shake when shooting a smartphone is not yet fully implemented.

현재 스마트폰 동영상 촬영 시 흔들림을 보정해주는 기술 및 장치는 크게 2가지로 나뉜다. 첫 번째는 짐벌 장치를 이용하는 것이다. 짐벌 장치에 스마트폰을 장착해서 촬영을 하면 3축 제어 기술을 이용해 흔들림을 훌륭하게 보정해준다. 하지만, 설문조사를 통해 많은 사람들이 짐벌의 큰 부피와 무거움 때문에 휴대하기 힘들어 이를 이용하지 않는다고 응답했다. 두 번째는 동영상 보정 어플리케이션의 이용이다. 어플리케이션은 휴대하기 어렵다는 짐벌의 단점을 보완했다. 하지만 실제로 사용해보니 흔들림 보정 성능 자체에 문제가 있었다.Currently, there are two technologies and devices that compensate the shake when taking a video of a smartphone. The first is to use the gimbal unit. When shooting with a smartphone attached to the gimbal unit, 3-axis control technology is used to compensate for the tremors. However, the survey responded that many people do not use it because it is hard to carry because of the large volume and heavy weight of the gimbals. The second is the use of video correction applications. Applications complement the gimbals' disadvantage of being hard to carry. However, when I actually used it, there was a problem with the shake correction performance itself.

또한, 도 1을 참조하면, 설문조사 결과 평상시에 휴대폰을 이용해서 동영상 촬영을 즐겨하는 사람들 중, 촬영 시 흔들림을 최소화하고 싶어 하는 사람들이 많다는 것을 확인할 수 있었다. 사용자들은 들고 다니기 편리하면서도 흔들림 보정 성능이 좋은 기술을 원한다. 사용자 입장에서 사용할 때 느낄 수 있는 불편한 점은 동영상 촬영 후 보정을 할 때 서버로 동영상을 전송, 수신해야하므로 데이터 소모량이 많다는 점이 있을 수 있다.Also, referring to FIG. 1, it can be seen from a survey result that, among the people who enjoy moving pictures using a mobile phone at normal times, many people want to minimize the shaking at the time of shooting. Users want a technology that is easy to carry and yet has good anti-shake performance. One of the inconveniences that may be felt when using the camera for the user is that there is a lot of data consumption since the video must be transmitted and received to the server when correcting the video after shooting.

현재 나와 있는 스마트폰 동영상 흔들림 보정을 보정해 주는 기술 및 제품은 크게 2가지로 나눌 수 있다. 첫 번째는 짐벌 장치, 두 번째는 어플리케이션 방식이다. 짐벌 장치는 동영상 흔들림을 보정해주는 기능은 훌륭하지만, 일상생활에서 휴대하고 다니기에는 어려움이 있다. 또한, 시중에 나와 있는 어플리케이션을 이용해 보았을 때에는, 깊이(depth)방향 흔들림이나 급격한 움직임 등 다양한 측면에서 흔들림 보정 성능이 부족하다. 설문 조사를 통해 기존 제품에 비해 본 발명이 경쟁력을 갖출 수 있다는 것을 확인하였다.There are two major technologies and products that can correct the video shake correction of smartphone. The first is the gimbal unit and the second is the application type. The gimbal device is good at correcting the video shake, but it is difficult to carry around in everyday life. In addition, when a commercially available application is used, the shake correction performance is lacking in various aspects such as a depth direction shake or a sudden motion. The survey confirms that the present invention is more competitive than existing products.

전반적인 카메라 사용 환경을 알아보기 위해, 온라인 275명, 오프라인 59명을 대상으로 설문조사를 실시하였다. 성별은 여성 58%, 남성 42%, 연령대별로는 10대 16%, 20대 56%, 30대 14%, 40대 이상 14%로, 다양한 표본을 대상으로 설문조사를 실시하였다. 설문조사 결과, 도 1을 참조하면, 스마트폰카메라를 사용하는 유저들은 제품의 핵심가치를 간편함, 편리함으로 생각하고 있다. 이에 따라, 흔들림에 상당한 불편함을 느끼고 있음에도 불구하고, 추가적인 하드웨어장치를 사용하는 것을 번거로우며, 따로 들고 다닐 필요가 없는 소프트웨어적 솔루션을 훨씬 선호하는 것을 확인하였다. 즉, 도 2를 참조하면, 짐벌 장치는 들고 다니기에는 부담되는 크기와 무게를 가지고 있어, 휴대성의 측면에서 많은 부담이 되고, 제대로된 성능을 구현하는 짐벌은 가격이 비싸며, 촬영 시에 짐벌 장치를 들고 있는 팔의 운동이 제한된다. To investigate the overall camera usage environment, we surveyed 275 online and 59 offline users. The questionnaires were conducted on 58% of males, 42% of males, 16% of teenagers, 56% of females, 14% of females and 14% of females. As a result of the survey, referring to FIG. 1, users who use a smartphone camera consider the core value of the product as simple and convenient. Thus, despite the considerable inconvenience to the shaking, it was confirmed that the use of additional hardware devices was cumbersome and much preferred to software solutions that did not have to carry around separately. That is, referring to FIG. 2, the gimbals device has a size and weight that are burdensome to carry, so that it takes a lot of burden in terms of portability, and the gimbets that implement the proper performance are expensive, The movement of the arm is limited.

또한, 어플리케이션만을 통한 흔들림 보정은 화면이 많이 흔들리며, 화각이 많이 줄어들고, 블러링(Blurring)이 많이 발생하기 때문에 화질저하에 영향을 미친다. 2017년 4월 말에 구글 포토(Google Photo)에 추가된 안정화(stabilize)기능 역시도 핸드폰의 요 모션(Yaw motion)에 관한 보정은 준수하지만, 롤 모션(Roll motion)과 피치 모션(Pitch motion)에 대한 보정은 미비하며, 화각이 좁아진다.In addition, the shake correction through the application only affects the picture quality deterioration because the screen shakes a lot, the angle of view decreases much, and blurring occurs a lot. The stabilization feature added to Google Photos at the end of April 2017 also conforms to the yaw motion correction of the mobile phone, but the roll motion and pitch motion The correction is insufficient, and the angle of view becomes narrow.

카메라의 움직임을 직접적으로 제어하는 짐벌 방식으로 1차 아이디어 제안을 하였으나, 이는 스마트폰의 핵심 가치인 편리성과 간편성을 충분히 만족시키지 못하여 아이디어 수정을 하였다. 다음으로 소프트웨어를 사용하여 후처리를 하는 방법을 제안하였다. 기존에도 소프트웨어적인 방법으로 영상 보정을 하는 어플들이 존재했다. 그러나 스마트폰만을 사용한 소프트웨어 후처리 방식에는 분명한 한계점이 존재했다. 스마트폰의 내장 IMU 센서를 이용한 선보정 방법을 사용한 어플은 화각이 매우 존재한다는 단점이 존재했고, 후보정 방법은 스마트폰 GPU(Graphics Processing Unit)를 사용한다는 한계로 인해서 속도가 느리고 화각이 많이 좁아지며, 시각적으로 보았을 때 보정이 완벽히 되지 않는다는 문제가 있었다. 2017년 4월 쯤에 구글에서 나온 구글 포토라는 소프트웨어는 비교적 보정이 잘 되었으나, 작은 흔들림에 대한 보정이 우수한 반면 롤(Roll)과 피치(Pitch)에 대한 보정에 부족함이 있었다.We proposed the first idea as a gimbal method that directly controls the camera movement. However, it did not satisfy the convenience and simplicity of the core value of the smartphone, and revised the idea. Next, we proposed a post-processing method using software. Previously, there were applications that corrected images by software. However, there was a clear limit to the way software processing using smartphones only. There is a disadvantage that the application using the calibration method using the built-in IMU sensor of the smartphone has a very high angle of view, and the post-processing method is slow due to the limit of using the smartphone GPU (Graphics Processing Unit) , There is a problem in that the correction is not perfect when viewed visually. In April 2017, Google Photos software from Google, which was relatively well-calibrated, was good at compensating for small fluctuations, but lacking in correction for rolls and pitch.

즉, 스마트폰 동영상 촬영 시 영상 흔들림을 보정하기 위해 처음으로 제시했던 방법은 카메라의 움직임을 직접적으로 제어하는 짐벌 방식이었지만, 이는 편리성과 간편성이라는 스마트폰 카메라의 핵심가치를 해치므로 시장성이 부족했다. 또한, 몇 가지 어플리케이션에서 소프트웨어 후처리 방식으로 영상 흔들림 보정기능을 제공하고 있지만, 소프트웨어 후처리의 특성상 한계점이 존재했다. 이에 따라 본 발명은 짐벌에 사용되는 IMU센서데이터만을 이용, 소프트웨어적 해결법과 융합함으로써 두 가지 장점을 모두 갖는 방식을 개발하였다.In other words, although the gimbal method that directly controls the camera movement was the first method proposed to compensate for image blurring during the video shooting of a smartphone, it lacked marketability because it undermines the core value of the smartphone camera, which is convenience and simplicity. In addition, although some applications provide image stabilization by software post-processing, there are limitations in the nature of software post-processing. Accordingly, the present invention has developed a method having both advantages by merely using the IMU sensor data used in the gimbal and fusing the software solution.

스마트폰에도 내장된 IMU 센서가 존재한다. 하지만 내장 IMU 센서는 분해능이나 노이즈의 제거보다 크기를 줄이는데 중점을 둔 센서를 사용했기 때문에 온도에 따라 민감하게 성능이 변한다. 외장 IMU 센서를 이용하여 온도에 민감한 단점을 극복할 수 있다. There is also an IMU sensor built into the smartphone. However, the built-in IMU sensor uses sensors that focus on reducing the size rather than removing resolution or noise, so the performance varies sensitively with temperature. An external IMU sensor can be used to overcome temperature-sensitive drawbacks.

본 발명은 짐벌과 기존 어플리케이션의 문제를 해결하기 위해, 기존 어플리케이션에 IMU 센서 데이터를 이용하여 편리성과 성능 둘 다를 구현하는 것을 목적으로 한다. IMU 센서 데이터를 얻기 위해 필요시에 외장 IMU 센서를 부착할 수 있도록 하였다.The present invention aims at realizing both convenience and performance by using IMU sensor data for existing applications in order to solve problems of gimbals and existing applications. To obtain IMU sensor data, an external IMU sensor can be attached when necessary.

본 발명의 목적들은 이상에서 언급한 목적으로 제한되지 않으며, 언급되지 않은 본 발명의 다른 목적 및 장점들은 하기의 설명에 의해서 이해될 수 있으며, 본 발명의 실시 예에 의해 보다 분명하게 알게 될 것이다. 또한, 본 발명의 목적 및 장점들은 특허 청구 범위에 나타낸 수단 및 그 조합에 의해 실현될 수 있음을 쉽게 알 수 있을 것이다.The objects of the present invention are not limited to the above-mentioned objects, and other objects and advantages of the present invention which are not mentioned can be understood by the following description, and will be more clearly understood by the embodiments of the present invention. It will also be readily apparent that the objects and advantages of the invention may be realized and attained by means of the instrumentalities and combinations particularly pointed out in the appended claims.

상기 목적을 달성하기 위한 본 발명은, 사용자 단말기로 촬영한 동영상을 보정하는 방법으로서, 사용자 단말기로 동영상을 촬영 시 IMU 센서를 이용하여 상기 사용자 단말기의 롤(roll), 피치(pitch), 요(yaw) 값과 상기 사용자 단말기의 x,y,z 축 방향의 변위 데이터를 측정하여 저장하는 단계, 저장된 상기 롤, 피치, 요 값과 변위 데이터 및 상기 동영상 데이터를 상기 사용자 단말기에서 서버에 전송하는 단계 및 상기 서버에서 상기 롤, 피치, 요 값과 상기 변위 데이터에 기초하여 전송된 상기 동영상 데이터를 보정하여, 상기 사용자 단말기에 되전송하는 단계를 포함하되, 상기 IMU 센서는 상기 사용자 단말기에 착탈 가능하게 결합될 수 있다.According to another aspect of the present invention, there is provided a method of correcting a motion picture photographed by a user terminal, the method comprising the steps of: measuring a roll, a pitch, a yaw rate, yaw and displacement data of the user terminal in the x, y and z axis directions, and transmitting the stored roll, pitch, yaw and displacement data and the moving image data to the server from the user terminal And correcting the motion picture data transmitted based on the roll, pitch, yaw and displacement data in the server and transmitting the corrected moving picture data back to the user terminal, wherein the IMU sensor is detachably mounted on the user terminal Can be combined.

본 발명에서는 짐벌에 사용되는 IMU(Inertial Measurement Unit) 센서 데이터만을 이용, 소프트웨어적 해결법과 융합함으로써 두 가지 장점을 모두 갖는 방식을 개발하였다. 컴퓨터 CPU를 이용하면 더 복잡한 보정 방법을 이용할 수 있으며, 보정 시간 역시 단축할 수 있다는 점을 이용하여 휴대폰이 아닌 컴퓨터 CPU로 보정을 하도록 하였다. 휴대폰에서 영상을 촬영하고 이 영상을 컴퓨터 서버로 전송하면 컴퓨터에서 보정이 된다. CPU 서버에는 위에서 언급했듯이 Opencv(Open Source Computer Version)를 토대로 한 보정 프로그램이 작동된다. 보정 결과를 다시 휴대폰으로 보내게 되고 이용자는 보정된 영상을 볼 수 있다.In the present invention, a method having both merits has been developed by merely using IMU (Inertial Measurement Unit) sensor data used for gimbals and software solution method. Using a computer CPU, a more complex calibration method can be used and calibration time can also be shortened to compensate with a computer CPU rather than a mobile phone. When you take a video from a mobile phone and transfer it to a computer server, it is calibrated on your computer. On the CPU server, as mentioned above, a correction program based on Opencv (Open Source Computer Version) is activated. The calibration result is sent back to the mobile phone and the user can view the corrected image.

Video StabilizerVideo Stabilizer Google PhotoGoogle Photo Horizon CameraHorizon Camera 본 개발 제품Our developed product 화각Angle of view 보통usually 조금 넓다It's a little wide. 좁다narrow 매우 넓다.Very wide. 보정 정도Degree of correction 미흡Inadequate 매우 좋음Very good 좋음good 매우 좋음Very good money 어플 설치비용 2800원Application installation cost 2800 won 무료free 광고 O
무료
Ad O
free
광고 O
무료
Ad O
free
후보정 가능 여부Availability 가능possible 가능possible 불가능impossible 가능possible 편리성convenience 바로 보정 가능Can be calibrated immediately 다소 복잡하다.It is somewhat complicated. 바로 보정 가능Can be calibrated immediately chip 형태의 외장 IMU 부착 필요Chip type external IMU attachment required

상기 표 2를 참조하면, 본 발명은 Ransac Method를 이용하여 보정을 하게 되며, 기존에 존재하던 다른 어플리케이션에 비해서 화각이 훨씬 넓다. 작은 흔들림에 대해서는 구글포토보다 더 넓은 화각으로 비슷한 수준의 영상을 얻을 수 있다. 롤(Roll)과 피치(Pitch)에 대한 보정이 잘 안되는 기존 어플리케이션 방법을 보완하기 위해서 영상 비율을 변화시키고 보정하는 방법을 이용하였다. 영상 비율을 회전 각도에 맞게 변화시켜서 영상이 흔들리지 않은 것처럼 보정할 수 있으며, Pitch에 대해서 가능성을 확인하였다.Referring to Table 2, the present invention is corrected using the Ransac Method, and the angle of view is much wider than other existing applications. For a small shake, you can get a similar image with a wider angle of view than Google Photo. In order to compensate for the existing application method which does not compensate for the roll and pitch, we used the method of changing the image ratio and correcting it. By changing the image ratio to the rotation angle, the image can be corrected as if it is not shaken, and the possibility for the pitch is confirmed.

도 1은 스마트폰 촬영 시 흔들림 보정과 관련한 설문조사 결과를 도시한 도면이다.
도 2는 짐벌 장치를 이용한 흔들림 보정과 소프트웨어를 이용한 흔들림 보정을 비교한 도면이다.
도 3은 본 발명의 일 실시예에 따른 동영상 보정 방법에서 피치(Pitch)보정 알고리즘 구축을 도시한 도면이다.
도 4는 MPU 6050과 Galaxy S6의 직교성(orthogonality)을 실험한 결과 그래프를 나타낸 도면이다.
도 5는 본 발명의 일 실시예에 따른 동영상 보정 시스템의 외장 IMU 센서를 연결한 형태를 도시한 도면이다.
도 6은 본 발명의 일 실시예에 따른 동영상 보정 방법의 흐름도를 도시한 도면이다.
FIG. 1 is a diagram showing a result of a questionnaire survey related to shake correction at the time of photographing a smartphone.
FIG. 2 is a diagram comparing shake correction using a gimbal unit and shake correction using software.
3 is a diagram illustrating a construction of a pitch correction algorithm in a moving image correction method according to an embodiment of the present invention.
FIG. 4 is a graph showing the orthogonality between the MPU 6050 and the Galaxy S6.
FIG. 5 is a diagram illustrating a connection of an external IMU sensor of a moving image correction system according to an exemplary embodiment of the present invention. Referring to FIG.
6 is a flowchart illustrating a moving image correction method according to an embodiment of the present invention.

전술한 목적, 특징들 및 장점은 첨부된 도면과 관련한 다음의 실시예를 통하여 보다 분명해 질 것이다. BRIEF DESCRIPTION OF THE DRAWINGS The above objects, features and advantages will become more apparent through the following examples in conjunction with the accompanying drawings.

특정한 구조 내지 기능적 설명들은 단지 본 발명의 개념에 따른 실시예를 설명하기 위한 목적으로 예시된 것으로, 본 발명의 개념에 따른 실시예들은 다양한 형태로 실시될 수 있으며 본 출원의 명세서에서 설명된 실시예들에 한정되는 것으로 해석되어서는 아니된다.It is to be understood that the specific structure or functional description is illustrative only for the purpose of describing an embodiment according to the concept of the present invention and that the embodiments according to the concept of the present invention may be embodied in various forms, Should not be construed as limited to these.

본 발명의 개념에 따른 실시예는 다양한 변경을 가할 수 있고 여러 가지 형태를 가질 수 있으므로 특정 실시예들은 도면에 예시하고 본 출원의 명세서에 상세하게 설명하고자 한다. 그러나, 이는 본 발명의 개념에 따른 실시예들을 특정한 개시 형태에 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.The embodiments according to the concept of the present invention can make various changes and have various forms, so that specific embodiments are illustrated in the drawings and described in detail in the specification of the present application. However, it should be understood that the embodiments according to the concept of the present invention are not intended to limit the present invention to specific modes of operation, but include all changes, equivalents and alternatives included in the spirit and scope of the present invention.

어떠한 구성 요소가 다른 구성 요소에 "연결되어 있다"거나 "접속되어 있다"고 언급된 때에는, 그 다른 구성 요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성 요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떠한 구성 요소가 다른 구성 요소에 "직접 연결되어 있다"거나 또는 "직접 접속되어 있다"고 언급된 때에는, 중간에 다른 구성 요소가 존재하지 않는 것으로 이해되어야 할 것이다. 구성 요소들 간의 관계를 설명하기 위한 다른 표현들, 즉 "∼사이에"와 "바로 ∼사이에" 또는 "∼에 인접하는"과 "∼에 직접 인접하는" 등의 표현도 마찬가지로 해석되어야 한다.Whenever an element is referred to as being "connected" or "connected" to another element, it may be directly connected or connected to the other element, but there may be other elements in between It should be understood. On the other hand, when an element is referred to as being "directly connected" or "directly connected" to another element, it should be understood that there are no other elements in between. Other expressions for describing the relationship between components, such as "between" and "between" or "adjacent to" and "directly adjacent to" should also be interpreted.

본 출원의 명세서에서 사용하는 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로서, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 명세서에서 "포함하다" 또는 "가지다" 등의 용어는 설시된 특징, 숫자, 단계, 동작, 구성 요소, 부분품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성 요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used in the specification of the present application is used only to describe a specific embodiment and is not intended to limit the present invention. The singular expressions include plural expressions unless the context clearly dictates otherwise. It is to be understood that the terms such as " comprises " or " having " in this specification are intended to specify the presence of stated features, integers, But do not preclude the presence or addition of steps, operations, elements, parts, or combinations thereof.

다르게 정의되지 않는 한, 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 갖는 것으로 해석되어야 하며, 본 명세서에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다. Unless otherwise defined, all terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Terms such as those defined in commonly used dictionaries are to be interpreted as having a meaning consistent with the meaning of the context in the relevant art and, unless explicitly defined herein, are to be interpreted as ideal or overly formal Do not.

이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시예를 설명함으로써 본 발명을 상세히 설명하도록 한다. 각 도면에 제시된 동일한 참조부호는 동일한 부재를 나타낸다.Hereinafter, the present invention will be described in detail with reference to the preferred embodiments of the present invention with reference to the accompanying drawings. Like reference symbols in the drawings denote like elements.

DJI OSMO MOBILEDJI OSMO MOBILE SNOPPA M1SNOPPA M1 NEXT BT22GBNEXT BT22GB

Figure pat00001


Figure pat00001


Figure pat00002


Figure pat00002


Figure pat00003


Figure pat00003

3축 제어3-axis control 3축 제어3-axis control 2축 제어로 흔들림 보정이 잘 되지 않는다.Stabilization does not work well with 2-axis control. 40만원 대 후반의 가격Price of 400,000 won late 20만원 대 중반About 200,000 won 5만원 대 중후반50,000 won middle and later 어느 정도의 관심과 공부가 필요하다.I need some attention and study. 어플 등 부가적 기능을 제공한다.Application, and so on. 한 번의 충전으로 2시간 정도만 사용 가능Only 2 hours for one charge 휴대폰을 제외하고도 500g이 넘는다.Except for mobile phone, it is over 500g. 휴대폰을 제외하고도 450g이 넘는다.Except for mobile phones, more than 450g. 일상생활에서 사용하기에 부피감이 매우 크다.It is very bulky to use in everyday life. 일상생활에서 사용하기에는 부피감이 다소 크다.It is somewhat bulky for use in everyday life. 다른 짐벌에 비해 비교적 들고다니기 간편하다.It is relatively easy to carry around compared to other gym bees.

우선, 표 2를 참조하면, 시중에서 판매되고 있는 짐벌 장치 중 판매량이 높은 짐벌 장치를 위주로 특징을 살펴보면, 시중에는 크게 3축 제어로 흔들림을 잘 보정해주지만 가격이 비싼 제품군과, 가격은 저렴하지만 2축 제어만을 이용하여 흔들림 보정이 미미한 제품군이 있다. 첫 번째 제품군은 성능은 우수했지만 가격이 일반사용자들이 사용하기에 매우 비쌌고, 짐벌이 무겁고 부피가 커서 일상생활에서 들고 다니기에는 무리가 있었다. 두 번째 제품군은 10만 원 이하의 저렴한 가격으로 구매할 수 있지만, 2축 제어만을 이용하였기 때문에 제한적인 상황에서만 흔들림 보정이 되는 것을 알 수 있다.First of all, referring to Table 2, when a gimbal device which is sold among the gimbal devices that are sold in the market is mainly characterized, the gimbal device that is sold in the market is mainly characterized by a three-axis control, which corrects the shaking well, There is a product group that has little shake correction using only 2-axis control. The first product was excellent in performance, but the price was too expensive for the average user to use, and the gimbals were heavy and bulky, making it difficult to carry around in everyday life. The second product can be purchased at a low price of less than 100,000 won, but since it uses only 2-axis control, it can be seen that the shake correction is performed only in a limited situation.

IMU는 이동물체의 속도와 방향, 중력, 가속도를 측정하는 장치를 뜻하며, 센서기반 방식이다. IMU 기반의 위치추정은 가속도계, 각속도계, 지자기계 및 고도계를 이용하여 보행자 및 이동물체의 움직임 상황을 인식하는 방식이다. 스마트폰에 삽입된 IMU 관성계측장치에는 일반적으로 3축 가속도계와 3축 각속도계가 내장되어 있어 진행방향, 횡방향, 높이방향의 가속도와 롤(roll), 피치(pitch), 요(yaw) 각속도의 측정이 가능하며, IMU로부터 얻어지는 가속도와 각속도를 적분하여 이동물체(보행자)의 속도와 자세각의 산출이 가능하다. 여기서, 롤(roll)은 이동 방향에 대해 평행한 수평면에 있는 축 주위의 회전이며, 피치(pitch)는 이동 방향에 대해 수직의 수평면에 있는 축 주위의 회전이고, 요(yaw)는 이동 방향에 대해 수직의 수직면에 있는 축 주위의 회전이다.IMU is a device that measures the speed, direction, gravity, and acceleration of a moving object. It is a sensor-based method. The IMU-based position estimation is a method of recognizing the motion situation of a pedestrian and a moving object by using an accelerometer, a speedometer, a geomachine and an altimeter. The IMU inertial measurement device inserted in the smartphone generally has a built-in three-axis accelerometer and three-axis angular velocity meter, and it can detect the acceleration in the direction of movement, the direction of the lateral direction and the height, and the roll, pitch, yaw angular velocity And it is possible to calculate the velocity and the attitude angle of the moving object (pedestrian) by integrating the acceleration and the angular velocity obtained from the IMU. Here, the roll is a rotation about an axis in a horizontal plane parallel to the moving direction, the pitch is a rotation about an axis in a horizontal plane perpendicular to the moving direction, Lt; RTI ID = 0.0 > vertical < / RTI >

또한, 실내공간에서 위치를 보다 정밀하게 측위하기 위한 여러 기술들, 즉 무선 랜 인프라, 의사위성(Pseudolites), 레이저, 음파, RFID(Radio Frequency Identification), 블루투스 등을 이용하여 특정 보정점(Waypoint)을 지정하여 IMU 측위의 누적오차를 보정할 수 있다.In addition, a specific correction point (Waypoint) can be obtained by using various technologies for more precisely positioning a position in an indoor space, such as a wireless LAN infrastructure, pseudolites, a laser, a sound wave, RFID (Radio Frequency Identification) Can be specified to correct the cumulative error of the IMU positioning.

도 3은 본 발명의 일 실시예에 따른 동영상 보정 방법에서 피치(Pitch) 보정 알고리즘 구축을 도시한 도면이다. 도 3을 참조하면, 본 발명의 일 실시예에 따른 외장 IMU 센서를 이용한 동영상 보정 방법은 동영상을 프레임별로 나누어 각 프레임에 존재하는 특징이 될 만한 점들을 찾는다. 그 뒤에 각 특징점을 매칭(matching)시켜 영상이 흔들리지 않는 것처럼 보정시켜주며, IMU 센서를 이용하여 카메라의 롤(Roll), 피치(Pitch), 요(Yaw)값을 알아낸다. 특히 요(yaw)에 관한 부분은 위의 특징점 찾기를 통해 잘 보정되므로, 피치(Pitch) 방향의 모션(motion)을 보정한다. 이 때, 피치(Pitch) 방향의 모션(motion)을 분석하여, 직사각형 형태의 영상을 사다리꼴의 형태로 바꾸어 란삭 메쏘드(Ransac Method)로 보정한다.3 is a diagram illustrating a construction of a pitch correction algorithm in a moving image correction method according to an embodiment of the present invention. Referring to FIG. 3, the moving image correction method using an external IMU sensor according to an embodiment of the present invention divides a moving image into frames, and finds points to be characteristic of each frame. After that, each feature point is matched so that the image is corrected as if it does not shake, and the roll, pitch, and yaw values of the camera are detected using the IMU sensor. Particularly, the part related to yaw is corrected well by finding the above minutia points, so that the motion in the pitch direction is corrected. At this time, the motion of the pitch direction is analyzed, and the rectangle image is transformed into a trapezoid shape and corrected by the Ransac method.

MPU 6050MPU 6050 Galaxy S7Galaxy S7 RangeRange Accelerometer : 2gAccelerometer: 2g Accelerometer : 2gAccelerometer: 2g Gyroscope : ±250˚/secGyroscope: ± 250˚ / sec Gyroscope : ±245˚/secGyroscope: ± 245˚ / sec SensitivitySensitivity Accelerometer : 16384LSB/gAccelerometer: 16384LSB / g Accelerometer : 16384LSB/gAccelerometer: 16384LSB / g Gyroscope : 131LSB/(˚/s)Gyroscope: 131LSB / (° / s) Gyroscope : 114LSB/(˚/s)Gyroscope: 114LSB / (° / s) Sensitivity change vsSensitivity change vs
TemperatureTemperature
±0.02%/℃± 0.02% / ° C ±1%/℃± 1% / ° C
Rate noise densityRate noise density
(Angular random walk)(Angular random walk)
Accelerometer : 0.4mg/√HzAccelerometer: 0.4 mg / √Hz Accelerometer : 2.0mg/√HzAccelerometer: 2.0 mg / √Hz
Gyroscope : 0.05˚/s/√HzGyroscope: 0.05˚ / s / √Hz Gyroscope : 0.14˚/s/√HzGyroscope: 0.14˚ / s / √Hz

표 3은 MPU 6050과 Galaxy S7의 성능을 비교한 표를 나타낸 도면이다. 표 3을 참조하면, 본 발명의 일 실시예에 따른 외장 IMU 센서의 필요성을 검증하기 위하여 갤럭시 s6와 s7의 내장 IMU 센서와 외장 IMU 센서를 비교 분석하였다. 갤럭시 s6와 s7 모델은 근 2년 안에 출시된 안드로이드 OS 스마트폰으로 안드로이드 흔들림 보정 어플리케이션용 센서와 성능을 비교하게 적합하였다. 외장 IMU 센서는 흔히 개발되어 이용되고있고 2000원 정도의 소비자가격의 저렴한 IMU 센서인 InvenSense사의 MPU 6050 모델을 이용하였다. 내장 IMU 센서의 민감도(sensitivity)가 온도에 따라 큰 변화를 보여 안정적이지 못하고, 가속도계와 자이로스코프 모두 외장 IMU 센서에 비하여 더 큰 노이즈를 가지는 것을 확인할 수 있다. 자이로스코프의 민감도(sensitivity)는 내장 IMU 센서가 약간 더 좋은 것으로 나타나지만 두드러지는 차이는 아니다. 또한 외장 IMU 센서의 제품군이 다양하여, 차이가 크지 않은 가격에 민감도(sensitivity)나 다른 성능이 더 좋은 제품들이 존재한다는 사실도 확인하였다.Table 3 shows a table comparing the performance of MPU 6050 and Galaxy S7. Referring to Table 3, in order to verify the necessity of an external IMU sensor according to an embodiment of the present invention, the built-in IMU sensor and the external IMU sensor of the Galaxy s6 and s7 were compared and analyzed. The Galaxy s6 and s7 models are suitable for comparing the performance of the Android OS smartphone with the sensor for the Android shake correction application, which was launched in the next two years. The external IMU sensor was developed and used by InvenSense's MPU 6050 model, which is an inexpensive IMU sensor with a consumer price of about 2000 won. It can be seen that the sensitivity of the built-in IMU sensor is not stable due to the large change in temperature, and that both the accelerometer and the gyroscope have larger noise than the external IMU sensor. The gyroscope's sensitivity appears to be slightly better on the built-in IMU sensor, but it is not a noticeable difference. We also confirmed that there are a variety of external IMU sensors available, and that there are products with better sensitivity and other performance at a price that is not significantly different.

도 4는 MPU 6050과 Galaxy S6의 직교성(orthogonality)을 실험한 결과 그래프를 나타낸 도면이다. 도 4에 있어서, 직교성은 가속도계(accelerometer)의 각 축이 서로 90도를 이루는지를 의미한다. 직교성은 외장 IMU 센서와 Galaxy S6를 바닥과 수평하게 내려놓고 가속도(acceleration) 값을 10초 동안 받아 그래프를 그려 확인하였다.FIG. 4 is a graph showing the orthogonality between the MPU 6050 and the Galaxy S6. In FIG. 4, the orthogonality means that the axes of the accelerometer form 90 degrees with each other. The orthogonality was confirmed by drawing an external IMU sensor and a Galaxy S6 horizontally on the floor and taking an acceleration value for 10 seconds.

MPU 6050은 Z축 방향으로 일정한 가속도를 갖고 X와 Y축으로는 가속도가 0인 것을 확인할 수 있다. Z축이 일정한 가속도를 갖는 것은 지구의 중력이 작용하기 때문이고, 따라서 MPU 6050의 가속도계의 세 축들이 서로 직교한다는 것을 확인할 수 있다.The MPU 6050 has a constant acceleration in the Z-axis direction and zero acceleration in the X and Y axes. The fact that the Z axis has a constant acceleration is due to the action of the earth's gravity, and thus the three axes of the MPU 6050 accelerometer are orthogonal to each other.

Galaxy S6 역시 Z축으로 일정한 가속도를 갖는다. 하지만 X와 Y축의 가속도가 0이 아닌 값을 갖는다. 이는 축이 서로 수직을 이루고 있지 않기 때문이다. 위의 결과를 통하여 Galaxy S6의 내장 IMU 센서를 이용할 경우, 정확한 가속도 정보를 얻기 어렵다는 것을 확인하였다. 내장 IMU 센서의 성능 비교와 더불어, 자이로스코프가 내장되어 있지 않은 안드로이드 OS 기반 스마트폰을 조사한 결과, 상당한 수의 스마트폰이 센서를 내장하고 있지 않다는 사실을 발견했다. 이러한 스마트폰은 예를 들어, 삼성 갤럭시 A 시리즈, 삼성 갤럭시 J 시리즈, 삼성 갤럭시 On 시리즈, 삼성 갤럭시 그랜드 시리즈, LG X 시리즈, LG K10, LG Stylus 시리즈, LG Class, LG Wine Smart를 포함할 수 있다. 결국, 자이로스코프를 통해 얻는 각속도는 가속도 데이터를 정제하고, 휴대폰의 회전각인 롤(roll), 피치(pitch), 요(yaw)를 구하는데 필요한 정보이기 때문에 자이로스코프의 부재는 흔들림 보정을 불가하게 만든다. 따라서 외장 IMU 센서의 필요성이 대두된다.Galaxy S6 also has a constant acceleration in the Z axis. However, the accelerations in the X and Y axes have non-zero values. This is because the axes are not perpendicular to each other. From the above results, it is confirmed that it is difficult to obtain accurate acceleration information by using the built-in IMU sensor of Galaxy S6. In addition to comparing the performance of the built-in IMU sensors, an Android OS-based smartphone that does not have a built-in gyroscope has been found and found that a significant number of smartphones do not have a built-in sensor. Such smart phones may include, for example, Samsung Galaxy A series, Samsung Galaxy J series, Samsung Galaxy On series, Samsung Galaxy Grand series, LG X series, LG K10, LG Stylus series, LG Class and LG Wine Smart . As a result, the angular velocity obtained through the gyroscope is information necessary to refine the acceleration data and obtain roll, pitch, and yaw, which are the rotation angles of the mobile phone, so that the absence of the gyroscope can not compensate for the shake I make it. Therefore, there is a need for an external IMU sensor.

도 5는 본 발명의 일 실시예에 따른 동영상 보정 시스템의 외장 IMU 센서를 연결한 형태를 도시한 도면이다. 도 5에 있어서, 본 발명의 일실시예에 따른 외장 IMU 센서는 MPU 6050을 이용할 수 있다. MPU 6050 센서를 처리하기 위해서 I2C 통신을 통하여 아두이노 Mega와 연결하여 사용할 수 있다. 외장 IMU 센서를 사용할 시에, 주의할 점으로는 먼저 노이즈와 바이어스(bias)를 제거하는 것이 있다. IMU 특성 상, 가속도계는 노이즈가 심하고, 자이로스코프는 시간이 흐름에 따라 오차가 쌓인다는 문제점이 있다. 이를 해결하기 위하여, Digital Motion Processor(DMP)를 이용하였다. 노이즈를 제거하기 위하여, 흔히 사용되는 필터로 상보 필터(Complementary filter)와 칼만 필터(Karman filter)가 있지만, DMP는 이보다 정밀하고 MCU에서 따로 처리할 필요가 없다는 장점이 있다.FIG. 5 is a diagram illustrating a connection of an external IMU sensor of a moving image correction system according to an exemplary embodiment of the present invention. Referring to FIG. In FIG. 5, an external IMU sensor according to an embodiment of the present invention may use an MPU 6050. In order to process the MPU 6050 sensor, it can be connected to the Arduino Mega via I2C communication. When using an external IMU sensor, one thing to note is to remove noise and bias first. Due to the IMU characteristic, there is a problem that the accelerometer is severely noisy and the gyroscope accumulates errors over time. To solve this problem, Digital Motion Processor (DMP) was used. In order to remove the noise, there are complementary filter and Karman filter which are commonly used, but DMP is more precise and there is no need to process separately in MCU.

또한, 노이즈와 바이어스 제거와 더불어 오프셋(offset)을 찾는 알고리즘도 실행하고, 수평을 최대한 맞추어 몇 분 동안 작동시킨 뒤, 평균값을 계산하여 오프셋을 찾고 이를 보정한 데이터를 수집하였다.We also implemented an algorithm to find the offset along with noise and bias elimination, run it for a few minutes with the best horizontal, then calculate the average value to find the offset and collect the corrected data.

또한, 롤(Roll), 피치(pitch), 요(yaw)는 IMU가 각 축에 대하여 회전하였는가를 나타낸다. 정확한 롤, 피치, 요를 얻기 위해서 자이로스코프와 더불어 가속도계를 함께 사용하였다. Roll, pitch, and yaw also indicate whether the IMU has rotated about each axis. Accelerometers were used together with the gyroscope to obtain accurate roll, pitch and yaw.

또한, 변위(Displacement)는 두 번 적분을 해야 하기 때문에 노이즈를 많이 줄이더라도 정확한 데이터를 얻는 것이 어렵다. 따라서 아주 짧은 시간 (0.001s)에서의 변위만을 지속적으로 가져오고, 이를 이용해서 카메라가 촬영하는 화면의 위치를 예측하였다. In addition, since displacement requires two integrations, it is difficult to obtain accurate data even if a lot of noise is reduced. Therefore, only the displacement at a very short time (0.001 s) was continuously brought in and the position of the screen shot by the camera was predicted using this.

본 발명의 일실시예에 따른 외장 IMU 센서를 이용한 동영상 보정 방법에 있어서, 외장 IMU 센서와 안드로이드의 통신을 위하여 OTG 케이블을 이용할 수 있다. 프로토타입에서는 IMU가 아두이노와 연결되고 아두이노는 안드로이드와 OTG 케이블을 이용하여 연결되는 방식이다. 아두이노를 이용하여 계산된 roll, pitch, yaw 와 x, y, z 축 방향의 변위 데이터를 안드로이드로 전송한다.In the moving image correction method using the external IMU sensor according to an embodiment of the present invention, an OTG cable can be used for communication between the external IMU sensor and Android. In the prototype, IMU is connected to Arduino and Arduino is connected via Android and OTG cable. Roll, pitch, yaw and displacement data in x, y, and z axis directions calculated using Arduino are transmitted to Android.

본 발명의 일 실시예에 따른 외장 IMU 센서를 이용한 동영상 보정 방법에 있어서, 동영상 보정은 안드로이드 어플로 구현할 수 있다. 동영상 촬영을 할 때, 시간에 따른 핸드폰의 롤, 피치, 요와 x,y,z 축 방향의 변위 값을 동영상과 함께 저장하기 위함이다. 동영상 촬영을 하고 흔들림 보정을 하기 위해 서버로 동영상과 IMU로부터 받은 데이터 값들을 전송하고 서버에서 보정된 영상을 다시 받는 역할을 한다.In the moving image correction method using an external IMU sensor according to an embodiment of the present invention, the moving image correction can be implemented in an Android application. It is to store the roll, pitch, yaw and displacement values of x, y, z axis direction of the mobile phone with the moving picture with time. In order to make a motion picture and to compensate for the blurring, it transmits data values received from the video and IMU to the server and receives the corrected image again from the server.

안드로이드 어플을 만들기 위하여 안드로이드 스튜디오를 사용할 수 있으며, 안드로이드 스튜디오는 자바(java)기반의 프로그램이다, 어플을 구현하기 위해서는 실제 화면을 구성하는 LayOut xml파일과 실제로 어플의 기능을 부여하는 자바파일을 작성해야 한다. 자신이 사용하는 기능에 따라서 승인(permission)을 부여해야 되는 경우도 있는데 이는 manifest 폴더에 있는 xml파일을 수정할 수 있다.You can use Android studio to make an Android application. Android Studio is a Java based program. In order to implement an application, you need to write a LayOut xml file that composes the actual screen and a Java file that actually gives the application function. do. Depending on the function you are using, you may need to grant permission, which allows you to modify the xml file in the manifest folder.

흔들림 보정 어플은 2개의 활동(activity)으로 이루어질 수 있다. 이는 메인 액티비티(MainAcvitivy)와 앨범 액티비티(AlbumActivity)이다. 메인 액티비티에서는 동영상 촬영 앱을 작동시키는 코드가 적혀있다. 또한, 촬영한 동영상과 동영상을 찍을 때, 핸드폰의 움직인 변위와 각도를 시간에 따라 정리한 텍스트파일을 안드로이드 폰에 저장해 주는 코드가 담겨 있다. 앨범 액티비티에서는 메인 액티비티에서 저장한 동영상과 이에 대응되는 텍스트 파일을 서버로 보내는 코드와 서버에서 보낸 동영상을 받는 코드가 담겨있다. Manifest 파일에는 인터넷과 네트워크를 사용하겠다는 승인(permission)과 외부 기억 장치(external storage)를 읽고 쓰겠다는 승인(permission)을 추가할 수 있다.The anti-shake application can be made up of two activities. This is the main activity (MainAcivitivy) and the album activity (AlbumActivity). In the main activity, there is a code to activate the video recording app. In addition, it contains code to store the text file that the mobile phone moves and angles according to time when it records the video and the video to the Android phone. The album activity contains the video saved in the main activity, the code for sending the corresponding text file to the server, and the code for receiving the video sent from the server. Manifest files can include permissions to use the Internet and the network, and permissions to read and write external storage.

어플을 구현할 때 가장 핵심적인 코드는 다음과 같다.The most important code for implementing an application is as follows.

- 앨범 액티비티 내 보정 전 원본 동영상과 txt를 서버로 보내는 코드 - Code to send the original video and txt to the server before the compensation in the album activity

public static void sendFile(Socket sock, File myFile)  public static void sendFile (Socket sock, File myFile)

try {          try {

//보내기            //Send

int fileSize = (int) myFile.length();            int fileSize = (int) myFile.length ();

byte[] mybytearray = new byte[fileSize];            byte [] myByteArray = new byte [fileSize];

FileInputStream fis = new FileInputStream(myFile);            FileInputStream fis = new FileInputStream (myFile);

BufferedInputStream bis = new BufferedInputStream(fis);            BufferedInputStream bis = new BufferedInputStream (fis);

bis.read(mybytearray, 0, fileSize);            bis.read (myByteArray, 0, fileSize);

OutputStream os = sock.getOutputStream();            OutputStream os = sock.getOutputStream ();

System.out.println("Sending...");            System.out.println ("Sending ...");

os.write(fileSize & 255);            os.write (fileSize &255);

os.write((fileSize >> 8) & 255);            os.write ((fileSize >> 8) &255);

os.write((fileSize >> 16) & 255);            os.write ((fileSize >> 16) &255);

os.write((fileSize >> 24) & 255);            os.write ((fileSize >> 24) &255);

System.out.println("sending fileSize: " + fileSize);            System.out.println ("sending fileSize:" + fileSize);

os.write(mybytearray, 0, fileSize);            os.write (myByteArray, 0, fileSize);

os.flush();            os.flush ();

} catch (UnknownHostException e) {         } catch (UnknownHostException e) {

// TODO Auto-generated catch block            // TODO Auto-generated catch block

e.printStackTrace();            e.printStackTrace ();

} catch (IOException e) {        } catch (IOException e) {

// TODO Auto-generated catch block            // TODO Auto-generated catch block

e.printStackTrace();            e.printStackTrace ();

}  }

} }

- 앨범 액티비티 내 보정 된 동영상을 서버로부터 받는 코드- Code that receives the calibrated video from the server in the album activity

public static void receiveFile(Socket sock, File newFile) { public static void sendFile (Socket sock, File newFile) {

try {        try {

newFile.createNewFile();            newFile.createNewFile ();

newFile.setWritable(true);            newFile.setWritable (true);

//받기            // Receive

InputStream is = sock.getInputStream();            InputStream is = sock.getInputStream ();

//newFile: 쓸(write) 파일            // newFile: write file

FileOutputStream fos = new FileOutputStream(newFile);            FileOutputStream fos = new FileOutputStream (newFile);

BufferedOutputStream bos = new BufferedOutputStream(fos);            BufferedOutputStream bos = new BufferedOutputStream (fos);

byte[] aByte = new byte[1024];            byte [] aByte = new byte [1024];

int bytesRead;            int bytesRead;

while ((bytesRead = is.read(aByte)) != -1) {            while ((bytesRead = is.read (aByte))! = -1) {

bos.write(aByte, 0, bytesRead);                bos.write (aByte, 0, bytesRead);

}            }

is.close();            is.close ();

bos.flush();            bos.flush ();

} catch (UnknownHostException e) {         } catch (UnknownHostException e) {

// TODO Auto-generated catch block            // TODO Auto-generated catch block

e.printStackTrace();            e.printStackTrace ();

} catch (IOException e) {         } catch (IOException e) {

// TODO Auto-generated catch block            // TODO Auto-generated catch block

e.printStackTrace();            e.printStackTrace ();

}        }

System.out.println("receive complete");        System.out.println ("receive complete");

}    }

- 메인 액티비티 내 동영상과 싱크가 맞도록 스마트폰 움직임을 시간과 함께 기록한 txt파일을 작성하도록 한 코드 - A code that creates a txt file that records your smartphone movements with time so that they match the videos in the main activity.

private class AccSensorListener implements SensorEventListener {private class AccSensorListener implements SensorEventListener {

//센서값 기록        // Record the sensor value

public void onSensorChanged(SensorEvent event) {        public void onSensorChanged (SensorEvent event) {

if(!videoStarted) {            if (! videoStarted) {

videoStarted = true;                videoStarted = true;

videoStartTime = event.timestamp;                videoStartTime = event.timestamp;

}}

String line = (event.timestamp - videoStartTime)/1000000.0 + " " + event.values[0] + " " + event.values[1] + " " + event.values[2] + "\n";     String line = (event.timestamp - videoStartTime) /1000000.0 + "" + event.values [0] + "" + event.values [1] + "" + event.values [2] + "\ n";

try {            try {

sensorStream.write(line.getBytes());                sensorStream.write (line.getBytes ());

} catch (IOException e) {            } catch (IOException e) {

e.printStackTrace();                e.printStackTrace ();

}            }

if(!once) {            if (! once) {

once = true;                once = true;

System.out.println(event.timestamp);                System.out.println (event.timestamp);

}            }

}         }

본 발명의 일 실시예에 따른 외장 IMU 센서를 이용한 동영상 보정 방법의 서버 구현은 윈도우에서 파이썬을 사용하여 구축할 수 있다. 서버의 역할은 동영상을 받고, 보정하고 다시 안드로이드 앱으로 보내는 역할을 한다. 전송-수신 방식은 안드로이드 앱에서 보낸 동영상과 txt파일을 TCP-IP 통신을 이용할 수 있다. 받은 텍스트와 동영상을 우리가 구현한 동영상 보정 프로그램을 통해 동영상을 보정한다. 그 다음, 보정된 영상을 다시 안드로이드 스마트폰으로 보낸다. 이를 나타낸 코드는 다음과 같다. The server implementation of the moving image correction method using the external IMU sensor according to an embodiment of the present invention can be constructed using Python in Windows. The role of the server is to receive the video, correct it and send it back to the Android app. The transmission-reception method can use TCP-IP communication with video and txt file sent from the Android app. Correct the video through the video correction program that we implemented the text and video we received. Then, the corrected image is sent back to the Android smartphone. The code for this is as follows.

import socketimport socket

import threadingimport threading

import structimport struct

import osimport os

def recvN(clientSocket, n):def recvN (clientSocket, n):

data = clientSocket.recv(n) data = clientSocket.recv (n)

while len(data) < n: while len (data) <n:

data += clientSocket.recv(n - len(data)) data + = clientSocket.recv (n - len (data))

return data return data

// 윈도우에서 파일을 받는 함수// function to receive file from window

def recvFile(clientSocket, fileName):def recvFile (clientSocket, fileName):

f = open('C:\Users\JeongHwan\Videos\FileName, 'wb') f = open ('C: \ Users \ JeongHwan \ Videos \ FileName,' wb ')

sz = recvN(clientSocket, 4) sz = recvN (clientSocket, 4)

size = struct.unpack('i', sz)[0] size = struct.unpack ('i', sz) [0]

print fileName, "size: ", size print fileName, "size:", size

f.write(recvN(clientSocket, size)) f.write (recvN (clientSocket, size))

f.close() f.close ()

//윈도우에서 파일을 보내는 함수// function to send file from window

def sendFile(clientSocket, fileName):def sendFile (clientSocket, fileName):

f = open('C:\Users\JeongHwan\Videos\FileName, 'rb') f = open ('C: \ Users \ JeongHwan \ Videos \ FileName,' rb ')

clientSocket.sendall(f.read()) clientSocket.sendall (f.read ())

f.close() f.close ()

//안드로이드로부터 받은 동영상을 동영상프로그램을 통해 보정하는 과정// The process of calibrating video received from Android through video program

def serveClient(clientSocket, clientId):def serveClient (clientSocket, clientId):

recvFile(clientSocket, "video_%03d.mp4" % clientId) recvFile (clientSocket, "video_% 03d.mp4"% clientId)

recvFile(clientSocket, "imu_%03d.txt" % clientId) recvFile (clientSocket, "imu_% 03d.txt"% clientId)

#TODO receive external imu sensor file#TODO receive external imu sensor file

#TODO video correction#TODO video correction

os.system("C:\Users\JeongHwan\Videos\videostab.exe C:\Users\JeongHwan\Videos\video_%03d.mp4-o=C:\Users\JeongHwan\Videos\corrected_%03d.mp4" % (clientId, clientId, clientId))os.system ("C: \ Users \ JeongHwan \ Videos \ videostab.exe C: \ Users \ JeongHwan \ Videos \ video_% 03d.mp4-o = C: \ Users \ JeongHwan \ Videos \ corrected_% 03d.mp4" (clientId, clientId, clientId))

sendFile(clientSocket, "corrected_%03d.mp4" % clientId)sendFile (clientSocket, "corrected_% 03d.mp4"% clientId)

#sendFile(clientSocket, "video_%03d.mp4" % clientId)#sendFile (clientSocket, "video_% 03d.mp4"% clientId)

clientSocket.close() clientSocket.close ()

serverSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)serverSocket = socket.socket (socket.AF_INET, socket.SOCK_STREAM)

serverSocket.bind(("", 5000))serverSocket.bind (("", 5000))

serverSocket.listen(5)serverSocket.listen (5)

clientId = 1clientId = 1

while True:while True:

print "waiting..." print "waiting ..."

clientSocket, addr = serverSocket.accept() clientSocket, addr = serverSocket.accept ()

print "connected from: ", addr print "connected from:", addr

th = threading.Thread(target = serveClient, args = (clientSocket, clientId)) th = threading.Thread (target = serveClient, args = (clientSocket, clientId))

clientId += 1 clientId + = 1

th.start() th.start ()

또한, 실제로 현실에서 관측되는 데이터에는 노이즈(Noise)가 항상 포함되어 있으며, 노이즈를 잡는 것이 매우 중요하다. 이 때, 노이즈를 최대한으로 배제하기 위해 사용되는 것이 란삭 메쏘드(Ransac Method)로, 란삭 메쏘드를 이용하기 위해서는 인라이어(Inlier)와 아웃라이어(Outlier)를 알아야 한다. 인라이어란 정상적인 분포 내에 포함되는 데이터들을 뜻하며, 아웃라이어는 반대로 정상적인 범주에 포함되지 않는 데이터들을 뜻한다. 이에 인라이어의 수가 가장 많아지는 분포선을 정하는 알고리즘이 란삭 메소드라고 할 수 있다. 란삭 메소드는 흔히 물체 매칭(matching)에서 사용된다. 물체의 특징점들을 검색하여 각 특징점들의 분포를 찾고, 그를 통해 배경 내에서 특정 물체가 어디에 있는지 찾는다거나, 특정 물체의 운동을 추적(tracking) 하는 등 여러 활용 방안이 존재한다.Also, data actually observed in real life always includes noise, and it is very important to capture noise. In this case, the Ransac method is used to exclude the noise as much as possible, and the inlier and the outlier must be known in order to use the Ransack method. An inlier refers to data that is contained within a normal distribution, while an outlier refers to data that does not fall into the normal category. The algorithm that determines the distribution line with the greatest number of inliers is called the lush method. The Random method is often used in object matching. There are various applications such as searching the feature points of an object, finding the distribution of each feature point, searching for a specific object in the background through it, or tracking the movement of a specific object.

또한, 더 나은 성능의 영상 안정화(Video stabilize)를 위해 피치 모션(Pitch Motion)을 보정하는 작업을 진행할 수 있다. 피치 운동에 대해 해당 각도만큼 영상을 사다리꼴의 형태로 바꿔줌으로써 보정을 할 때에 특징점을 잘 찾을 수 있도록 도와주는 방법이다.In addition, it is possible to correct the pitch motion for better image stabilization (video stabilization). It is a method to help find the feature points when correcting by changing the image to the trapezoidal shape by the angle corresponding to the pitch motion.

란삭 메쏘드(Ransac Method)를 이용한 영상 안정화는 란삭 메쏘드(Ransac Method)를 통해 특징점을 찾고, 보정하는 방법이다. 특징점 들끼리 매칭시켜 영상을 흔들리지 않는 것처럼 바꿔주는 방법으로, 현재 영상 안정화를 할 때에 자주 사용되는 방법이다.Image stabilization using the Ransac Method is a method of finding and correcting feature points using the Ransac Method. This is a method used to stabilize the current image by matching the feature points to each other so as not to shake the image.

또한, 어펜딕스(APPENDIX) 어플리케이션 구현을 위한 부가적인 코드를 살펴보면,Also, looking at the additional code for implementing an APPENDIX application,

-Pitch Motion analyze-Pitch Motion analyze

int trans(float theta, Mat frame)int trans (float theta, Mat frame)

{{

if (frame.empty()) if (frame.empty ())

return -1; return -1;

Mat mapX, mapY; Mat mapX, mapY;

mapX.create(frame.size(), CV_32FC1); mapX.create (frame.size (), CV_32FC1);

mapY.create(frame.size(), CV_32FC1); mapY.create (frame.size (), CV_32FC1);

float seta; float seta;

seta = (0.62*theta*theta + 1.39*theta + 0.62) / (2.77*theta); seta = (0.62 * theta * theta + 1.39 * theta + 0.62) / (2.77 * theta);

printf("%f\n", seta); printf ("% f \ n", seta);

for (int y = 0; y < (frame.rows / 2); y++) y (frame.rows / 2); y ++)

for (int x = 0;x<frame.cols;x++) for (int x = 0; x <frame.cols; x ++)

{ {

mapX.at<float>(y, x) = x; mapX.at <float> (y, x) = x;

mapY.at<float>(y, x) = y - ((frame.rows / 2 - y)*x) / (seta * frame.cols - x); mapY.at <float> (y, x) = y - ((frame.rows / 2 - y) * x) / (seta * frame.cols - x);

} }

for (int y = (frame.rows / 2); y < (frame.rows); y++) y (frame.rows); y ++) < / RTI &gt;

for (int x = 0;x<frame.cols;x++) for (int x = 0; x <frame.cols; x ++)

{ {

mapX.at<float>(y, x) = x; mapX.at <float> (y, x) = x;

mapY.at<float>(y, x) = y + ((y - frame.rows / 2)*x) / (seta * frame.cols - x); mapY.at <float> (y, x) = y + ((y - frame.rows / 2) * x) / (seta * frame.cols - x);

} }

Mat dstImage(frame.size(), frame.type()); Mat dstImage (frame.size (), frame.type ());

remap(frame, dstImage, mapX, mapY, INTER_LINEAR); remap (frame, dstImage, mapX, mapY, INTER_LINEAR);

//imshow("frame", frame);// imshow ("frame", frame);

imshow("dstImage", dstImage); imshow ("dstImage", dstImage);

waitKey(); waitKey ();

return 0; return 0;

}}

string lines[5000];string lines [5000];

float y[3000][3];float y [3000] [3];

float z[3000];float z [3000];

struct float3struct float3

{{

float a; float a;

float b; float b;

float c; float c;

};};

float3 getfloat(string line)float3 getfloat (string line)

{{

string a[3]; string a [3];

int j = 16; int j = 16;

int k = -1; int k = -1;

while (j<line.length()) while (j <line.length ())

{ {

while (line[j] != 9) while (line [j]! = 9)

{ {

a[k] += line[j]; a [k] + = line [j];

j++; j ++;

if (j >= line.length()) if (j> = line.length ())

{ {

break; break;

} }

} }

if (line[j] == 9) if (line [j] == 9)

k++; k ++;

j++; j ++;

} }

float3 f; float3 f;

f.a = stof(a[0]); f.a = stof (a [0]);

f.b = stof(a[1]);f.b = stof (a [1]);

f.c = stof(a[2]); f.c = stof (a [2]);

return f; return f;

}}

int main()int main ()

{{

string filePath = "text.txt"; string filePath = "text.txt";

Mat dstImage; Mat dStImage;

// read File // read File

ifstream openFile(filePath.data()); ifstream openFile (filePath.data ());

int i = 0; int i = 0;

if (openFile.is_open()) { if (openFile.is_open ()) {

while (getline(openFile, lines[i])) { while (getline (openFile, lines [i])) {

//cout << lines[i] << endl; // cout << lines [i] << endl;

i++; i ++;

} }

openFile.close(); openFile.close ();

} }

int n = 0; int n = 0;

for (int l = 5; l < i-1; l++) (int l = 5; l <i-1; l ++)

{ {

if (lines[l].find("ypr") != string::npos) if (lines [l] .find ("ypr")! = string :: npos)

{ {

//printf("%d", lines[l].find("ypr")); // printf ("% d", lines [l] .find ("ypr"));

float3 t = getfloat(lines[l]); float3 t = getfloat (lines [l]);

y[n][0] = t.a; y [n] [0] = t.a;

y[n][1] = t.b; y [n] [1] = t.b;

y[n][2] = t.c; y [n] [2] = t.c;

z[n] =( y[n][1] - y[n+1][1])/0.01745; z [n] = (y [n] [1] - y [n + 1] [1]) /0.01745;

n++; n ++;

} }

} }

CvCapture* m_Capture; CvCapture * m_Capture;

m_Capture = cvCreateFileCapture("play.mp4"); m_Capture = cvCreateFileCapture ("play.mp4");

IplImage *scene; IplImage * scene;

VideoWriter writer;VideoWriter writer;

Mat stabilizedFrame; Mat stabilizedFrame;

int nframes = 0; int nframes = 0;

//writer.open("trans.avi", CV_FOURCC('D', 'I', 'V', 'X'), 120, cvSize(1200, 1600), 1); // writer.open ("trans.avi", CV_FOURCC ('D', 'I', 'V', 'X'), 120, cvSize (1200, 1600), 1);

for (int k = 0; k < 3000; k++) for (int k = 0; k <3000; k + +)

{ {

cvSetCaptureProperty(m_Capture, CV_CAP_PROP_POS_FRAMES, k); cvSetCaptureProperty (m_Capture, CV_CAP_PROP_POS_FRAMES, k);

cvGrabFrame(m_Capture); cvGrabFrame (m_Capture);

Mat frame = cvarrToMat(cvRetrieveFrame(m_Capture)); Mat frame = cvarrToMat (cvRetrieveFrame (m_Capture));

if (frame.empty()) if (frame.empty ())

break; break;

else else

{ {

trans(z[k],frame); trans (z [k], frame);

//writer.write(dstImage); //writer.write(dstImage);

} }

} }

return 0; return 0;

}}

- Ransac Method- Ransac Method

#include <string>#include <string>

#include <vector>#include <vector>

#include <cstdlib>#include <cstdlib>

#include <iostream>#include <iostream>

#include <fstream>#include <fstream>

#include <sstream>#include <sstream>

#include <stdexcept>#include <stdexcept>

#include <opencv2/core.hpp>#include <opencv2 / core.hpp>

#include <opencv2/core/utility.hpp>#include <opencv2 / core / utility.hpp>

#include "opencv2/video.hpp"#include "opencv2 / video.hpp"

#include "opencv2/imgproc.hpp"#include "opencv2 / imgproc.hpp"

#include "opencv2/videoio.hpp"#include "opencv2 / videoio.hpp"

#include "opencv2/highgui.hpp"#include "opencv2 / highgui.hpp"

#include "opencv2/videostab.hpp"#include "opencv2 / videostab.hpp"

#include "opencv2/opencv_modules.hpp"#include "opencv2 / opencv_modules.hpp"

#define arg(name) cmd.get<string>(name)#define arg (name) cmd.get <string> (name)

#define argb(name) cmd.get<bool>(name)#define argb (name) cmd.get <bool> (name)

#define argi(name) cmd.get<int>(name)#define argi (name) cmd.get <int> (name)

#define argf(name) cmd.get<float>(name)#define argf (name) cmd.get <float> (name)

#define argd(name) cmd.get<double>(name)#define argd (name) cmd.get <double> (name)

using namespace std;using namespace std;

using namespace cv;using namespace cv;

using namespace cv::videostab;using namespace cv :: videostab;

Ptr<IFrameSource> stabilizedFrames;Ptr <IFrameSource> stabilizedFrames;

string saveMotionsPath;string saveMotionsPath;

double outputFps;double outputFps;

string outputPath;string outputPath;

bool quietMode;bool quietMode;

void run();void run ();

// void saveMotionsIfNecessary();// void saveMotionsIfNecessary ();

void printHelp();void printHelp ();

MotionModel motionModel(const string &str);MotionModel motionModel (const string &str);

void run()void run ()

{{

VideoWriter writer; VideoWriter writer;

Mat stabilizedFrame; Mat stabilizedFrame;

int nframes = 0; int nframes = 0;

// for each stabilized frame // for each stabilized frame

while (!(stabilizedFrame = stabilizedFrames->nextFrame()).empty()) while (! (stabilizedFrame = stabilizedFrames-> nextFrame ()). empty ())

{ {

nframes++; nframes ++;

// init writer (once) and save stabilized frame // init writer (once) and save

if (!outputPath.empty()) if (! outputPath.empty ())

{ {

if (!writer.isOpened()) if (! writer.isOpened ())

writer.open(outputPath, VideoWriter::fourcc('X', 'V', 'I', 'D'), writer.open (outputPath, VideoWriter :: fourcc ('X', 'V', 'I', 'D'),

outputFps, stabilizedFrame.size()); outputFps, stabilizedFrame.size ());

writer << stabilizedFrame; writer << stabilizedFrame;

} }

// show stabilized frame // show stabilized frame

if (!quietMode) if (! quietMode)

{ {

imshow("stabilizedFrame", stabilizedFrame); imshow ("stabilizedFrame", stabilizedFrame);

char key = static_cast<char>(waitKey(3)); char key = static_cast <char> (waitKey (3));

if (key == 27) cout << endl; break; if (key == 27) cout << endl; break;

} }

}}

cout << "processed frames: " << nframes << endl cout << "processed frames:" << nframes << endl

<< "finished\n"; << "finished \ n";

}}

void printHelp()void printHelp ()

{{

cout << "OpenCV video stabilizer.\n"cout << "OpenCV video stabilizer.nn"

"Usage: videostab <file_path> [arguments]\n\n" "Usage: videostab <file_path> [arguments] \ n \ n"

"Arguments:\n" "Arguments: \ n"

" -m=, --model=(transl|transl_and_scale|rigid|similarity|affine|homography)\n" "-m =, --model = (transl | transl_and_scale | rigid | similarity | affine | homography) \ n"

" Set motion model. The default is affine.\n" "Set motion model." The default is affine.nn

" -lp=, --lin-prog-motion-est=(yes|no)\n" "-lp =, --lin-prog-motion-est = (yes | no) \ n"

" Turn on/off LP based motion estimation. The default is no.\n" "Turn on / off LP based motion estimation. The default is no. \ N"

" --subset=(<int_number>|auto)\n" "--subset = (<int_number> | auto) \ n"

" Number of random samples per one motion hypothesis. The default is auto.\n" "Number of random samples per motion hypothesis. The default is auto.\n"

" --thresh=(<float_number>|auto)\n" "--thresh = (<float_number> | auto) \ n"

" Maximum error to classify match as inlier. The default is auto.\n" "Default error to classify match as inlier." The default is auto.\n "

" --outlier-ratio=<float_number>\n" "--outlier-ratio = <float_number> \ n"

" Motion estimation outlier ratio hypothesis. The default is 0.5.\n" "The motion estimation outlier ratio hypothesis. The default is 0.5. \ n"

" --min-inlier-ratio=<float_number>\n" "--min-inlier-ratio = <float_number> \ n"

" Minimum inlier ratio to decide if estimated motion is OK. The default is 0.1.\n" "Minimum inlier ratio to decide if estimated motion is OK." The default is 0.1. \ n "

" --nkps=<int_number>\n" "--nkps = <int_number> \ n"

" Number of keypoints to find in each frame. The default is 1000.\n" "Number of keypoints to find in each frame." The default is 1000. \ n "

" --local-outlier-rejection=(yes|no)\n" "--local-outlier-rejection = (yes | no) \ n"

" Perform local outlier rejection. The default is no.\n\n" "Perform local outlier rejection. The default is no.nnn"

" -sm=, --save-motions=(<file_path>|no)\n" "-sm =, --save-motions = (<file_path> | no) \ n"

" Save estimated motions into file. The default is no.\n" "Save estimated motions into file." The default is no.

" -lm=, --load-motions=(<file_path>|no)\n" "-lm =, --load-motions = (<file_path> | no) \ n"

" Load motions from file. The default is no.\n\n" "Load motions from file. The default is no.nnn"

" -r=, --radius=<int_number>\n" "-r =, --radius = <int_number> \ n"

" Set sliding window radius. The default is 15.\n" "Set sliding window radius." The default is 15. \ n "

" --stdev=(<float_number>|auto)\n" "--stdev = (<float_number> | auto) \ n"

" Set smoothing weights standard deviation. The default is auto\n" "Set smoothing weights standard deviation." The default is auto \ n "

" (i.e. sqrt(radius)).\n" "(ie sqrt (radius)). \ n"

" -lps=, --lin-prog-stab=(yes|no)\n" "-lps =, --lin-prog-stab = (yes | no) \ n"

" Turn on/off linear programming based stabilization method.\n" "Turn on / off linear programming based stabilization method. \ N"

" --lps-trim-ratio=(<float_number>|auto)\n" "--lps-trim-ratio = (<float_number> | auto) \ n"

" Trimming ratio used in linear programming based method.\n" &Quot; Trimming ratio used in linear programming based method &

" --lps-w1=(<float_number>|1)\n" "--lps-w1 = (<float_number> | 1) \ n"

" 1st derivative weight. The default is 1.\n" "1st derivative weight. The default is 1. \ n"

" --lps-w2=(<float_number>|10)\n" "--lps-w2 = (<float_number> | 10) \ n"

" 2nd derivative weight. The default is 10.\n" "2nd derivative weight. The default is 10. \ n"

" --lps-w3=(<float_number>|100)\n" "--lps-w3 = (<float_number> | 100) \ n"

" 3rd derivative weight. The default is 100.\n" "3rd derivative weight. The default is 100. \ n"

" --lps-w4=(<float_number>|100)\n" "--lps-w4 = (<float_number> | 100) \ n"

" Non-translation motion components weight. The default is 100.\n\n" "Non-translation motion components weight. The default is 100. \ n \ n"

" --deblur=(yes|no)\n" "--deblur = (yes | no) \ n"

" Do deblurring.\n" "Do deblurring.\n"

" --deblur-sens=<float_number>\n" "--deblur-sens = <float_number> \ n"

" Set deblurring sensitivity (from 0 to +inf). The default is 0.1.\n\n" "Set deblurring sensitivity (from 0 to + inf). The default is 0.1. \ n \ n"

" -t=, --trim-ratio=<float_number>\n" "-t =, --trim-ratio = <float_number> \ n"

" Set trimming ratio (from 0 to 0.5). The default is 0.1.\n" "Set trimming ratio (from 0 to 0.5). The default is 0.1. \ n"

" -et=, --est-trim=(yes|no)\n" "-et =, --est-trim = (yes | no) \ n"

" Estimate trim ratio automatically. The default is yes.\n" "The default is yes. \ N"

" -ic=, --incl-constr=(yes|no)\n" "-ic =, --incl-constr = (yes | no) \ n"

" Ensure the inclusion constraint is always satisfied. The default is no.\n\n" "Ensure the inclusion constraint is always satisfied. The default is no.nnn"

" -bm=, --border-mode=(replicate|reflect|const)\n" "-bm =, --border-mode = (replicate | reflect | const) \ n"

" Set border extrapolation mode. The default is replicate.\n\n" "Set border extrapolation mode." The default is replicate.\n\n "

" --mosaic=(yes|no)\n" "--mosaic = (yes | no) \ n"

" Do consistent mosaicing. The default is no.\n" "Do consistent mosaicing. The default is no. \ N"

" --mosaic-stdev=<float_number>\n""--mosaic-stdev = <float_number> \ n"

" Consistent mosaicing stdev threshold. The default is 10.0.\n\n" "Consistent mosaicing stdev threshold. The default is 10.0. \ n \ n"

" -mi=, --motion-inpaint=(yes|no)\n" "-mi =, --motion-inpaint = (yes | no) \ n"

" Do motion inpainting (requires CUDA support). The default is no.\n" "Do motion inpainting (requires CUDA support). The default is no. \ N"

" --mi-dist-thresh=<float_number>\n" "- mi-dist-thresh = <float_number> \ n"

" Estimated flow distance threshold for motion inpainting. The default is 5.0.\n\n" "Estimated flow distance threshold for motion inpainting. The default is 5.0. \ n \ n"

" -ci=, --color-inpaint=(no|average|ns|telea)\n" "-ci =, --color-inpaint = (no | average | ns | telea) \ n"

" Do color inpainting. The defailt is no.\n" &Quot; Do color inpainting. The defailt is no.

" --ci-radius=<float_number>\n" "--ci-radius = <float_number> \ n"

" Set color inpainting radius (for ns and telea options only).\n" "Set color inpainting radius (for ns and telea options only). \ N"

" The default is 2.0\n\n" "The default is 2.0 \ n \ n"

" -ws=, --wobble-suppress=(yes|no)\n" "-ws =, --wobble-suppress = (yes | no) \ n"

" Perform wobble suppression. The default is no.\n" "Perform wobble suppression. The default is no. \ N"

" --ws-lp=(yes|no)\n" "--ws-lp = (yes | no) \ n"

" Turn on/off LP based motion estimation. The default is no.\n" "Turn on / off LP based motion estimation. The default is no. \ N"

" --ws-period=<int_number>\n" "--ws-period = <int_number> \ n"

" Set wobble suppression period. The default is 30.\n" "Set wobble suppression period." The default is 30. \ n "

" --ws-model=(transl|transl_and_scale|rigid|similarity|affine|homography)\n" "--ws-model = (transl | transl_and_scale | rigid | similarity | affine | homography) \ n"

" Set wobble suppression motion model (must have more DOF than motion \n" "Set wobble suppression motion model (must have more DOF than motion \ n"

" estimation model). The default is homography.\n" "estimation model). The default is homography.\n"

" --ws-subset=(<int_number>|auto)\n" "--ws-subset = (<int_number> | auto) \ n"

" Number of random samples per one motion hypothesis. The default is auto.\n" "Number of random samples per motion hypothesis. The default is auto.\n"

" --ws-thresh=(<float_number>|auto)\n" "--ws-thresh = (<float_number> | auto) \ n"

" Maximum error to classify match as inlier. The default is auto.\n" "Default error to classify match as inlier." The default is auto.\n "

" --ws-outlier-ratio=<float_number>\n" "--ws-outlier-ratio = <float_number> \ n"

" Motion estimation outlier ratio hypothesis. The default is 0.5.\n" "The motion estimation outlier ratio hypothesis. The default is 0.5. \ n"

" --ws-min-inlier-ratio=<float_number>\n" "--ws-min-inlier-ratio = <float_number> \ n"

" Minimum inlier ratio to decide if estimated motion is OK. The default is 0.1.\n" "Minimum inlier ratio to decide if estimated motion is OK." The default is 0.1. \ n "

" --ws-nkps=<int_number>\n" "--ws-nkps = <int_number> \ n"

" Number of keypoints to find in each frame. The default is 1000.\n" "Number of keypoints to find in each frame." The default is 1000. \ n "

" --ws-local-outlier-rejection=(yes|no)\n" "--ws-local-outlier-rejection = (yes | no) \ n"

" Perform local outlier rejection. The default is no.\n\n" "Perform local outlier rejection. The default is no.nnn"

" -sm2=, --save-motions2=(<file_path>|no)\n" "-sm2 =, --save-motions2 = (<file_path> | no) \ n"

" Save motions estimated for wobble suppression. The default is no.\n" "Save motions estimated for wobble suppression. The default is no. \ N"

" -lm2=, --load-motions2=(<file_path>|no)\n" "-lm2 =, --load-motions2 = (<file_path> | no) \ n"

" Load motions for wobble suppression from file. The default is no.\n\n" "Load motions for wobble suppression from file. The default is no.nnn"

" -gpu=(yes|no)\n" "-gpu = (yes | no) \ n"

" Use CUDA optimization whenever possible. The default is no.\n\n" "Use CUDA optimization whenever possible." The default is no.nnn "

" -o=, --output=(no|<file_path>)\n" "-o =, --output = (no | <file_path>) \ n"

" Set output file path explicitely. The default is stabilized.avi.\n" "Set output file path explicitely. The default is stabilized.avi.\n"

" --fps=(<float_number>|auto)\n" "--fps = (<float_number> | auto) \ n"

" Set output video FPS explicitely. By default the source FPS is used (auto).\n" "Set output video FPS explicitly. By default the source FPS is used (auto). \ N"

" -q, --quiet\n" "-q, --quiet \ n"

" Don't show output video frames.\n\n" "Do not show output video frames. \ N \ n"

" -h, --help\n" "-h, --help \ n"

" Print help.\n\n" "Print help.\n\n"

"Note: some argument configurations lead to two passes, some to single pass.\n\n"; "Note: some argument configurations lead to two passes, some to single pass. \ N \ n";

}}

// motion estimator builders are for concise creation of motion estimators// motion estimator builders are for concise creation of motion estimators

class IMotionEstimatorBuilderclass IMotionEstimatorBuilder

{{

public:public:

virtual ~IMotionEstimatorBuilder() virtual ~ IMotionEstimatorBuilder ()

virtual Ptr<ImageMotionEstimatorBase> build() = 0; virtual Ptr <ImageMotionEstimatorBase> build () = 0;

protected:protected:

IMotionEstimatorBuilder(CommandLineParser &command) : cmd(command) IMotionEstimatorBuilder (CommandLineParser & command): cmd (command)

CommandLineParser cmd; CommandLineParser cmd;

};};

class MotionEstimatorRansacL2Builder : public IMotionEstimatorBuilderclass MotionEstimatorRansacL2Builder: public IMotionEstimatorBuilder

{{

public:public:

MotionEstimatorRansacL2Builder(CommandLineParser &command, bool use_gpu, const string &_prefix = "")MotionEstimatorRansacL2Builder (CommandLineParser & command, bool use_gpu, const string & _prefix = "")

: IMotionEstimatorBuilder(command), gpu(use_gpu), prefix(_prefix) {} : IMotionEstimatorBuilder (command), gpu (use_gpu), prefix (_prefix) {}

virtual Ptr<ImageMotionEstimatorBase> build() virtual Ptr <ImageMotionEstimatorBase> build ()

{ {

Ptr<MotionEstimatorRansacL2> est = makePtr<MotionEstimatorRansacL2>(motionModel(arg(prefix + "model"))); Ptr <MotionEstimatorRansacL2> est = makePtr <MotionEstimatorRansacL2> (motionModel (arg (prefix + "model")));

RansacParams ransac = est->ransacParams(); RansacParams ransac = est-> ransacParams ();

if (arg(prefix + "subset") != "auto") if (arg (prefix + "subset")! = "auto")

ransac.size = argi(prefix + "subset"); ransac.size = argi (prefix + "subset");

if (arg(prefix + "thresh") != "auto") if (arg (prefix + "thresh")! = "auto")

ransac.thresh = argf(prefix + "thresh"); ransac.thresh = argf (prefix + "thresh");

ransac.eps = argf(prefix + "outlier-ratio"); ransac.eps = argf (prefix + "outlier-ratio");

est->setRansacParams(ransac); est-> setRansacParams (ransac);

est->setMinInlierRatio(argf(prefix + "min-inlier-ratio")); est-> setMinInlierRatio (argf (prefix + "min-inlier-ratio"));

Ptr<IOutlierRejector> outlierRejector = makePtr<NullOutlierRejector>(); Ptr <IOutlierRejector> outlierRejector = makePtr <NullOutlierRejector> ();

if (arg(prefix + "local-outlier-rejection") == "yes") if (arg (prefix + "local-outlier-rejection") == "yes")

{ {

Ptr<TranslationBasedLocalOutlierRejector> tblor = makePtr<TranslationBasedLocalOutlierRejector>(); Ptr <TranslationBasedLocalOutlierRejector> tblor = makePtr <TranslationBasedLocalOutlierRejector> ();

RansacParams ransacParams = tblor->ransacParams(); RansacParams ransacParams = tblor-> ransacParams ();

if (arg(prefix + "thresh") != "auto") if (arg (prefix + "thresh")! = "auto")

ransacParams.thresh = argf(prefix + "thresh"); ransacParams.thresh = argf (prefix + "thresh");

tblor->setRansacParams(ransacParams); tblor-> setRansacParams (ransacParams);

outlierRejector = tblor; outlierRejector = tblor;

} }

#if defined(HAVE_OPENCV_CUDAIMGPROC) && defined(HAVE_OPENCV_CUDAOPTFLOW)#if defined (HAVE_OPENCV_CUDAIMGPROC) && defined (HAVE_OPENCV_CUDAOPTFLOW)

if (gpu) if (gpu)

{ {

Ptr<KeypointBasedMotionEstimatorGpu> kbest = makePtr<KeypointBasedMotionEstimatorGpu>(est); Ptr <KeypointBasedMotionEstimatorGpu> kbest = makePtr <KeypointBasedMotionEstimatorGpu> (est);

kbest->setOutlierRejector(outlierRejector); kbest-> setOutlierRejector (outlierRejector);

return kbest; return kbest;

} }

#else#else

CV_Assert(gpu == false && "CUDA modules are not available"); CV_Assert (gpu == false && "CUDA modules are not available");

#endif#endif

Ptr<KeypointBasedMotionEstimator> kbest = makePtr<KeypointBasedMotionEstimator>(est); Ptr <KeypointBasedMotionEstimator> kbest = makePtr <KeypointBasedMotionEstimator> (est);

kbest->setDetector(GFTTDetector::create(argi(prefix + "nkps"))); kbest-> setDetector (GFTTDetector :: create (argi (prefix + "nkps")));

kbest->setOutlierRejector(outlierRejector); kbest-> setOutlierRejector (outlierRejector);

return kbest; return kbest;

} }

private:private:

bool gpu; bool gpu;

string prefix; string prefix;

};};

class MotionEstimatorL1Builder : public IMotionEstimatorBuilderclass MotionEstimatorL1Builder: public IMotionEstimatorBuilder

{{

public:public:

MotionEstimatorL1Builder(CommandLineParser &command, bool use_gpu, const string &_prefix = "") MotionEstimatorL1Builder (CommandLineParser & command, bool use_gpu, const string & _prefix = "")

: IMotionEstimatorBuilder(command), gpu(use_gpu), prefix(_prefix) : IMotionEstimatorBuilder (command), gpu (use_gpu), prefix (_prefix)

virtual Ptr<ImageMotionEstimatorBase> build() virtual Ptr <ImageMotionEstimatorBase> build ()

{ {

Ptr<MotionEstimatorL1> est = makePtr<MotionEstimatorL1>(motionModel(arg(prefix + "model"))); Ptr <MotionEstimatorL1> est = makePtr <MotionEstimatorL1> (motionModel (arg (prefix + "model")));

Ptr<IOutlierRejector> outlierRejector = makePtr<NullOutlierRejector>(); Ptr <IOutlierRejector> outlierRejector = makePtr <NullOutlierRejector> ();

if (arg(prefix + "local-outlier-rejection") == "yes") if (arg (prefix + "local-outlier-rejection") == "yes")

{ {

Ptr<TranslationBasedLocalOutlierRejector> tblor = makePtr<TranslationBasedLocalOutlierRejector>(); Ptr <TranslationBasedLocalOutlierRejector> tblor = makePtr <TranslationBasedLocalOutlierRejector> ();

RansacParams ransacParams = tblor->ransacParams(); RansacParams ransacParams = tblor-> ransacParams ();

if (arg(prefix + "thresh") != "auto") if (arg (prefix + "thresh")! = "auto")

ransacParams.thresh = argf(prefix + "thresh"); ransacParams.thresh = argf (prefix + "thresh");

tblor->setRansacParams(ransacParams); tblor-> setRansacParams (ransacParams);

outlierRejector = tblor; outlierRejector = tblor;

} }

if defined(HAVE_OPENCV_CUDAIMGPROC) && defined(HAVE_OPENCV_CUDAOPTFLOW)if defined (HAVE_OPENCV_CUDAIMGPROC) && defined (HAVE_OPENCV_CUDAOPTFLOW)

if (gpu) if (gpu)

{ {

Ptr<KeypointBasedMotionEstimatorGpu> kbest = makePtr<KeypointBasedMotionEstimatorGpu>(est); Ptr <KeypointBasedMotionEstimatorGpu> kbest = makePtr <KeypointBasedMotionEstimatorGpu> (est);

kbest->setOutlierRejector(outlierRejector); kbest-> setOutlierRejector (outlierRejector);

return kbest; return kbest;

} }

#else#else

CV_Assert(gpu == false && "CUDA modules are not available"); CV_Assert (gpu == false && "CUDA modules are not available");

#endif#endif

Ptr<KeypointBasedMotionEstimator> kbest = makePtr<KeypointBasedMotionEstimator>(est); Ptr <KeypointBasedMotionEstimator> kbest = makePtr <KeypointBasedMotionEstimator> (est);

kbest->setDetector(GFTTDetector::create(argi(prefix + "nkps"))); kbest-> setDetector (GFTTDetector :: create (argi (prefix + "nkps")));

kbest->setOutlierRejector(outlierRejector); kbest-> setOutlierRejector (outlierRejector);

return kbest; return kbest;

}}

private:private:

bool gpu; bool gpu;

string prefix; string prefix;

현재 존재하고 있는 제품은 앞서 제시했듯, 소프트웨어와 짐벌 장치 두 종류가 존재한다. 각 경우 모두 각자가 가지는 장, 단점이 존재한다. 소프트웨어의 경우 스마트폰으로만 촬영할 수 있지만 흔들림 보정 성능이 별로 좋지 않다는 단점이 있고, 짐벌 장치는 흔들림 보정 성능은 뛰어나지만 휴대성이 떨어진다는 단점이 있다.There are two kinds of software and gimbal device, as mentioned above. In each case, there is a chapter and a disadvantage of each. Software can shoot only with smartphone, but it has a disadvantage that shake correction performance is not very good, and gimbal device is excellent in shake correction performance, but has a drawback in that it is not portable.

위 두 종류의 제품들과 차별적으로, 본 발명의 일 실시예에 따른 외장 IMU 센서를 이용한 동영상 보정 방법의 경우에는 어플리케이션 형식으로 뛰어난 휴대성을 지닐 뿐만 아니라, IMU 센서를 이용해 보정함으로써 더 뛰어난 흔들림 보정 성능을 보여주게 된다.In contrast to the above two types of products, in the case of the moving image correction method using the external IMU sensor according to the embodiment of the present invention, not only has excellent portability in an application format but also is corrected using the IMU sensor, Performance.

특히, 기존에 존재했던 어플리케이션들의 문제점인 화각이 좁아진다는 문제점에 대해 본 완성 제품의 경우에는 가장 넓은 화각을 가질 수 있었다. 또한 요(yaw) 방향의 흔들림 보정뿐만 아니라 피치(Pitch) 방향의 흔들림 보정까지 함으로써 더 나은 성능을 자랑한다.Particularly, in the case of the present finished product, the problem that the angle of view, which is a problem of existing applications, narrows. It also has better performance by not only stabilizing the yaw direction but also compensating the pitch in the pitch direction.

본 발명에 대하여 9 블락 비즈니스 모델 캔버스(9 Block Business Model Canvas)를 기준으로 비즈니스 모델을 구축하였다. 본 발명의 고객은 사진 동영상 촬영에 관심이 있는 모든 스마트폰 이용자이며, 어플리케이션에서 광고를 통해 수익을 얻는 구조이기 때문에, 넓은 범위로 고객을 타겟팅하였다.For the present invention, a business model was constructed based on the 9 Block Business Model Canvas. The customer of the present invention is a smartphone user who is interested in photographic movie shooting, and has a wide range of customers because it is a structure that earns profit through advertisement in an application.

본 발명의 제공가치는 스마트폰 동영상 촬영 시 흔들림이 발생하는 불편함을 해소할 수 있고, IMU 센서 이외의 외부 장치가 필요하지 않아 사용하기 편리하며, IMU 센서를 이용해서 기존 제품들의 성능을 개선하였다. 구체적으로, 요(Yaw) 방향의 보정뿐만 아니라, 롤(Roll), 피치(Pitch) 방향의 흔들림 보정이 가능하고, 블러링(Blurring) 현상을 최소화 할 수 있으며, 급작스러운 흔들림에도 안정적인 보정이 가능하다.The provided value of the present invention can solve the inconvenience of shaking during shooting of a smartphone, and is easy to use because an external device other than the IMU sensor is not needed, and the performance of the existing products is improved by using the IMU sensor . Concretely, it is possible not only to correct the yaw direction but also to correct the shake in the roll and pitch directions, to minimize the blurring phenomenon, and to perform the stable correction even in the sudden fluctuation. Do.

또한, 기존 회사들은 짐벌 등 하드웨어 장치를 주문, 제작해서 공급하거나 IMU 데이터를 활용하지 않은 어플리케이션을 통해 서비스를 제공하고 있다. 따라서, 앱 스토어를 통해 고객에게 서비스를 제공하여, 하드웨어 채널에 비해 고객들이 접근하기 쉽기 때문에, 자체 인터넷 홈페이지를 통해 외장 IMU를 판매한다. 고객의 피드백을 통한 지속적인 어플리케이션 업데이트를 통해 경쟁력 유지할 수 있고, 흔들림 보정 이외에도 IMU데이터를 활용하여 다양한 기능을 개발하여 제공한다. 3D 이미지, 파노라마, 3D 이모티콘 등의 기능을 제공할 수 있다. 그리고, 업데이트가 소프트웨어 개발을 기본으로 하기 때문에 큰 비용이 소모되지 않는다.In addition, existing companies are providing services through ordering, manufacturing and supplying hardware devices such as gimbals, or applications that do not utilize IMU data. Therefore, since the service is provided to the customer through the App Store and the customer is more accessible than the hardware channel, the external IMU is sold through the Internet homepage. We can maintain competitiveness through continuous application update through customer feedback. In addition to shake correction, IMU data is used to develop various functions. 3D images, panoramas, 3D emoticons, and more. And because the update is based on software development, it does not cost a lot.

또한, 본 발명은 동영상이 서버에서 보정이 진행되는 동안 외부기업의 광고를 시청하게 하여 수익을 발생시키며, IMU 센서를 원가부근으로 판매하고, 흔들림 보정등의 기능을 무료로 제공하여 고객의 숫자를 키워 광고주들의 투자를 유도한다. 본 발명의 좋은 보정 퍼포먼스를 유지하기 위해 프로그래밍 능력을 가진 인적자원을 확보하는 것이 중요하고, 이윤을 창출하기 위해서는 IMU 센서 제작 기업, 그리고 광고주들과의 우호적인 관계를 확보하는 것이 중요하다.In addition, the present invention enables revenue generation by allowing an advertisement of an external company to be watched while a moving image is being corrected in a server, selling an IMU sensor near a cost, and providing free functions such as a shake correction, To attract investors. In order to maintain the good calibration performance of the present invention, it is important to secure human resources with programming ability. In order to generate profits, it is important to establish a friendly relationship with the IMU sensor manufacturing company and advertisers.

또한, IMU 센서 데이터와 특징점 찾기를 이용하여 흔들림 보정 알고리즘 개발 및 제공하며, 인터넷을 통한 IMU 센서를 판매하며, 광고를 원하는 기업들과 관계가 중요할 뿐 아니라, IMU 센서 공급업체와의 교섭도 매우 중요하다. 본 발명의 비즈니즈적 관점에서, IMU 센서를 구매하고 소비자들에게 유통하는데 들어가는 비용 및 어플리케이션의 개발, 유지, 보수비용이 들 것으로 예상된다.In addition, IMU sensor data and feature point search are used to develop and provide shake correction algorithms, to sell IMU sensors over the Internet, to deal with companies that want to advertise, and to negotiate with IMU sensor suppliers It is important. From the business viewpoint of the present invention, it is expected that the costs of developing IMU sensors and distributing them to consumers, and the development, maintenance, and repairing of applications are expected.

본 발명의 일 실시예에 따른 외장 IMU 센서를 이용한 동영상 보정 방법은 기존에 존재하는 어플리케이션이 롤(roll)과 피치(pitch)에 대한 보정을 잘하지 못하는 점을 해결하기 위해서 IMU 센서를 사용하였다. IMU 센서에서 얻은 각도 데이터를 이용하여 영상 비율을 보정하는 방법으로 후처리를 할 수 있고, 피치(Pitch) 방향으로 흔든 영상에 대해서 캡쳐된 영상 비율을 바꾸는 방법으로, 화면 비율을 각도에 맞게 바꿔주고 트리밍(triming)하는 방법으로 영상을 보정할 수 있다. 이 방법을 영상에 적용하기 위해서는 각도와 화면 비율 변화 사이의 명확한 관계식을 찾아내고 이를 영상에 적용시켜야 된다. 또한, 롤(Roll)에 대해서도 같은 방법으로 보정하는 방법을 구현해야 한다.The motion compensation method using an external IMU sensor according to an embodiment of the present invention uses an IMU sensor to solve the problem that an existing application does not correct the roll and the pitch. It is possible to perform post-processing by correcting the image ratio using the angle data obtained from the IMU sensor, and by changing the image ratio captured for the image that is staggered in the pitch direction, The image can be corrected by a method of trimming. To apply this method to an image, a clear relationship between angle and aspect ratio change must be found and applied to the image. It is also necessary to implement a method of correcting rolls in the same way.

컴퓨터 CPU를 이용하여 후보정을 하기 때문에 보정 과정에서 컴퓨터 그래픽 카드를 사용할 수 있다. 서버 코딩에 CUDA method를 추가하여 영상 보정 성능과 속도를 높일 수 있다.You can use your computer graphics card in the calibration process because you are using a computer CPU. CUDA method can be added to server coding to improve image correction performance and speed.

또한, 트림 비율(trim ratio), 모자이크(mosaic), 디블러링 민감도(deblurring sensitivity), 스무싱(smoothing), 슬라이딩 윈도 인라이어 비율( sliding window inlier ratio), 아웃라이어 비율(outlier ratio)등 값에 따라 영상 보정이 달라진다. 같은 값를 사용하더라도 흔들림 정도, 흔들림 방향에 따라 영상 보정 성능이 달라졌다. 때문에 영상의 흔들림 속도, 각도, 방향 등에 따라서 위 값들의 최적값을 찾을 수 있다면 더 선명히 보정된 영상을 얻을 수 있다.It is also possible to adjust the values of the trim ratio, mosaic, deblurring sensitivity, smoothing, sliding window inlier ratio, outlier ratio, etc. The image correction is different. Even if the same value was used, the image correction performance was changed according to the shake degree and the shake direction. Therefore, if the optimum value of the above values can be found depending on the shaking speed, angle, and direction of the image, a more clearly corrected image can be obtained.

또한, 동영상 흔들림 보정 외에도, 스마트폰이 돌아간 각도와 촬영된 영상을 통해 특징점을 매칭 함으로써 파노라마 사진을 만들 수 있다. 그리고, 한 물체의 형상을 영상으로 촬영함으로써 3D 재구성(reconstruction) 할 수 있다. 스마트폰의 위치와 영상 특징점 매칭을 통해 3D 이미징(imaging)이 가능하다.In addition to video stabilization, you can create a panoramic picture by matching the feature points with the angle of the smartphone and the captured image. Then, 3D reconstruction can be performed by photographing the shape of an object as an image. 3D imaging is possible through smartphone location and image feature point matching.

도 6은 본 발명의 일 실시예에 따른 동영상 보정 방법의 흐름도를 도시한 도면이다. 도 6에 있어서, 우선, S100 단계에서 사용자 단말기로 동영상을 촬영함과 동시에 사용자 단말기에 연결된 외장 IMU 센서를 통해 시간에 따른 사용자 단말기의 롤(roll), 피치(pitch), 요(yaw) 값과 x,y,z 축 방향의 변위 데이터를 동영상 데이터와 함께 저장한다. 그 다음, S200 단계에서 사용자 단말기에 저장된 변위 데이터와 동영상 데이터를 서버에 전송하며, S300 단계에서 서버에 전송된 상기 변위 데이터를 이용하여 전송된 동영상 데이터를 보정한다. 이 때, 동영상 데이터의 보정은 전송된 동영상 데이터에서 촬영된 물체들의 특징점들을 검색하여, 각 특징점들의 분포를 찾고, 전송된 동영상 데이터의 배경 내에서 특정 물체의 위치를 찾거나 특정 물체의 운동을 추적하여 동영상의 흔들림을 보정할 수 있으며, 나아가, 전송된 동영상 데이터에서 피치(Pitch) 운동에 대해 해당 각도만큼 영상을 사다리꼴 형태로 변형하여, 물체들의 특징점들을 더 쉽게 찾을 수 있다. 그 다음, S400 단계에서 서버로부터 사용자 단말기에 보정된 동영상 데이터를 전송한다.6 is a flowchart illustrating a moving image correction method according to an embodiment of the present invention. 6, first, at step S100, a motion picture is taken to a user terminal, and at the same time, a roll, a pitch, a yaw value of a user terminal, and stores the displacement data in the x, y, and z axis directions together with the moving image data. Next, in step S200, the displacement data and the moving image data stored in the user terminal are transmitted to the server. In step S300, the transmitted moving image data is corrected using the displacement data transmitted to the server. At this time, the correction of the moving image data is performed by searching the characteristic points of the objects photographed in the transmitted moving image data, finding the distribution of each characteristic point, locating a specific object within the background of the transmitted moving image data, In addition, it is possible to more easily find the feature points of the objects by transforming the image into a trapezoidal shape by the corresponding angle with respect to the pitch motion in the transmitted moving image data. Then, in step S400, the server transmits the corrected moving image data to the user terminal.

본 발명은 도면에 도시된 실시예를 참고로 설명되었으나 이는 예시적인 것에 불과하며, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 다른 실시예가 가능하다는 점을 이해할 것이다. 따라서 본 발명의 진정한 기술적 보호 범위는 첨부된 특허청구범위의 기술적 사상에 의하여 정해져야 할 것이다.While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the scope of the invention as defined by the appended claims. will be. Accordingly, the true scope of the present invention should be determined by the technical idea of the appended claims.

Claims (6)

사용자 단말기로 촬영한 동영상을 보정하는 방법으로서,
사용자 단말기로 동영상을 촬영 시 IMU 센서를 이용하여 상기 사용자 단말기의 롤(roll), 피치(pitch), 요(yaw) 값과 상기 사용자 단말기의 x,y,z 축 방향의 변위 데이터를 측정하여 저장하는 단계;
저장된 상기 롤, 피치, 요 값과 변위 데이터 및 상기 동영상 데이터를 상기 사용자 단말기에서 서버에 전송하는 단계; 및
상기 서버에서 상기 롤, 피치, 요 값과 상기 변위 데이터에 기초하여 전송된 상기 동영상 데이터를 보정하여, 상기 사용자 단말기에 되전송하는 단계를 포함하되,
상기 IMU 센서는 상기 사용자 단말기에 착탈 가능하게 결합되는
동영상 보정 방법.
A method for correcting a moving image captured by a user terminal,
Pitch, and yaw values of the user terminal and displacement data in the x, y, and z-axis directions of the user terminal using the IMU sensor when capturing a moving image with the user terminal ;
Transmitting the stored roll, pitch, yaw and displacement data and the moving image data to the server at the user terminal; And
And correcting the moving picture data transmitted based on the roll, pitch, yaw and displacement data at the server, and transmitting the corrected moving picture data back to the user terminal,
The IMU sensor is detachably coupled to the user terminal
How to calibrate your video.
제 1 항에 있어서,
상기 동영상 데이터의 보정은,
전송된 상기 동영상 데이터에서 촬영된 물체들의 특징점들을 검색하여, 상기 각 특징점들의 분포를 찾고, 전송된 상기 동영상 데이터의 배경 내에서 특정 물체의 위치를 찾거나 특정 물체의 운동을 추적하여 동영상의 흔들림을 보정함에 의해, 이루어지는 동영상 보정 방법.
The method according to claim 1,
The correction of the motion picture data may be performed,
Searching the minutiae points of the objects photographed in the transmitted moving image data, searching the distribution of each of the minutiae points, locating a specific object within the background of the transmitted moving image data, or tracking the movement of a specific object, And correcting the moving image.
제 2 항에 있어서,
상기 촬영된 물체들의 특징점은,
전송된 상기 동영상 데이터에서 피치(Pitch) 운동에 대해 해당 각도만큼 영상을 사다리꼴 형태로 변형함에 의해 검색되는 하는 동영상 보정 방법.
3. The method of claim 2,
The feature points of the photographed objects include,
Wherein the moving image is searched by transforming the image into a trapezoidal shape by a corresponding angle with respect to a pitch motion in the transmitted moving image data.
동영상을 촬영하는 동영상 촬영부를 구비한 사용자 단말기;
상기 사용자 단말기에 착탈 가능하게 결합되며, 사용자 단말기로 동영상을 촬영 시 상기 사용자 단말기의 롤(roll), 피치(pitch), 요(yaw) 값과 상기 사용자 단말기의 x,y,z 축 방향의 변위 데이터를 측정하는 IMU 센서;
상기 롤, 피치, 요 값과 상기 변위 데이터에 기초하여 상기 서버에서 전송된 상기 동영상 데이터를 보정한 후 보정된 동영상을 사용자 단말기에 되전송하는 동영상 보정부를 포함하는 동영상 보정 시스템.
A user terminal having a moving image capturing section for capturing a moving image;
A pitch and a yaw value of the user terminal and a displacement of the user terminal in x, y, and z-axis directions when capturing a moving image with the user terminal, An IMU sensor for measuring data;
And a moving picture corrector for correcting the moving picture data transmitted from the server based on the roll, pitch, yaw value and the displacement data, and transmitting the corrected moving picture back to the user terminal.
제 4 항에 있어서,
상기 동영상 보정부에 의한 동영상 데이터의 보정은,
전송된 상기 동영상 데이터에서 촬영된 물체들의 특징점들을 검색하여, 상기 각 특징점들의 분포를 찾고, 전송된 상기 동영상 데이터의 배경 내에서 특정 물체의 위치를 찾거나 특정 물체의 운동을 추적하여 동영상의 흔들림을 보정함에 의해, 이루어지는 동영상 보정 시스템.
5. The method of claim 4,
Wherein the correction of the moving picture data by the moving picture correction unit
Searching the minutiae points of the objects photographed in the transmitted moving image data, searching the distribution of each of the minutiae points, locating a specific object within the background of the transmitted moving image data, or tracking the movement of a specific object, And correcting the moving image.
제 5 항에 있어서,
상기 촬영된 물체들의 특징점은,
전송된 상기 동영상 데이터에서 피치(Pitch) 운동에 대해 해당 각도만큼 영상을 사다리꼴 형태로 변형함에 의해 검색 되는 동영상 보정 시스템.
6. The method of claim 5,
The feature points of the photographed objects include,
Wherein the moving image is searched by transforming the image into a trapezoidal shape by a corresponding angle with respect to a pitch motion in the transmitted moving image data.
KR1020170106050A 2017-08-22 2017-08-22 Image correction system and method KR20190021009A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020170106050A KR20190021009A (en) 2017-08-22 2017-08-22 Image correction system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020170106050A KR20190021009A (en) 2017-08-22 2017-08-22 Image correction system and method

Publications (1)

Publication Number Publication Date
KR20190021009A true KR20190021009A (en) 2019-03-05

Family

ID=65760483

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020170106050A KR20190021009A (en) 2017-08-22 2017-08-22 Image correction system and method

Country Status (1)

Country Link
KR (1) KR20190021009A (en)

Similar Documents

Publication Publication Date Title
US9674440B2 (en) Systems and methods for digital video stabilization via constraint-based rotation smoothing
US10404915B1 (en) Method and system for panoramic video image stabilization
US9124804B2 (en) Using accelerometer information for determining orientation of pictures and video images
CN109788189B (en) Five-dimensional video stabilization device and method for fusing camera and gyroscope
US10250800B2 (en) Computing device having an interactive method for sharing events
AU2017401161B2 (en) Image display method and electronic device
US10600188B2 (en) Method and system for correcting field of view using user terminal information upon playback of 360-degree image
WO2015183636A1 (en) Photo-video-camera with dynamic orientation lock, constant framing and defined aspect ratio
KR20160026251A (en) Method and electronic device for taking a photograph
US10051180B1 (en) Method and system for removing an obstructing object in a panoramic image
KR20150134960A (en) Method and apparatus for recommending photo composition
KR102330264B1 (en) Electronic device for playing movie based on movment information and operating mehtod thereof
US10911677B1 (en) Multi-camera video stabilization techniques
US20230109047A1 (en) Methods and apparatus for re-stabilizing video in post-processing
KR20190021009A (en) Image correction system and method
KR101906718B1 (en) Method and system for correcting play areas using user terminal information during 360 degree content playback
JP2007208596A (en) Data reproducing apparatus, and data reproducing method and program
TW201738649A (en) Corresponding method between panorama video and message and system thereof having cloud software calculator to obtain an angle value and a first time point from the cloud database, and calculate and search a picture of panorama video corresponding to the message
WO2022180459A1 (en) Image processing method, recording medium, image processing apparatus, and image processing system