KR20210086812A - Method for processing a video and an electronic device supporting the same - Google Patents

Method for processing a video and an electronic device supporting the same Download PDF

Info

Publication number
KR20210086812A
KR20210086812A KR1020190178495A KR20190178495A KR20210086812A KR 20210086812 A KR20210086812 A KR 20210086812A KR 1020190178495 A KR1020190178495 A KR 1020190178495A KR 20190178495 A KR20190178495 A KR 20190178495A KR 20210086812 A KR20210086812 A KR 20210086812A
Authority
KR
South Korea
Prior art keywords
frames
processor
background
frame
electronic device
Prior art date
Application number
KR1020190178495A
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 KR1020190178495A priority Critical patent/KR20210086812A/en
Priority to PCT/KR2020/019308 priority patent/WO2021137584A1/en
Publication of KR20210086812A publication Critical patent/KR20210086812A/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/272Means for inserting a foreground image in a background image, i.e. inlay, outlay
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8455Structuring of content, e.g. decomposing content into time segments involving pointers to the content, e.g. pointers to the I-frames of the video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region
    • H04N5/144Movement detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Image Analysis (AREA)

Abstract

Disclosed is an electronic device to easily create a video which is played repeatedly. According to one embodiment of the present invention, the electronic device comprises a display, a memory, and a processor. The processor extracts a plurality of frames from a first video stored in the memory; divides an object area in which a first object is disposed and a background area other than the object area for each of the plurality of frames; determines a key frame on the basis of an arrangement shape of the first object among the plurality of frames; determines a motion region in which motion occurs in the background area of background frames other than the key frame among the plurality of frames; generates a background image by combining the motion regions of the background frames; and generates a second video by combining the object area of the key frame and the background image. Various other embodiments understood through the description are possible.

Description

동영상 처리 방법 및 이를 지원하는 전자 장치{Method for processing a video and an electronic device supporting the same}A video processing method and an electronic device supporting the same

본 문서에서 개시되는 실시 예들은, 동영상을 처리하는 전자 장치 및 영상 처리 방법과 관련된다.Embodiments disclosed in this document relate to an electronic device for processing a video and an image processing method.

스마트폰 또는 태블릿 PC와 같은 전자 장치는 음성 통화, 사진/동영상 촬영, 사진/동영상 편집과 같은 다양한 기능을 수행할 수 있다. 예를 들어, 상기 전자 장치는 사진 또는 동영상을 촬영할 수 있고, 촬영된 사진 또는 동영상을 저장할 수 있다. 상기 전자 장치는 사진 또는 동영상을 변환하거나 편집할 수 있는 어플리케이션을 실행할 수 있다. 사용자는 상기 어플리케이션을 이용하여, 사진 또는 동영상을 편집할 수 있다.An electronic device such as a smart phone or a tablet PC may perform various functions such as voice call, photo/video recording, and photo/video editing. For example, the electronic device may take a photo or a video, and store the captured photo or video. The electronic device may execute an application capable of converting or editing a photo or video. A user may edit a photo or a video by using the application.

최근에는 저장된 동영상에서 간단한 움직임을 반복적으로 재생하는 영상(예: GIF 파일)을 생성할 수 있게 하는 어플리케이션이 개발되고 있다.Recently, an application capable of generating an image (eg, a GIF file) that repeatedly reproduces simple motions from stored moving images is being developed.

종래 기술에 따른 전자 장치는 간단한 움직임을 반복적으로 재생하는 영상을 생성하는 경우, i) 고정된 카메라 각도로 촬영된 영상이 있어야 하고, ii) 동영상 편집을 위한 어플리케이션을 실행하고, iii) 해당 어플리케이션에서 객체 영역 및 움직임이 발생하는 배경 영역을 개별적으로 설정해야 하는 불편함이 있다.When the electronic device according to the prior art generates an image that repeatedly reproduces a simple movement, i) there must be an image captured at a fixed camera angle, ii) execute an application for video editing, iii) in the corresponding application It is inconvenient to separately set the object area and the background area in which motion occurs.

본 문서에서는 기술은 촬영되거나 저장된 동영상에서 객체를 인식하고, 객체에 의해 가려졌던 배경을 복원하여 간단한 움직임을 반복적으로 재생하는 영상을 생성하는 전자 장치를 제공할 수 있다.In this document, the technology may provide an electronic device that recognizes an object in a captured or stored video, restores a background covered by the object, and generates an image that repeatedly reproduces simple movements.

전자 장치는 디스플레이, 메모리, 및 프로세서를 포함하고, 상기 프로세서는 상기 메모리에 저장된 제1 동영상에서, 복수의 프레임들을 추출하고, 상기 복수의 프레임들 각각에 대해, 제1 객체가 배치되는 객체 영역과 상기 객체 영역을 제외한 배경 영역을 구분하고, 상기 복수의 프레임들 중, 상기 제1 객체의 배치 형태를 기반으로 키 프레임을 결정하고, 상기 복수의 프레임들 중 상기 키 프레임을 제외한 배경 프레임들의 배경 영역에서 움직임이 발생한 모션 영역을 결정하고, 상기 배경 프레임들의 모션 영역을 결합하여 배경 영상을 생성하고, 상기 키 프레임의 객체 영역과 상기 배경 영상을 결합하여, 제2 동영상을 생성할 수 있다.The electronic device includes a display, a memory, and a processor, wherein the processor extracts a plurality of frames from a first moving picture stored in the memory, and, for each of the plurality of frames, an object area in which a first object is disposed; classifying a background region excluding the object region, determining a key frame from among the plurality of frames based on an arrangement shape of the first object, and determining a background region of background frames excluding the key frame from among the plurality of frames may determine a motion region in which motion occurs, generate a background image by combining the motion regions of the background frames, and combine the object region of the key frame and the background image to generate a second video.

본 문서에 개시되는 실시 예들에 따른 전자 장치는 촬영되거나 저장된 동영상에서 객체를 인식하고, 객체에 의해 가려졌던 배경을 복원하여 간단한 움직임을 반복적으로 재생하는 영상을 생성할 수 있다.The electronic device according to the embodiments disclosed in this document may recognize an object in a captured or stored video, restore a background covered by the object, and generate an image in which a simple movement is repeatedly reproduced.

본 문서에 개시되는 실시 예에 따른 전자 장치는 사용자가 일반적으로 촬영한 동영상에서 피사체와 배경을 분류하고, 배경에서 움직임의 속성을 분석하고, 피사체와 배경의 움직임을 이질감 없이 합성할 수 있다. The electronic device according to an embodiment disclosed in this document may classify a subject and a background in a video generally captured by a user, analyze a property of a motion in the background, and synthesize the motion of the subject and the background without any difference.

본 문서에 개시되는 실시 예에 따른 전자 장치는 고품질의 원본 영상을 얻기 위한 카메라의 고정, 피사체의 선택 및 움직임을 재생하기 위한 영역 선택의 번거로운 절차 없이 손쉽게 반복 재생되는 영상을 생성할 수 있다An electronic device according to an embodiment disclosed in this document can easily generate an image that is reproduced repeatedly without cumbersome procedures of fixing a camera to obtain a high-quality original image, selecting a subject, and selecting an area for reproducing motion.

이 외에, 본 문서를 통해 직접적 또는 간접적으로 파악되는 다양한 효과들이 제공될 수 있다. In addition, various effects directly or indirectly identified through this document may be provided.

도 1은 다양한 실시예들에 따른, 네트워크 환경 내의 전자 장치이다.
도 2는 다양한 실시예에 따른 동영상 처리 방법을 나타낸다.
도 3은 다양한 실시예에 따른 프레임 안정화를 나타낸다.
도 4는 다양한 실시예에 따른 객체 영역과 배경 영역의 구분을 나타낸다.
도 5는 다양한 실시예에 따른 키 프레임과 배경 프레임의 분류를 나타낸다.
도 6은 다양한 실시예에 따른 모션 영역의 결정을 나타낸다.
도 7은 다양한 실시예에 따른 제2 동영상의 생성을 나타낸다.
도 8은 다양한 실시예에 따른 가중치를 적용하여 제2 동영상을 합성하는 예시도이다.
도면의 설명과 관련하여, 동일 또는 유사한 구성요소에 대해서는 동일 또는 유사한 참조 부호가 사용될 수 있다.
1 is an electronic device in a network environment, according to various embodiments of the present disclosure;
2 illustrates a video processing method according to various embodiments.
3 illustrates frame stabilization according to various embodiments.
4 illustrates the division of an object area and a background area according to various embodiments of the present disclosure.
5 illustrates classification of a key frame and a background frame according to various embodiments.
6 illustrates a determination of a motion region according to various embodiments.
7 illustrates generation of a second video according to various embodiments.
8 is an exemplary diagram of synthesizing a second video by applying a weight according to various embodiments of the present disclosure;
In connection with the description of the drawings, the same or similar reference numerals may be used for the same or similar components.

이하, 본 문서의 다양한 실시예가 첨부된 도면을 참조하여 기재된다. 그러나, 이는 본 문서에 기재된 기술을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 문서의 실시예의 다양한 변경(modifications), 균등물(equivalents), 및/또는 대체물(alternatives)을 포함하는 것으로 이해되어야 한다. 도면의 설명과 관련하여, 유사한 구성요소에 대해서는 유사한 참조 부호가 사용될 수 있다.Hereinafter, various embodiments of the present document will be described with reference to the accompanying drawings. However, it is not intended to limit the technology described in this document to specific embodiments, and it should be understood to include various modifications, equivalents, and/or alternatives of the embodiments of this document. . In connection with the description of the drawings, like reference numerals may be used for like components.

도 1은 다양한 실시 예들에 따른 네트워크 환경(100) 내의 전자 장치(101)의 블록도 이다. 본 문서에 개시된 다양한 실시 예들에 따른 전자 장치는 다양한 형태의 장치가 될 수 있다. 전자 장치는, 예를 들면, 휴대용 통신 장치(예: 스마트폰), 컴퓨터 장치(예: PDA(personal digital assistant), 태블릿 PC(tablet PC), 랩탑 PC(데스크톱 PC, 워크스테이션, 또는 서버), 휴대용 멀티미디어 장치(예: 전자 책 리더기 또는 MP3 플레이어), 휴대용 의료 기기(예: 심박, 혈당, 혈압, 또는 체온 측정기), 카메라, 또는 웨어러블 장치 중 적어도 하나를 포함할 수 있다. 웨어러블 장치는 액세서리 형(예: 시계, 반지, 팔찌, 발찌, 목걸이, 안경, 콘택트 렌즈, 또는 머리 착용 형 장치(head-mounted-device(HMD)), 직물 또는 의류 일체형(예: 전자 의복), 신체 부착 형(예: 스킨 패드 또는 문신), 또는 생체 이식 형 회로 중 적어도 하나를 포함할 수 있다. 어떤 실시 예들에서, 전자 장치는, 예를 들면, 텔레비전, DVD(digital video disk) 플레이어, 오디오 장치, 오디오 액세서리 장치(예: 스피커, 헤드폰, 또는 헤드 셋), 냉장고, 에어컨, 청소기, 오븐, 전자레인지, 세탁기, 공기 청정기, 셋톱 박스, 홈 오토메이션 컨트롤 패널, 보안 컨트롤 패널, 게임 콘솔, 전자 사전, 전자 키, 캠코더, 또는 전자 액자 중 적어도 하나를 포함할 수 있다.1 is a block diagram of an electronic device 101 in a network environment 100 according to various embodiments of the present disclosure. Electronic devices according to various embodiments disclosed in this document may be devices of various types. Electronic devices include, for example, portable communication devices (eg, smartphones), computer devices (eg, personal digital assistants), tablet PCs (tablet PCs), laptop PCs (desktop PCs, workstations, or servers); It may include at least one of a portable multimedia device (eg, an e-book reader or an MP3 player), a portable medical device (eg, a heart rate, blood sugar, blood pressure, or body temperature monitor), a camera, or a wearable device. (e.g. watches, rings, bracelets, anklets, necklaces, eyeglasses, contact lenses, or head-mounted-devices (HMDs)); : skin pad or tattoo), or a bioimplantable circuit.In some embodiments, the electronic device is, for example, a television, a digital video disk (DVD) player, an audio device, an audio accessory device. (e.g. speakers, headphones, or headsets), refrigerators, air conditioners, vacuum cleaners, ovens, microwaves, washing machines, air purifiers, set-top boxes, home automation control panels, security control panels, game consoles, electronic dictionaries, electronic keys, camcorders , or at least one of an electronic picture frame.

다른 실시 예에서, 전자 장치는 네비게이션 장치, 위성 항법 시스템(GNSS(global navigation satellite system)), EDR(event data recorder)(예: 차량/선박/비행기 용 블랙박스(black box)), 자동차 인포테인먼트 장치(예: 차량용 헤드-업 디스플레이), 산업용 또는 가정용 로봇, 드론(drone), ATM(automated teller machine), POS(point of sales) 기기, 계측 기기(예: 수도, 전기, 또는 가스 계측 기기), 또는 사물 인터넷 장치(예: 전구, 스프링클러 장치, 화재 경보기, 온도 조절기, 또는 가로등) 중 적어도 하나를 포함할 수 있다. 본 문서의 실시 예에 따른 전자 장치는 전술한 기기들에 한정되지 않으며, 또한, 예를 들면, 개인의 생체 정보(예: 심박 또는 혈당)의 측정 기능이 구비된 스마트폰의 경우처럼, 복수의 장치들의 기능들을 복합적으로 제공할 수 있다. 본 문서에서, 사용자라는 용어는 전자 장치를 사용하는 사람 또는 전자 장치를 사용하는 장치(예: 인공지능 전자 장치)를 지칭할 수 있다. In another embodiment, the electronic device may include a navigation device, a global navigation satellite system (GNSS), an event data recorder (EDR) (eg, a black box for a vehicle/vessel/airplane), and an automotive infotainment device. (e.g. head-up displays for vehicles), industrial or domestic robots, drones, automated teller machines (ATMs), point of sales (POS) instruments, metering instruments (e.g. water, electricity, or gas metering instruments); Alternatively, it may include at least one of an IoT device (eg, a light bulb, a sprinkler device, a fire alarm, a thermostat, or a street lamp). The electronic device according to the embodiment of this document is not limited to the above-described devices, and, for example, as in the case of a smartphone equipped with a function of measuring personal biometric information (eg, heart rate or blood sugar), a plurality of electronic devices The functions of the devices may be provided in a complex manner. In this document, the term user may refer to a person who uses an electronic device or a device (eg, an artificial intelligence electronic device) using the electronic device.

네트워크 환경(100)에서 전자 장치(101)는 제 1 네트워크(198)(예: 근거리 무선 통신 네트워크)를 통하여 전자 장치(102)와 통신하거나, 또는 제 2 네트워크(199)(예: 원거리 무선 통신 네트워크)를 통하여 전자 장치(104) 또는 서버(108)와 통신할 수 있다. 일실시예에 따르면, 전자 장치(101)는 서버(108)를 통하여 전자 장치(104)와 통신할 수 있다. 일실시예에 따르면, 전자 장치(101)는 프로세서(120), 메모리(130), 입력 장치(150), 음향 출력 장치(155), 표시 장치(160), 오디오 모듈(170), 센서 모듈(176), 인터페이스(177), 햅틱 모듈(179), 카메라 모듈(180), 전력 관리 모듈(210), 배터리(189), 통신 모듈(190), 가입자 식별 모듈(196), 또는 안테나 모듈(197)을 포함할 수 있다. 어떤 실시예에서는, 전자 장치(101)에는, 이 구성요소들 중 적어도 하나(예: 표시 장치(160) 또는 카메라 모듈(180))가 생략되거나, 하나 이상의 다른 구성요소가 추가될 수 있다. 어떤 실시예에서는, 이 구성요소들 중 일부들은 하나의 통합된 회로로 구현될 수 있다. 예를 들면, 센서 모듈(176)(예: 지문 센서, 홍채 센서, 또는 조도 센서)은 표시 장치(160)(예: 디스플레이)에 임베디드된 채 구현될 수 있다.In the network environment 100 , the electronic device 101 communicates with the electronic device 102 through a first network 198 (eg, a short-range wireless communication network), or a second network 199 (eg, a long-distance wireless communication network). network) and communicate with the electronic device 104 or the server 108 . According to an embodiment, the electronic device 101 may communicate with the electronic device 104 through the server 108 . According to an embodiment, the electronic device 101 includes a processor 120 , a memory 130 , an input device 150 , a sound output device 155 , a display device 160 , an audio module 170 , and a sensor module ( 176 , interface 177 , haptic module 179 , camera module 180 , power management module 210 , battery 189 , communication module 190 , subscriber identification module 196 , or antenna module 197 . ) may be included. In some embodiments, at least one of these components (eg, the display device 160 or the camera module 180 ) may be omitted or one or more other components may be added to the electronic device 101 . In some embodiments, some of these components may be implemented as one integrated circuit. For example, the sensor module 176 (eg, a fingerprint sensor, an iris sensor, or an illuminance sensor) may be implemented while being embedded in the display device 160 (eg, a display).

프로세서(120)는, 예를 들면, 소프트웨어(예: 프로그램(140))를 실행하여 프로세서(120)에 연결된 전자 장치(101)의 적어도 하나의 다른 구성요소(예: 하드웨어 또는 소프트웨어 구성요소)를 제어할 수 있고, 다양한 데이터 처리 또는 연산을 수행할 수 있다. 일실시예에 따르면, 데이터 처리 또는 연산의 적어도 일부로서, 프로세서(120)는 다른 구성요소(예: 센서 모듈(176) 또는 통신 모듈(190))로부터 수신된 명령 또는 데이터를 휘발성 메모리(132)에 로드하고, 휘발성 메모리(132)에 저장된 명령 또는 데이터를 처리하고, 결과 데이터를 비휘발성 메모리(134)에 저장할 수 있다. 일실시예에 따르면, 프로세서(120)는 메인 프로세서(121)(예: 중앙 처리 장치 또는 어플리케이션 프로세서), 및 이와는 독립적으로 또는 함께 운영 가능한 보조 프로세서(123)(예: 그래픽 처리 장치, 이미지 시그널 프로세서, 센서 허브 프로세서, 또는 커뮤니케이션 프로세서)를 포함할 수 있다. 추가적으로 또는 대체적으로, 보조 프로세서(123)는 메인 프로세서(121)보다 저전력을 사용하거나, 또는 지정된 기능에 특화되도록 설정될 수 있다. 보조 프로세서(123)는 메인 프로세서(121)와 별개로, 또는 그 일부로서 구현될 수 있다.The processor 120, for example, executes software (eg, the program 140) to execute at least one other component (eg, a hardware or software component) of the electronic device 101 connected to the processor 120 . It can control and perform various data processing or operations. According to one embodiment, as at least part of data processing or operation, the processor 120 converts commands or data received from other components (eg, the sensor module 176 or the communication module 190 ) to the volatile memory 132 . may be loaded into the volatile memory 132 , process commands or data stored in the volatile memory 132 , and store the resulting data in the non-volatile memory 134 . According to an embodiment, the processor 120 includes a main processor 121 (eg, a central processing unit or an application processor), and a secondary processor 123 (eg, a graphics processing unit, an image signal processor) that can be operated independently or in conjunction with the main processor 121 . , a sensor hub processor, or a communication processor). Additionally or alternatively, the auxiliary processor 123 may be configured to use less power than the main processor 121 or to be specialized for a designated function. The auxiliary processor 123 may be implemented separately from or as a part of the main processor 121 .

보조 프로세서(123)는, 예를 들면, 메인 프로세서(121)가 인액티브(예: 슬립) 상태에 있는 동안 메인 프로세서(121)를 대신하여, 또는 메인 프로세서(121)가 액티브(예: 어플리케이션 실행) 상태에 있는 동안 메인 프로세서(121)와 함께, 전자 장치(101)의 구성요소들 중 적어도 하나의 구성요소(예: 표시 장치(160), 센서 모듈(176), 또는 통신 모듈(190))와 관련된 기능 또는 상태들의 적어도 일부를 제어할 수 있다. 일실시예에 따르면, 보조 프로세서(123)(예: 이미지 시그널 프로세서 또는 커뮤니케이션 프로세서)는 기능적으로 관련 있는 다른 구성요소(예: 카메라 모듈(180) 또는 통신 모듈(190))의 일부로서 구현될 수 있다. The auxiliary processor 123 may be, for example, on behalf of the main processor 121 while the main processor 121 is in an inactive (eg, sleep) state, or when the main processor 121 is active (eg, executing an application). ), together with the main processor 121, at least one of the components of the electronic device 101 (eg, the display device 160, the sensor module 176, or the communication module 190) It is possible to control at least some of the related functions or states. According to an embodiment, the coprocessor 123 (eg, an image signal processor or a communication processor) may be implemented as part of another functionally related component (eg, the camera module 180 or the communication module 190). have.

메모리(130)는, 전자 장치(101)의 적어도 하나의 구성요소(예: 프로세서(120) 또는 센서모듈(176))에 의해 사용되는 다양한 데이터를 저장할 수 있다. 데이터는, 예를 들어, 소프트웨어(예: 프로그램(140)) 및, 이와 관련된 명령에 대한 입력 데이터 또는 출력 데이터를 포함할 수 있다. 메모리(130)는, 휘발성 메모리(132) 또는 비휘발성 메모리(134)를 포함할 수 있다. The memory 130 may store various data used by at least one component (eg, the processor 120 or the sensor module 176 ) of the electronic device 101 . The data may include, for example, input data or output data for software (eg, the program 140 ) and instructions related thereto. The memory 130 may include a volatile memory 132 or a non-volatile memory 134 .

프로그램(140)은 메모리(130)에 소프트웨어로서 저장될 수 있으며, 예를 들면, 운영 체제(142), 미들 웨어(144) 또는 어플리케이션(146)을 포함할 수 있다. The program 140 may be stored as software in the memory 130 , and may include, for example, an operating system 142 , middleware 144 , or an application 146 .

입력 장치(150)는, 전자 장치(101)의 구성요소(예: 프로세서(120))에 사용될 명령 또는 데이터를 전자 장치(101)의 외부(예: 사용자)로부터 수신할 수 있다. 입력 장치(150)는, 예를 들면, 마이크, 마우스, 키보드, 또는 디지털 펜(예: 스타일러스 펜)을 포함할 수 있다. The input device 150 may receive a command or data to be used by a component (eg, the processor 120 ) of the electronic device 101 from the outside (eg, a user) of the electronic device 101 . The input device 150 may include, for example, a microphone, a mouse, a keyboard, or a digital pen (eg, a stylus pen).

음향 출력 장치(155)는 음향 신호를 전자 장치(101)의 외부로 출력할 수 있다. 음향 출력 장치(155)는, 예를 들면, 스피커 또는 리시버를 포함할 수 있다. 스피커는 멀티미디어 재생 또는 녹음 재생과 같이 일반적인 용도로 사용될 수 있고, 리시버는 착신 전화를 수신하기 위해 사용될 수 있다. 일실시예에 따르면, 리시버는 스피커와 별개로, 또는 그 일부로서 구현될 수 있다.The sound output device 155 may output a sound signal to the outside of the electronic device 101 . The sound output device 155 may include, for example, a speaker or a receiver. The speaker can be used for general purposes such as multimedia playback or recording playback, and the receiver can be used to receive incoming calls. According to one embodiment, the receiver may be implemented separately from or as part of the speaker.

표시 장치(160)는 전자 장치(101)의 외부(예: 사용자)로 정보를 시각적으로 제공할 수 있다. 표시 장치(160)는, 예를 들면, 디스플레이, 홀로그램 장치, 또는 프로젝터 및 해당 장치를 제어하기 위한 제어 회로를 포함할 수 있다. 일실시예에 따르면, 표시 장치(160)는 터치를 감지하도록 설정된 터치 회로(touch circuitry), 또는 상기 터치에 의해 발생되는 힘의 세기를 측정하도록 설정된 센서 회로(예: 압력 센서)를 포함할 수 있다. The display device 160 may visually provide information to the outside (eg, a user) of the electronic device 101 . The display device 160 may include, for example, a display, a hologram device, or a projector and a control circuit for controlling the corresponding device. According to an embodiment, the display device 160 may include a touch circuitry configured to sense a touch or a sensor circuit (eg, a pressure sensor) configured to measure the intensity of a force generated by the touch. have.

오디오 모듈(170)은 소리를 전기 신호로 변환시키거나, 반대로 전기 신호를 소리로 변환시킬 수 있다. 일실시예에 따르면, 오디오 모듈(170)은, 입력 장치(150)를 통해 소리를 획득하거나, 음향 출력 장치(155), 또는 전자 장치(101)와 직접 또는 무선으로 연결된 외부 전자 장치(예: 전자 장치(102))(예: 스피커 또는 헤드폰)를 통해 소리를 출력할 수 있다.The audio module 170 may convert a sound into an electric signal or, conversely, convert an electric signal into a sound. According to an embodiment, the audio module 170 acquires a sound through the input device 150 , or an external electronic device (eg, a sound output device 155 ) connected directly or wirelessly with the electronic device 101 . The electronic device 102) (eg, a speaker or headphones) may output a sound.

센서 모듈(176)은 전자 장치(101)의 작동 상태(예: 전력 또는 온도), 또는 외부의 환경 상태(예: 사용자 상태)를 감지하고, 감지된 상태에 대응하는 전기 신호 또는 데이터 값을 생성할 수 있다. 일실시예에 따르면, 센서 모듈(176)은, 예를 들면, 제스처 센서, 자이로 센서, 기압 센서, 마그네틱 센서, 가속도 센서, 그립 센서, 근접 센서, 컬러 센서, IR(infrared) 센서, 생체 센서, 온도 센서, 습도 센서, 또는 조도 센서를 포함할 수 있다. The sensor module 176 detects an operating state (eg, power or temperature) of the electronic device 101 or an external environmental state (eg, user state), and generates an electrical signal or data value corresponding to the sensed state. can do. According to an embodiment, the sensor module 176 may include, for example, a gesture sensor, a gyro sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an IR (infrared) sensor, a biometric sensor, It may include a temperature sensor, a humidity sensor, or an illuminance sensor.

인터페이스(177)는 전자 장치(101)가 외부 전자 장치(예: 전자 장치(102))와 직접 또는 무선으로 연결되기 위해 사용될 수 있는 하나 이상의 지정된 프로토콜들을 지원할 수 있다. 일실시예에 따르면, 인터페이스(177)는, 예를 들면, HDMI(high definition multimedia interface), USB(universal serial bus) 인터페이스, SD카드 인터페이스, 또는 오디오 인터페이스를 포함할 수 있다.The interface 177 may support one or more specified protocols that may be used by the electronic device 101 to directly or wirelessly connect with an external electronic device (eg, the electronic device 102 ). According to an embodiment, the interface 177 may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, an SD card interface, or an audio interface.

연결 단자(178)는, 그를 통해서 전자 장치(101)가 외부 전자 장치(예: 전자 장치(102))와 물리적으로 연결될 수 있는 커넥터를 포함할 수 있다. 일실시예에 따르면, 연결 단자(178)는, 예를 들면, HDMI 커넥터, USB 커넥터, SD 카드 커넥터, 또는 오디오 커넥터(예: 헤드폰 커넥터)를 포함할 수 있다.The connection terminal 178 may include a connector through which the electronic device 101 can be physically connected to an external electronic device (eg, the electronic device 102 ). According to an embodiment, the connection terminal 178 may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (eg, a headphone connector).

햅틱 모듈(179)은 전기적 신호를 사용자가 촉각 또는 운동 감각을 통해서 인지할 수 있는 기계적인 자극(예: 진동 또는 움직임) 또는 전기적인 자극으로 변환할 수 있다. 일실시예에 따르면, 햅틱 모듈(179)은, 예를 들면, 모터, 압전 소자, 또는 전기 자극 장치를 포함할 수 있다.The haptic module 179 may convert an electrical signal into a mechanical stimulus (eg, vibration or movement) or an electrical stimulus that the user can perceive through tactile or kinesthetic sense. According to an embodiment, the haptic module 179 may include, for example, a motor, a piezoelectric element, or an electrical stimulation device.

카메라 모듈(180)은 정지 영상 및 동영상을 촬영할 수 있다. 일실시예에 따르면, 카메라 모듈(180)은 하나 이상의 렌즈들, 이미지 센서들, 이미지 시그널 프로세서들, 또는 플래시들을 포함할 수 있다.The camera module 180 may capture still images and moving images. According to an embodiment, the camera module 180 may include one or more lenses, image sensors, image signal processors, or flashes.

전력 관리 모듈(188)(예: 도 2의 전력 관리 모듈(210))은 전자 장치(101)에 공급되는 전력을 관리할 수 있다. 일실시예에 따르면, 전력 관리 모듈(188)은, 예를 들면, PMIC(power management integrated circuit)의 적어도 일부로서 구현될 수 있다.The power management module 188 (eg, the power management module 210 of FIG. 2 ) may manage power supplied to the electronic device 101 . According to an embodiment, the power management module 188 may be implemented as, for example, at least a part of a power management integrated circuit (PMIC).

배터리(189)는 전자 장치(101)의 적어도 하나의 구성요소에 전력을 공급할 수 있다. 일실시예에 따르면, 배터리(189)는, 예를 들면, 재충전 불가능한 1차 전지, 재충전 가능한 2차 전지 또는 연료 전지를 포함할 수 있다.The battery 189 may supply power to at least one component of the electronic device 101 . According to one embodiment, battery 189 may include, for example, a non-rechargeable primary cell, a rechargeable secondary cell, or a fuel cell.

통신 모듈(190)은 전자 장치(101)와 외부 전자 장치(예: 전자 장치(102), 전자 장치(104), 또는 서버(108)) 간의 직접(예: 유선) 통신 채널 또는 무선 통신 채널의 수립, 및 수립된 통신 채널을 통한 통신 수행을 지원할 수 있다. 통신 모듈(190)은 프로세서(120)(예: 어플리케이션 프로세서)와 독립적으로 운영되고, 직접(예: 유선) 통신 또는 무선 통신을 지원하는 하나 이상의 커뮤니케이션 프로세서를 포함할 수 있다. 일실시예에 따르면, 통신 모듈(190)은 무선 통신 모듈(192)(예: 셀룰러 통신 모듈, 근거리 무선 통신 모듈, 또는 GNSS(global navigation satellite system) 통신 모듈) 또는 유선 통신 모듈(194)(예: LAN(local area network) 통신 모듈, 또는 전력선 통신 모듈)을 포함할 수 있다. 이들 통신 모듈 중 해당하는 통신 모듈은 제 1 네트워크(198)(예: 블루투스, WiFi direct 또는 IrDA(infrared data association) 같은 근거리 통신 네트워크) 또는 제 2 네트워크(199)(예: 셀룰러 네트워크, 인터넷, 또는 컴퓨터 네트워크(예: LAN 또는 WAN)와 같은 원거리 통신 네트워크)를 통하여 외부 전자 장치(104)와 통신할 수 있다. 이런 여러 종류의 통신 모듈들은 하나의 구성요소(예: 단일 칩)로 통합되거나, 또는 서로 별도의 복수의 구성요소들(예: 복수 칩들)로 구현될 수 있다. 무선 통신 모듈(192)은 가입자 식별 모듈(196)에 저장된 가입자 정보(예: 국제 모바일 가입자 식별자(IMSI))를 이용하여 제 1 네트워크(198) 또는 제 2 네트워크(199)와 같은 통신 네트워크 내에서 전자 장치(101)를 확인 및 인증할 수 있다. The communication module 190 is a direct (eg, wired) communication channel or a wireless communication channel between the electronic device 101 and an external electronic device (eg, the electronic device 102, the electronic device 104, or the server 108). It can support establishment and communication through the established communication channel. The communication module 190 may include one or more communication processors that operate independently of the processor 120 (eg, an application processor) and support direct (eg, wired) communication or wireless communication. According to one embodiment, the communication module 190 is a wireless communication module 192 (eg, a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module 194 (eg, : It may include a local area network (LAN) communication module, or a power line communication module). Among these communication modules, a corresponding communication module is a first network 198 (eg, a short-range communication network such as Bluetooth, WiFi direct, or IrDA (infrared data association)) or a second network 199 (eg, a cellular network, the Internet, or It may communicate with the external electronic device 104 through a computer network (eg, a telecommunication network such as a LAN or WAN). These various types of communication modules may be integrated into one component (eg, a single chip) or may be implemented as a plurality of components (eg, multiple chips) separate from each other. The wireless communication module 192 uses the subscriber information (eg, International Mobile Subscriber Identifier (IMSI)) stored in the subscriber identification module 196 within a communication network such as the first network 198 or the second network 199 . The electronic device 101 may be identified and authenticated.

안테나 모듈(197)은 신호 또는 전력을 외부(예: 외부 전자 장치)로 송신하거나 외부로부터 수신할 수 있다. 일실시예에 따르면, 안테나 모듈(197)은 서브스트레이트(예: PCB) 위에 형성된 도전체 또는 도전성 패턴으로 이루어진 방사체를 포함하는 하나의 안테나를 포함할 수 있다. 일실시예에 따르면, 안테나 모듈(197)은 복수의 안테나들을 포함할 수 있다. 이런 경우, 제 1 네트워크(198) 또는 제 2 네트워크(199)와 같은 통신 네트워크에서 사용되는 통신 방식에 적합한 적어도 하나의 안테나가, 예를 들면, 통신 모듈(190)에 의하여 상기 복수의 안테나들로부터 선택될 수 있다. 신호 또는 전력은 상기 선택된 적어도 하나의 안테나를 통하여 통신 모듈(190)과 외부 전자 장치 간에 송신되거나 수신될 수 있다. 어떤 실시예에 따르면, 방사체 이외에 다른 부품(예: RFIC)이 추가로 안테나 모듈(197)의 일부로 형성될 수 있다.The antenna module 197 may transmit or receive a signal or power to the outside (eg, an external electronic device). According to an embodiment, the antenna module 197 may include one antenna including a conductor formed on a substrate (eg, a PCB) or a radiator formed of a conductive pattern. According to an embodiment, the antenna module 197 may include a plurality of antennas. In this case, at least one antenna suitable for a communication method used in a communication network such as the first network 198 or the second network 199 is connected from the plurality of antennas by, for example, the communication module 190 . can be selected. A signal or power may be transmitted or received between the communication module 190 and an external electronic device through the selected at least one antenna. According to some embodiments, other components (eg, RFIC) other than the radiator may be additionally formed as a part of the antenna module 197 .

상기 구성요소들 중 적어도 일부는 주변 기기들간 통신 방식(예: 버스, GPIO(general purpose input and output), SPI(serial peripheral interface), 또는 MIPI(mobile industry processor interface))을 통해 서로 연결되고 신호(예: 명령 또는 데이터)를 상호간에 교환할 수 있다.At least some of the components are connected to each other through a communication method between peripheral devices (eg, a bus, general purpose input and output (GPIO), serial peripheral interface (SPI), or mobile industry processor interface (MIPI)) and a signal ( e.g. commands or data) can be exchanged with each other.

일실시예에 따르면, 명령 또는 데이터는 제 2 네트워크(199)에 연결된 서버(108)를 통해서 전자 장치(101)와 외부의 전자 장치(104)간에 송신 또는 수신될 수 있다. 외부 전자 장치(102, 104) 각각은 전자 장치(101)와 동일한 또는 다른 종류의 장치일 수 있다. 일실시예에 따르면, 전자 장치(101)에서 실행되는 동작들의 전부 또는 일부는 외부 전자 장치들(102, 104, 또는 108) 중 하나 이상의 외부 전자 장치들에서 실행될 수 있다. 예를 들면, 전자 장치(101)가 어떤 기능이나 서비스를 자동으로, 또는 사용자 또는 다른 장치로부터의 요청에 반응하여 수행해야 할 경우에, 전자 장치(101)는 기능 또는 서비스를 자체적으로 실행시키는 대신에 또는 추가적으로, 하나 이상의 외부 전자 장치들에게 그 기능 또는 그 서비스의 적어도 일부를 수행하라고 요청할 수 있다. 상기 요청을 수신한 하나 이상의 외부 전자 장치들은 요청된 기능 또는 서비스의 적어도 일부, 또는 상기 요청과 관련된 추가 기능 또는 서비스를 실행하고, 그 실행의 결과를 전자 장치(101)로 전달할 수 있다. 전자 장치(101)는 상기 결과를, 그대로 또는 추가적으로 처리하여, 상기 요청에 대한 응답의 적어도 일부로서 제공할 수 있다. 이를 위하여, 예를 들면, 클라우드 컴퓨팅, 분산 컴퓨팅, 또는 클라이언트-서버 컴퓨팅 기술이 이용될 수 있다. According to an embodiment, the command or data may be transmitted or received between the electronic device 101 and the external electronic device 104 through the server 108 connected to the second network 199 . Each of the external electronic devices 102 and 104 may be the same as or different from the electronic device 101 . According to an embodiment, all or a part of operations executed in the electronic device 101 may be executed in one or more of the external electronic devices 102 , 104 , or 108 . For example, when the electronic device 101 needs to perform a function or service automatically or in response to a request from a user or other device, the electronic device 101 may perform the function or service itself instead of executing the function or service itself. Alternatively or additionally, one or more external electronic devices may be requested to perform at least a part of the function or the service. The one or more external electronic devices that have received the request may execute at least a part of the requested function or service, or an additional function or service related to the request, and transmit a result of the execution to the electronic device 101 . The electronic device 101 may process the result as it is or additionally and provide it as at least a part of a response to the request. For this purpose, for example, cloud computing, distributed computing, or client-server computing technology may be used.

도 2는 다양한 실시예에 따른 동영상 처리 방법을 나타낸다.2 illustrates a video processing method according to various embodiments.

도 2를 참조하면, 동작 210에서, 일 실시예에 따른 프로세서(120)는 메모리(130)에 저장된 제1 동영상(이하, 원본 동영상)에서, 복수의 프레임들을 추출할 수 있다. Referring to FIG. 2 , in operation 210 , the processor 120 according to an embodiment may extract a plurality of frames from a first video (hereinafter, an original video) stored in the memory 130 .

일 실시예에 따르면, 원본 동영상은 전자 장치(101)의 카메라 모듈(180)을 통해 촬영되어 메모리(130)에 저장된 영상일 수 있다. 일 실시예에 따르면, 프로세서(120)는 카메라 모듈(180)을 통해 원본 동영상이 촬영되는 과정에서 동작 210 내지 260을 수행할 수도 있다.According to an embodiment, the original video may be an image captured by the camera module 180 of the electronic device 101 and stored in the memory 130 . According to an embodiment, the processor 120 may perform operations 210 to 260 while the original video is captured through the camera module 180 .

다른 일 실시예에 따르면, 원본 동영상은 외부 장치(예: 서버(108))로부터 다운로드 되어 메모리(130)에 저장된 영상일 수 있다. According to another embodiment, the original video may be an image downloaded from an external device (eg, the server 108 ) and stored in the memory 130 .

일 실시예에 따르면, 프로세서(120)는 복수의 프레임들을 랜덤하게 추출할 수 있다. 다른 일 실시예에 따르면, 프로세서(120)는 원본 동영상에서 지정된 시간 주기로 프레임을 추출할 수 있다. 예를 들어, 1분의 원본 동영상에서 10초 단위로 프레임을 추출할 수 있다. 또 다른 일 실시예에 따르면, 프로세서(120)는 원본 동영상의 일부에서 프레임을 추출할 수 있다. 예를 들어, 프로세서(120)는 1분의 원본 동영상에서 30초에서 40초 구간 이내에서 복수의 프레임들을 추출할 수 있다.According to an embodiment, the processor 120 may randomly extract a plurality of frames. According to another embodiment, the processor 120 may extract a frame from the original video at a specified time period. For example, frames can be extracted in units of 10 seconds from a one-minute original video. According to another embodiment, the processor 120 may extract a frame from a part of the original video. For example, the processor 120 may extract a plurality of frames within a period of 30 seconds to 40 seconds from a one-minute original video.

다양한 실시예에 따르면, 동작 215에서, 프로세서(120)는 추출된 복수의 프레임들의 구도를 일치시킬 수 있다. 사용자가 삼각대 없이 촬영한 원본 동영상은 사용자의 손떨림에 의한 흔들림이 발생할 수 있다. 프로세서(120)는 추출된 복수의 프레임들을 비교하여, 흔들림을 보정할 수 있다.According to various embodiments, in operation 215 , the processor 120 may match the composition of the plurality of extracted frames. The original video shot by the user without a tripod may be shaken due to the user's hand shake. The processor 120 may correct shake by comparing the plurality of extracted frames.

일 실시예에 따르면, 프로세서(120)는 복수의 프레임들에 공통적으로 포함된 적어도 하나 이상의 객체를 인식하고, 인식된 객체를 기반으로 흔들림을 보정할 수 있다. 예를 들어, 프로세서(120)는 이미지의 가장 자리(예: 상측/하측/좌측/우측)에 인접한 객체를 인식하고, 상기 객체가 동일 또는 유사한 비율로 이미지에 포함되도록 복수의 프레임들 각각을 크롭핑할 수 있다.According to an embodiment, the processor 120 may recognize at least one or more objects commonly included in the plurality of frames, and correct shake based on the recognized object. For example, the processor 120 recognizes an object adjacent to an edge (eg, top/bottom/left/right) of the image, and crops each of the plurality of frames so that the object is included in the image at the same or similar ratio. can ping

다른 일 실시예에 따르면, 프로세서(120)는 복수의 프레임들에 공통적으로 포함된 특징점을 인식하고, 각 특징점이 일치 또는 근접하게 배치되도록 하여 복수의 프레임들의 구도를 일치시킬 수 있다.According to another exemplary embodiment, the processor 120 may recognize a feature point commonly included in a plurality of frames, and match the composition of the plurality of frames by allowing each feature point to coincide or be disposed adjacent to each other.

다양한 실시예에 따르면, 동작 220에서, 프로세서(120)는 상기 복수의 프레임들 각각에 대해, 제1 객체(또는 메인 객체)가 배치되는 객체 영역과 상기 객체 영역을 제외한 배경 영역을 구분할 수 있다.According to various embodiments, in operation 220 , for each of the plurality of frames, the processor 120 may distinguish an object area in which a first object (or a main object) is disposed and a background area other than the object area.

다양한 실시예에 따르면, 프로세서(120)는 복수의 프레임들 각각에 대해, 공통으로 인식되는 제1 객체를 인식할 수 있다. 프로세서(120)는 복수의 객체들이 인식되는 경우, 다양한 조건(예: 객체와 거리, 이미지에서 객체가 차지하는 면적, 주변 픽셀과의 연관도 또는 포커싱 여부)을 기반으로 제1 객체를 결정할 수 있다.According to various embodiments, the processor 120 may recognize a commonly recognized first object for each of the plurality of frames. When a plurality of objects are recognized, the processor 120 may determine the first object based on various conditions (eg, a distance from an object, an area occupied by an object in an image, a degree of association with neighboring pixels, or whether it is focused).

다양한 실시예에 따르면, 프로세서(120)는 인식된 제1 객체가 차지하는 객체 영역과 상기 객체 영역을 제외한 배경 영역을 구분할 수 있다.According to various embodiments, the processor 120 may distinguish an object area occupied by the recognized first object and a background area excluding the object area.

다양한 실시예에 따르면, 복수의 프레임들 각각에서의 객체 영역(또는 배경 영역)은 서로 다를 수 있다. 예를 들어, 제1 객체에 움직임이 발생하는 경우, 제1 프레임에서는 객체 영역인 픽셀이, 제2 프레임에서는 배경 영역에 포함될 수 있다.According to various embodiments, the object area (or background area) in each of the plurality of frames may be different from each other. For example, when a motion occurs in the first object, a pixel that is an object area in the first frame may be included in the background area in the second frame.

다양한 실시예에 따르면, 동작 230에서, 프로세서(120)는 복수의 프레임들 중 제1 객체의 배치 형태를 기반으로 키 프레임을 결정할 수 있다. 프로세서(120)는 제1 객체의 위치와 방향성을 분석하여 키 프레임을 결정할 수 있다.According to various embodiments, in operation 230 , the processor 120 may determine a key frame based on the arrangement shape of the first object among the plurality of frames. The processor 120 may determine the key frame by analyzing the position and directionality of the first object.

일 실시예에 따르면, 프로세서(120)는 프레임의 수평 방향과 수직 방향을 결정할 수 있다. 또한, 프로세서(120)는 제1 객체의 특징점의 배치 형태를 기반으로 제1 객체의 수평 방향 및 수직 방향을 결정할 수 있다. 프로세서(120)는 프레임의 수평 방향과 제1 객체의 수평 방향을 비교하거나, 프레임의 수직 방향과 제1 객체의 수직 방향을 비교하여, 방향의 일치 정도가 가장 큰 프레임을 키 프레임으로 결정할 수 있다.According to an embodiment, the processor 120 may determine a horizontal direction and a vertical direction of the frame. Also, the processor 120 may determine the horizontal direction and the vertical direction of the first object based on the arrangement shape of the feature points of the first object. The processor 120 may compare the horizontal direction of the frame and the horizontal direction of the first object or compare the vertical direction of the frame and the vertical direction of the first object to determine the frame having the greatest degree of matching as the key frame. .

다른 일 실시예에 따르면, 프로세서(120)는 제1 객체의 특징점에 관한 정보가 미리 설정된 조건과 일치하는 비율이 가장 큰 프레임을 키 프레임으로 결정할 수 있다. 예를 들어, 제1 객체가 인물인 경우, 얼굴의 특징점(예: 눈/코/입)이 가장 많이 포함되거나, 정면을 바라보는 비율이 가장 큰 프레임, 또는 얼굴의 비율이 가장 큰 프레임을 키 프레임으로 결정할 수 있다. According to another exemplary embodiment, the processor 120 may determine a frame in which the information on the feature point of the first object matches a preset condition with the greatest ratio as the key frame. For example, when the first object is a person, the frame containing the most facial feature points (eg, eyes/nose/mouth), the frame with the largest frontal ratio, or the frame with the largest face ratio is keyed. frame can be determined.

다양한 실시예에 따르면, 동작 240에서, 프로세서(120)는 복수의 프레임들 중 키 프레임을 제외한 배경 프레임들의 배경 영역에서, 별도의 움직임이 발생한 모션 영역을 결정할 수 있다.According to various embodiments, in operation 240 , the processor 120 may determine a motion region in which a separate motion occurs in a background region of background frames other than a key frame among the plurality of frames.

일 실시예에 따르면, 모션 영역은 제1 객체의 움직임이 아닌 다른 객체의 움직임이 발생한 영역일 수 있다. 프로세서(120)는 프레임 사이의 배경 영역을 비교하고, 상기 비교를 기반으로 모션 영역을 결정할 수 있다.According to an embodiment, the motion region may be a region in which a motion of an object other than the motion of the first object occurs. The processor 120 may compare background regions between frames and determine a motion region based on the comparison.

일 실시예에 따르면, 프로세서(120)는 배경 프레임들 중, 키 프레임의 제1 객체의 배치를 중심으로 제1 객체가 제1 방향(예: 왼쪽 방향)으로 움직인 제1 배경 프레임(또는 우측 프레임) 및 제1 객체가 제1 방향과 다른 제2 방향(예: 오른쪽 방향)으로 움직인 제2 배경 프레임(또는 좌측 프레임)을 결정할 수 있다. 프로세서(120)는 제1 객체의 위치 또는 방향을 분석하여 제1 배경 프레임 및 제2 배경 프레임을 결정할 수 있다. 프로세서(120)는 제1 배경 프레임 및 제2 배경 프레임에서의 모션 영역을 결정할 수 있다.According to an embodiment of the present disclosure, the processor 120 configures the first background frame (or the right side) in which the first object moves in the first direction (eg, the left direction) with respect to the arrangement of the first object of the key frame among the background frames. frame) and a second background frame (or left frame) in which the first object moves in a second direction (eg, a right direction) different from the first direction may be determined. The processor 120 may determine the first background frame and the second background frame by analyzing the position or direction of the first object. The processor 120 may determine motion regions in the first background frame and the second background frame.

다양한 실시예에 따르면, 프로세서(120)는 제1 배경 프레임 및 제2 배경 프레임 각각에 대해 복수의 섹션들로 나누고, 전후 프레임의 차이를 분석하여 해당 구역이 모션 영역인지를 결정할 수 있다. 예를 들어, 제1 배경 프레임 및 제2 배경 프레임 각각을 동일한 크기의 20개의 섹센들로 구분하고, 각각의 섹션에 대한 전후 프레임의 차이를 분석할 수 있다(도 6 참조). 프로세서(120)는 해당 구역에 대한 움직임이 발생한 프레임의 정보, 움직임의 방향 정보, 움직임의 속도 정보 등을 저장할 수 있다.According to various embodiments, the processor 120 may divide each of the first background frame and the second background frame into a plurality of sections, and determine whether the corresponding region is a motion region by analyzing a difference between the front and rear frames. For example, each of the first background frame and the second background frame may be divided into 20 sections of the same size, and differences between front and rear frames for each section may be analyzed (see FIG. 6 ). The processor 120 may store information on a frame in which a motion occurs for a corresponding zone, information on a direction of a motion, information on a speed of a motion, and the like.

예를 들어, 해변에서 인물을 촬영하는 경우, 인물이 촬영된 객체 영역을 제외하고, 바다가 촬영된 영역은 파도에 의해 움직임이 발생하는 모션 영역일 수 있다. 반면, 하늘이 촬영된 영역은 기준값 이상의 움직임이 발생하지 않은 영역일 수 있다. 프로세서(120)는 바다가 촬영된 영역을 모션 영역으로 결정할 수 있다.For example, when photographing a person at the beach, the area in which the sea is photographed may be a motion area in which movement occurs due to waves, except for an object area in which the person is photographed. On the other hand, the area in which the sky is photographed may be an area in which motion greater than the reference value does not occur. The processor 120 may determine the area where the sea is photographed as the motion area.

다양한 실시예에 따르면, 동작 250에서, 프로세서(120)는 배경 프레임의 모션 영역들을 결합하여 배경 영상을 생성할 수 있다. 제1 배경 프레임에서의 모션 영역과 제2 배경 프레임에서의 모션 영역은 서로 다를 수 있다. According to various embodiments, in operation 250 , the processor 120 may generate a background image by combining motion regions of the background frame. The motion region in the first background frame and the motion region in the second background frame may be different from each other.

다양한 실시예에 따르면, 제1 배경 프레임에서의 모션 영역 중 제1 객체에서 가려진 부분은 제1 배경 프레임에서는 가려지지 않을 수 있다. 반대로, 제2 배경 프레임에서의 모션 영역 중 제1 객체에서 가려진 부분은 제2 배경 프레임에서는 가려지지 않을 수 있다.According to various embodiments, a portion of the motion region covered by the first object in the first background frame may not be covered by the first background frame. Conversely, a portion of the motion region covered by the first object in the second background frame may not be covered by the second background frame.

다양한 실시예에 따르면, 프로세서(120)는 제1 배경 프레임에서의 모션 영역과 제2 배경 프레임에서의 모션 영역의 움직임의 방향 정보 및/또는 움직임의 속도 정보를 비교하여 결합할 수 있다. 일 실시예에서, 제1 배경 프레임에서의 모션 영역과 제2 배경 프레임에서의 모션 영역은 서로 인접하거나 적어도 일부가 겹칠 수 있다. 프로세서(120)는 전후 프레임에서 모션 영역을 비교하여, 움직임의 방향 정보 및/또는 움직임의 속도 정보가 일치되도록 모션 영역을 결합할 수 있다.According to various embodiments, the processor 120 may compare and combine direction information and/or speed information of the motion of the motion region in the first background frame and the motion region in the second background frame. In an embodiment, the motion region in the first background frame and the motion region in the second background frame may be adjacent to each other or at least partially overlap. The processor 120 may compare the motion regions in the front and rear frames, and combine the motion regions so that direction information of the movement and/or speed information of the movement match.

다양한 실시예에 따르면, 프로세서(120)는 배경 프레임 각각을 복수의 섹션들로 구분하고, 각각의 섹션이 적어도 일부에 모션을 포함하는지를 확인할 수 있다. 프로세서(120)는 제1 배경 프레임에서 모션을 포함하는 섹션을 제2 배경 프레임의 대응하는 섹션과 결합할 수 있다. 예를 들어, 제1 배경 프레임의 제5 섹션이 모션 영역을 포함하고, 제2 배경 프레임의 제5 섹션이 모션 영역을 포함하는 경우, 프로세서(120)는 제1 배경 프레임의 제5 섹션과 제2 배경 프레임의 제5 섹션을 병합할 수 있다. According to various embodiments, the processor 120 may classify each of the background frames into a plurality of sections, and determine whether each section includes at least a portion of the motion. The processor 120 may combine a section comprising motion in the first background frame with a corresponding section in the second background frame. For example, if the fifth section of the first background frame includes the motion region and the fifth section of the second background frame includes the motion region, the processor 120 may The 5th section of the 2 background frame can be merged.

다양한 실시예에 따르면 동작 260에서, 프로세서(120)는 키 프레임의 객체 영역과 상기 배경 영상을 결합하여, 제2 동영상을 생성할 수 있다. 제2 동영상을 구성하는 각 프레임에서, 키 프레임의 객체 영역에 대응하는 메인 영역은 움직이지 않는 고정된 이미지 영역일 수 있다. 상기 메인 영역에서는 키 프레임의 제1 객체의 이미지가 계속적으로 표시될 수 있다. 제2 동영상을 구성하는 각 프레임에서, 메인 영역이 아닌 영역 중 제1 배경 영역은 배경 프레임에서 모션 영역에 대응할 수 있고, 계속적으로 이미지가 움직이는 영역일 수 있다. 제2 동영상을 구성하는 각 프레임에서, 메인 영역이 아닌 영역 중 제2 배경 영역은 배경 프레임에서 모션 영역이 아닌 영역에 대응할 수 있고, 고정된 이미지가 표시될 수 있다.According to various embodiments, in operation 260 , the processor 120 may generate a second video by combining the object region of the key frame and the background image. In each frame constituting the second video, the main area corresponding to the object area of the key frame may be a fixed image area that does not move. In the main area, the image of the first object of the key frame may be continuously displayed. In each frame constituting the second video, the first background region among regions other than the main region may correspond to the motion region in the background frame, and may be a region in which the image continuously moves. In each frame constituting the second video, a second background region among regions other than the main region may correspond to a region other than the motion region in the background frame, and a fixed image may be displayed.

다양한 실시예에 따르면, 프로세서(120)는 메인 영역과 제1 서브 영역 사이에 이질감을 줄이기 위한 이미지 처리를 할 수 있다.According to various embodiments, the processor 120 may perform image processing to reduce a sense of heterogeneity between the main region and the first sub region.

다양한 실시예에 따르면, 프로세서(120)는 제2 동영상을 재생할 수 있다. 프로세서(120)는 기본 설정으로 제2 동영상이 무한 재생되도록 할 수 있다. 무한 재생의 경우, 프로세서(120)는 제2 동영상의 마지막 프레임이 재생되면, 제2 동영상의 첫번째 프레임으로 이동하거나, 마지막 프레임과 유사도가 가장 높은 프레임으로 이동하여 무한 재생될 수 있다.According to various embodiments, the processor 120 may play the second video. The processor 120 may cause the second video to be played indefinitely as a default setting. In the case of infinite playback, when the last frame of the second video is reproduced, the processor 120 may move to the first frame of the second video or move to the frame having the highest similarity to the last frame to be reproduced indefinitely.

도 3은 다양한 실시예에 따른 프레임 안정화를 나타낸다. 3 illustrates frame stabilization according to various embodiments.

도 3을 참조하면, 프로세서(120)는 원본 동영상(310))에서, 복수의 프레임들(311, 312, 313)을 추출할 수 있다. 도 3에서는 3개의 프레임들을 추출하는 경우를 예시적으로 도시하였으나, 이에 한정되는 것은 아니다. 원본 동영상(310)은 카메라 모듈(180)을 통해 촬영된 영상 또는 외부 장치를 통해 다운로드 된 영상일 수 있다. Referring to FIG. 3 , the processor 120 may extract a plurality of frames 311 , 312 , and 313 from the original moving picture 310 . In FIG. 3 , a case of extracting three frames is illustrated as an example, but the present invention is not limited thereto. The original video 310 may be an image captured through the camera module 180 or an image downloaded through an external device.

다양한 실시예에 따르면, 프로세서(120)는 원본 동영상(310)의 촬영이 완료되어 저장된 상태에서, 복수의 프레임들(311, 312, 313)을 추출할 수 있다. 또는, 프로세서(120)는 원본 동영상(310)의 촬영이 계속되고 상태에서, 원본 동영상(310)의 이미 촬영되어 저장된 부분에서 복수의 프레임들(311, 312, 313)을 추출할 수도 있다. According to various embodiments, the processor 120 may extract a plurality of frames 311 , 312 , and 313 in a state in which the original video 310 has been recorded and stored. Alternatively, the processor 120 may extract a plurality of frames 311 , 312 , and 313 from an already captured and stored portion of the original video 310 in a state in which the recording of the original video 310 continues.

다양한 실시예에 따르면, 프로세서(120)는 복수의 프레임들(311, 312, 313)을 랜덤하게 추출하거나, 지정된 조건에 따라 추출할 수 있다. 상기 조건은 지정된 시간 주기 또는 프레임간의 유사 비율 등에 관한 조건일 수 있다.According to various embodiments, the processor 120 may randomly extract the plurality of frames 311 , 312 , and 313 or extract it according to a specified condition. The condition may be a condition related to a specified time period or a similarity ratio between frames.

프로세서(120)는 추출된 복수의 프레임들(311, 312, 313)에 대한 구도를 일치시킬 수 있다. 예를 들어, 사용자의 손떨림에 의한 흔들림이 발생한 경우, 복수의 프레임들(311, 312, 313) 사이에는 객체의 위치가 일치하지 않을 수 있다.The processor 120 may match the composition of the plurality of extracted frames 311 , 312 , and 313 . For example, when shaking due to a user's hand shake occurs, the position of the object may not match between the plurality of frames 311 , 312 , and 313 .

다양한 실시예에 따르면, 프로세서(120)는 복수의 프레임들(311, 312, 313) 각각에 포함된 객체를 인식할 수 있다. 예를 들어, 프로세서(120)는 제1 프레임(311)에 포함된 제1 객체(350a) 및 제2 객체(360a)를 인식할 수 있다. 프로세서(120)는 제2 프레임(312)에 포함된 제1 객체(350b) 및 제2 객체(360b)를 인식할 수 있다. 프로세서(120)는 제3 프레임(313)에 포함된 제1 객체(350c) 및 제2 객체(360c)를 인식할 수 있다. According to various embodiments, the processor 120 may recognize an object included in each of the plurality of frames 311 , 312 , and 313 . For example, the processor 120 may recognize the first object 350a and the second object 360a included in the first frame 311 . The processor 120 may recognize the first object 350b and the second object 360b included in the second frame 312 . The processor 120 may recognize the first object 350c and the second object 360c included in the third frame 313 .

제1 프레임(311)에 포함된 제1 객체(350a), 제2 프레임(312)에 포함된 제1 객체(350b), 및 제3 프레임(313)에 포함된 제1 객체(350c)는 동일한 하나의 객체이지만, 시간 변화에 따라 움직임이 발생하는 객체일 수 있다.The first object 350a included in the first frame 311 , the first object 350b included in the second frame 312 , and the first object 350c included in the third frame 313 are the same Although it is a single object, it may be an object that moves according to time change.

일 실시예에 따르면, 프로세서(120)는 복수의 프레임들(311, 312, 313) 에 공통적으로 포함된 객체 중 가장 자리에 배치되고, 지정된 크기 이상인 제2 객체(360a, 360b, 360c)를 기반으로 복수의 프레임들(311, 312, 313)의 구도를 일치시킬 수 있다. 프로세서(120)는 복수의 프레임들(311, 312, 313) 각각에 대해, 제2 객체(360a, 360b, 360c)가 동일한 비율로 포함되도록 크롭핑 된 복수의 프레임들(311a, 312a, 313a)을 생성할 수 있다. According to an embodiment, the processor 120 is disposed at the edge among the objects commonly included in the plurality of frames 311 , 312 , and 313 and based on the second objects 360a , 360b and 360c having a specified size or larger. As a result, the composition of the plurality of frames 311 , 312 , and 313 may be matched. For each of the plurality of frames 311 , 312 , and 313 , the processor 120 includes a plurality of cropped frames 311a , 312a , 313a such that the second object 360a , 360b , 360c is included in the same ratio. can create

도 4는 다양한 실시예에 따른 객체 영역과 배경 영역의 구분을 나타낸다.4 illustrates the division of an object area and a background area according to various embodiments of the present disclosure.

도 4를 참조하면, 프로세서(120)는 구도가 일치된 복수의 프레임들(311a, 312a, 313a) 각각에 대해, 제1 객체(350a, 350b, 350c)를 인식할 수 있다. 제1 프레임(311)에 포함된 제1 객체(350a), 제2 프레임(312)에 포함된 제1 객체(350b), 및 제3 프레임(313)에 포함된 제1 객체(350c)은 동일한 하나의 객체이지만, 시간 변화에 따라 움직임이 발생하는 객체일 수 있다.Referring to FIG. 4 , the processor 120 may recognize the first objects 350a , 350b , and 350c for each of a plurality of frames 311a , 312a , and 313a having the same composition. The first object 350a included in the first frame 311 , the first object 350b included in the second frame 312 , and the first object 350c included in the third frame 313 are the same Although it is a single object, it may be an object that moves according to time change.

다양한 실시예에 따르면, 프로세서(120)는 복수의 객체들이 인식되는 경우, 다양한 조건(예: 객체와 거리, 이미지에서 객체가 차지하는 면적, 주변 픽셀과의 연관도 또는 포커싱 여부)을 기반으로 제1 객체(350a, 350b, 350c)를 결정할 수 있다.According to various embodiments, when a plurality of objects are recognized, the processor 120 performs the first operation based on various conditions (eg, a distance from an object, an area occupied by an object in an image, a degree of association with a neighboring pixel, or whether it is focused). Objects 350a, 350b, and 350c may be determined.

프로세서(120)는 인식된 제1 객체(350a, 350b, 350c)가 배치되는 객체 영역(410, 420, 430)과 배경 영역(440, 450, 460)을 구분할 수 있다. 배경 영역(440, 450, 460)은 각각의 프레임에서 객체 영역(410, 420, 430)을 제외한 나머지 영역일 수 있다. 예를 들어, 프로세서(120)는 제1 프레임(311a)에서, 객체 영역(410)와 배경 영역(440)을 분리할 수 있다. 프로세서(120)는 제2 프레임(312a)에서, 객체 영역(420)와 배경 영역(450)을 분리할 수 있다. 프로세서(120)는 제3 프레임(313a)에서, 객체 영역(430)와 배경 영역(460)을 분리할 수 있다.The processor 120 may distinguish object regions 410 , 420 , 430 in which the recognized first objects 350a , 350b , and 350c are disposed and background regions 440 , 450 , 460 . The background regions 440 , 450 , and 460 may be the remaining regions excluding the object regions 410 , 420 , and 430 in each frame. For example, the processor 120 may separate the object area 410 and the background area 440 from the first frame 311a. The processor 120 may separate the object area 420 and the background area 450 from the second frame 312a. The processor 120 may separate the object area 430 and the background area 460 from the third frame 313a.

복수의 프레임들(311a, 312a, 313a) 각각에서 객체 영역(410, 420, 430)의 형태는 서로 다를 수 있다. 복수의 프레임들(311a, 312a, 313a)의 사이 시간에 동일한 제1 객체(350a, 350b, 350c)의 움직임이 발생할 수 있고, 이에 따라 객체 영역(410, 420, 430)의 형태는 각 프레임에서 서로 다를 수 있다. 또한, 복수의 프레임들(311a, 312a, 313a) 각각에서 배경 영역(440, 450, 460)의 형태도 서로 다를 수 있다.In each of the plurality of frames 311a, 312a, and 313a, shapes of the object areas 410, 420, and 430 may be different from each other. The movement of the same first object 350a, 350b, 350c may occur at a time between the plurality of frames 311a, 312a, and 313a, and accordingly, the shape of the object regions 410, 420, 430 is changed in each frame. may be different. Also, the shapes of the background regions 440 , 450 , and 460 in each of the plurality of frames 311a , 312a , and 313a may be different from each other.

도 5는 다양한 실시예에 따른 키 프레임과 배경 프레임의 분류를 나타낸다.5 illustrates classification of a key frame and a background frame according to various embodiments.

도 5를 참조하면, 프로세서(120)는 구도가 일치된 복수의 프레임들(311a, 312a, 313a) 중 제1 객체(350a, 350b, 350c)의 배치 형태를 기반으로 키 프레임을 결정할 수 있다. 프로세서(120)는 복수의 프레임들(311a, 312a, 313a)에서 프레임의 수평 방향(A)과 수직 방향(B)을 결정할 수 있다. 또한, 프로세서(120)는 각 프레임에서, 제1 객체(350a, 350b, 350c)의 수직 방향과 수평 방향을 결정할 수 있다.Referring to FIG. 5 , the processor 120 may determine the key frame based on the arrangement of the first objects 350a , 350b , and 350c among the plurality of frames 311a , 312a , 313a having the same composition. The processor 120 may determine the horizontal direction (A) and the vertical direction (B) of the frame in the plurality of frames (311a, 312a, 313a). Also, the processor 120 may determine a vertical direction and a horizontal direction of the first objects 350a , 350b , and 350c in each frame.

예를 들어, 제1 프레임(311a)에서, 프로세서(120)는 제1 객체(350a)의 특징점을 이용하여, 제1 객체(350a)의 제1 수평 방향(511), 제2 수평 방향(512), 수직 방향(513)을 결정할 수 있다. 프로세서(120)는 프레임의 수평 방향(A)와 제1 수평 방향(511) 또는 제2 수평 방향(512)을 비교할 수 있다. 프로세서(120)는 프레임의 수직 방향(B)와 수직 방향(513)을 비교할 수 있다.For example, in the first frame 311a, the processor 120 uses the feature points of the first object 350a in the first horizontal direction 511 and the second horizontal direction 512 of the first object 350a. ), the vertical direction 513 may be determined. The processor 120 may compare the horizontal direction A of the frame with the first horizontal direction 511 or the second horizontal direction 512 . The processor 120 may compare the vertical direction B and the vertical direction 513 of the frame.

유사하게, 제2 프레임(312a)에서, 프로세서(120)는 제1 객체(350b)의 제1 수평 방향(521), 제2 수평 방향(522), 수직 방향(523)을 결정하고, 프레임의 수평 방향(A) 또는 수직 방향(B)와 비교할 수 있다. 또한, 제3 프레임(313a)에서, 프로세서(120)는 제1 객체(350c)의 제1 수평 방향(531), 제2 수평 방향(532), 수직 방향(533)을 결정하고, 프레임의 수평 방향(A) 또는 수직 방향(B)와 비교할 수 있다.Similarly, in the second frame 312a, the processor 120 determines a first horizontal direction 521, a second horizontal direction 522, and a vertical direction 523 of the first object 350b, and It can be compared to the horizontal direction (A) or the vertical direction (B). Also, in the third frame 313a , the processor 120 determines a first horizontal direction 531 , a second horizontal direction 532 , and a vertical direction 533 of the first object 350c , and determines the horizontal direction of the frame. It can be compared to the direction (A) or the vertical direction (B).

프로세서(120)는 상기 비교를 기반으로 프레임의 방향과 제1 객체의 방향의 일치도가 큰 제1 프레임(311a)을 키 프레임으로 결정할 수 있다. 프로세서(120)는 키 프레임이 아닌 제2 프레임(312a) 및 제3 프레임(313a)를 배경 프레임으로 결정할 수 있다.The processor 120 may determine, as the key frame, the first frame 311a having a high degree of matching between the direction of the frame and the direction of the first object based on the comparison. The processor 120 may determine the second frame 312a and the third frame 313a instead of the key frame as the background frame.

다양한 실시예에 따르면, 프로세서(120)는 배경 프레임들 중, 제1 객체가 제1 방향(예: 왼쪽 방향)으로 움직인 제2 프레임(312a)를 제1 배경 프레임(또는 우측 프레임)으로 결정할 수 있다. 프로세서(120)는 배경 프레임들 중, 제1 방향과 다른 제2 방향(예: 오른쪽 방향)으로 움직인 제3 프레임(313a)를 제2 배경 프레임(또는 좌측 프레임)으로 결정할 수 있다.According to various embodiments, the processor 120 determines, among the background frames, the second frame 312a in which the first object moves in the first direction (eg, the left direction) as the first background frame (or the right frame). can The processor 120 may determine, among the background frames, a third frame 313a moving in a second direction (eg, a right direction) different from the first direction as the second background frame (or left frame).

도 6은 다양한 실시예에 따른 모션 영역의 결정을 나타낸다.6 illustrates determination of a motion region according to various embodiments.

도 6을 참조하면, 프로세서(120)는 제1 배경 프레임(312a) 및 제2 배경 프레임(313a) 각각에서의 모션 영역(610, 620)을 결정할 수 있다. 프로세서(120)는 모션 영역(610, 620) 각각에 대한 움직임이 발생한 프레임의 정보, 움직임의 방향 정보, 움직임의 속도 정보 등을 저장할 수 있다.Referring to FIG. 6 , the processor 120 may determine motion regions 610 and 620 in the first background frame 312a and the second background frame 313a, respectively. The processor 120 may store information of a frame in which motion occurs, direction information of motion, speed information of motion, and the like for each of the motion regions 610 and 620 .

다양한 실시예에 따르면, 제1 배경 프레임(312a) 및 제2 배경 프레임(313a) 각각을 복수의 섹션들로 나누고 모션 영역(610, 620)에 포함되는 섹션을 결정할 수 있다.According to various embodiments, each of the first background frame 312a and the second background frame 313a may be divided into a plurality of sections, and sections included in the motion regions 610 and 620 may be determined.

예를 들어, 제1 배경 프레임(312a)에서, 프로세서(120)는 제1 배경 프레임(312a)을 복수의 섹션들로 구분할 수 있다. 프로세서(120)는 제1 배경 프레임(312a)의 전후 프레임과의 차이를 분석하여 각각의 섹션들이 제1 객체(350b)에 의한 움직임이 아닌 다른 배경 객체에 의해 움직임이 발생하는지를 확인할 수 있다. 프로세서(120)는 제14 섹션(A14), 제22 섹션(A22)을 모션 영역(610)으로 결정할 수 있다.For example, in the first background frame 312a, the processor 120 may divide the first background frame 312a into a plurality of sections. The processor 120 may analyze a difference between the front and rear frames of the first background frame 312a to determine whether each section is moved by a background object other than the movement by the first object 350b. The processor 120 may determine the fourteenth section A14 and the twenty-second section A22 as the motion region 610 .

다른 예를 들어, 제2 배경 프레임(313a)에서, 프로세서(120)는 제2 배경 프레임(313a)을 복수의 섹션들로 구분할 수 있다. 프로세서(120)는 제2 배경 프레임(313a)의 전후 프레임과의 차이를 분석하여 각각의 섹션들이 제1 객체(350c)에 의한 움직임이 아닌 다른 배경 객체에 의해 움직임이 발생하는지를 확인할 수 있다. 프로세서(120)는 제11 섹션(B11), 제12 섹션(B12), 제19 섹션(B19), 제21 섹션(B21)을 모션 영역(620)으로 결정할 수 있다.As another example, in the second background frame 313a, the processor 120 may divide the second background frame 313a into a plurality of sections. The processor 120 may analyze the difference between the front and rear frames of the second background frame 313a to determine whether each of the sections is moved by a background object other than the first object 350c. The processor 120 may determine the eleventh section B11 , the twelfth section B12 , the nineteenth section B19 , and the twenty-first section B21 as the motion region 620 .

도 7은 다양한 실시예에 따른 제2 동영상의 생성을 나타낸다. 도 7은 예시적인 것으로 이에 한정되는 것은 아니다. 7 illustrates generation of a second video according to various embodiments. 7 is illustrative and not limited thereto.

도 7을 참조하면, 프로세서(120)는 키 프레임(311a)의 제1 객체 (350a)와 제1 배경 프레임(312a) 및 제2 배경 프레임(313a)에서 추출된 배경 영상을 결합하여, 제2 동영상(710)을 생성할 수 있다.Referring to FIG. 7 , the processor 120 combines the first object 350a of the key frame 311a with the background image extracted from the first background frame 312a and the second background frame 313a to obtain a second A video 710 may be generated.

상기 배경 영상은 제1 배경 프레임(312a)의 모션 영역(610) 및 제2 배경 프레임(313a)의 모션 영역(620)에서는 이미지가 움직이고, 다른 배경 영역에서는 이미지가 움직이지 않을 수 있다.In the background image, the image may move in the motion region 610 of the first background frame 312a and the motion region 620 of the second background frame 313a, and the image may not move in other background regions.

제2 동영상(710)을 구성하는 각 프레임에서, 키 프레임(311a)의 제1 객체(350a)에 대응하는 메인 영역(711)은 움직이지 않는 고정된 이미지 영역일 수 있다. 상기 메인 영역(711)에서는 키 프레임(311a)의 제1 객체(350a)의 이미지가 계속적으로 표시될 수 있다. 제2 동영상(710)을 구성하는 각 프레임에서, 메인 영역(711)이 아닌 영역 중 제1 배경 영역(712)은 제1 배경 프레임(312a) 및 제2 배경 프레임(313a)의 모션 영역(610, 620)에 대응할 수 있고, 계속적으로 이미지가 움직이는 영역일 수 있다. 제2 동영상을 구성하는 각 프레임에서, 메인 영역(711)이 아닌 영역 중 제2 배경 영역(713)은 배경 프레임에서 모션 영역(610, 620)이 아닌 영역에 대응할 수 있고, 고정된 이미지가 표시될 수 있다. In each frame constituting the second video 710 , the main area 711 corresponding to the first object 350a of the key frame 311a may be a fixed image area that does not move. In the main area 711 , the image of the first object 350a of the key frame 311a may be continuously displayed. In each frame constituting the second video 710 , the first background region 712 among regions other than the main region 711 is the motion region 610 of the first background frame 312a and the second background frame 313a. , 620), and may be a region in which the image continuously moves. In each frame constituting the second video, a second background region 713 among regions other than the main region 711 may correspond to regions other than the motion regions 610 and 620 in the background frame, and a fixed image is displayed. can be

도 8은 다양한 실시예에 따른 가중치를 적용하여 제2 동영상을 합성하는 예시도이다. 도 8은 예시적인 것으로 이에 한정되는 것은 아니다. 8 is an exemplary diagram of synthesizing a second video by applying a weight according to various embodiments. 8 is illustrative and not limited thereto.

도 8을 참조하면, 프로세서(120)는 키 프레임(311a)의 제1 객체 (350a)와 제1 배경 프레임(312a) 및 제2 배경 프레임(313a)에서 추출된 배경 영상을 결합하여, 제2 동영상(710)을 생성할 수 있다.Referring to FIG. 8 , the processor 120 combines the first object 350a of the key frame 311a with the background image extracted from the first background frame 312a and the second background frame 313a to obtain a second A video 710 may be generated.

프로세서(120)는 제2 동영상(710)의 메인 영역(711)과 제1 배경 영역(712) 사이의 이질감을 줄이기 위해, 제1 배경 프레임(312a) 및 제2 배경 프레임(313a)과 유사한 추가 프레임들에서 모션을 분석하여, 제2 동영상(710)을 생성하는데 반영할 수 있다.The processor 120 adds a first background frame 312a and a second background frame 313a similar to the first background frame 312a and the second background frame 313a in order to reduce the sense of heterogeneity between the main region 711 and the first background region 712 of the second video 710 . By analyzing the motion in the frames, it may be reflected in generating the second video 710 .

예를 들어, 프로세서(120)는 제1 배경 프레임(312a)의 이전 프레임(811) 및 제1 배경 프레임(312a)의 이후 프레임(812)에서 모션을 분석하여, 제2 동영상(710)을 생성하는데 반영할 수 있다. 프로세서(120)는 모션 영역의 크기를 기반으로 각 프레임에 대한 가중치를 반영하여 제2 동영상(710)을 생성할 수 있다. For example, the processor 120 generates the second video 710 by analyzing motions in the frame 811 before the first background frame 312a and the frame 812 after the first background frame 312a. can be reflected. The processor 120 may generate the second video 710 by reflecting a weight for each frame based on the size of the motion region.

다른 예를 들어, 프로세서(120)는 제2 배경 프레임(313a)의 이전 프레임(821) 및 제2 배경 프레임(313a)의 이후 프레임(822)에서 모션을 분석하여, 제2 동영상(710)을 생성하는데 반영할 수 있다. 프로세서(120)는 모션 영역의 크기를 기반으로 각 프레임에 대한 가중치를 반영하여 제2 동영상(710)을 생성할 수 있다. As another example, the processor 120 analyzes motions in the frame 821 before the second background frame 313a and the frame 822 after the second background frame 313a to generate the second video 710 . It can be reflected in the creation. The processor 120 may generate the second video 710 by reflecting a weight for each frame based on the size of the motion region.

다양한 실시예에 따른 전자 장치(예: 도 1의 전자 장치(101))는 디스플레이, 메모리(예: 도 1의 메모리(130)), 및 프로세서(예: 도 1의 프로세서(120))를 포함하고, 상기 프로세서(예: 도 1의 프로세서(120))는 상기 메모리(예: 도 1의 메모리(130))에 저장된 제1 동영상에서, 복수의 프레임들을 추출하고, 상기 복수의 프레임들 각각에 대해, 제1 객체가 배치되는 객체 영역과 상기 객체 영역을 제외한 배경 영역을 구분하고, 상기 복수의 프레임들 중, 상기 제1 객체의 배치 형태를 기반으로 키 프레임을 결정하고, 상기 복수의 프레임들 중 상기 키 프레임을 제외한 배경 프레임들의 배경 영역에서 움직임이 발생한 모션 영역을 결정하고, 상기 배경 프레임들의 모션 영역을 결합하여 배경 영상을 생성하고, 상기 키 프레임의 객체 영역과 상기 배경 영상을 결합하여, 제2 동영상을 생성할 수 있다.An electronic device (eg, the electronic device 101 of FIG. 1 ) according to various embodiments includes a display, a memory (eg, the memory 130 of FIG. 1 ), and a processor (eg, the processor 120 of FIG. 1 ) and, the processor (eg, the processor 120 of FIG. 1 ) extracts a plurality of frames from the first video stored in the memory (eg, the memory 130 of FIG. 1 ), and stores the frames in each of the plurality of frames. , distinguishing an object region in which the first object is disposed and a background region excluding the object region, determining a key frame from among the plurality of frames based on an arrangement shape of the first object, and selecting the plurality of frames. determining a motion region in which motion occurs in a background region of background frames excluding the key frame, combining the motion regions of the background frames to generate a background image, combining the object region of the key frame with the background image, A second video may be created.

다양한 실시예에 따르면, 상기 프로세서(예: 도 1의 프로세서(120))는 상기 제1 동영상에서 램덤하게 상기 복수의 프레임들을 추출할 수 있다.According to various embodiments, the processor (eg, the processor 120 of FIG. 1 ) may randomly extract the plurality of frames from the first video.

다양한 실시예에 따르면, 상기 프로세서(예: 도 1의 프로세서(120))는 프레임 사이의 유사도를 기반으로 상기 복수의 프레임들을 추출할 수 있다.According to various embodiments, the processor (eg, the processor 120 of FIG. 1 ) may extract the plurality of frames based on the similarity between the frames.

다양한 실시예에 따르면, 상기 전자 장치(예: 도 1의 전자 장치(101))는 카메라(예: 도 1의 카메라 모듈(180))를 더 포함하고, 상기 프로세서(예: 도 1의 프로세서(120))는 상기 카메라(예: 도 1의 카메라 모듈(180))를 통해 상기 제1 영상이 촬영되는 중에, 상기 복수의 프레임들을 추출할 수 있다.According to various embodiments, the electronic device (eg, the electronic device 101 of FIG. 1 ) further includes a camera (eg, the camera module 180 of FIG. 1 ), and the processor (eg, the processor (eg) of FIG. 1 ) 120)) may extract the plurality of frames while the first image is captured through the camera (eg, the camera module 180 of FIG. 1 ).

다양한 실시예에 따르면, 상기 프로세서(예: 도 1의 프로세서(120))는 상기 복수의 프레임들 각각에서 인식된 객체들 중 객체와의 거리, 객체가 차지하는 면적, 포커싱 여부 중 적어도 하나를 기반으로 상기 제1 객체를 결정할 수 있다.According to various embodiments, the processor (for example, the processor 120 of FIG. 1 ) may be configured to perform an operation based on at least one of a distance to an object, an area occupied by the object, and whether or not focusing is performed among the objects recognized in each of the plurality of frames. The first object may be determined.

다양한 실시예에 따르면, 상기 프로세서(예: 도 1의 프로세서(120))는 상기 복수의 프레임들의 수평 방향과 수직 방향을 결정하고, 상기 제1 객체의 배치 방향과 상기 수평 방향 또는 상기 수직 방향과의 일치 정도를 기반으로 상기 키 프레임 또는 상기 배경 프레임을 결정할 수 있다. 상기 프로세서(예: 도 1의 프로세서(120))는 상기 일치 정도가 가장 높은 프레임을 상기 키 프레임으로 결정할 수 있다. 상기 프로세서(예: 도 1의 프로세서(120))는 상기 일치 정도가 지정된 범위 내에 있는 프레임들을 상기 배경 프레임으로 결정할 수 있다.According to various embodiments, the processor (eg, the processor 120 of FIG. 1 ) determines a horizontal direction and a vertical direction of the plurality of frames, and determines the arrangement direction of the first object and the horizontal direction or the vertical direction. The key frame or the background frame may be determined based on the degree of matching of . The processor (eg, the processor 120 of FIG. 1 ) may determine the frame having the highest degree of matching as the key frame. The processor (eg, the processor 120 of FIG. 1 ) may determine frames having the matching degree within a specified range as the background frame.

다양한 실시예에 따르면, 상기 프로세서(예: 도 1의 프로세서(120))는 상기 제1 객체의 특징점들을 인식하고, 상기 특징점들을 기반으로 상기 키 프레임 또는 상기 배경 프레임을 결정할 수 있다.According to various embodiments, the processor (eg, the processor 120 of FIG. 1 ) may recognize feature points of the first object and determine the key frame or the background frame based on the feature points.

다양한 실시예에 따르면, 상기 프로세서(예: 도 1의 프로세서(120))는 상기 배경 프레임의 상기 배경 영역을 기반으로 제1 레이어를 생성하고, 상기 키 프레임의 객체 영역을 기반으로 제2 레이어를 생성하고, 상기 제1 레이어 및 제2 레이어를 결합하여 상기 제2 동영상을 생성할 수 있다.According to various embodiments, the processor (eg, the processor 120 of FIG. 1 ) generates a first layer based on the background area of the background frame, and creates a second layer based on the object area of the key frame. and combining the first layer and the second layer to generate the second video.

다양한 실시예에 따르면, 상기 프로세서(예: 도 1의 프로세서(120))는 상기 모션 영역과 상기 객체 영역 사이의 이미지 처리를 통해 상기 모션 영역과 상기 객체 영역 사이의 유사도를 높일 수 있다.According to various embodiments, the processor (eg, the processor 120 of FIG. 1 ) may increase the similarity between the motion region and the object region through image processing between the motion region and the object region.

다양한 실시예에 따르면, 상기 프로세서(예: 도 1의 프로세서(120))는 상기 복수의 프레임들 각각에서 인식된 제2 객체를 비교하여 상기 상기 복수의 프레임들의 구도를 조절할 수 있다.According to various embodiments, the processor (eg, the processor 120 of FIG. 1 ) may adjust the composition of the plurality of frames by comparing a second object recognized in each of the plurality of frames.

다양한 실시예에 따르면, 상기 프로세서(예: 도 1의 프로세서(120))는 상기 배경 프레임들 각각을 복수의 섹션들로 구분하고, 각각의 섹션에서 움직임이 발생한 섹션을 결합하여 상기 모션 영역을 결정할 수 있다.According to various embodiments, the processor (eg, the processor 120 of FIG. 1 ) divides each of the background frames into a plurality of sections, and determines the motion region by combining the sections in which motion occurs in each section. can

다양한 실시예에 따르면, 상기 프로세서(예: 도 1의 프로세서(120))는 상기 배경 프레임과, 상기 배경 프레임의 이전 또는 이후 프레임을 이용하여 상기 배경 영상을 생성할 수 있다.According to various embodiments, the processor (eg, the processor 120 of FIG. 1 ) may generate the background image using the background frame and a frame before or after the background frame.

다양한 실시예에 따르면, 상기 프로세서(예: 도 1의 프로세서(120))는 상기 배경 프레임과, 상기 이전 또는 이후 프레임에 상기 움직임이 발생한 정도를 기반으로 가중치를 반영하여 상기 배경 영상을 생성할 수 있다.According to various embodiments, the processor (eg, the processor 120 of FIG. 1 ) may generate the background image by reflecting a weight based on the degree of occurrence of the motion in the background frame and the previous or subsequent frames. have.

다양한 실시예에 따르면, 상기 프로세서(예: 도 1의 프로세서(120))는 상기 제2 동영상을 무한 재생할 수 있다.According to various embodiments, the processor (eg, the processor 120 of FIG. 1 ) may play the second video indefinitely.

다양한 실시예에 따르면, 상기 프로세서(예: 도 1의 프로세서(120))는 상기 제2 동영상을 재생하고, 상기 제2 영상의 마지막 프레임과 일치 비율이 지정된 값 이상인 프레임부터 다시 재생할 수 있다.According to various embodiments, the processor (eg, the processor 120 of FIG. 1 ) reproduces the second video, and reproduces the second video from a frame having a matching ratio equal to or greater than a specified value to the last frame of the second video.

다양한 실시예에 따른 동영상 처리 방법은 전자 장치(예: 도 1의 전자 장치(101))에서 수행되고, 상기 전자 장치(예: 도 1의 전자 장치(101))의 메모리(예: 도 1의 메모리(130))에 저장된 제1 동영상에서, 복수의 프레임들을 추출하는 동작, 상기 복수의 프레임들 각각에 대해, 제1 객체가 배치되는 객체 영역과 상기 객체 영역을 제외한 배경 영역을 구분하는 동작, 상기 복수의 프레임들 중, 상기 제1 객체의 배치 형태를 기반으로 키 프레임을 결정하는 동작, 상기 복수의 프레임들 중 상기 키 프레임을 제외한 배경 프레임들의 배경 영역에서 움직임이 발생한 모션 영역을 결정하는 동작, 상기 배경 프레임들의 모션 영역을 결합하여 배경 영상을 생성하는 동작, 및 상기 키 프레임의 객체 영역과 상기 배경 영상을 결합하여, 제2 동영상을 생성하는 동작을 포함할 수 있다. A video processing method according to various embodiments is performed in an electronic device (eg, the electronic device 101 of FIG. 1 ), and a memory (eg, the electronic device 101 of FIG. 1 ) of the electronic device (eg, the electronic device 101 of FIG. 1 ) is performed. an operation of extracting a plurality of frames from the first moving picture stored in the memory 130), an operation of distinguishing, for each of the plurality of frames, an object region in which the first object is disposed and a background region excluding the object region; Determining a key frame from among the plurality of frames based on the arrangement shape of the first object, and determining a motion area in which motion occurs in a background area of background frames other than the key frame among the plurality of frames , generating a background image by combining motion regions of the background frames, and generating a second moving image by combining the object region of the key frame with the background image.

다양한 실시예에 따르면, 상기 키 프레임을 결정하는 동작은 상기 복수의 프레임들의 수평 방향과 수직 방향을 결정하는 동작, 및 상기 제1 객체의 배치 방향과 상기 수평 방향 또는 상기 수직 방향과의 일치 정도를 기반으로 상기 키 프레임 또는 상기 배경 프레임을 결정하는 동작을 포함할 수 있다.According to various embodiments, the determining of the key frame includes determining a horizontal direction and a vertical direction of the plurality of frames, and a degree of coincidence between an arrangement direction of the first object and the horizontal direction or the vertical direction. based on determining the key frame or the background frame.

다양한 실시예에 따르면, 상기 복수의 프레임들을 추출하는 동작은 상기 복수의 프레임들 각각에서 인식된 제2 객체를 비교하여 상기 상기 복수의 프레임들의 구도를 조절하는 동작을 포함할 수 있다.According to various embodiments, the extracting of the plurality of frames may include adjusting the composition of the plurality of frames by comparing a second object recognized in each of the plurality of frames.

본 문서의 다양한 실시예들 및 이에 사용된 용어들은 본 문서에 기재된 기술적 특징들을 특정한 실시예들로 한정하려는 것이 아니며, 해당 실시예의 다양한 변경, 균등물, 또는 대체물을 포함하는 것으로 이해되어야 한다. 도면의 설명과 관련하여, 유사한 또는 관련된 구성요소에 대해서는 유사한 참조 부호가 사용될 수 있다. 아이템에 대응하는 명사의 단수 형은 관련된 문맥상 명백하게 다르게 지시하지 않는 한, 상기 아이템 한 개 또는 복수 개를 포함할 수 있다. 본 문서에서, "A 또는 B", "A 및 B 중 적어도 하나",“A 또는 B 중 적어도 하나”, "A, B 또는 C", "A, B 및 C 중 적어도 하나”, 및 “A, B, 또는 C 중 적어도 하나"와 같은 문구들 각각은 그 문구들 중 해당하는 문구에 함께 나열된 항목들 중 어느 하나, 또는 그들의 모든 가능한 조합을 포함할 수 있다. "제 1", "제 2", 또는 "첫째" 또는 "둘째"와 같은 용어들은 단순히 해당 구성요소를 다른 해당 구성요소와 구분하기 위해 사용될 수 있으며, 해당 구성요소들을 다른 측면(예: 중요성 또는 순서)에서 한정하지 않는다. 어떤(예: 제 1) 구성요소가 다른(예: 제 2) 구성요소에, “기능적으로” 또는 “통신적으로”라는 용어와 함께 또는 이런 용어 없이, “커플드” 또는 “커넥티드”라고 언급된 경우, 그것은 상기 어떤 구성요소가 상기 다른 구성요소에 직접적으로(예: 유선으로), 무선으로, 또는 제 3 구성요소를 통하여 연결될 수 있다는 것을 의미한다.It should be understood that the various embodiments of this document and the terms used therein are not intended to limit the technical features described in this document to specific embodiments, and include various modifications, equivalents, or substitutions of the embodiments. In connection with the description of the drawings, like reference numerals may be used for similar or related components. The singular form of the noun corresponding to the item may include one or more of the item, unless the relevant context clearly dictates otherwise. As used herein, “A or B”, “at least one of A and B”, “at least one of A or B”, “A, B or C”, “at least one of A, B and C”, and “A , B, or C" each may include any one of the items listed together in the corresponding one of the phrases, or all possible combinations thereof. Terms such as “first”, “second”, or “first” or “second” may simply be used to distinguish the component from other components in question, and may refer to components in other aspects (e.g., importance or order) is not limited. that one (eg first) component is “coupled” or “connected” to another (eg, second) component with or without the terms “functionally” or “communicatively” When referenced, it means that one component can be connected to the other component directly (eg by wire), wirelessly, or through a third component.

본 문서에서 사용된 용어 "모듈"은 하드웨어, 소프트웨어 또는 펌웨어로 구현된 유닛을 포함할 수 있으며, 예를 들면, 로직, 논리 블록, 부품, 또는 회로와 같은 용어와 상호 호환적으로 사용될 수 있다. 모듈은, 일체로 구성된 부품 또는 하나 또는 그 이상의 기능을 수행하는, 상기 부품의 최소 단위 또는 그 일부가 될 수 있다. 예를 들면, 일실시예에 따르면, 모듈은 ASIC(application-specific integrated circuit)의 형태로 구현될 수 있다. As used herein, the term “module” may include a unit implemented in hardware, software, or firmware, and may be used interchangeably with terms such as, for example, logic, logic block, component, or circuit. A module may be an integrally formed part or a minimum unit or a part of the part that performs one or more functions. For example, according to an embodiment, the module may be implemented in the form of an application-specific integrated circuit (ASIC).

본 문서의 다양한 실시예들은 기기(machine)(예: 전자 장치(1301)) 의해 읽을 수 있는 저장 매체(storage medium)(예: 내장 메모리(1336) 또는 외장 메모리(1338))에 저장된 하나 이상의 명령어들을 포함하는 소프트웨어(예: 프로그램(1340))로서 구현될 수 있다. 예를 들면, 기기(예: 전자 장치(1301))의 프로세서(예: 프로세서(1320))는, 저장 매체로부터 저장된 하나 이상의 명령어들 중 적어도 하나의 명령을 호출하고, 그것을 실행할 수 있다. 이것은 기기가 상기 호출된 적어도 하나의 명령어에 따라 적어도 하나의 기능을 수행하도록 운영되는 것을 가능하게 한다. 상기 하나 이상의 명령어들은 컴파일러에 의해 생성된 코드 또는 인터프리터에 의해 실행될 수 있는 코드를 포함할 수 있다. 기기로 읽을 수 있는 저장 매체는, 비일시적(non-transitory) 저장 매체의 형태로 제공될 수 있다. 여기서, ‘비일시적’은 저장 매체가 실재(tangible)하는 장치이고, 신호(signal)(예: 전자기파)를 포함하지 않는다는 것을 의미할 뿐이며, 이 용어는 데이터가 저장 매체에 반영구적으로 저장되는 경우와 임시적으로 저장되는 경우를 구분하지 않는다.Various embodiments of the present document include one or more instructions stored in a storage medium (eg, internal memory 1336 or external memory 1338) readable by a machine (eg, electronic device 1301). may be implemented as software (eg, the program 1340) including For example, the processor (eg, the processor 1320 ) of the device (eg, the electronic device 1301 ) may call at least one command among one or more commands stored from the storage medium and execute it. This makes it possible for the device to be operated to perform at least one function according to the at least one command called. The one or more instructions may include code generated by a compiler or code executable by an interpreter. The device-readable storage medium may be provided in the form of a non-transitory storage medium. Here, 'non-transitory' only means that the storage medium is a tangible device and does not contain a signal (eg, electromagnetic wave), and this term refers to the case where data is semi-permanently stored in the storage medium and It does not distinguish between temporary storage cases.

일실시예에 따르면, 본 문서에 개시된 다양한 실시예들에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예: compact disc read only memory(CD-ROM))의 형태로 배포되거나, 또는 어플리케이션 스토어(예: 플레이 스토어TM)를 통해 또는 두 개의 사용자 장치들(예: 스마트 폰들) 간에 직접, 온라인으로 배포(예: 다운로드 또는 업로드)될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 기기로 읽을 수 있는 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.According to one embodiment, the method according to various embodiments disclosed in this document may be provided as included in a computer program product. Computer program products may be traded between sellers and buyers as commodities. The computer program product is distributed in the form of a machine-readable storage medium (eg compact disc read only memory (CD-ROM)), or via an application store (eg Play Store TM ) or on two user devices ( It can be distributed (eg downloaded or uploaded) directly between smartphones, eg between smartphones. In the case of online distribution, at least a part of the computer program product may be temporarily stored or temporarily created in a machine-readable storage medium such as a memory of a server of a manufacturer, a server of an application store, or a relay server.

다양한 실시예들에 따르면, 상기 기술한 구성요소들의 각각의 구성요소(예: 모듈 또는 프로그램)는 단수 또는 복수의 개체를 포함할 수 있다. 다양한 실시예들에 따르면, 전술한 해당 구성요소들 중 하나 이상의 구성요소들 또는 동작들이 생략되거나, 또는 하나 이상의 다른 구성요소들 또는 동작들이 추가될 수 있다. 대체적으로 또는 추가적으로, 복수의 구성요소들(예: 모듈 또는 프로그램)은 하나의 구성요소로 통합될 수 있다. 이런 경우, 통합된 구성요소는 상기 복수의 구성요소들 각각의 구성요소의 하나 이상의 기능들을 상기 통합 이전에 상기 복수의 구성요소들 중 해당 구성요소에 의해 수행되는 것과 동일 또는 유사하게 수행할 수 있다. 다양한 실시예들에 따르면, 모듈, 프로그램 또는 다른 구성요소에 의해 수행되는 동작들은 순차적으로, 병렬적으로, 반복적으로, 또는 휴리스틱하게 실행되거나, 상기 동작들 중 하나 이상이 다른 순서로 실행되거나, 생략되거나, 또는 하나 이상의 다른 동작들이 추가될 수 있다.According to various embodiments, each component (eg, a module or a program) of the above-described components may include a singular or a plurality of entities. According to various embodiments, one or more components or operations among the above-described corresponding components may be omitted, or one or more other components or operations may be added. Alternatively or additionally, a plurality of components (eg, a module or a program) may be integrated into one component. In this case, the integrated component may perform one or more functions of each component of the plurality of components identically or similarly to those performed by the corresponding component among the plurality of components prior to the integration. . According to various embodiments, operations performed by a module, program, or other component are executed sequentially, in parallel, repeatedly, or heuristically, or one or more of the operations are executed in a different order, or omitted. or one or more other operations may be added.

Claims (20)

전자 장치에 있어서,
디스플레이;
메모리; 및
프로세서;를 포함하고,
상기 프로세서는
상기 메모리에 저장된 제1 동영상에서, 복수의 프레임들을 추출하고,
상기 복수의 프레임들 각각에 대해, 제1 객체가 배치되는 객체 영역과 상기 객체 영역을 제외한 배경 영역을 구분하고,
상기 복수의 프레임들 중, 상기 제1 객체의 배치 형태를 기반으로 키 프레임을 결정하고,
상기 복수의 프레임들 중 상기 키 프레임을 제외한 배경 프레임들의 배경 영역에서 움직임이 발생한 모션 영역을 결정하고,
상기 배경 프레임들의 모션 영역을 결합하여 배경 영상을 생성하고,
상기 키 프레임의 객체 영역과 상기 배경 영상을 결합하여, 제2 동영상을 생성하는 전자 장치.
In an electronic device,
display;
Memory; and
processor; including;
the processor
Extracting a plurality of frames from the first video stored in the memory,
For each of the plurality of frames, an object area in which the first object is disposed and a background area other than the object area are divided;
determining a key frame based on an arrangement shape of the first object among the plurality of frames;
determining a motion region in which motion occurs in a background region of background frames other than the key frame among the plurality of frames;
A background image is generated by combining the motion regions of the background frames,
The electronic device generates a second video by combining the object region of the key frame and the background image.
제1항에 있어서, 상기 프로세서는;
상기 제1 동영상에서 램덤하게 상기 복수의 프레임들을 추출하는 전자 장치.
According to claim 1, wherein the processor;
An electronic device for randomly extracting the plurality of frames from the first video.
제1항에 있어서, 상기 프로세서는
프레임 사이의 유사도를 기반으로 상기 복수의 프레임들을 추출하는 전자 장치.
The method of claim 1, wherein the processor is
An electronic device extracting the plurality of frames based on the similarity between the frames.
제1항에 있어서,
카메라를 더 포함하고,
상기 프로세서는 상기 카메라를 통해 상기 제1 영상이 촬영되는 중에, 상기 복수의 프레임들을 추출하는 전자 장치.
According to claim 1,
further including a camera,
The processor extracts the plurality of frames while the first image is captured by the camera.
제1항에 있어서, 상기 프로세서는
상기 복수의 프레임들 각각에서 인식된 객체들 중 객체와의 거리, 객체가 차지하는 면적, 포커싱 여부 중 적어도 하나를 기반으로 상기 제1 객체를 결정하는 전자 장치.
The method of claim 1, wherein the processor is
The electronic device determines the first object based on at least one of a distance to an object, an area occupied by the object, and whether or not focusing is performed among the objects recognized in each of the plurality of frames.
제1항에 있어서, 상기 프로세서는
상기 복수의 프레임들의 수평 방향과 수직 방향을 결정하고,
상기 제1 객체의 배치 방향과 상기 수평 방향 또는 상기 수직 방향과의 일치 정도를 기반으로 상기 키 프레임 또는 상기 배경 프레임을 결정하는 전자 장치.
The method of claim 1, wherein the processor is
determining the horizontal and vertical directions of the plurality of frames,
The electronic device determines the key frame or the background frame based on a degree of coincidence between an arrangement direction of the first object and the horizontal direction or the vertical direction.
제6항에 있어서, 상기 프로세서는
상기 일치 정도가 가장 높은 프레임을 상기 키 프레임으로 결정하는 전자 장치.
7. The method of claim 6, wherein the processor
The electronic device determines a frame having the highest degree of matching as the key frame.
제6항에 있어서, 상기 프로세서는
상기 일치 정도가 지정된 범위 내에 있는 프레임들을 상기 배경 프레임으로 결정하는 전자 장치.
7. The method of claim 6, wherein the processor
an electronic device that determines frames having the matching degree within a specified range as the background frame.
제1항에 있어서, 상기 프로세서는
상기 제1 객체의 특징점들을 인식하고, 상기 특징점들을 기반으로 상기 키 프레임 또는 상기 배경 프레임을 결정하는 전자 장치.
The method of claim 1, wherein the processor is
The electronic device recognizes feature points of the first object and determines the key frame or the background frame based on the feature points.
제1항에 있어서, 상기 프로세서는
상기 배경 프레임의 상기 배경 영역을 기반으로 제1 레이어를 생성하고,
상기 키 프레임의 객체 영역을 기반으로 제2 레이어를 생성하고,
상기 제1 레이어 및 제2 레이어를 결합하여 상기 제2 동영상을 생성하는 전자 장치.
The method of claim 1, wherein the processor is
creating a first layer based on the background area of the background frame;
creating a second layer based on the object area of the key frame;
An electronic device generating the second video by combining the first layer and the second layer.
제1항에 있어서, 상기 프로세서는
상기 모션 영역과 상기 객체 영역 사이의 이미지 처리를 통해 상기 모션 영역과 상기 객체 영역 사이의 유사도를 높이는 전자 장치.
The method of claim 1, wherein the processor is
An electronic device that increases the similarity between the motion region and the object region through image processing between the motion region and the object region.
제1항에 있어서, 상기 프로세서는
상기 복수의 프레임들 각각에서 인식된 제2 객체를 비교하여 상기 상기 복수의 프레임들의 구도를 조절하는 전자 장치.
The method of claim 1, wherein the processor is
An electronic device for adjusting a composition of the plurality of frames by comparing a second object recognized in each of the plurality of frames.
제1항에 있어서, 상기 프로세서는
상기 배경 프레임들 각각을 복수의 섹션들로 구분하고,
각각의 섹션에서 움직임이 발생한 섹션을 결합하여 상기 모션 영역을 결정하는 전자 장치.
The method of claim 1, wherein the processor is
dividing each of the background frames into a plurality of sections,
An electronic device for determining the motion region by combining the sections in which motion has occurred in each section.
제1항에 있어서, 상기 프로세서는
상기 배경 프레임과, 상기 배경 프레임의 이전 또는 이후 프레임을 이용하여 상기 배경 영상을 생성하는 전자 장치.
The method of claim 1, wherein the processor is
The electronic device generates the background image by using the background frame and a frame before or after the background frame.
제14항에 있어서, 상기 프로세서는
상기 배경 프레임과, 상기 이전 또는 이후 프레임에 상기 움직임이 발생한 정도를 기반으로 가중치를 반영하여 상기 배경 영상을 생성하는 전자 장치.
15. The method of claim 14, wherein the processor
The electronic device generates the background image by reflecting a weight based on the degree of occurrence of the motion in the background frame and the previous or subsequent frames.
제1항에 있어서, 상기 프로세서는
상기 제2 동영상을 무한 재생하는 전자 장치.
The method of claim 1, wherein the processor is
An electronic device for infinitely reproducing the second video.
제1항에 있어서, 상기 프로세서는
상기 제2 동영상을 재생하고, 상기 제2 영상의 마지막 프레임과 일치 비율이 지정된 값 이상인 프레임부터 다시 재생하는 전자 장치.
The method of claim 1, wherein the processor is
The electronic device reproduces the second video and reproduces a frame having a matching ratio equal to or greater than a specified value to the last frame of the second image.
전자 장치에서 수행되는 동영상 처리 방법은
상기 전자 장치의 메모리에 저장된 제1 동영상에서, 복수의 프레임들을 추출하는 동작;
상기 복수의 프레임들 각각에 대해, 제1 객체가 배치되는 객체 영역과 상기 객체 영역을 제외한 배경 영역을 구분하는 동작;
상기 복수의 프레임들 중, 상기 제1 객체의 배치 형태를 기반으로 키 프레임을 결정하는 동작;
상기 복수의 프레임들 중 상기 키 프레임을 제외한 배경 프레임들의 배경 영역에서 움직임이 발생한 모션 영역을 결정하는 동작;
상기 배경 프레임들의 모션 영역을 결합하여 배경 영상을 생성하는 동작; 및
상기 키 프레임의 객체 영역과 상기 배경 영상을 결합하여, 제2 동영상을 생성하는 동작;을 포함하는 방법
The video processing method performed by the electronic device is
extracting a plurality of frames from the first video stored in the memory of the electronic device;
for each of the plurality of frames, dividing an object area in which a first object is disposed and a background area excluding the object area;
determining a key frame from among the plurality of frames based on an arrangement shape of the first object;
determining a motion region in which motion occurs in a background region of background frames other than the key frame among the plurality of frames;
generating a background image by combining motion regions of the background frames; and
generating a second video by combining the object region of the key frame and the background image;
제 18항에 있어서, 상기 키 프레임을 결정하는 동작은
상기 복수의 프레임들의 수평 방향과 수직 방향을 결정하는 동작; 및
상기 제1 객체의 배치 방향과 상기 수평 방향 또는 상기 수직 방향과의 일치 정도를 기반으로 상기 키 프레임 또는 상기 배경 프레임을 결정하는 동작;을 포함하는 방법.
The method of claim 18, wherein the determining of the key frame comprises:
determining a horizontal direction and a vertical direction of the plurality of frames; and
and determining the key frame or the background frame based on a degree of coincidence between the arrangement direction of the first object and the horizontal direction or the vertical direction.
제 18항에 있어서, 상기 복수의 프레임들을 추출하는 동작은
상기 복수의 프레임들 각각에서 인식된 제2 객체를 비교하여 상기 상기 복수의 프레임들의 구도를 조절하는 동작;을 포함하는 방법.
The method of claim 18, wherein the extracting of the plurality of frames comprises:
Comparing a second object recognized in each of the plurality of frames, and adjusting the composition of the plurality of frames.
KR1020190178495A 2019-12-30 2019-12-30 Method for processing a video and an electronic device supporting the same KR20210086812A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020190178495A KR20210086812A (en) 2019-12-30 2019-12-30 Method for processing a video and an electronic device supporting the same
PCT/KR2020/019308 WO2021137584A1 (en) 2019-12-30 2020-12-29 Moving image processing method and electronic device for supporting same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190178495A KR20210086812A (en) 2019-12-30 2019-12-30 Method for processing a video and an electronic device supporting the same

Publications (1)

Publication Number Publication Date
KR20210086812A true KR20210086812A (en) 2021-07-09

Family

ID=76686637

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190178495A KR20210086812A (en) 2019-12-30 2019-12-30 Method for processing a video and an electronic device supporting the same

Country Status (2)

Country Link
KR (1) KR20210086812A (en)
WO (1) WO2021137584A1 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016032193A (en) * 2014-07-29 2016-03-07 株式会社ニコン Imaging apparatus
JP6049024B2 (en) * 2014-08-11 2016-12-21 株式会社チャオ Image transmission apparatus, image transmission method, and image transmission program
JP6478536B2 (en) * 2014-09-09 2019-03-06 キヤノン株式会社 Image processing apparatus and imaging apparatus, and control method and program thereof
JP2016129281A (en) * 2015-01-09 2016-07-14 キヤノン株式会社 Image processor
KR101993962B1 (en) * 2016-12-22 2019-07-01 전자부품연구원 N-View Blending-based Hole Filling Method for Intermediate View Image

Also Published As

Publication number Publication date
WO2021137584A1 (en) 2021-07-08

Similar Documents

Publication Publication Date Title
KR102565755B1 (en) Electronic device for displaying an avatar performed a motion according to a movement of a feature point of a face and method of operating the same
KR102629346B1 (en) The foldable electronic device including a plurality of camera modules
KR102664688B1 (en) Method for providing shoot mode based on virtual character and electronic device performing thereof
KR102659357B1 (en) Electronic device for providing avatar animation and method thereof
US11189102B2 (en) Electronic device for displaying object for augmented reality and operation method therefor
CN112907725B (en) Image generation, training of image processing model and image processing method and device
US20190354259A1 (en) Electronic device for providing vr/ar content
US20210248218A1 (en) Electronic device and method for recognizing object
US20230074380A1 (en) Electronic device for providing augmented reality service and operating method thereof
US11284020B2 (en) Apparatus and method for displaying graphic elements according to object
US20230005227A1 (en) Electronic device and method for offering virtual reality service
CN116057451A (en) Method for changing setting of display and electronic device
KR102624100B1 (en) Method for controlling display and electronic device thereof
KR102653252B1 (en) Electronic device for providing visualized artificial intelligence service based on information of external object and method for the same
KR20210040680A (en) The electronic device including a plurality of cameras, the shape of which changes and the method for shooting image
KR20200076438A (en) Electronic device for tracking activity of user and method for the same
KR20200046417A (en) Apparatus and method for creating avatar based on compensated image
US11164388B2 (en) Electronic device and method for providing augmented reality object therefor
KR102570009B1 (en) Electronic device and method for generating argument reality object
EP4087232A1 (en) Electronic device, and method for performing autofocus
KR20210086812A (en) Method for processing a video and an electronic device supporting the same
KR20210136659A (en) Electronic device for providing augmented reality service and operating method thereof
KR20200095691A (en) the method for recognizing the object using the mmWave and the electronic device supporting the same
KR20200105234A (en) Electronic device and method for generating contents
EP4369721A1 (en) Electronic device for providing content in association with external display device and content providing method thereof

Legal Events

Date Code Title Description
E902 Notification of reason for refusal