WO2021221394A1 - Method and electronic device for image augmentation - Google Patents

Method and electronic device for image augmentation Download PDF

Info

Publication number
WO2021221394A1
WO2021221394A1 PCT/KR2021/005171 KR2021005171W WO2021221394A1 WO 2021221394 A1 WO2021221394 A1 WO 2021221394A1 KR 2021005171 W KR2021005171 W KR 2021005171W WO 2021221394 A1 WO2021221394 A1 WO 2021221394A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual object
image
electronic device
trajectory
objects
Prior art date
Application number
PCT/KR2021/005171
Other languages
French (fr)
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 삼성전자 주식회사
Publication of WO2021221394A1 publication Critical patent/WO2021221394A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/006Mixed reality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration

Definitions

  • Various embodiments relate to a method of augmenting an image in an electronic device.
  • AR augmented reality
  • the function of adding an AR sticker to give an AR effect to the image is to detect a horizontal plane and a vertical plane in the preview image of the camera and overlay objects on the detected plane. It is difficult to give an AR effect to an image.
  • a method for an electronic device to augment a virtual object in an image includes: identifying one or more objects in the image; classifying the one or more objects into a main object and a sub-object; obtaining a virtual object related to the main object based on the main object and the sub-object; obtaining depth information of a three-dimensional space in which the image is captured; obtaining a trajectory of the virtual object indicating a three-dimensional movement path relative to the main object, based on the depth information;
  • the method may include moving the virtual object along the trajectory.
  • the moving of the virtual object includes: a size of the virtual object, a direction of the virtual object with respect to the main object, and a direction of the virtual object with respect to the main object.
  • the method may include changing at least one of a position of the virtual object and a perspective view of the virtual object.
  • the moving of the virtual object comprises: a size of the virtual object and the main object based on at least one of a size, a location, and a category of the main object.
  • the method may further include determining a direction of the virtual object with respect to the object, a position of the virtual object with respect to the main object, and a perspective view of the virtual object.
  • the acquiring of the virtual object includes: a relationship between sub-objects identified in the image, a relationship between a main object and sub-objects, an interest identifying at least one of a region and a context of the image; Generating a context connection tree representing a connection relationship between the main object and the sub-objects based on at least one of a relationship between the sub-objects, a relationship between a main object and sub-objects, a region of interest, and a context of the image ; and identifying the virtual object based on the context connection tree.
  • the depth information may include foreground information and background information of the image.
  • the moving the virtual object may include controlling visibility of the virtual object based on the depth information. have.
  • the moving of the virtual object includes: the depth information, a direction of the virtual object with respect to the main object, and the virtual object from the main object
  • the method may further include changing the perspective view based on the distance of .
  • the acquiring the trajectory includes acquiring a user input guiding a movement path of the virtual object from a user of the electronic device can do.
  • the acquiring the trajectory includes applying the virtual object to an artificial intelligence model to acquire a trajectory corresponding to the virtual object can do.
  • an electronic device for augmenting a virtual object on an image includes: a communication unit; display; a memory storing a program including one or more instructions; at least one processor executing one or more instructions of the program stored in the memory, wherein the at least one processor identifies one or more objects in the image and converts the one or more objects into main objects and sub-objects. classify, obtain a virtual object related to the main object based on the main object and the sub-object, obtain depth information of a three-dimensional space in which the image is captured, and based on the depth information, with respect to the main object The electronic device may obtain a trajectory of the virtual object indicating a relative three-dimensional movement path and control the display to display the movement of the virtual object.
  • FIG. 1 is a block diagram illustrating a configuration of an electronic device according to an exemplary embodiment.
  • FIG. 2 is a block diagram illustrating a configuration of an object controller according to an exemplary embodiment.
  • FIG. 3 is a flowchart illustrating a method in which an electronic device generates an augmented image by identifying a virtual object and a trajectory of the virtual object, according to an exemplary embodiment.
  • FIG. 4 is a diagram for describing a method in which an electronic device generates a moving trajectory of a virtual object using an artificial intelligence model, according to an exemplary embodiment.
  • FIG. 5 is a flowchart illustrating a method for an electronic device to determine a virtual object and a trajectory by using object identification information, image depth information, and context information, according to an exemplary embodiment.
  • FIG. 6 is a diagram for describing a method for an electronic device to recognize an object in an image and acquire a virtual object, according to an exemplary embodiment.
  • FIG. 7 is a diagram for describing a method of an electronic device moving a virtual object in an image based on depth information, according to an exemplary embodiment.
  • FIG. 8 is a diagram for describing a method of an electronic device moving a virtual object in an image based on a user input, according to an exemplary embodiment.
  • FIG. 9 is a diagram for describing a method of obtaining, by an electronic device, a virtual object to be augmented on an image and a trajectory of the virtual object, according to an exemplary embodiment
  • FIG. 10 is a diagram for describing a method of obtaining, by an electronic device, a virtual object based on information obtained from an image, according to an exemplary embodiment.
  • FIG. 11 is a diagram for describing a method of obtaining, by an electronic device, a virtual object by a user input, according to an exemplary embodiment.
  • FIG. 12 is a diagram for describing a method of an electronic device recommending a virtual object and a trajectory of the virtual object, according to an exemplary embodiment.
  • FIG. 13 is a diagram for describing various methods of augmenting an image by an electronic device using a virtual object, according to an exemplary embodiment.
  • FIG. 14 is a diagram for describing a method of augmenting an image based on a user gesture by an electronic device, according to an exemplary embodiment.
  • 15 is a flowchart illustrating a method of augmenting an image by an electronic device according to an exemplary embodiment.
  • 16 is a flowchart illustrating a method for an electronic device to acquire a virtual object, according to an embodiment.
  • 17 is a diagram for describing a method of obtaining, by an electronic device, an animation effect and a trajectory of a virtual object based on a pre-stored mapping table, according to an exemplary embodiment.
  • FIG. 1 is a block diagram illustrating a configuration of an electronic device according to an exemplary embodiment.
  • 'augmenting an image' by the electronic device 100 means that the electronic device 100 adds a virtual object in the original image, and a specific effect (eg, animation effect, virtual object movement, etc.).
  • a moving picture implementing the above-described animation effect may be generated through 'image augmentation', and each frame of the generated moving picture may be composed of a plurality of augmented images.
  • 'augmentation of an image' may be equally applied and expanded to a method of 'augmentation of a video'.
  • the following description will be based on 'image'.
  • the electronic device 100 may augment a virtual object in an image according to the disclosed embodiments.
  • the electronic device 100 may be, for example, a smart watch, a smart phone, a smart TV, a smart robot, an artificial intelligence speaker, a personal digital assistant (PDA), a tablet computer, a laptop computer, a music player, a video player, etc., but is limited thereto. it's not going to be
  • PDA personal digital assistant
  • the electronic device 100 may be configured to include at least a processor 110 , a communication unit 120 , a memory 130 , a display 140 , and an object controller 150 .
  • the processor 110 may execute one or more instructions of a program stored in the memory 130 .
  • the processor 110 may be composed of hardware components that perform arithmetic, logic, input/output operations and signal processing.
  • Processor 110 is, for example, a central processing unit (Central Processing Unit), a microprocessor (microprocessor), a graphic processor (Graphic Processing Unit), ASICs (Application Specific Integrated Circuits), DSPs (Digital Signal Processors), DSPDs (Digital Signal Processing Devices), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), Application Processors (APs), Neural Processing Units, or artificial intelligence-only processors designed with a hardware structure specialized for processing artificial intelligence models. It may consist of at least one, but is not limited thereto.
  • the communication unit 120 may perform data communication with an external device (eg, a server or other electronic device) under the control of the processor 110 .
  • an external device eg, a server or other electronic device
  • the communication unit 120 is, for example, a wired LAN, a wireless LAN, a Wi-Fi, a Bluetooth, a Zigbee, a Wi-Fi Direct (WFD), an infrared communication (IrDA). Data Association), BLE (Bluetooth Low Energy), NFC (Near Field Communication), WiBro (Wireless Broadband Internet, Wibro), WiMAX (World Interoperability for Microwave Access, WiMAX), SWAP (Shared Wireless Access Protocol), WiGig ( Data communication with an external device may be performed using at least one of data communication methods including Wireless Gigabit Alliance (WiGig) and RF communication.
  • WiGig Wireless Gigabit Alliance
  • instructions, data structures, and program codes readable by the processor 110 may be stored.
  • operations performed by the processor 110 may be implemented by executing instructions or codes of a program stored in the memory 130 .
  • the memory 130 may include, for example, a flash memory type, a hard disk type, a multimedia card micro type, or a card type memory (eg, SD or XD memory). etc.), RAM (Random Access Memory) SRAM (Static Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), PROM (Programmable Read-Only Memory), magnetic It may include at least one type of storage medium among a memory, a magnetic disk, and an optical disk.
  • RAM Random Access Memory
  • SRAM Static Random Access Memory
  • ROM Read-Only Memory
  • EEPROM Electrical Erasable Programmable Read-Only Memory
  • PROM Programmable Read-Only Memory
  • magnetic It may include at least one type of storage medium among a memory, a magnetic disk, and an optical disk.
  • the display 140 may display information processed by the electronic device 100 .
  • the display 140 may display the augmented image generated by the electronic device 100 .
  • the augmented image may be an image in which a virtual object generated by the electronic device 100 is rendered in the image.
  • a video in which the virtual object moves within the image and reproduces various animation effects may be generated.
  • the disclosed embodiments may include an embodiment in which an augmented video is generated using a plurality of augmented images.
  • the object controller 150 may perform various operations for the electronic device 100 to generate an augmented image.
  • the object controller 150 may acquire a virtual object and a trajectory indicating a path along which the virtual object moves in the image.
  • the trajectory may be a trajectory of a virtual object indicating a movement path relative to the main object.
  • the object controller 150 may move the virtual object in the image along the trajectory of the virtual object.
  • the present invention is not limited thereto, and the object controller 150 may augment the image by applying only a predetermined animation effect without moving the virtual object in the image.
  • the object controller 150 may obtain depth information from an image.
  • the object controller 150 selects at least one of the size, direction and position of the virtual object at different depths in the three-dimensional space of the image including depth information, and a perspective view. can be changed
  • the trajectory on which the virtual object moves may be a 3D trajectory generated based on the acquired trajectory and depth information.
  • the object controller 150 is implemented as hardware that enables the electronic device 100 to perform a series of operations for generating an augmented image, or is implemented in the form of software and stored in the memory 130 of the electronic device 100 . can be
  • FIG. 2 is a block diagram illustrating a configuration of an object controller according to an exemplary embodiment.
  • the electronic device 100 may augment the virtual object in the image acquired by the electronic device using the object controller 150 .
  • the object controller 150 includes at least an object identification and classification engine 202 , a depth segmentation engine 204 , a context analyzer 206 , and one or more artificial intelligence models 208 . may include The object controller 150 may perform overall operations for controlling the virtual object in the image.
  • the main object may be an object determined as a subject to be photographed from among the objects identified in the image.
  • the electronic device 100 may classify an object determined to be an important object among the objects identified in the image as a main object.
  • the identified main object may be plural.
  • the sub-object may be an object that is not a target of photographing among objects identified in the image, but exists in the image.
  • the electronic device 100 may classify an object that is not classified as a main object in an image as a sub-object.
  • the identified sub-objects may be plural.
  • the virtual object may be an object for generating an augmented image by adding an animation effect to the acquired image.
  • the electronic device 100 may acquire a virtual object to be added to an image based on at least a part of the main object, the sub-object, and the context information of the image.
  • the object controller 150 may use the object identification and classification engine 202 to identify and classify objects within the image.
  • the object identification and classification engine 202 may identify at least one object within the image.
  • the object identification and classification engine 202 may classify the identified at least one object into a main object and a sub-object.
  • one identified object may be classified as a main object, and in this case, the main object may be treated as a main object and a sub-object in the disclosed embodiments.
  • the object identification and classification engine 202 may identify at least one object existing in the image by using the object recognition model among the artificial intelligence models 208 .
  • the object identification and classification engine 202 may classify at least one object identified within the image. For example, when there are a plurality of identified at least one object, the object identification and classification engine 202 classifies the identified objects into groups of the same or similar category, thereby identifying a relationship between the objects.
  • the information indicating the relationship between the identified objects may include a degree of similarity between categories of objects classified into groups, and the number of objects included in the group. Also, the information indicating the relationship between the identified objects may include relationship information between the main object and the sub-objects and relationship information between the sub-objects.
  • the electronic device 100 may acquire a virtual object to be added to an image and a trajectory of the virtual object based on the identified objects and classification information of the objects.
  • the electronic device 100 may obtain depth information of a 3D space in which an image is captured by using a depth segmentation engine 204 .
  • the depth segmentation engine 204 recognizes an object (eg, a person) within an image, and segments the image into a foreground image and a background image based on the recognized object. can do.
  • the foreground image and the background image may be one or more images having different depths.
  • the depth segmentation engine 204 divides the image into a background image and a first foreground image having different depths, a second foreground image, . . . , can be divided into the N-th foreground image.
  • the depth segmentation engine 204 may obtain segmentation levels of segmented images having different depths as depth information.
  • the electronic device 100 may acquire depth information of a 3D space in which an image is captured in another method.
  • the electronic device 100 may acquire depth information from an image captured by using at least two or more cameras.
  • the electronic device 100 may obtain depth information from an image including depth information captured using an RGB-Depth (RGB-D) camera.
  • RGB-D RGB-Depth
  • the electronic device 100 may give perspective to the image and the virtual object by enabling three-dimensional movement when the virtual object moves along a trajectory in the image by using the obtained depth information.
  • the electronic device 100 generates a 3D trajectory to move the virtual object in an image by using the acquired trajectory and depth information of the virtual object, and moves the virtual object along the generated 3D trajectory.
  • the electronic device 100 may obtain context information of an image using the context analyzer 206 and analyze the obtained context information.
  • the context information may include, for example, at least one of a pose, emotion, action, scene of an image, an event in the image, and a location at which the image is captured, of an object in the image, but is not limited thereto.
  • the context analyzer 206 may identify at least context information existing in the image by analyzing the image using the context information acquisition model among the artificial intelligence models 208 .
  • the electronic device 100 may acquire a virtual object and a trajectory of the virtual object based on a result of analyzing the identified context information.
  • the electronic device 100 may analyze the identified context information and combine at least a portion of the identified context information in various ways to identify a virtual object and a trajectory of the virtual object.
  • the electronic device 100 may identify a pose of an object in an image and analyze the identified pose to identify an action that the object in the image is taking.
  • the electronic device 100 may identify a virtual object related to the action of the object and a trajectory of the virtual object based on the action of the object.
  • the electronic device 100 may identify a scene/event in an image, and analyze the identified scene and event to identify a theme of the image.
  • the electronic device 100 may identify a virtual object related to the theme of the image and a trajectory of the virtual object based on the theme of the image.
  • the electronic device 100 identifies a place (eg, a travel destination, a restaurant, etc.) where an image was captured, and based on the identified place where the image was captured, a virtual object related to the place where the image was captured and a trajectory of the virtual object may be identified.
  • a place eg, a travel destination, a restaurant, etc.
  • the electronic device 100 identifies and analyzes context information to identify a virtual object and a trajectory have been described. However, this should be understood only as an exemplary embodiment, and the electronic device 100 may use at least a portion of the context of an image or Based on the combination, it is possible to determine the virtual object and trajectory to be added to the image.
  • one or more artificial intelligence models 208 may include various artificial intelligence models trained to perform a particular action.
  • the AI models 208 may include a model for identifying an object in an image, a model for analyzing the context of an image, a model for determining a virtual object to be added in the image, and a model for identifying a trajectory of the virtual object. It may be a model, an artificial intelligence model for recommending a virtual object and a trajectory to a user, but is not limited thereto.
  • the one or more AI models 208 may be an AI model that is implemented as a single AI model and trained to perform all of the various operations and functions described above.
  • FIG. 3 is a flowchart illustrating a method in which an electronic device generates an augmented image by identifying a virtual object and a trajectory of the virtual object, according to an exemplary embodiment.
  • the electronic device 100 may acquire an image.
  • the electronic device 100 may acquire an image by photographing it using a camera.
  • there may be more than one camera, and may be an RGB-D camera capable of acquiring depth information together.
  • the electronic device 100 may obtain an image from an external device using the communication unit 120 .
  • the electronic device 100 may identify at least one object in the image and classify the identified object.
  • the electronic device 100 may identify at least one object in the image by applying the obtained image to the artificial intelligence model. When there are a plurality of objects in the image, the electronic device 100 may classify the identified objects into a main object to which the virtual object is to be augmented and sub-objects for determining the virtual object.
  • the electronic device 100 may generate an object tag 322 by assigning a unique tag (eg, object identification information, category information, etc.) to each of the objects identified in the image.
  • a unique tag eg, object identification information, category information, etc.
  • the electronic device 100 may identify a relationship between the objects by classifying the identified objects into groups of the same or similar category.
  • the electronic device 100 may acquire depth information 332 by performing depth division on the acquired image.
  • the electronic device 100 may divide the image into a foreground and a background based on at least one object identified in the acquired image.
  • the foreground image and the background image may be one or more images having different depths.
  • the depth segmentation engine 204 divides the image into a background image and a first foreground image having different depths, a second foreground image, . . . , can be divided into the N-th foreground image.
  • the depth segmentation engine 204 may obtain segmentation levels of segmented images having different depths as depth information 332 .
  • the method by which the electronic device 100 acquires the depth information 332 is not limited thereto, and the electronic device 100 acquires the depth information 332 from an image photographed using at least two or more cameras, or Depth information 332 may be obtained from an image including depth information photographed using an RGB-Depth (RGB-D) camera.
  • RGB-D RGB-Depth
  • the electronic device 100 may acquire a virtual object to be added to the image.
  • the virtual object may be an object for applying an animation effect to the main object identified in step S320.
  • the virtual object may be an object for imparting an animation effect to another region in the image obtained by the identified main object.
  • the electronic device 100 may determine the virtual object 352 to be added to the image based on the object tags of the main object and the sub-objects identified in operation S320 .
  • the electronic device 100 may determine the virtual object 352 from among a plurality of virtual object candidates stored in the memory of the electronic device 100 or in an external device (eg, a server).
  • the electronic device 100 determines an object similar to the main object as the virtual object 352 based on the object tag of the main object, obtains the determined virtual object 352, or an animation effect suitable for the main object
  • An object to which can be assigned is determined as a virtual object 352 , and the determined virtual object 352 may be obtained.
  • the electronic device 100 determines an object similar to the sub-object as the virtual object 352 based on the object tag of the sub-object, obtains the determined virtual object 352, or stores the object tag of the sub-objects. Based on the virtual object 352 , an object capable of imparting an animation effect suitable for the main object may be determined and the determined virtual object 352 may be obtained.
  • the main object may not exist in the image acquired by the electronic device 100 .
  • the electronic device may determine the virtual object 352 to be added to at least a partial area in the image based on the context information of the image.
  • the electronic device 100 determines a virtual object 352 to be added to the image based on a combination of at least two or more of the object tag of the main object, the object tag of the sub-object, and context information of the image, and the determined virtual An object 352 may be obtained.
  • the obtained virtual object 352 may be added to an image to give an animation effect to a main object in the image, or may be used to create an augmented image that animates at least some regions in the image.
  • the electronic device 100 may obtain a trajectory 354 indicating a movement path of the virtual object 352 .
  • the trajectory 354 may be a trajectory revolving around the main object based on the identified main object.
  • the present invention is not limited thereto, and the trajectory 354 may be a trajectory indicating a relative movement path of the virtual object 352 with respect to the main object with respect to the main object.
  • the electronic device 100 may obtain a user input guiding a movement path of the virtual object 352 from the user. For example, the electronic device 100 obtains a user input for drawing a trajectory of a virtual object on an input device (eg, a touch screen, etc.) of the electronic device 100 , and uses the obtained user input as the trajectory of the virtual object. (354) can be determined. In another example, the electronic device 100 may acquire the trajectory 354 from the user's other external device (eg, a smart watch, a stylus pen, etc.). In this case, the other external device may include a plurality of sensors (motion sensor, gyro sensor, etc.).
  • the user's other external device may identify an operation in which the user draws a trajectory of the virtual object 352 using another external device, generate a trajectory corresponding to the identified operation, and transmit the generated trajectory to the electronic device 100 .
  • the electronic device 100 may obtain the trajectory 354 indicating the movement path of the virtual object by using the artificial intelligence model learned to generate the trajectory corresponding to the obtained virtual object 352 . .
  • the obtained trajectory 354 of the virtual object includes depth information and may be a trajectory corresponding to a movement path of the virtual object in a 3D space. Also, the obtained trajectory 354 of the virtual object may be a trajectory corresponding to a movement path of the virtual object on a two-dimensional plane.
  • the electronic device 100 may move the obtained virtual object 352 on the trajectory 354 .
  • the electronic device 100 may move the virtual object 352 by using the depth information 332 together.
  • the electronic device 100 may move the virtual object 352 along the trajectory 354 in the image. While the electronic device 100 moves the virtual object 352 along the trajectory, the size of the virtual object 352, the direction of the virtual object 352 with respect to the main object, the position of the virtual object with respect to the main object, and the virtual object At least one of the perspective views of 352 may be changed.
  • the electronic device 100 moves the virtual object 352 to a deeper region of the three-dimensional space in the image based on the two-dimensional plane of the image. Adjust the size of the virtual object 352 to become smaller in order to express (352) can be adjusted to increase the size.
  • the electronic device 100 displays the direction of the virtual object 352 to represent that animation effects are applied based on the main object. and position can be adjusted.
  • the electronic device 100 may adjust the direction of the virtual object 352 with respect to the main object and the position of the virtual object with respect to the main object for each image corresponding to every frame of a moving picture in which the virtual object moves. .
  • the electronic device 100 may provide only an animation effect without moving the virtual object 352 even if the trajectory 354 does not exist or even if the trajectory 354 exists.
  • the electronic device 100 may store the augmented image including the obtained virtual object 352 .
  • the electronic device 100 may generate a video in which the virtual object 352 moves on the trajectory 354 by generating a plurality of images in which the obtained virtual object 352 is augmented.
  • the moving picture in which the virtual object 352 moves on the trajectory 354 may be composed of images in which respective frames of the moving picture are augmented.
  • FIG. 4 is a diagram for describing a method in which an electronic device generates a moving trajectory of a virtual object using an artificial intelligence model, according to an exemplary embodiment.
  • the electronic device 100 may obtain a plurality of images or an input 402 in the form of a video including the plurality of images as frames.
  • the electronic device 100 may perform video analysis.
  • the electronic device 100 may obtain the input 402 and perform object identification, object classification, and context analysis.
  • the video analysis operation of step S404 may correspond to the function and operation of the object controller 150 described with reference to FIG. 2 .
  • Input 402 may be in the form of video and images. Hereinafter, for convenience of description, an image will be used as a reference.
  • the electronic device 100 may generate a list of data required to identify a virtual object and generate a trajectory based on the object identification, object classification, and context analysis results.
  • the electronic device 100 may generate a list of information obtained by performing the video analysis of operation S404.
  • the electronic device 100 may obtain a list of main objects, sub-objects, virtual object candidates to be added to the image, and actions related to the identified objects identified in the image.
  • the electronic device 100 may identify motions of virtual objects related to objects in the image and scenes based on the analysis result of context information acquired in the image.
  • the identified movement of the virtual object may be a general movement of the virtual object determined by the electronic device 100, and the virtual object is created using information such as the location and size of the main object, sub-object, and scene in the image. It may be a movement that allows a natural movement within the image.
  • the electronic device 100 may obtain metadata about a main object, a sub-object, virtual object candidates, a trajectory point, and a scene from the list generated in operation S406.
  • the trajectory point may be coordinates in space in the image corresponding to the trajectory indicating the movement path of the virtual object
  • the scene metadata may indicate the characteristics of the image scene, such as the subject, atmosphere, season, and time of the image scene. It may be information, but is not limited thereto.
  • the electronic device 100 may apply the acquired data to the artificial intelligence model.
  • the electronic device 100 may apply at least a portion of the virtual object candidates, the trajectory point, and the metadata about the scene to the artificial intelligence model 208 .
  • the electronic device 100 may perform trajectory clustering using the artificial intelligence model 208 .
  • the electronic device 100 may identify candidates of trajectories on which the virtual object can move through trajectory clustering, and perform scene-to-virtual object analysis of the image to identify trajectories on which the virtual object moves in the image from among the candidate trajectories.
  • the electronic device may determine the identified trajectory as a contextual trajectory suitable for a scene, and generate identification information of the contextual trajectory.
  • the electronic device 100 may generate a context connection tree and a scene-virtual object connection tree.
  • the electronic device 100 may generate a context connection tree indicating a connection relationship between the main object and the sub-objects.
  • the electronic device 100 may identify at least one of a relationship between a main object and sub-objects, a relationship between sub-objects, an ROI of an image, and obtained context information in an image.
  • the relationship between the objects indicates the relevance of the identified objects in the image based on whether the identified object exists in the region of interest, the similarity of the categories of the identified objects, the relevance of the identified objects with context information, and the like. It may be a score, but is not limited thereto.
  • the electronic device 100 indicates a connection relationship between the main object and the sub-objects based on at least one of the identified relationship between the main object and the sub-objects, the relationship between the sub-objects, the region of interest of the image, and the obtained context information. You can create a context-connected tree.
  • connection relationship between the main object and the sub-object is, for example, connected when the main object and the sub-object belong to the same or similar category and thus has a high relevance between objects, and the main object and the sub-object belong to different categories, so the relevance between objects is high. If not, it may not be connected.
  • the method by which the electronic device 100 generates the context connection tree is not limited thereto, and when the electronic device 100 creates the context connection tree, the electronic device 100 indicates the connection relationship between the main object and the sub-object based on various criteria. can create
  • the electronic device 100 may determine a virtual object to be added to the image based on the connection relationship between the main object and the sub-objects. For example, the electronic device 100 may determine, as a virtual object, an object belonging to the same or similar category to the main object and sub-objects connected to the main object, based on the main object and sub-objects connected to the main object. .
  • the present invention is not limited thereto.
  • the electronic device 100 may connect the main object and the virtual object.
  • the electronic device 100 may identify a contextual trajectory corresponding to a main object and a virtual object connected to the main object.
  • the contextual trajectory may be identified based on the contextual trajectory identification information output using the artificial intelligence model 208 .
  • the electronic device 100 may generate a scene-virtual object connection tree indicating a connection relationship between a scene of an image and a virtual object.
  • the connection relationship between the scene and the virtual object is, for example, connected when the scene of the image and the virtual object to be added to the image belong to the same or similar category and are highly related, and the scene of the image and the virtual object to be added to the image are in different categories If it belongs to and is not highly related, it may not be connected.
  • the present invention is not limited thereto, and the scene-virtual object connection tree may be set in various ways to indicate a connection relationship between the scene and the virtual object.
  • the electronic device 100 may determine a virtual object to be added to the image based on the connection relationship between the scene and the virtual object. For example, the electronic device 100 may determine a virtual object connected to a scene as a virtual object to be added to the image. However, the present invention is not limited thereto. In this case, since the determined virtual object is not related to the main object, but to the scene of the image, unlike the above-described embodiment, the virtual object may not be connected to the main object.
  • the electronic device 100 may identify a contextual trajectory corresponding to the determined virtual object. In this case, the contextual trajectory may be identified based on the contextual trajectory identification information output using the artificial intelligence model 208 .
  • FIG. 5 is a flowchart illustrating a method for an electronic device to determine a virtual object and a trajectory by using object identification information, image depth information, and context information, according to an embodiment.
  • the electronic device 100 may obtain an input 502 and perform object identification, object classification, and context analysis. Step S510 may correspond to step S404 of FIG. 4 .
  • the electronic device 100 may obtain information for determining a virtual object and a trajectory based on the result of operation S510.
  • the electronic device 100 may obtain a main object, a sub-object, virtual object candidates to be added to the image, actions related to the identified objects, trajectory candidates, and scene metadata identified in the image.
  • the scene metadata may be information capable of representing characteristics of an image scene, such as a subject, atmosphere, season, and time of the image scene, but is not limited thereto.
  • the electronic device 100 may determine a trajectory by applying the acquired data to the AI model. For example, the electronic device 100 may input the main object, sub-object, virtual object candidates, and trajectory candidates to the AI model 208 to obtain trajectory clusters for each of the virtual object candidates.
  • the artificial intelligence model 208 may be a model trained to output a trajectory suitable for each virtual object.
  • the cluster of candidate trajectories corresponding to the first candidate virtual object may be T1
  • the cluster of candidate trajectories corresponding to the second candidate virtual object may be T2.
  • the electronic device 100 may analyze the obtained trajectory clusters and determine the trajectory of the candidate virtual object within each trajectory cluster.
  • the electronic device 100 may analyze a relationship with a main object or a sub-object for each of the candidate virtual objects. For example, the electronic device 100 may determine whether the candidate virtual object has high relevance to the main object or whether the candidate virtual object has high relevance to the sub-object.
  • the electronic device 100 may select at least some of the main object and the sub-object.
  • the method for the electronic device 100 to select an object includes a method of selecting only a main object, a method of selecting only a sub-object, a method of selecting using scene metadata, a method of selecting using preset conditions, and other methods. and the like, and is not limited to any one method.
  • the electronic device 100 may select a virtual object corresponding to the selected object from among the candidate virtual objects.
  • the virtual object may be an object corresponding to the main object from among the candidate virtual objects.
  • the sub-object may be an object corresponding to the sub-object from among the candidate virtual objects.
  • the electronic device 100 may augment an image by using a selected object (a main object or a sub-object), a selected virtual object, and a trajectory determined for the selected virtual object. Also, the electronic device 100 may train the artificial intelligence model 208 by using the object selected with respect to the input image and the selected virtual object as training data. When a specific image is input, the electronic device 100 may recommend an object selected by the electronic device 100 to augment the image, a virtual object corresponding to the selected object, and a trajectory corresponding to the virtual object. Intelligence models can be trained.
  • FIG. 6 is a diagram for describing a method for an electronic device to recognize an object in an image and acquire a virtual object, according to an exemplary embodiment.
  • the electronic device 100 may acquire an image 602 .
  • the image 602 may be received from an external device or obtained by photographing the electronic device 100 through a camera.
  • the electronic device 100 may identify one or more objects 604 and 606 within the image 602 .
  • the electronic device 100 may classify the identified objects 604 and 606 . For example, based on a result of analyzing the image 602 , the electronic device 100 identifies that a main subject is a person when capturing an image, classifies the identified first object 604 'person' as a main object, and , the identified second object 606 'butterfly printed on a person's clothes' may be classified as a sub-object.
  • the electronic device 100 may acquire depth information by performing depth division on the image 602 .
  • the electronic device 100 may divide the image 602 into a foreground image 608 and a background image 610 based on the object recognized in the image 602 .
  • the foreground image 608 and the background image 610 are shown as one each in FIG. 6 , the foreground image 608 or the background image 610 may be one or more images each having different depths.
  • the electronic device 100 may acquire depth information corresponding to the foreground image 608 as first depth information and depth information corresponding to the background image 610 as second depth information.
  • the electronic device 100 may acquire a virtual object 612 to be added to the image 602 .
  • the electronic device 100 may acquire the virtual object 612 to be added to the image 602 through an external device or a manual input of a user.
  • the electronic device 100 may determine the virtual object 612 to be added to the image based on the main object 604 , the sub-object 606 , context information of the image, or a combination thereof. Specifically, the electronic device may determine a 'butterfly' similar to the sub-object 606 as the virtual object 612 based on the sub-object 606 .
  • the electronic device 100 may obtain a trajectory cluster for the virtual object 'butterfly'. For example, the electronic device 100 bounces, flies, rotates, or moves (eg, from the left side) to a cluster of candidate trajectories corresponding to the virtual object 612 'butterfly'. to the right or from top to bottom), etc.
  • the electronic device 100 determines a trajectory corresponding to the virtual object 612 in the cluster of obtained candidate trajectories based on the main object 604 , the sub-object 606 , context information of the image, or a cluster analysis result, etc. can
  • the electronic device 100 obtains the virtual object 612 and the trajectory of the virtual object, and renders the plurality of virtual objects on the plurality of images to generate a plurality of augmented images, thereby the main object 604 . It is possible to generate an augmented video in which the virtual object 612 moves along a trajectory around the .
  • the electronic device 100 may control visibility of the virtual object moved in the image 602 based on the acquired depth information and the virtual object. For example, the electronic device 100 may move the obtained virtual object 612 to rotate around the main object 604 based on the main object 604 . In this case, the electronic device 100 overlays the main object 604 on the virtual object 612 to represent a state in which the virtual object 612 is closer than the main object 604 based on the acquired depth information. Thus, the virtual object 612 may be displayed.
  • the electronic device 100 determines that at least a part of the virtual object 612 is Visibility of the virtual object 612 may be controlled by controlling the main object 604 so that it is not displayed.
  • the electronic device 100 determines the size of the virtual object 612, the direction of the virtual object with respect to the main object, the position of the virtual object with respect to the main object, and the virtual object. at least one of the perspective views of This will be further described with reference to FIG. 7 .
  • FIG. 7 is a diagram for describing a method of an electronic device moving a virtual object in an image based on depth information, according to an exemplary embodiment.
  • the electronic device 100 may obtain trajectory(s) indicating a movement path of the virtual object 710 .
  • the trajectory indicating the movement path of the virtual object 710 is the coordinates of all points on the movement path of the virtual object 710 from the point where the movement of the virtual object 710 starts to the point where the movement of the virtual object 710 ends. It may be a set of these, but is not limited thereto.
  • the trajectory of the virtual object 710 may be a set of vectors indicating the distance and direction in which the virtual object 710 moves within one image frame for each of the augmented image frames included in the augmented video. have.
  • a trajectory of the virtual object 710 will be described below by dividing it into a first trajectory 720 and a second trajectory 722 .
  • the first trajectory is a trajectory indicating a movement path in which the virtual object 710 rotates forward of the main object 730
  • the second trajectory indicates that the virtual object 710 rotates backward of the main object 730 .
  • It may be a trajectory indicating a moving path.
  • the virtual object 710 may change in size, direction, position, perspective, and the like as it moves along a trajectory in the image.
  • the electronic device 100 determines the size of the virtual object 710 , the direction of the virtual object 710 with respect to the main object 730 , At least one of a position of the virtual object with respect to the main object and a perspective view of the virtual object 710 may be changed.
  • the electronic device 100 causes the virtual object 710 to move in front of the main object 730 and to be expressed as being closer to the main object 730 .
  • the size of the virtual object 710 may be adjusted to be larger.
  • the electronic device 100 may adjust the position and direction of the virtual object 710 so that the virtual object 710 is expressed as if it rotates in front of the main object 730 while looking at the main object 730 .
  • the electronic device 100 may adjust a perspective view of the virtual object 710 in order to give a lively effect to the movement of the virtual object 710 .
  • the electronic device 100 may use the main object, the virtual object, and the depth information when adjusting the perspective view.
  • the electronic device 100 may change based on depth information, the direction of the virtual object 710 with respect to the main object 730 , the position of the virtual object with respect to the main object, and the distance from the main object to the virtual object 710 . have.
  • the electronic device 100 determines the size of the virtual object 710 , the direction of the virtual object 710 with respect to the main object 730 , At least one of a position of the virtual object with respect to the main object, a perspective view and visibility of the virtual object 710 may be changed.
  • the electronic device 100 causes the virtual object 710 to move backward of the main object 730 and be expressed as if it were farther away.
  • the size of the virtual object 710 may be adjusted to be smaller.
  • the electronic device 100 may adjust the location and direction of the virtual object 710 so that the virtual object 710 is expressed as if it rotates backward of the main object 730 while looking at the main object 730 .
  • the electronic device 100 may adjust a perspective view of the virtual object 710 in order to give a lively effect to the movement of the virtual object.
  • the perspective view may be changed based on depth information, the direction of the virtual object 710 with respect to the main object 730 , the position of the virtual object with respect to the main object, and the distance from the main object to the virtual object 710 . .
  • the electronic device 100 controls the visibility of the virtual object 710 to represent that the virtual object 710 is obscured by the main object 730 as it moves to the rear of the main object 730 . At least a portion of the virtual object 710 may be controlled so that it is not visible because it is obscured by the main object 730 .
  • the electronic device 100 determines a size of the virtual object 710 and a direction of the virtual object 710 with respect to the main object 730 based on at least one of a size, a location, and a category of the main object 730 . , a position of the virtual object with respect to the main object, and at least one of a perspective view of the virtual object 710 may be determined.
  • the electronic device 100 sets the main object 730 to 'Butterfly'.
  • the size of the virtual object 710 may be determined based on a ratio of the actual size of the virtual object 710 to . Also, based on the location of the main object 730 , the electronic device 100 may adjust the direction and location of the virtual object 710 so that the virtual object 710 is naturally displayed in the image.
  • the electronic device 100 determines the size of the virtual object 710 , the direction of the virtual object 710 with respect to the main object 730 , the location of the virtual object with respect to the main object, and the virtual object 710 . at least one of the perspective views of
  • FIG. 8 is a diagram for describing a method of an electronic device moving a virtual object in an image based on a user input, according to an exemplary embodiment.
  • the electronic device 100 may acquire a trajectory corresponding to the movement path of the virtual object based on a user input of touching an image displayed on the display of the electronic device.
  • the trajectory may be a trajectory of a virtual object indicating a movement path relative to the main object.
  • the electronic device 100 may obtain a first trajectory 820 from the user's first touch input 810 and acquire a second trajectory 822 from the second touch input 812 .
  • the present invention is not limited thereto, and the electronic device 100 may obtain a trajectory including the first trajectory 820 and the second trajectory 822 from the user's one-time touch input.
  • the electronic device 100 may perform depth division on an image, divide the image into a foreground image 830 and a background image 832 , and obtain depth information. Since this has been described in the above-described embodiments, a description thereof will be omitted.
  • the electronic device 100 may move the virtual object based on the first trajectory 820 and the second trajectory 822 obtained from the user's input. In this case, depth information obtained from the foreground image 830 and the background image 832 may be used. Since the method of the electronic device 100 moving the virtual object along the trajectory has been described in the above-described embodiments, the same description will be omitted.
  • FIG. 9 is a diagram for describing a method of obtaining, by an electronic device, a virtual object to be augmented on an image and a trajectory of the virtual object, according to an exemplary embodiment
  • the electronic device 100 may acquire various images, and acquire a virtual object corresponding to the acquired image and a trajectory of the virtual object.
  • the electronic device 100 may acquire the first image 910 .
  • the first image 910 may be an image of 'a child holding a toy'.
  • the electronic device 100 may identify objects 'child' and 'toy' in the first image 910 .
  • the electronic device 100 may determine the first virtual object 912 to be added to the first image 910 based on at least a part of object tags of objects identified in the image and context information of the image. For example, the electronic device 100 may acquire a 'doll toy' as a first virtual object 912 to be augmented in a first image 910 that is an image of a 'child holding a toy'.
  • the electronic device 100 may acquire a first trajectory 914 on which the first virtual object 912 moves within the first image 910 .
  • the first trajectory 914 may be obtained based on a mapping table pre-stored in the electronic device 100 or an external device (eg, a server).
  • the first trajectory 914 may be obtained from a user input to the electronic device 100 or a user input using an external device (eg, a smart watch or a stylus pen).
  • the first trajectory 914 may be obtained based on an artificial intelligence model trained to output a trajectory corresponding to the object.
  • the first trajectory 914 may be output from the AI model by inputting the first object 912 into the AI model.
  • the electronic device 100 may acquire the second image 920 .
  • the second image 920 may be an image of 'a man near the sea'.
  • the electronic device 100 may identify an object in the second image 920 according to the above-described embodiments.
  • the electronic device 100 may determine the second virtual object 922 to be added to the second image 920 based on at least a part of an object tag of an object identified in the image and context information of the image. For example, the electronic device 100 may acquire 'dolphin' as the second virtual object 922 to be augmented in the second image 920 that is an image of 'a man near the sea'.
  • the electronic device 100 may acquire a second trajectory 924 on which the second virtual object 922 moves within the second image 920 . Since this has been described in the embodiment in which the electronic device 100 acquires the trajectory of the first object of the first image, a description thereof will be omitted.
  • the electronic device 100 may acquire a third image 930 .
  • the third image 930 may be an image of 'a girl near the beach'.
  • the electronic device 100 may identify an object in the third image 930 according to the above-described embodiments.
  • the electronic device 100 may determine a third virtual object 932 to be added to the third image 930 based on at least a part of an object tag of an object identified in the image and context information of the image. For example, the electronic device 100 may acquire the 'sailboat' as the third virtual object 932 to be augmented in the third image 930 that is an image of the 'girl near the beach'.
  • the electronic device 100 may acquire a third trajectory 934 on which the third virtual object 932 moves within the third image 930 . Since this has been described in the embodiment in which the electronic device 100 acquires the trajectory of the first object of the first image, a description thereof will be omitted.
  • the electronic device 100 may augment the images based on the acquired virtual object and the trajectory of the virtual object for each of the images. For example, the electronic device 100 adds a first virtual object 912 to a first image 910 that is an image of a 'child holding a toy', and creates the first virtual object 912 along a first trajectory. By moving and applying an animation effect, the first image 910 may be augmented. In another example, the electronic device 100 adds a third virtual object 932 to a third image 930 that is an image of a 'girl near the beach', and adds the third virtual object 932 along the third trajectory. By moving and applying an animation effect, the third image 930 may be augmented.
  • FIG. 10 is a diagram for describing a method of obtaining, by an electronic device, a virtual object based on information obtained from an image, according to an exemplary embodiment.
  • the electronic device 100 may obtain various information to identify a virtual object to be added to an image.
  • the electronic device 100 may identify objects in an image and classify the identified objects.
  • the electronic device 100 may classify the identified objects into a main object and a sub-object, and obtain an object tag of each object.
  • the object tag is information for identifying each object, and may include object identification information, category information, and the like, but is not limited thereto.
  • the electronic device 100 may identify a 'toy' and a 'child' in the first image 1010 that is a 'child holding a toy'. In this case, the electronic device 100 may classify 'child' as a main object and classify 'toy' as a sub-object. However, the present invention is not limited thereto, and the electronic device 100 may classify 'toy' as a main object and classify 'child' as a sub-object.
  • the electronic device 100 may identify a relationship between the objects by classifying the identified objects into groups of the same or similar category. For example, the electronic device 100 may classify 'child' and 'toy' into a 'kids' group, and identify objects in the image as objects related to the 'kids' category.
  • the electronic device 100 may obtain context information of an image.
  • the context information may include, for example, at least one of a pose, emotion, action, scene of an image, an event in the image, and a location at which the image is captured, of an object in the image, but is not limited thereto.
  • the electronic device 100 may identify the pose of the main object in the image to identify the action the main object is taking in the image. For example, the electronic device 100 classifies the 'child' as a main object in the first image that is the 'child holding a toy', identifies the child's pose, and takes the action of the child holding the toy. It can be identified that there is Also, the electronic device 100 may identify the child's current emotion, 'happiness' by analyzing the child's expression.
  • the electronic device 100 includes an object tag and an object of the objects identified in the image. A virtual object to be added in the image may be determined based on at least a part of a relationship between the two and the context information of the image. In this case, the virtual object determined by the electronic device 100 may be an object similar to the object identified in the image, or an object that is not similar to the object identified in the image, but suitable for the subject, atmosphere, etc. of the image.
  • the electronic device 100 performs object identification and image analysis on a first image 1010 that is an image of a 'child holding a toy', and the object of the identified objects in the first image 1010 . You can acquire tags, relationships between objects, and context information of images.
  • a first virtual object 1012 to be added to the first image 1010 the electronic device 100 sets a 'doll toy', which is an object similar to a 'toy' existing in the first image 1010 , to the first object 1012 . ) can be determined.
  • the second image 1020 may be 'a man near the sea'.
  • the electronic device 100 performs object identification and image analysis on the second image 1020 to obtain object tags of objects identified in the second image 1020, relationships between objects, and context information of images.
  • the electronic device 100 is a second virtual object 1022 to be added to the second image 1020, which is not similar to 'man', which is an object existing in the second image 1020 , but has 'the sea' as a background.
  • Objects suitable for the second image 1020 such as 'dolphins' and 'sailboats', may be determined as the second object 1022 .
  • the third image 1030 may be a 'flower'.
  • the electronic device 100 performs object identification and image analysis on the third image 1030 to obtain object tags of objects identified in the second image 1030, relationships between objects, and context information of images.
  • the electronic device 100 is a third virtual object 1032 to be added to the third image 1030 , which is not similar to 'flower', which is an object existing in the third image 1030 , but is a third image of 'flower'.
  • 'Butterfly' and 'bee' which are objects suitable for the 1030 , may be determined as the third object 1032 .
  • FIG. 11 is a diagram for describing a method of obtaining, by an electronic device, a virtual object by a user input, according to an exemplary embodiment.
  • the electronic device 100 may acquire an image 1110 of a 'basketball player holding a basketball ball'.
  • the electronic device 100 may identify the region of interest 1120 within the acquired image 1110 .
  • the electronic device 100 may identify the ROI 1120 by analyzing the image 1110 , but may also identify the ROI 1120 based on a user's input for selecting the ROI.
  • the electronic device 100 may use an external device (eg, a stylus pen) 1130 to identify the 'basketball ball' as the region of interest based on the region where the user draws a circle in the image. have.
  • the electronic device 100 may identify an object in the ROI and acquire the virtual object 1150 based on the identified object in the ROI. For example, the electronic device 100 may identify a 'basketball ball' that is an object in the ROI as the virtual object 1150 .
  • the present invention is not limited thereto, and the electronic device 100 may identify an object similar to a basketball or an object suitable for basketball as the virtual object 1150 based on a 'basketball ball' that is an object in the region of interest.
  • the electronic device 100 may identify the 'basketball ball' as the virtual object 1150, but is not limited thereto.
  • the electronic device 100 may acquire the trajectory 1140 of the virtual object 1150 .
  • the electronic device 100 may receive an input in which a user draws a trajectory 1140 on the touch screen of the electronic device 100 using the external device 1130 .
  • the present invention is not limited thereto, and the electronic device 100 allows a user to draw a trajectory 1140 in an empty space using an external device 1130 including various sensors (eg, a motion sensor, a gyro sensor, etc.). It can also receive input.
  • the electronic device 100 may move the virtual object 1150 in the image based on the obtained virtual object 1150 and the trajectory 1140 .
  • FIG. 12 is a diagram for describing a method of an electronic device recommending a virtual object and a trajectory of the virtual object, according to an exemplary embodiment.
  • the electronic device 100 may acquire an image 1202 obtained by photographing a skydiving activity.
  • the electronic device 100 may determine the virtual object to be augmented in the image 1202 and the trajectory of the virtual object based on the object tags of the objects identified in the image 1202 and context information of the image. Since the method for the electronic device 100 to determine the virtual object and the trajectory of the virtual object has been described in the above-described embodiments, a description thereof will be omitted.
  • the electronic device 100 receives a user's input (eg, the user's gesture 1206, the user's touch input 1208) to augment the image 1202,
  • a user interface 1204 that recommends virtual objects and trajectories determined as candidates to be added to the image according to the above information may be displayed.
  • the electronic device 100 may determine a helicopter, a parachute, a person in skydiving, etc. as a virtual object candidate to be added to the skydiving image 1202 and recommend it to the user.
  • the electronic device 100 may determine a trajectory of a rectangle, a circle, a straight line, a reciprocating arrow, etc. as a trajectory candidate of the virtual object and recommend it to the user.
  • the trajectory candidates may indicate a movement path in a 3D space including depth information.
  • the electronic device 100 may recognize the user's gesture 1206 and move the virtual object added to the image or modify the trajectory of the virtual object based on the recognized gesture.
  • FIG. 13 is a diagram for describing various methods of augmenting an image by an electronic device using a virtual object, according to an exemplary embodiment.
  • the electronic device may acquire a virtual object to be added to an image and a trajectory of the virtual object, and change at least one of a size, a direction, a position, and a perspective view of the virtual object while moving the virtual object on the trajectory. Since this has been described through the above-described embodiments, a description thereof will be omitted herein.
  • the electronic device 100 may acquire an image 1310 of a girl on the beach and determine a virtual object to be added to the image.
  • the electronic device 100 may augment the image 1310 by determining the sailboat 1312 as a virtual object with respect to the image 1310 of the girl on the beach and automatically moving the virtual object sailboat 1312 on the trajectory. have.
  • the electronic device 100 may acquire an image 1320 of a child holding a toy and determine a virtual object to be added to the image. With respect to the image 1320 of the child holding the toy, the electronic device 100 determines the doll toy 1322 as a virtual object, and automatically moves the virtual object doll toy 1322 on the trajectory to generate the image 1320. can be augmented.
  • the electronic device 100 may acquire an image 1330 of a skydiving activity and determine a virtual object to be added to the image.
  • the electronic device 100 receives an input for selecting the helicopter 1332 as the virtual object 1332 with respect to the image 1330 obtained by photographing the skydiving activity, and manually adds the virtual object helicopter 1332 to the image. and the virtual object helicopter 1332 may be moved on the acquired trajectory.
  • the electronic device 100 may acquire an image 1340 of a man near the sea and determine a virtual object to be added to the image.
  • the electronic device 100 may augment the image 1340 by determining the dolphin 1342 as a virtual object and moving the virtual object dolphin 1342 on a trajectory with respect to the image 1340 of a man near the sea.
  • the path that the virtual object dolphin 1342 moves on the image may be manually set by the user.
  • the electronic device 100 may augment the image by adding a virtual object butterfly 1352 to the image and moving the virtual object on the trajectory with respect to the selfie image 1350 of the man.
  • the butterfly 1352 which is a virtual object, may give an animation effect while turning around a 'man' classified as a main object in the image.
  • FIG. 14 is a diagram for describing a method of augmenting an image based on a user gesture by an electronic device, according to an exemplary embodiment.
  • the electronic device 100 may identify a gesture for augmenting an image of a user.
  • the electronic device 100 may identify that the user makes a gesture for augmenting an image based on whether a preset event (eg, a user's call command, execution of an image augmentation mode, etc.) occurs.
  • a preset event eg, a user's call command, execution of an image augmentation mode, etc.
  • the user's gesture for augmenting the image may be preset and stored in the electronic device 100 , but is not limited thereto.
  • the electronic device 100 may augment the image by displaying a twinkling animation effect.
  • the electronic device 100 may augment the image by displaying an animation effect in which a rainbow appears in the background.
  • 15 is a flowchart illustrating a method of augmenting an image by an electronic device according to an exemplary embodiment.
  • the electronic device 100 may acquire a virtual object to be added to an image.
  • the electronic device 100 may acquire a virtual object to be added to an image through an external device or a manual input of a user.
  • the electronic device 100 may determine a virtual object to be added to the image based on the main object, the sub-object, context information of the image, or a combination thereof, and obtain the determined virtual object.
  • the electronic device 100 may acquire the virtual object based on at least a part of a connection relationship between the main object and sub-objects, a context connection tree, and a scene-virtual object connection tree.
  • the electronic device 100 may acquire a trajectory indicating a movement path of the obtained virtual object.
  • the electronic device 100 may acquire the trajectory corresponding to the movement path of the virtual object by using the artificial intelligence model learned to output the trajectory corresponding to the object.
  • the electronic device 100 may obtain a trajectory corresponding to the movement path of the virtual object based on a user input (eg, a touch input, a motion input, a gesture input, etc.).
  • a user input eg, a touch input, a motion input, a gesture input, etc.
  • the electronic device 100 may acquire a trajectory corresponding to the acquired virtual object based on a mapping table pre-stored in the electronic device 100 or an external device. This will be further described in the description of FIG. 17 .
  • the electronic device 100 may move the virtual object along the trajectory.
  • the electronic device 100 moves the virtual object along a trajectory in the image, and the size of the virtual object, the direction of the virtual object with respect to the main object, the position of the virtual object with respect to the main object, and the position of the virtual object with respect to the main object. At least one of the perspective views may be changed. Since the description of how the electronic device 100 moves the virtual object in the image has been described through the above-described embodiments, the same description will be omitted.
  • 16 is a flowchart illustrating a method for an electronic device to acquire a virtual object, according to an embodiment.
  • the electronic device 100 may identify one or more objects in the image.
  • the electronic device 100 may identify and classify an object in an image using an artificial intelligence model.
  • the identified object may be classified into a main object and a sub-object. Since the description of the method for the electronic device 100 to identify the object in the image has been described through the above-described embodiments, the same description will be omitted.
  • the electronic device 100 may identify at least one of information among a relationship between objects, an ROI of an image, and a context of the image.
  • the electronic device 100 may identify a relationship between identified sub-objects from among the identified objects, a relationship between a main object and sub-objects, and identify an ROI of an image and a context of the image.
  • the electronic device 100 may generate a context connection tree based on at least one of a relationship between objects, an ROI of an image, and obtained context information.
  • the context connection tree may indicate a connection relationship between the main object and sub-objects. Since the description of the method in which the electronic device 100 generates the context connection tree has been described through the above-described embodiments, the same description will be omitted.
  • the electronic device 100 may identify a virtual object to be added to the image in order to augment the image based on the context connection tree. Since the description of the method for the electronic device 100 to identify the virtual object has been described through the above-described embodiments, the same description will be omitted.
  • 17 is a diagram for describing a method of obtaining, by an electronic device, an animation effect and a trajectory of a virtual object based on a pre-stored mapping table, according to an exemplary embodiment.
  • the electronic device 100 may acquire animation effects and trajectories corresponding to the virtual objects based on the mapping table 1700 .
  • the electronic device 100 may use the mapping table 1700 stored in the electronic device 100 or may use the mapping table 1700 stored in the external device (eg, a server).
  • the mapping table 1700 may include a list of virtual objects 1710 obtainable by the electronic device and an animation type 1720 corresponding to each virtual object. For example, when the virtual object that the electronic device 100 wants to add to the image is a watch, the electronic device 100 rotates the clock hand, which is an animation corresponding to the virtual object 'clock', based on the mapping table 1700 .
  • An image may be augmented by acquiring an effect and applying the acquired animation effect to the virtual object 'clock'.
  • FIGS. 1 and 2 are block diagrams for an exemplary embodiment.
  • Each component in the block diagram may be integrated, added, or omitted according to the specifications of each device that is actually implemented. That is, two or more components may be combined into one component, or one component may be subdivided into two or more components as needed.
  • the function performed in each block is for describing the embodiments, and the specific operation or device does not limit the scope of the present invention.
  • the method of augmenting a virtual object on an image by the electronic device 100 may be implemented in the form of a program command that can be executed through various computer means and recorded in a computer-readable medium.
  • the computer-readable medium may include program instructions, data files, data structures, etc. alone or in combination.
  • the program instructions recorded on the medium may be specially designed and configured for the present invention, or may be known and available to those skilled in the art of computer software. Examples of the computer-readable recording medium include magnetic media such as hard disks, floppy disks and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic such as floppy disks.
  • program instructions include not only machine language codes such as those generated by a compiler, but also high-level language codes that can be executed by a computer using an interpreter or the like.
  • a method for the electronic device 100 to augment a virtual object on an image according to the disclosed embodiments may be provided by being included in a computer program product.
  • Computer program products may be traded between sellers and buyers as commodities.
  • the computer program product may include a S/W program and a computer-readable storage medium in which the S/W program is stored.
  • computer program products may include products (eg, downloadable apps) in the form of software programs distributed electronically through manufacturers of electronic devices or electronic markets (eg, Google Play Store, App Store). have.
  • the S/W program may be stored in a storage medium or may be temporarily generated.
  • the storage medium may be a server of a manufacturer, a server of an electronic market, or a storage medium of a relay server temporarily storing a SW program.
  • the computer program product in a system including a server and the electronic device 100 , may include a storage medium of a server or a storage medium of a client device.
  • a third device eg, a smart phone
  • the computer program product may include a storage medium of the third device.
  • the computer program product may include the S/W program itself transmitted from the server to the client device or the third device, or transmitted from the third device to the client device.
  • one of the server, the electronic device 100 and the third device may execute a computer program product to perform the method according to the disclosed embodiments.
  • two or more of the server, the electronic device, and the third device may execute the computer program product to distribute the method according to the disclosed embodiments.

Abstract

Disclosed are an electronic device and method for augmenting a virtual object in an image. The electronic device for augmenting a virtual object in an image may comprise: a communication unit; a display; a memory for storing a program including one or more instructions; and at least one processor which executes the one or more instructions of the program stored in the memory. The at least one processor can identify one or more objects in the image, classify the one or more objects into a main object and sub-objects, acquire a virtual object related to the main object on the basis of the main object and the sub-objects, acquire depth information about the three-dimensional space in which the image was imaged, acquire a trajectory of the virtual object on the basis of the depth information, the trajectory showing the relative three-dimensional movement path with respect to the main object, and control the display to display the movement of the virtual object.

Description

이미지 증강을 위한 방법 및 전자 장치Method and electronic device for image augmentation
다양한 실시예들은, 전자 장치에서 이미지를 증강하는 방법에 관한 것이다.Various embodiments relate to a method of augmenting an image in an electronic device.
기술이 발전함에 따라, 모바일 디바이스와 같은 전자 장치들은 사용자가 이미지를 편집할 수 있게 하는 미디어 편집 기능들을 가진다. 예를 들어, 모바일 디바이스의 사용자는 이미지를 캡처하면서 이미지 내에 AR(Augmented Reality) 스티커를 추가할 수 있게 되었다.As technology advances, electronic devices such as mobile devices have media editing functions that allow users to edit images. For example, users of mobile devices will be able to add augmented reality (AR) stickers within images while capturing images.
하지만, 스티커의 추가하는 이미지 편집은 사용자에 의해 수동으로 수행되며, 추가되는 스티커들 또한 향상된 사용자 경험을 가져다 주기에는 한계가 있다. 또한, 스티커들이 단순히 이미지에 오버레이되기 때문에, 편집된 이미지는 사용자에게 시각적으로 매력적인 출력을 제공하는데 한계가 있다. However, image editing to add stickers is manually performed by the user, and the added stickers also have a limit in providing an improved user experience. In addition, since the stickers are simply overlaid on the image, the edited image has a limit in providing a visually attractive output to the user.
또한, 이미지에 AR 효과를 주기 위해 AR 스티커를 추가하는 기능은, 카메라의 프리뷰 이미지 내에서 수평 평면 및 수직 평면을 검출하고 검출된 평면상에 객체들을 오버레이하는 것이므로, 카메라의 프리뷰 이미지가 아닌 촬영된 이미지에는 AR 효과를 부여하기 어렵다.In addition, the function of adding an AR sticker to give an AR effect to the image is to detect a horizontal plane and a vertical plane in the preview image of the camera and overlay objects on the detected plane. It is difficult to give an AR effect to an image.
이에 따라, 미디어를 편집할 때, 이미지/비디오의 깊이 분할, 객체 분류, 인공지능과 같은 기술을 통해 획득한 정보들을 이용하여 미디어를 편집함으로써, 시각적으로 빼어나고 독창적인 미디어 출력을 제공할 수 있는 기술이 요구된다.Accordingly, when editing media, it is possible to provide visually outstanding and original media output by editing media using information acquired through technologies such as image/video depth segmentation, object classification, and artificial intelligence. skills are required
상술한 기술적 과제를 달성하기 위한 기술적 수단으로서, 일 실시예에 따른 전자 장치가 가상 객체를 이미지에 증강하는 방법은, 상기 이미지 내에서 하나 이상의 객체들을 식별하는 단계; 상기 하나 이상의 객체들을 메인 객체 및 서브 객체로 분류하는 단계; 상기 메인 객체 및 서브 객체에 기초하여 상기 메인 객체와 관련된 가상 객체를 획득하는 단계; 상기 이미지가 촬영된 3차원 공간의 깊이 정보를 획득하는 단계; 상기 깊이 정보에 기초하여, 상기 메인 객체에 대하여 상대적인 3차원의 이동 경로를 나타내는 상기 가상 객체의 궤적을 획득하는 단계; 상기 궤적을 따라 상기 가상 객체를 이동시키는 단계를 포함하는 방법일 수 있다.As a technical means for achieving the above technical problem, a method for an electronic device to augment a virtual object in an image according to an embodiment includes: identifying one or more objects in the image; classifying the one or more objects into a main object and a sub-object; obtaining a virtual object related to the main object based on the main object and the sub-object; obtaining depth information of a three-dimensional space in which the image is captured; obtaining a trajectory of the virtual object indicating a three-dimensional movement path relative to the main object, based on the depth information; The method may include moving the virtual object along the trajectory.
일 실시예에 따른 전자 장치가 가상 객체를 이미지에 증강하는 방법에 있어서, 상기 가상 객체를 이동시키는 단계는, 상기 가상 객체의 크기, 상기 메인 객체에 대한 상기 가상 객체의 방향, 상기 메인 객체에 대한 상기 가상 객체의 위치 및 상기 가상 객체의 사시도(perspective view) 중 적어도 하나를 변경하는 단계를 포함할 수 있다.In the method of an electronic device augmenting an image with a virtual object according to an embodiment, the moving of the virtual object includes: a size of the virtual object, a direction of the virtual object with respect to the main object, and a direction of the virtual object with respect to the main object. The method may include changing at least one of a position of the virtual object and a perspective view of the virtual object.
일 실시예 에 따른 전자 장치가 가상 객체를 이미지에 증강하는 방법에 있어서, 상기 가상 객체를 이동시키는 단계는, 메인 객체의 크기, 위치, 카테고리 중 적어도 하나에 기초하여 상기 가상 객체의 크기, 상기 메인 객체에 대한 상기 가상 객체의 방향, 상기 메인 객체에 대한 상기 가상 객체의 위치 및 상기 가상 객체의 사시도(perspective view)를 결정하는 단계를 더 포함할 수 있다.In the method of an electronic device augmenting a virtual object on an image, according to an embodiment, the moving of the virtual object comprises: a size of the virtual object and the main object based on at least one of a size, a location, and a category of the main object. The method may further include determining a direction of the virtual object with respect to the object, a position of the virtual object with respect to the main object, and a perspective view of the virtual object.
일 실시예 에 따른 전자 장치가 가상 객체를 이미지에 증강하는 방법에 있어서, 상기 가상 객체를 획득하는 단계는, 상기 이미지 내에서 식별된 서브 객체들 간 관계, 메인 객체 및 서브 객체들 간 관계, 관심 영역 및 상기 이미지의 컨텍스트 중 적어도 하나를 식별하는 단계; 상기 서브 객체들 간 관계, 메인 객체 및 서브 객체들 간 관계, 관심 영역 및 상기 이미지의 컨텍스트 중 적어도 하나에 기초하여, 상기 메인 객체와 상기 서브 객체들 간의 연결 관계를 나타내는 컨텍스트 연결 트리를 생성하는 단계; 및 상기 컨텍스트 연결 트리에 기초하여 상기 가상 객체를 식별하는 단계를 포함할 수 있다.In the method for augmenting a virtual object on an image by an electronic device according to an embodiment, the acquiring of the virtual object includes: a relationship between sub-objects identified in the image, a relationship between a main object and sub-objects, an interest identifying at least one of a region and a context of the image; Generating a context connection tree representing a connection relationship between the main object and the sub-objects based on at least one of a relationship between the sub-objects, a relationship between a main object and sub-objects, a region of interest, and a context of the image ; and identifying the virtual object based on the context connection tree.
일 실시예 에 따른 전자 장치가 가상 객체를 이미지에 증강하는 방법에 있어서, 상기 식별된 하나 이상의 객체들에 기초하여, 상기 이미지에 부가될 가상 객체 후보들을 획득하는 단계; 및 상기 가상 객체 후보들 각각에 대하여, 상기 가상 객체 후보들 각각에 대응되는 궤적 후보들을 포함하는, 궤적 클러스터를 획득하는 단계를 더 포함하고, 상기 가상 객체를 획득하는 단계는, 상기 가상 객체 후보들 중에서, 상기 이미지에 부가될 가상 객체를 선택하는 단계를 포함하고, 상기 궤적을 획득하는 단계는, 상기 선택된 가상 객체에 대응되는 상기 궤적 클러스터 내에서, 상기 선택된 가상 객체의 이동 경로를 나타내는 궤적을 선택하는 단계를 포함할 수 있다.According to an embodiment, a method for an electronic device to augment a virtual object on an image, the method comprising: obtaining virtual object candidates to be added to the image based on the identified one or more objects; and obtaining, for each of the virtual object candidates, a trajectory cluster including trajectory candidates corresponding to each of the virtual object candidates, wherein the obtaining of the virtual object includes: selecting a virtual object to be added to the image, wherein obtaining the trajectory includes: selecting a trajectory indicating a movement path of the selected virtual object within the trajectory cluster corresponding to the selected virtual object may include
일 실시예 에 따른 전자 장치가 가상 객체를 이미지에 증강하는 방법에 있어서, 상기 깊이 정보는 상기 이미지의 전경 정보 및 배경 정보를 포함할 수 있다.In the method of augmenting a virtual object on an image by an electronic device according to an embodiment, the depth information may include foreground information and background information of the image.
일 실시예 에 따른 전자 장치가 가상 객체를 이미지에 증강하는 방법에 있어서, 상기 가상 객체를 이동시키는 단계는, 상기 깊이 정보에 기초하여 상기 가상 객체의 가시성(visibility)을 제어하는 단계를 포함할 수 있다.In a method by an electronic device to augment a virtual object on an image according to an embodiment, the moving the virtual object may include controlling visibility of the virtual object based on the depth information. have.
일 실시예 에 따른 전자 장치가 가상 객체를 이미지에 증강하는 방법에 있어서, 상기 가상 객체를 이동시키는 단계는, 상기 깊이 정보, 상기 메인 객체에 대한 상기 가상 객체의 방향 및 상기 메인 객체로부터 상기 가상 객체의 거리에 기초하여 상기 사시도(perspective view)를 변경하는 단계를 더 포함할 수 있다.In the method of an electronic device augmenting an image with a virtual object according to an embodiment, the moving of the virtual object includes: the depth information, a direction of the virtual object with respect to the main object, and the virtual object from the main object The method may further include changing the perspective view based on the distance of .
일 실시예 에 따른 전자 장치가 가상 객체를 이미지에 증강하는 방법에 있어서, 상기 궤적을 획득하는 단계는, 상기 전자 장치의 사용자로부터 상기 가상 객체의 이동 경로를 가이드하는 사용자 입력을 획득하는 단계를 포함할 수 있다.In the method for augmenting a virtual object on an image by an electronic device according to an embodiment, the acquiring the trajectory includes acquiring a user input guiding a movement path of the virtual object from a user of the electronic device can do.
일 실시예 에 따른 전자 장치가 가상 객체를 이미지에 증강하는 방법에 있어서, 상기 궤적을 획득하는 단계는, 상기 가상 객체를 인공지능 모델에 적용하여 상기 가상 객체에 대응되는 궤적을 획득하는 단계를 포함할 수 있다.In the method for augmenting a virtual object on an image by an electronic device according to an embodiment, the acquiring the trajectory includes applying the virtual object to an artificial intelligence model to acquire a trajectory corresponding to the virtual object can do.
또한, 일 실시예 에 따른 가상 객체를 이미지에 증강하는 전자 장치는, 통신부; 디스플레이; 하나 이상의 명령어들(instructions)을 포함하는 프로그램을 저장하는 메모리; 상기 메모리에 저장된 상기 프로그램의 하나 이상의 명령어들을 실행하는 적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서는, 상기 이미지 내에서 하나 이상의 객체들을 식별하고, 상기 하나 이상의 객체들을 메인 객체 및 서브 객체로 분류하고, 상기 메인 객체 및 서브 객체에 기초하여 상기 메인 객체와 관련된 가상 객체를 획득하고, 상기 이미지가 촬영된 3차원 공간의 깊이 정보를 획득하고, 상기 깊이 정보에 기초하여, 상기 메인 객체에 대하여 상대적인 3차원의 이동 경로를 나타내는 상기 가상 객체의 궤적을 획득하고, 상기 가상 객체의 이동을 표시하도록 상기 디스플레이를 제어하는, 전자 장치일 수 있다.Also, according to an embodiment, an electronic device for augmenting a virtual object on an image includes: a communication unit; display; a memory storing a program including one or more instructions; at least one processor executing one or more instructions of the program stored in the memory, wherein the at least one processor identifies one or more objects in the image and converts the one or more objects into main objects and sub-objects. classify, obtain a virtual object related to the main object based on the main object and the sub-object, obtain depth information of a three-dimensional space in which the image is captured, and based on the depth information, with respect to the main object The electronic device may obtain a trajectory of the virtual object indicating a relative three-dimensional movement path and control the display to display the movement of the virtual object.
도 1은 일 실시예에 따른 전자 장치의 구성을 설명하기 위한 블록도이다.1 is a block diagram illustrating a configuration of an electronic device according to an exemplary embodiment.
도 2는 일 실시예에 따른 객체 컨트롤러의 구성을 설명하기 위한 블록도이다.2 is a block diagram illustrating a configuration of an object controller according to an exemplary embodiment.
도 3은 일 실시예에 따른 전자 장치가 가상 객체 및 가상 객체의 궤적을 식별하여 증강된 이미지를 생성하는 방법을 도시한 흐름도이다.3 is a flowchart illustrating a method in which an electronic device generates an augmented image by identifying a virtual object and a trajectory of the virtual object, according to an exemplary embodiment.
도 4는 일 실시예에 따른 전자 장치가 인공지능 모델을 이용하여 가상 객체가 이동하는 궤적을 생성하는 방법을 설명하기 위한 도면이다.FIG. 4 is a diagram for describing a method in which an electronic device generates a moving trajectory of a virtual object using an artificial intelligence model, according to an exemplary embodiment.
도 5는 일 실시예에 따른 전자 장치가 객체 식별 정보, 이미지 깊이 정보, 및 컨텍스트 정보를 이용하여 가상 객체 및 궤적을 결정하는 방법을 설명하기 위한 흐름도이다.5 is a flowchart illustrating a method for an electronic device to determine a virtual object and a trajectory by using object identification information, image depth information, and context information, according to an exemplary embodiment.
도 6은 일 실시예에 따른 전자 장치가 이미지 내에서 객체를 인식하고, 가상 객체를 획득하는 방법을 설명하기 위한 도면이다.FIG. 6 is a diagram for describing a method for an electronic device to recognize an object in an image and acquire a virtual object, according to an exemplary embodiment.
도 7은 일 실시예에 따른 전자 장치가 깊이 정보에 기반하여 가상 객체를 이미지 내에서 이동시키는 방법을 설명하기 위한 도면이다.7 is a diagram for describing a method of an electronic device moving a virtual object in an image based on depth information, according to an exemplary embodiment.
도 8은 일 실시예에 따른 전자 장치가 사용자 입력에 기초하여 이미지 내에서 가상 객체를 이동시키는 방법을 설명하기 위한 도면이다.8 is a diagram for describing a method of an electronic device moving a virtual object in an image based on a user input, according to an exemplary embodiment.
도 9는 일 실시예에 따른 전자 장치가 이미지에 증강시킬 가상 객체 및 가상 객체의 궤적을 획득하는 방법을 설명하기 위한 도면이다.FIG. 9 is a diagram for describing a method of obtaining, by an electronic device, a virtual object to be augmented on an image and a trajectory of the virtual object, according to an exemplary embodiment;
도 10은 일 실시예에 따른 전자 장치가 이미지로부터 획득되는 정보에 기초하여 가상 객체를 획득하는 방법을 설명하기 위한 도면이다.FIG. 10 is a diagram for describing a method of obtaining, by an electronic device, a virtual object based on information obtained from an image, according to an exemplary embodiment.
도 11은 일 실시예에 따른 전자 장치가 사용자의 입력에 의해 가상 객체를 획득하는 방법을 설명하기 위한 도면이다.11 is a diagram for describing a method of obtaining, by an electronic device, a virtual object by a user input, according to an exemplary embodiment.
도 12는 일 실시예에 따른 전자 장치가 가상 객체 및 가상 객체의 궤적을 추천하는 방법을 설명하기 위한 도면이다.12 is a diagram for describing a method of an electronic device recommending a virtual object and a trajectory of the virtual object, according to an exemplary embodiment.
도 13은 일 실시예에 따른 전자 장치가 가상 객체를 이용하여 이미지를 증강하는 다양한 방법을 설명하기 위한 도면이다.13 is a diagram for describing various methods of augmenting an image by an electronic device using a virtual object, according to an exemplary embodiment.
도 14는 일 실시예에 따른 전자 장치가 사용자 제스처에 기초하여 이미지를 증강시키는 방법을 설명하기 위한 도면이다.14 is a diagram for describing a method of augmenting an image based on a user gesture by an electronic device, according to an exemplary embodiment.
도 15는 일 실시예에 따른 전자 장치가 이미지를 증강하는 방법을 설명하기 위한 흐름도이다.15 is a flowchart illustrating a method of augmenting an image by an electronic device according to an exemplary embodiment.
도 16은 일 실시예에 따른 전자 장치가 가상 객체를 획득하는 방법을 설명하기 위한 흐름도이다.16 is a flowchart illustrating a method for an electronic device to acquire a virtual object, according to an embodiment.
도 17은 일 실시예에 따른 전자 장치가 기 저장된 맵핑 테이블에 기초하여 가상 객체의 애니메이션 효과 및 궤적을 획득하는 방법을 설명하기 위한 도면이다.17 is a diagram for describing a method of obtaining, by an electronic device, an animation effect and a trajectory of a virtual object based on a pre-stored mapping table, according to an exemplary embodiment.
본 명세서에서 사용되는 용어에 대해 간략히 설명하고, 본 발명에 대해 구체적으로 설명하기로 한다.Terms used in this specification will be briefly described, and the present invention will be described in detail.
본 발명에서 사용되는 용어는 본 발명에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어들을 선택하였으나, 이는 당 분야에 종사하는 기술자의 의도 또는 판례, 새로운 기술의 출현 등에 따라 달라질 수 있다. 또한, 특정한 경우는 출원인이 임의로 선정한 용어도 있으며, 이 경우 해당되는 발명의 설명 부분에서 상세히 그 의미를 기재할 것이다. 따라서 본 발명에서 사용되는 용어는 단순한 용어의 명칭이 아닌, 그 용어가 가지는 의미와 본 발명의 전반에 걸친 내용을 토대로 정의되어야 한다.The terms used in the present invention have been selected as currently widely used general terms as possible while considering the functions in the present invention, but these may vary depending on the intention or precedent of a person skilled in the art, the emergence of new technology, and the like. In addition, in a specific case, there is a term arbitrarily selected by the applicant, and in this case, the meaning will be described in detail in the description of the corresponding invention. Therefore, the term used in the present invention should be defined based on the meaning of the term and the overall content of the present invention, rather than the name of a simple term.
단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함할 수 있다. 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 용어들은 본 명세서에 기재된 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가질 수 있다. 또한, 본 명세서에서 사용되는 '제1' 또는 '제2' 등과 같이 서수를 포함하는 용어는 다양한 구성 요소들을 설명하는데 사용할 수 있지만, 상기 구성 요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성 요소를 다른 구성 요소로부터 구별하는 목적으로만 사용된다.The singular expression may include the plural expression unless the context clearly dictates otherwise. Terms used herein, including technical or scientific terms, may have the same meanings as commonly understood by one of ordinary skill in the art described herein. Also, terms including an ordinal number such as 'first' or 'second' used in this specification may be used to describe various components, but the components should not be limited by the terms. The above terms are used only for the purpose of distinguishing one component from another.
명세서 전체에서 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있음을 의미한다. 또한, 명세서에 기재된 "부", "엔진" 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어 또는 소프트웨어로 구현되거나 하드웨어와 소프트웨어의 결합으로 구현될 수 있다.When a part "includes" a certain element throughout the specification, this means that other elements may be further included, rather than excluding other elements, unless otherwise stated. In addition, terms such as "unit" and "engine" described in the specification mean a unit that processes at least one function or operation, which may be implemented as hardware or software, or a combination of hardware and software.
아래에서는 첨부한 도면을 참고하여 본 발명의 실시예에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Hereinafter, with reference to the accompanying drawings, embodiments of the present invention will be described in detail so that those of ordinary skill in the art can easily carry out the embodiments of the present invention. However, the present invention may be embodied in many different forms and is not limited to the embodiments described herein. And in order to clearly explain the present invention in the drawings, parts irrelevant to the description are omitted, and similar reference numerals are attached to similar parts throughout the specification.
도 1은 일 실시예에 따른 전자 장치의 구성을 설명하기 위한 블록도이다.1 is a block diagram illustrating a configuration of an electronic device according to an exemplary embodiment.
이하에서 개시되는 실시예들에서, 전자 장치(100)가 ‘이미지를 증강’시킨다는 것은, 전자 장치(100)가 원본 이미지 내에 가상 객체를 부가하여, 특정 효과(예를 들어, 애니메이션 효과의, 가상 객체 이동 등)을 부여하는 것을 의미할 수 있다. 이 경우, ‘이미지의 증강’을 통해 전술한 애니메이션 효과를 구현하는 동영상이 생성될 수 있으며, 생성된 동영상은 각각의 프레임들이 복수의 증강된 이미지들로 구성될 수 있다. In the embodiments disclosed below, 'augmenting an image' by the electronic device 100 means that the electronic device 100 adds a virtual object in the original image, and a specific effect (eg, animation effect, virtual object movement, etc.). In this case, a moving picture implementing the above-described animation effect may be generated through 'image augmentation', and each frame of the generated moving picture may be composed of a plurality of augmented images.
이하에서 개시되는 실시들예에서, ‘이미지의 증강’은 ‘동영상의 증강’ 방법에 동일하게 적용되어 확장될 수 있다. 설명의 편의를 위하여, 이하에서는 ‘이미지’를 기준으로 설명하기로 한다.In the embodiments disclosed below, 'augmentation of an image' may be equally applied and expanded to a method of 'augmentation of a video'. For convenience of explanation, the following description will be based on 'image'.
일 실시예에 따른 전자 장치(100)는 개시된 실시예들에 따라 이미지 내에서 가상 객체를 증강할 수 있다. 전자 장치(100)는 예를 들어, 스마트 와치, 스마트 폰, 스마트 TV, 스마트 로봇, 인공 지능 스피커, PDA(Personal Digital Assistant), 태블릿 컴퓨터, 랩탑 컴퓨터, 뮤직 플레이어, 비디오 플레이어 등일 수 있으나, 이에 한정되는 것은 아니다.The electronic device 100 according to an embodiment may augment a virtual object in an image according to the disclosed embodiments. The electronic device 100 may be, for example, a smart watch, a smart phone, a smart TV, a smart robot, an artificial intelligence speaker, a personal digital assistant (PDA), a tablet computer, a laptop computer, a music player, a video player, etc., but is limited thereto. it's not going to be
일 실시예에 따른 전자 장치(100)는 적어도 프로세서(110), 통신부(120), 메모리(130), 디스플레이(140) 및 객체 컨트롤러(150)를 포함하도록 구성될 수 있다.The electronic device 100 according to an embodiment may be configured to include at least a processor 110 , a communication unit 120 , a memory 130 , a display 140 , and an object controller 150 .
일 실시예에 따른 프로세서(110)는 메모리(130)에 저장된 프로그램의 하나 이상의 명령어들(instructions)을 실행할 수 있다. 프로세서(110)는 산술, 로직 및 입출력 연산과 시그널 프로세싱을 수행하는 하드웨어 구성요소로 구성될 수 있다.The processor 110 according to an embodiment may execute one or more instructions of a program stored in the memory 130 . The processor 110 may be composed of hardware components that perform arithmetic, logic, input/output operations and signal processing.
프로세서(110)는 예를 들어, 중앙 처리 장치(Central Processing Unit), 마이크로 프로세서(microprocessor), 그래픽 프로세서(Graphic Processing Unit), ASICs(Application Specific Integrated Circuits), DSPs(Digital Signal Processors), DSPDs(Digital Signal Processing Devices), PLDs(Programmable Logic Devices), FPGAs(Field Programmable Gate Arrays), AP(Application Processor), 뉴럴 프로세서(Neural Processing Unit) 또는 인공지능 모델의 처리에 특화된 하드웨어 구조로 설계된 인공지능 전용 프로세서 중 적어도 하나로 구성될 수 있으나, 이에 제한되는 것은 아니다. Processor 110 is, for example, a central processing unit (Central Processing Unit), a microprocessor (microprocessor), a graphic processor (Graphic Processing Unit), ASICs (Application Specific Integrated Circuits), DSPs (Digital Signal Processors), DSPDs (Digital Signal Processing Devices), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), Application Processors (APs), Neural Processing Units, or artificial intelligence-only processors designed with a hardware structure specialized for processing artificial intelligence models. It may consist of at least one, but is not limited thereto.
일 실시예에 따른 통신부(120)는 프로세서(110)의 제어에 의해 외부 장치(예를 들어, 서버 또는 다른 전자 장치)와 데이터 통신을 수행할 수 있다.The communication unit 120 according to an embodiment may perform data communication with an external device (eg, a server or other electronic device) under the control of the processor 110 .
통신부(120)는 예를 들어, 유선 랜, 무선 랜(Wireless LAN), 와이파이(Wi-Fi), 블루투스(Bluetooth), 지그비(zigbee), WFD(Wi-Fi Direct), 적외선 통신(IrDA, infrared Data Association), BLE (Bluetooth Low Energy), NFC(Near Field Communication), 와이브로(Wireless Broadband Internet, Wibro), 와이맥스(World Interoperability for Microwave Access, WiMAX), SWAP(Shared Wireless Access Protocol), 와이기그(Wireless Gigabit Allicance, WiGig) 및 RF 통신을 포함하는 데이터 통신 방식 중 적어도 하나를 이용하여 외부 장치와 데이터 통신을 수행할 수 있다.The communication unit 120 is, for example, a wired LAN, a wireless LAN, a Wi-Fi, a Bluetooth, a Zigbee, a Wi-Fi Direct (WFD), an infrared communication (IrDA). Data Association), BLE (Bluetooth Low Energy), NFC (Near Field Communication), WiBro (Wireless Broadband Internet, Wibro), WiMAX (World Interoperability for Microwave Access, WiMAX), SWAP (Shared Wireless Access Protocol), WiGig ( Data communication with an external device may be performed using at least one of data communication methods including Wireless Gigabit Alliance (WiGig) and RF communication.
일 실시예에 따른 메모리(130)에는 프로세서(110)가 판독할 수 있는 명령어들, 데이터 구조, 및 프로그램 코드(program code)가 저장될 수 있다. 개시된 실시예들에서, 프로세서(110)가 수행하는 동작들은 메모리(130)에 저장된 프로그램의 명령어들 또는 코드들을 실행함으로써 구현될 수 있다.In the memory 130 according to an embodiment, instructions, data structures, and program codes readable by the processor 110 may be stored. In the disclosed embodiments, operations performed by the processor 110 may be implemented by executing instructions or codes of a program stored in the memory 130 .
메모리(130)는 예를 들어, 플래시 메모리 타입(flash memory type), 하드디스크 타입(hard disk type), 멀티미디어 카드 마이크로 타입(multimedia card micro type), 카드 타입의 메모리(예를 들어 SD 또는 XD 메모리 등), 램(RAM, Random Access Memory) SRAM(Static Random Access Memory), 롬(ROM, Read-Only Memory), EEPROM(Electrically Erasable Programmable Read-Only Memory), PROM(Programmable Read-Only Memory), 자기 메모리, 자기 디스크, 광디스크 중 적어도 하나의 타입의 저장매체를 포함할 수 있다.The memory 130 may include, for example, a flash memory type, a hard disk type, a multimedia card micro type, or a card type memory (eg, SD or XD memory). etc.), RAM (Random Access Memory) SRAM (Static Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), PROM (Programmable Read-Only Memory), magnetic It may include at least one type of storage medium among a memory, a magnetic disk, and an optical disk.
일 실시예에 따른 디스플레이(140)는 전자 장치(100)에서 처리되는 정보를 표시할 수 있다. 예를 들어, 디스플레이(140)는 전자 장치(100)에서 생성된 증강된 이미지를 표시할 수 있다. 이 경우, 증강된 이미지는 전자 장치(100)에 의해 생성된 가상 객체가 이미지 내에 렌더링된 이미지일 수 있다. 또한 가상 객체가 렌더링됨으로써 증강된 복수의 이미지들을 이용하여, 가상 객체가 이미지 내에서 이동하며 다양한 애니메이션 효과를 재생하는 동영상이 생성될 수 있다. 이하에서는 설명의 편의를 위하여 증강된 각각의 이미지들 중 어느 하나를 기준으로 전자 장치가 이미지를 증강하는 방법을 설명한다. 다만, 개시된 실시예들은, 복수의 증강된 이미지들을 이용하여 증강된 동영상을 생성하는 실시예를 포함할 수 있다.The display 140 according to an embodiment may display information processed by the electronic device 100 . For example, the display 140 may display the augmented image generated by the electronic device 100 . In this case, the augmented image may be an image in which a virtual object generated by the electronic device 100 is rendered in the image. Also, by using a plurality of images augmented by rendering the virtual object, a video in which the virtual object moves within the image and reproduces various animation effects may be generated. Hereinafter, for convenience of explanation, a method of augmenting an image by the electronic device based on any one of the respective augmented images will be described. However, the disclosed embodiments may include an embodiment in which an augmented video is generated using a plurality of augmented images.
일 실시예에 따른 객체 컨트롤러(150)는, 전자 장치(100)가 증강된 이미지를 생성하기 위한 다양한 동작들을 수행할 수 있다.The object controller 150 according to an embodiment may perform various operations for the electronic device 100 to generate an augmented image.
일 실시예에서, 객체 컨트롤러(150)는 가상 객체 및 가상 객체가 이미지 내에서 이동하는 경로를 나타내는 궤적을 획득할 수 있다. 이 경우, 궤적은 메인 객체에 대한 상대적인 이동 경로를 나타내는 가상 객체의 궤적일 수 있다. 객체 컨트롤러(150)는 가상 객체를 가상 객체의 궤적을 따라 이미지 내에서 이동시킬 수 있다. 다만, 이에 한정되는 것은 아니며, 객체 컨트롤러(150)는 이미지 내에서 가상 객체를 이동시키지 않고, 소정의 애니메이션 효과만을 적용하여 이미지를 증강시킬 수 있다.In an embodiment, the object controller 150 may acquire a virtual object and a trajectory indicating a path along which the virtual object moves in the image. In this case, the trajectory may be a trajectory of a virtual object indicating a movement path relative to the main object. The object controller 150 may move the virtual object in the image along the trajectory of the virtual object. However, the present invention is not limited thereto, and the object controller 150 may augment the image by applying only a predetermined animation effect without moving the virtual object in the image.
일 실시예에 따른 객체 컨트롤러(150)는 이미지로부터 깊이 정보를 획득할 수 있다. 객체 컨트롤러(150)는 이미지 내에서 가상 객체를 증강하기 위해, 깊이 정보를 포함하는 이미지의 3차원 공간상의 서로 다른 깊이들에서 가상 객체의 크기, 방향 및 위치, 사시도(perspective view) 중 적어도 하나를 변경할 수 있다. 이 경우, 가상 객체가 이동하는 궤적은, 획득된 궤적 및 깊이 정보에 기초하여 생성된 3차원 궤적일 수 있다.The object controller 150 according to an embodiment may obtain depth information from an image. In order to augment the virtual object in the image, the object controller 150 selects at least one of the size, direction and position of the virtual object at different depths in the three-dimensional space of the image including depth information, and a perspective view. can be changed In this case, the trajectory on which the virtual object moves may be a 3D trajectory generated based on the acquired trajectory and depth information.
객체 컨트롤러(150)는 전자 장치(100)가 증강된 이미지를 생성하기 위한 일련의 동작을 수행할 수 있는 하드웨어로 구현되거나, 소프트웨어의 형태로 구현되어 전자 장치(100)의 메모리(130)에 저장될 수 있다.The object controller 150 is implemented as hardware that enables the electronic device 100 to perform a series of operations for generating an augmented image, or is implemented in the form of software and stored in the memory 130 of the electronic device 100 . can be
객체 컨트롤러(150)의 상세한 구성 및 동작에 대해서는 도 2에 대한 설명에서 더 서술하기로 한다.A detailed configuration and operation of the object controller 150 will be further described in the description of FIG. 2 .
도 2는 일 실시예에 따른 객체 컨트롤러의 구성을 설명하기 위한 블록도이다.2 is a block diagram illustrating a configuration of an object controller according to an exemplary embodiment.
일 실시예에 따른 전자 장치(100)는 객체 컨트롤러(150)를 이용하여 전자 장치가 획득한 이미지에 가상 객체를 증강시킬 수 있다.The electronic device 100 according to an embodiment may augment the virtual object in the image acquired by the electronic device using the object controller 150 .
도 2를 참조하면, 일 실시예에 따른 객체 컨트롤러(150)는 적어도 객체 식별 및 분류 엔진(202), 깊이 분할 엔진(204), 컨텍스트 분석기(206) 및 하나 이상의 인공지능 모델들(208)을 포함할 수 있다. 객체 컨트롤러(150)는 이미지 내 가상 객체를 제어하기 위한 전반적인 동작들을 수행할 수 있다.Referring to FIG. 2 , the object controller 150 according to an embodiment includes at least an object identification and classification engine 202 , a depth segmentation engine 204 , a context analyzer 206 , and one or more artificial intelligence models 208 . may include The object controller 150 may perform overall operations for controlling the virtual object in the image.
개시된 실시예에서, 메인 객체는 이미지 내에서 식별된 객체들 중에서, 촬영의 대상이 되는 피사체로 판단되는 객체일 수 있다. 일 실시예에 따른 전자 장치(100)는 이미지 내에서 식별된 객체들 중에서 중요한 객체로 판단되는 객체를 메인 객체로 분류할 수 있다. 식별된 메인 객체는 복수개일 수 있다.In the disclosed embodiment, the main object may be an object determined as a subject to be photographed from among the objects identified in the image. The electronic device 100 according to an embodiment may classify an object determined to be an important object among the objects identified in the image as a main object. The identified main object may be plural.
개시된 실시예에서, 서브 객체는 이미지 내 식별된 객체들 중에서, 촬영의 대상이 되지는 않았으나, 이미지 내 존재하는 객체일 수 있다. 일 실시예에 따른 전자 장치(100)는 이미지 내에서 메인 객체로 분류되지 않은 객체를 서브 객체로 분류할 수 있다. 식별된 서브 객체는 복수개일 수 있다.In the disclosed embodiment, the sub-object may be an object that is not a target of photographing among objects identified in the image, but exists in the image. The electronic device 100 according to an embodiment may classify an object that is not classified as a main object in an image as a sub-object. The identified sub-objects may be plural.
개시된 실시예에서, 가상 객체는 획득된 이미지에 부가되어 애니메이션 효과 등을 부여함으로써 증강된 이미지를 생성하기 위한 객체일 수 있다. 일 실시예에 따른 전자 장치(100)는 메인 객체, 서브 객체, 이미지의 컨텍스트 정보 중 적어도 일부에 기초하여 이미지에 부가될 가상 객체를 획득할 수 있다.In the disclosed embodiment, the virtual object may be an object for generating an augmented image by adding an animation effect to the acquired image. The electronic device 100 according to an embodiment may acquire a virtual object to be added to an image based on at least a part of the main object, the sub-object, and the context information of the image.
일 실시예에서, 객체 컨트롤러(150)는 객체 식별 및 분류 엔진(202)을 이용하여, 이미지 내에서 객체를 식별하고 분류할 수 있다. 객체 식별 및 분류 엔진(202)은 이미지 내에서 적어도 하나의 객체를 식별할 수 있다. 이 경우, 객체 식별 및 분류 엔진(202)은 식별된 적어도 하나의 객체를 메인 객체 및 서브 객체로 분류할 수 있다. 이미지 내 객체가 하나인 경우, 식별된 하나의 객체는 메인 객체로 분류될 수 있으며, 이 경우 개시된 실시예들에서 메인 객체가 메인 객체인 동시에 서브 객체로써 취급될 수 있다. 객체 식별 및 분류 엔진(202)은 인공지능 모델(208) 중 객체 인식 모델을 이용하여 이미지 내 존재하는 적어도 하나의 객체를 식별할 수 있다.In one embodiment, the object controller 150 may use the object identification and classification engine 202 to identify and classify objects within the image. The object identification and classification engine 202 may identify at least one object within the image. In this case, the object identification and classification engine 202 may classify the identified at least one object into a main object and a sub-object. When there is one object in the image, one identified object may be classified as a main object, and in this case, the main object may be treated as a main object and a sub-object in the disclosed embodiments. The object identification and classification engine 202 may identify at least one object existing in the image by using the object recognition model among the artificial intelligence models 208 .
일 실시예에서, 객체 식별 및 분류 엔진(202)은 이미지 내에서 식별된 적어도 하나의 객체를 분류할 수 있다. 예를 들어, 식별된 적어도 하나의 객체가 복수개인 경우, 객체 식별 및 분류 엔진(202)은 식별된 객체들을 동일 또는 유사한 카테고리의 그룹으로 분류함으로써, 객체들 간의 관계를 식별할 수 있다. 식별된 객체들 간의 관계를 나타내는 정보는, 그룹으로 분류된 객체들의 카테고리 분류된 객체 그룹들 간 카테고리의 유사도, 그룹 내 포함되는 객체들의 수 등을 포함할 수 있다. 또한, 식별된 객체들 간의 관계를 나타내는 정보는 메인 객체와 서브 객체 간의 관계 정보 및 서브 객체들 간 관계 정보를 포함할 수 있다. 다만, 이에 한정되는 것은 아니다. 일 실시예에 따른 전자 장치(100)는 식별된 객체들 및 객체들의 분류 정보에 기초하여, 이미지에 부가될 가상 객체 및 가상 객체의 궤적을 획득할 수 있다.In one embodiment, the object identification and classification engine 202 may classify at least one object identified within the image. For example, when there are a plurality of identified at least one object, the object identification and classification engine 202 classifies the identified objects into groups of the same or similar category, thereby identifying a relationship between the objects. The information indicating the relationship between the identified objects may include a degree of similarity between categories of objects classified into groups, and the number of objects included in the group. Also, the information indicating the relationship between the identified objects may include relationship information between the main object and the sub-objects and relationship information between the sub-objects. However, the present invention is not limited thereto. The electronic device 100 according to an embodiment may acquire a virtual object to be added to an image and a trajectory of the virtual object based on the identified objects and classification information of the objects.
일 실시예에서, 전자 장치(100)는 깊이 분할(depth segmentation) 엔진(204)을 이용하여, 이미지가 촬영된 3차원 공간의 깊이 정보를 획득할 수 있다.In an embodiment, the electronic device 100 may obtain depth information of a 3D space in which an image is captured by using a depth segmentation engine 204 .
예를 들어, 깊이 분할 엔진(204)은 이미지 내에서 객체(예를 들어, 사람)를 인식하고, 인식된 객체에 기초하여 이미지를 전경(foreground) 이미지 및 배경(background) 이미지로 분할(segment)할 수 있다. 이 경우, 전경 이미지 및 배경 이미지는 서로 다른 깊이를 갖는 하나 이상의 이미지들일 수 있다. 예를 들어, 깊이 분할 엔진(204)은 이미지를 배경 이미지 및 서로 다른 깊이를 갖는 제1 전경 이미지, 제2 전경 이미지, …, 제N 전경 이미지로 분할할 수 있다. 깊이 분할 엔진(204)은 서로 다른 깊이를 갖는 분할된 이미지들의 세그멘테이션 레벨을 깊이 정보로 획득할 수 있다.For example, the depth segmentation engine 204 recognizes an object (eg, a person) within an image, and segments the image into a foreground image and a background image based on the recognized object. can do. In this case, the foreground image and the background image may be one or more images having different depths. For example, the depth segmentation engine 204 divides the image into a background image and a first foreground image having different depths, a second foreground image, . . . , can be divided into the N-th foreground image. The depth segmentation engine 204 may obtain segmentation levels of segmented images having different depths as depth information.
일 실시예에서, 전자 장치(100)는 다른 방식으로 이미지가 촬영된 3차원 공간의 깊이 정보를 획득할 수 있다. 예를 들어, 전자 장치(100)는 적어도 둘 이상의 카메라를 이용하여 촬영된 이미지로부터 깊이 정보를 획득할 수 있다. 다른 예에서, 전자 장치(100)는 RGB-D(RGB-Depth) 카메라를 이용하여 촬영된 깊이 정보를 포함하는 이미지로부터, 깊이 정보를 획득할 수 있다.In an embodiment, the electronic device 100 may acquire depth information of a 3D space in which an image is captured in another method. For example, the electronic device 100 may acquire depth information from an image captured by using at least two or more cameras. In another example, the electronic device 100 may obtain depth information from an image including depth information captured using an RGB-Depth (RGB-D) camera.
일 실시예에 따른 전자 장치(100)는 획득된 깊이 정보를 이용하여, 이미지 내에서 가상 객체가 궤적을 따라 이동할 때, 3차원 이동을 가능하게 함으로써 이미지 및 가상 객체에 원근감을 부여할 수 있다.The electronic device 100 according to an embodiment may give perspective to the image and the virtual object by enabling three-dimensional movement when the virtual object moves along a trajectory in the image by using the obtained depth information.
일 실시예에 따른 전자 장치(100)는 획득된 가상 객체의 궤적 및 깊이 정보를 이용하여, 이미지 내에서 가상 객체가 이동할 3차원 궤적을 생성하고, 생성된 3차원 궤적을 따라 가상 객체를 이동시킬 수 있다.The electronic device 100 according to an embodiment generates a 3D trajectory to move the virtual object in an image by using the acquired trajectory and depth information of the virtual object, and moves the virtual object along the generated 3D trajectory. can
일 실시예에서, 전자 장치(100)는 컨텍스트 분석기(206)를 이용하여 이미지의 컨텍스트 정보를 획득하고, 획득된 컨텍스트 정보를 분석할 수 있다. 컨텍스트 정보는 예를 들어, 이미지 내 객체의 포즈, 감정, 액션, 이미지의 장면, 이미지 내 이벤트, 이미지가 촬영된 위치 중 적어도 하나를 포함할 수 있으나, 이에 한정되는 것은 아니다. 컨텍스트 분석기(206)는 인공지능 모델들(208) 중 컨텍스트 정보 획득 모델을 이용하여 이미지를 분석함으로써 이미지 내 존재하는 적어도 컨텍스트 정보를 식별할 수 있다. 일 실시예에 따른 전자 장치(100)는 식별된 컨텍스트 정보를 분석한 결과에 기초하여, 가상 객체 및 가상 객체의 궤적을 획득할 수 있다.In an embodiment, the electronic device 100 may obtain context information of an image using the context analyzer 206 and analyze the obtained context information. The context information may include, for example, at least one of a pose, emotion, action, scene of an image, an event in the image, and a location at which the image is captured, of an object in the image, but is not limited thereto. The context analyzer 206 may identify at least context information existing in the image by analyzing the image using the context information acquisition model among the artificial intelligence models 208 . The electronic device 100 according to an embodiment may acquire a virtual object and a trajectory of the virtual object based on a result of analyzing the identified context information.
일 실시예에 따른 전자 장치(100)는 식별된 컨텍스트 정보를 분석하고 식별된 컨텍스트 정보의 적어도 일부를 다양한 방식으로 조합하여 가상 객체 및 가상 객체의 궤적을 식별하는 데 이용할 수 있다.The electronic device 100 according to an embodiment may analyze the identified context information and combine at least a portion of the identified context information in various ways to identify a virtual object and a trajectory of the virtual object.
일 실시예에서, 전자 장치(100)는 이미지 내 객체의 포즈를 식별하고, 식별된 포즈를 분석하여 이미지 내 객체가 취하고 있는 액션을 식별할 수 있다. 전자 장치(100)는 객체의 액션에 기초하여, 객체의 액션과 관련된 가상 객체 및 가상 객체의 궤적을 식별할 수 있다.In an embodiment, the electronic device 100 may identify a pose of an object in an image and analyze the identified pose to identify an action that the object in the image is taking. The electronic device 100 may identify a virtual object related to the action of the object and a trajectory of the virtual object based on the action of the object.
일 실시예에서, 전자 장치(100)는 이미지 내의 장면/이벤트를 식별하고, 식별된 장면 및 이벤트를 분석하여 이미지의 테마를 식별할 수 있다. 전자 장치(100)는 이미지의 테마에 기초하여, 이미지의 테마와 관련된 가상 객체 및 가상 객체의 궤적을 식별할 수 있다.In an embodiment, the electronic device 100 may identify a scene/event in an image, and analyze the identified scene and event to identify a theme of the image. The electronic device 100 may identify a virtual object related to the theme of the image and a trajectory of the virtual object based on the theme of the image.
일 실시예에서, 전자 장치(100)는 이미지가 촬영된 장소(예를 들어, 여행지, 식당 등)을 식별하고, 식별된 이미지가 촬영된 장소에 기초하여, 이미지가 촬영된 장소와 관련된 가상 객체 및 가상 객체의 궤적을 식별할 수 있다.In an embodiment, the electronic device 100 identifies a place (eg, a travel destination, a restaurant, etc.) where an image was captured, and based on the identified place where the image was captured, a virtual object related to the place where the image was captured and a trajectory of the virtual object may be identified.
이상에서 전자 장치(100)가 컨텍스트 정보를 식별하고 분석하여 가상 객체 및 궤적을 식별하는 실시예들을 서술하였으나, 이는 일 실시예들로만 이해되어야 하며, 전자 장치(100)는 이미지의 컨텍스트 중 적어도 일부 또는 그 조합에 기초하여, 이미지에 부가될 가상 객체 및 궤적을 결정할 수 있다.In the above, embodiments in which the electronic device 100 identifies and analyzes context information to identify a virtual object and a trajectory have been described. However, this should be understood only as an exemplary embodiment, and the electronic device 100 may use at least a portion of the context of an image or Based on the combination, it is possible to determine the virtual object and trajectory to be added to the image.
일 실시예에서, 하나 이상의 인공지능 모델들(208)은 특정 동작을 수행하기 위해 학습된 다양한 인공지능 모델들을 포함할 수 있다. In one embodiment, one or more artificial intelligence models 208 may include various artificial intelligence models trained to perform a particular action.
예를 들어, 인공지능 모델들(208)은 이미지 내에서 객체를 식별하기 위한 모델, 이미지의 컨텍스트 분석을 위한 모델, 이미지 내 부가될 가상 객체를 결정하기 위한 모델, 가상 객체의 궤적을 식별하기 위한 모델, 사용자에게 가상 객체 및 궤적을 추천하기 위한 인공지능 모델 등일 수 있으나, 이에 한정되는 것은 아니다.For example, the AI models 208 may include a model for identifying an object in an image, a model for analyzing the context of an image, a model for determining a virtual object to be added in the image, and a model for identifying a trajectory of the virtual object. It may be a model, an artificial intelligence model for recommending a virtual object and a trajectory to a user, but is not limited thereto.
다른 예에서, 하나 이상의 인공지능 모델들(208)은, 하나의 인공지능 모델로 구현되어 전술한 여러 동작 및 기능들을 모두 수행 가능하도록 학습된, 인공지능 모델일 수 있다.In another example, the one or more AI models 208 may be an AI model that is implemented as a single AI model and trained to perform all of the various operations and functions described above.
도 3은 일 실시예에 따른 전자 장치가 가상 객체 및 가상 객체의 궤적을 식별하여 증강된 이미지를 생성하는 방법을 도시한 흐름도이다.3 is a flowchart illustrating a method in which an electronic device generates an augmented image by identifying a virtual object and a trajectory of the virtual object, according to an exemplary embodiment.
단계 S310에서, 일 실시예에 따른 전자 장치(100)는 이미지를 획득할 수 있다. 일 실시예에서, 전자 장치(100)는 카메라를 이용하여 이미지를 촬영하여 획득할 수 있다. 이 경우, 카메라는 하나 이상일 수 있으며, 깊이 정보를 함께 획득할 수 있는 RGB-D 카메라일 수 있다. 일 실시예에서, 전자 장치(100)는 통신부(120)를 이용하여 외부 장치로부터 이미지를 획득할 수 있다.In operation S310, the electronic device 100 according to an embodiment may acquire an image. In an embodiment, the electronic device 100 may acquire an image by photographing it using a camera. In this case, there may be more than one camera, and may be an RGB-D camera capable of acquiring depth information together. In an embodiment, the electronic device 100 may obtain an image from an external device using the communication unit 120 .
단계 S320에서, 전자 장치(100)는 이미지 내 적어도 하나의 객체를 식별하고, 식별된 객체를 분류할 수 있다.In operation S320, the electronic device 100 may identify at least one object in the image and classify the identified object.
일 실시예에서, 전자 장치(100)는 획득된 이미지를 인공지능 모델에 적용하여, 이미지 내 적어도 하나의 객체를 식별할 수 있다. 전자 장치(100)는 이미지 내 객체가 복수개 존재하는 경우, 식별된 객체들을 가상 객체가 증강될 메인 객체 및 가상 객체를 결정하기 위한 서브 객체들로 분류할 수 있다.In an embodiment, the electronic device 100 may identify at least one object in the image by applying the obtained image to the artificial intelligence model. When there are a plurality of objects in the image, the electronic device 100 may classify the identified objects into a main object to which the virtual object is to be augmented and sub-objects for determining the virtual object.
전자 장치(100)는 이미지 내에서 식별한 객체들 각각에 고유의 태그(예를 들어, 객체의 식별 정보, 카테고리 정보 등)를 부여하여, 객체 태그(322)를 생성할 수 있다.The electronic device 100 may generate an object tag 322 by assigning a unique tag (eg, object identification information, category information, etc.) to each of the objects identified in the image.
일 실시예에서, 전자 장치(100)는 식별된 객체들을 동일 또는 유사한 카테고리의 그룹으로 분류함으로써, 객체들 간의 관계를 식별할 수 있다.In an embodiment, the electronic device 100 may identify a relationship between the objects by classifying the identified objects into groups of the same or similar category.
단계 S330에서, 전자 장치(100)는 획득된 이미지에 깊이 분할을 수행하여 깊이 정보(332)를 획득할 수 있다.In operation S330 , the electronic device 100 may acquire depth information 332 by performing depth division on the acquired image.
일 실시예에서, 전자 장치(100)는 획득된 이미지 내에서 식별된 적어도 하나의 객체에 기초하여, 이미지를 전경 및 배경으로 분할할 수 있다. 이 경우, 전경 이미지 및 배경 이미지는 서로 다른 깊이를 갖는 하나 이상의 이미지들일 수 있다. 예를 들어, 깊이 분할 엔진(204)은 이미지를 배경 이미지 및 서로 다른 깊이를 갖는 제1 전경 이미지, 제2 전경 이미지, …, 제N 전경 이미지로 분할할 수 있다. 깊이 분할 엔진(204)은 서로 다른 깊이를 갖는 분할된 이미지들의 세그멘테이션 레벨을 깊이 정보(332)로 획득할 수 있다.In an embodiment, the electronic device 100 may divide the image into a foreground and a background based on at least one object identified in the acquired image. In this case, the foreground image and the background image may be one or more images having different depths. For example, the depth segmentation engine 204 divides the image into a background image and a first foreground image having different depths, a second foreground image, . . . , can be divided into the N-th foreground image. The depth segmentation engine 204 may obtain segmentation levels of segmented images having different depths as depth information 332 .
다만, 전자 장치(100)가 깊이 정보(332)를 획득하는 방법은 이에 한정되는 것은 아니며, 전자 장치(100)는 적어도 둘 이상의 카메라를 이용하여 촬영된 이미지로부터 깊이 정보(332)를 획득하거나, RGB-D(RGB-Depth) 카메라를 이용하여 촬영된 깊이 정보를 포함하는 이미지로부터, 깊이 정보(332)를 획득할 수 있다.However, the method by which the electronic device 100 acquires the depth information 332 is not limited thereto, and the electronic device 100 acquires the depth information 332 from an image photographed using at least two or more cameras, or Depth information 332 may be obtained from an image including depth information photographed using an RGB-Depth (RGB-D) camera.
단계 S340에서, 전자 장치(100)는 이미지에 부가될 가상 객체를 획득할 수 있다. 이 경우, 가상 객체는 단계 S320에서 식별된 메인 객체에 애니메이션 효과를 부여하기 위한 객체일 수 있다. 또한, 가상 객체는 식별된 메인 객체가 획득된 이미지 내 다른 영역에 애니메이션 효과를 부여하기 위한 객체일 수 있다.In operation S340 , the electronic device 100 may acquire a virtual object to be added to the image. In this case, the virtual object may be an object for applying an animation effect to the main object identified in step S320. In addition, the virtual object may be an object for imparting an animation effect to another region in the image obtained by the identified main object.
일 실시예에서, 전자 장치(100)는 단계 S320에서 식별된 메인 객체 및 서브 객체들의 객체 태그에 기초하여, 이미지에 부가될 가상 객체(352)를 결정할 수 있다. 전자 장치(100)는 전자 장치(100)의 메모리 또는 외부 장치(예를 들어, 서버)에 저장된 복수의 가상 객체 후보들 중에서, 가상 객체(352)를 결정할 수 있다.In an embodiment, the electronic device 100 may determine the virtual object 352 to be added to the image based on the object tags of the main object and the sub-objects identified in operation S320 . The electronic device 100 may determine the virtual object 352 from among a plurality of virtual object candidates stored in the memory of the electronic device 100 or in an external device (eg, a server).
일 실시예에서, 전자 장치(100)는 메인 객체의 객체 태그에 기초하여 메인 객체와 유사한 객체를 가상 객체(352)로 결정하고, 결정된 가상 객체(352)를 획득하거나, 메인 객체에 적합한 애니메이션 효과를 부여할 수 있는 객체를 가상 객체(352)로 결정하고 결정된 가상 객체(352)를 획득할 수 있다.In an embodiment, the electronic device 100 determines an object similar to the main object as the virtual object 352 based on the object tag of the main object, obtains the determined virtual object 352, or an animation effect suitable for the main object An object to which can be assigned is determined as a virtual object 352 , and the determined virtual object 352 may be obtained.
일 실시예에서, 전자 장치(100)는 서브 객체의 객체 태그에 기초하여 서브 객체와 유사한 객체를 가상 객체(352)로 결정하고, 결정된 가상 객체(352)를 획득하거나, 서브 객체들의 객체 태그에 기초하여 메인 객체에 적합한 애니메이션 효과를 부여할 수 있는 객체를 가상 객체(352)로 결정하고 결정된 가상 객체(352)를 획득할 수 있다.In an embodiment, the electronic device 100 determines an object similar to the sub-object as the virtual object 352 based on the object tag of the sub-object, obtains the determined virtual object 352, or stores the object tag of the sub-objects. Based on the virtual object 352 , an object capable of imparting an animation effect suitable for the main object may be determined and the determined virtual object 352 may be obtained.
일 실시예에서, 전자 장치(100)가 획득한 이미지에는 메인 객체가 존재하지 않을 수 있다. 이 경우, 전자 장치는 이미지의 컨텍스트 정보에 기초하여 이미지 내 적어도 일부 영역에 부가될 가상 객체(352)를 결정할 수 있다.In an embodiment, the main object may not exist in the image acquired by the electronic device 100 . In this case, the electronic device may determine the virtual object 352 to be added to at least a partial area in the image based on the context information of the image.
다른 예에서, 전자 장치(100)는 메인 객체의 객체 태그 및 서브 객체의 객체 태그, 이미지의 컨텍스트 정보 중 적어도 둘 이상의 조합에 기초하여, 이미지에 부가될 가상 객체(352)를 결정하고, 결정된 가상 객체(352)를 획득할 수 있다.In another example, the electronic device 100 determines a virtual object 352 to be added to the image based on a combination of at least two or more of the object tag of the main object, the object tag of the sub-object, and context information of the image, and the determined virtual An object 352 may be obtained.
획득된 가상 객체(352)는 이미지에 부가되어 이미지 내 메인 객체에 애니메이션 효과를 부여하거나, 이미지 내 적어도 일부 영역에 애니메이션 효과를 부여하는, 증강된 이미지를 생성하는 데 사용될 수 있다. The obtained virtual object 352 may be added to an image to give an animation effect to a main object in the image, or may be used to create an augmented image that animates at least some regions in the image.
단계 S350에서, 일 실시예에 따른 전자 장치(100)는 가상 객체(352)의 이동 경로를 나타내는 궤적(354)을 획득할 수 있다. 이 경우, 궤적(354)은 식별된 메인 객체를 기준으로, 메인 객체 주변을 선회하는 궤적일 수 있다. 다만, 이에 한정되는 것은 아니며 궤적(354)는 메인 객체를 기준으로 메인 객체에 대한 가상 객체(352)의 상대적인 이동 경로를 나타내는 궤적일 수 있다.In operation S350 , the electronic device 100 according to an embodiment may obtain a trajectory 354 indicating a movement path of the virtual object 352 . In this case, the trajectory 354 may be a trajectory revolving around the main object based on the identified main object. However, the present invention is not limited thereto, and the trajectory 354 may be a trajectory indicating a relative movement path of the virtual object 352 with respect to the main object with respect to the main object.
일 실시예에서, 전자 장치(100)는 사용자로부터 가상 객체(352)의 이동 경로를 가이드하는 사용자 입력을 획득할 수 있다. 예를 들어, 전자 장치(100)는 전자 장치(100)의 입력 장치(예를 들어, 터치 스크린 등)에 가상 객체의 궤적을 그리는 사용자의 입력을 획득하고, 획득된 사용자 입력을 가상 객체의 궤적(354)으로 결정할 수 있다. 다른 예에서, 전자 장치(100)는 사용자의 다른 외부 장치(예를 들어, 스마트 와치, 스타일러스 펜 등)로부터 궤적(354)을 획득할 수 있다. 이 경우, 다른 외부 장치는 복수의 센서(모션 센서, 자이로 센서 등)들을 포함할 수 있다. 사용자의 다른 외부 장치는, 사용자가 다른 외부 장치를 이용하여 가상 객체(352)의 궤적을 그리는 동작을 식별하고, 식별된 동작에 대응되는 궤적을 생성하여 전자 장치(100)로 전송할 수 있다. 다른 예에서, 전자 장치(100)는 획득된 가상 객체(352)에 대응되는 궤적을 생성하기 위해 학습된 인공지능 모델을 이용하여, 가상 객체의 이동 경로를 나타내는 궤적(354)을 획득할 수 있다.In an embodiment, the electronic device 100 may obtain a user input guiding a movement path of the virtual object 352 from the user. For example, the electronic device 100 obtains a user input for drawing a trajectory of a virtual object on an input device (eg, a touch screen, etc.) of the electronic device 100 , and uses the obtained user input as the trajectory of the virtual object. (354) can be determined. In another example, the electronic device 100 may acquire the trajectory 354 from the user's other external device (eg, a smart watch, a stylus pen, etc.). In this case, the other external device may include a plurality of sensors (motion sensor, gyro sensor, etc.). The user's other external device may identify an operation in which the user draws a trajectory of the virtual object 352 using another external device, generate a trajectory corresponding to the identified operation, and transmit the generated trajectory to the electronic device 100 . In another example, the electronic device 100 may obtain the trajectory 354 indicating the movement path of the virtual object by using the artificial intelligence model learned to generate the trajectory corresponding to the obtained virtual object 352 . .
개시된 실시예들에서, 획득된 가상 객체의 궤적(354)은 깊이 정보를 포함하고, 3차원 공간상에서 가상 객체가 이동하는 이동 경로에 대응되는 궤적일 수 있다. 또한, 획득된 가상 객체의 궤적(354)은 2차원 평면상에서 가상 객체가 이동하는 이동 경로에 대응되는 궤적일 수 있다.In the disclosed embodiments, the obtained trajectory 354 of the virtual object includes depth information and may be a trajectory corresponding to a movement path of the virtual object in a 3D space. Also, the obtained trajectory 354 of the virtual object may be a trajectory corresponding to a movement path of the virtual object on a two-dimensional plane.
단계 S360에서, 일 실시예에 따른 전자 장치(100)는 획득된 가상 객체(352)를 궤적(354) 상에서 이동시킬 수 있다. 이 경우, 전자 장치(100)는 깊이 정보(332)를 함께 이용하여 가상 객체(352)를 이동시킬 수 있다.In operation S360 , the electronic device 100 according to an embodiment may move the obtained virtual object 352 on the trajectory 354 . In this case, the electronic device 100 may move the virtual object 352 by using the depth information 332 together.
일 실시예에서, 전자 장치(100)는 이미지 내에서 궤적(354)을 따라 가상 객체(352)를 이동시킬 수 있다. 전자 장치(100)는 궤적을 따라 가상 객체(352)를 이동시키면서, 가상 객체(352)의 크기, 메인 객체에 대한 가상 객체(352)의 방향, 메인 객체에 대한 가상 객체의 위치, 및 가상 객체(352)의 사시도(perspective view) 중 적어도 하나를 변경할 수 있다.In an embodiment, the electronic device 100 may move the virtual object 352 along the trajectory 354 in the image. While the electronic device 100 moves the virtual object 352 along the trajectory, the size of the virtual object 352, the direction of the virtual object 352 with respect to the main object, the position of the virtual object with respect to the main object, and the virtual object At least one of the perspective views of 352 may be changed.
일 실시예에서, 전자 장치(100)는 가상 객체(352)가 궤적(354) 상에서 이동할 때, 이미지의 2차원 평면을 기준으로 가상 객체(352)가 이미지 내 3차원 공간의 더 깊은 영역으로 이동하는 것을 표현하기 위하여 가상 객체(352)의 크기가 작아지도록 조정하고, 이미지의 2차원 평면을 기준으로 가상 객체(352)가 이미지 내 3차원 공간의 더 얕은 영역으로 이동하는 것을 표현하기 위하여 가상 객체(352)의 크기가 커지도록 조정할 수 있다.In an embodiment, when the virtual object 352 moves on the trajectory 354 , the electronic device 100 moves the virtual object 352 to a deeper region of the three-dimensional space in the image based on the two-dimensional plane of the image. Adjust the size of the virtual object 352 to become smaller in order to express (352) can be adjusted to increase the size.
일 실시예에서, 전자 장치(100)는 가상 객체(352)가 궤적(354) 상에서 이동할 때, 가상 객체(352)가 메인 객체를 기준으로 애니메이션 효과를 부여하는 것임을 표현하기 위하여, 가상 객체의 방향 및 위치를 조정할 수 있다. 예를 들어, 전자 장치(100)는 가상 객체가 이동하는 동영상의 매 프레임에 대응되는 이미지들마다, 가상 객체(352)의 메인 객체에 대한 방향, 메인 객체에 대한 가상 객체의 위치를 조정할 수 있다.In an embodiment, when the virtual object 352 moves on the trajectory 354 , the electronic device 100 displays the direction of the virtual object 352 to represent that animation effects are applied based on the main object. and position can be adjusted. For example, the electronic device 100 may adjust the direction of the virtual object 352 with respect to the main object and the position of the virtual object with respect to the main object for each image corresponding to every frame of a moving picture in which the virtual object moves. .
일 실시예에서, 전자 장치(100)는 궤적(354)이 존재하지 않거나, 혹은 궤적(354)이 존재하더라도, 가상 객체(352)를 이동시키지 않고 애니메이션 효과만을 부여할 수도 있다.In an embodiment, the electronic device 100 may provide only an animation effect without moving the virtual object 352 even if the trajectory 354 does not exist or even if the trajectory 354 exists.
단계 S370에서, 일 실시예에 따른 전자 장치(100)는 획득된 가상 객체(352)를 포함하는 증강된 이미지를 저장할 수 있다. 전자 장치(100)는 획득된 가상 객체(352)가 증강된 복수의 이미지들을 생성함으로써, 가상 객체(352)가 궤적(354) 상에서 이동하는 동영상을 생성할 수 있다. 이 경우, 가상 객체(352)가 궤적(354) 상에서 이동하는 동영상은, 동영상의 각각의 프레임들이 증강된 이미지들로 구성되는 것일 수 있다.In operation S370 , the electronic device 100 according to an embodiment may store the augmented image including the obtained virtual object 352 . The electronic device 100 may generate a video in which the virtual object 352 moves on the trajectory 354 by generating a plurality of images in which the obtained virtual object 352 is augmented. In this case, the moving picture in which the virtual object 352 moves on the trajectory 354 may be composed of images in which respective frames of the moving picture are augmented.
도 4는 일 실시예에 따른 전자 장치가 인공지능 모델을 이용하여 가상 객체가 이동하는 궤적을 생성하는 방법을 설명하기 위한 도면이다.FIG. 4 is a diagram for describing a method in which an electronic device generates a moving trajectory of a virtual object using an artificial intelligence model, according to an exemplary embodiment.
도 4를 참조하면, 일 실시예에 따른 전자 장치(100)는 복수의 이미지 또는 복수의 이미지들을 프레임으로 포함하는 비디오 형태의 입력(402)을 획득할 수 있다.Referring to FIG. 4 , the electronic device 100 according to an embodiment may obtain a plurality of images or an input 402 in the form of a video including the plurality of images as frames.
단계 S404에서, 일 실시예에 따른 전자 장치(100)는 비디오 분석을 수행할 수 있다. 전자 장치(100)는 입력(402)을 획득하여, 객체 식별, 객체 분류 및 컨텍스트 분석을 수행할 수 있다. 단계 S404의 비디오 분석 동작은, 도 2에서 설명한 객체 컨트롤러(150)의 기능 및 동작에 대응될 수 있다. 입력(402)는 비디오 및 이미지 형태일 수 있다. 이하에서는, 설명의 편의를 위하여 이미지를 기준으로 설명하기로 한다. 일 실시예에 따른 전자 장치(100)는 객체 식별, 객체 분류 및 컨텍스트 분석 결과에 기초하여, 가상 객체의 식별 및 궤적을 생성하기 위해 필요한 데이터들의 리스트를 생성할 수 있다.In operation S404, the electronic device 100 according to an embodiment may perform video analysis. The electronic device 100 may obtain the input 402 and perform object identification, object classification, and context analysis. The video analysis operation of step S404 may correspond to the function and operation of the object controller 150 described with reference to FIG. 2 . Input 402 may be in the form of video and images. Hereinafter, for convenience of description, an image will be used as a reference. The electronic device 100 according to an embodiment may generate a list of data required to identify a virtual object and generate a trajectory based on the object identification, object classification, and context analysis results.
단계 S406에서, 일 실시예에 따른 전자 장치(100)는 단계 S404의 비디오 분석을 수행하여 획득된 정보들의 리스트를 생성할 수 있다. 예를 들어, 전자 장치(100)는 이미지 내에서 식별된 메인 객체, 서브 객체, 이미지에 부가될 가상 객체 후보들 및, 식별된 객체들에 관련된 액션들의 리스트를 획득할 수 있다. 또한, 전자 장치(100)는 이미지 내에서 획득된 컨텍스트 정보의 분석 결과에 기초하여, 이미지 내 객체들 및 장면(scene)에 관련된, 가상 객체의 움직임을 식별할 수 있다. 이 경우, 식별된 가상 객체의 움직임은, 전자 장치(100)에 의해 결정된 가상 객체의 일반적인 움직임일 수 있으며, 이미지 내 메인 객체, 서브 객체 및 장면의 위치, 크기 등의 정보를 이용하여 가상 객체가 이미지 내에서 자연스럽게 이동할 수 있도록 하는 움직임일 수 있다.In operation S406, the electronic device 100 according to an embodiment may generate a list of information obtained by performing the video analysis of operation S404. For example, the electronic device 100 may obtain a list of main objects, sub-objects, virtual object candidates to be added to the image, and actions related to the identified objects identified in the image. Also, the electronic device 100 may identify motions of virtual objects related to objects in the image and scenes based on the analysis result of context information acquired in the image. In this case, the identified movement of the virtual object may be a general movement of the virtual object determined by the electronic device 100, and the virtual object is created using information such as the location and size of the main object, sub-object, and scene in the image. It may be a movement that allows a natural movement within the image.
단계 S408에서, 전자 장치(100)는 단계 S406에서 생성된 리스트 중에서, 메인 객체, 서브 객체, 가상 객체 후보들, 궤적 포인트 및 장면에 대한 메타 데이터를 획득할 수 있다. 이 경우, 궤적 포인트는 가상 객체의 이동 경로를 나타내는 궤적에 대응되는, 이미지 내 공간상의 좌표들일 수 있으며, 장면 메타 데이터는 이미지 장면의 주제, 분위기, 계절, 시간 등 이미지 장면의 특징을 나타낼 수 있는 정보일 수 있으나, 이에 한정되는 것은 아니다.In operation S408, the electronic device 100 may obtain metadata about a main object, a sub-object, virtual object candidates, a trajectory point, and a scene from the list generated in operation S406. In this case, the trajectory point may be coordinates in space in the image corresponding to the trajectory indicating the movement path of the virtual object, and the scene metadata may indicate the characteristics of the image scene, such as the subject, atmosphere, season, and time of the image scene. It may be information, but is not limited thereto.
단계 S410에서, 전자 장치(100)는 획득된 데이터들을 인공지능 모델에 적용할 수 있다. 전자 장치(100)는 가상 객체 후보들, 궤적 포인트 및 장면에 대한 메타 데이터 중 적어도 일부를 인공지능 모델(208)에 적용할 수 있다. 전자 장치(100)는 인공지능 모델(208)을 이용하여 궤적 클러스터링을 수행할 수 있다. 전자 장치(100)는 궤적 클러스터링을 통해 가상 객체가 이동 가능한 궤적들의 후보들을 식별하고, 이미지의 장면 대 가상 객체 분석을 수행하여 후보 궤적들 중에서 가상 객체가 이미지 내에서 이동할 궤적을 식별할 수 있다. 전자 장치는 식별된 궤적을 장면에 적합한 정황적(contextual) 궤적으로 결정하고, 정황적 궤적의 식별 정보(Identification information)를 생성할 수 있다.In step S410 , the electronic device 100 may apply the acquired data to the artificial intelligence model. The electronic device 100 may apply at least a portion of the virtual object candidates, the trajectory point, and the metadata about the scene to the artificial intelligence model 208 . The electronic device 100 may perform trajectory clustering using the artificial intelligence model 208 . The electronic device 100 may identify candidates of trajectories on which the virtual object can move through trajectory clustering, and perform scene-to-virtual object analysis of the image to identify trajectories on which the virtual object moves in the image from among the candidate trajectories. The electronic device may determine the identified trajectory as a contextual trajectory suitable for a scene, and generate identification information of the contextual trajectory.
단계 S412에서, 일 실시예에 따른 전자 장치(100)는 컨텍스트 연결 트리 및 장면-가상 객체 연결 트리를 생성할 수 있다.In operation S412, the electronic device 100 according to an embodiment may generate a context connection tree and a scene-virtual object connection tree.
일 실시예에서, 전자 장치(100)는 메인 객체와 서브 객체들 간의 연결 관계를 나타내는 컨텍스트 연결 트리를 생성할 수 있다. In an embodiment, the electronic device 100 may generate a context connection tree indicating a connection relationship between the main object and the sub-objects.
일 실시예에 따른 전자 장치(100)는 이미지 내에서 메인 객체 및 서브 객체들 간 관계, 서브 객체들 간 관계, 이미지의 관심 영역, 획득된 컨텍스트 정보 중 적어도 하나를 식별할 수 있다. 이 경우, 객체들 간 관계는 식별된 객체가 관심 영역 내에 존재하는지 여부, 식별된 객체들의 카테고리의 유사도, 식별된 객체들의 컨텍스트 정보와의 관련성 등에 기초하여, 이미지 내에서 식별된 객체들의 관련성을 나타내는 스코어일 수 있으나, 이에 한정되는 것은 아니다.The electronic device 100 according to an embodiment may identify at least one of a relationship between a main object and sub-objects, a relationship between sub-objects, an ROI of an image, and obtained context information in an image. In this case, the relationship between the objects indicates the relevance of the identified objects in the image based on whether the identified object exists in the region of interest, the similarity of the categories of the identified objects, the relevance of the identified objects with context information, and the like. It may be a score, but is not limited thereto.
전자 장치(100)는 식별된 메인 객체 및 서브 객체들 간 관계, 서브 객체들 간 관계, 이미지의 관심 영역, 획득된 컨텍스트 정보 중 적어도 하나에 기초하여, 메인 객체와 서브 객체들 간의 연결 관계를 나타내는 컨텍스트 연결 트리를 생성할 수 있다.The electronic device 100 indicates a connection relationship between the main object and the sub-objects based on at least one of the identified relationship between the main object and the sub-objects, the relationship between the sub-objects, the region of interest of the image, and the obtained context information. You can create a context-connected tree.
메인 객체와 서브 객체의 연결 관계는 예를 들어, 메인 객체와 서브 객체가 동일하거나 유사한 카테고리에 속하여 객체간 관련성이 높은 경우 연결되고, 메인 객체와 서브 객체가 서로 다른 카테고리에 속하여 객체간 관련성이 높지 않은 경우 연결되지 않은 것일 수 있다.The connection relationship between the main object and the sub-object is, for example, connected when the main object and the sub-object belong to the same or similar category and thus has a high relevance between objects, and the main object and the sub-object belong to different categories, so the relevance between objects is high. If not, it may not be connected.
다만, 전자 장치(100)가 컨텍스트 연결 트리를 생성하는 방법은 이에 한정되지 않으며, 전자 장치(100)는 컨텍스트 연결 트리를 생성할 때 다양한 기준으로 바탕으로 메인 객체 및 서브 객체의 연결 관계를 나타내도록 생성할 수 있다.However, the method by which the electronic device 100 generates the context connection tree is not limited thereto, and when the electronic device 100 creates the context connection tree, the electronic device 100 indicates the connection relationship between the main object and the sub-object based on various criteria. can create
전자 장치(100)는 메인 객체와 서브 객체들 간의 연결 관계에 기초하여, 이미지에 부가될 가상 객체를 결정할 수 있다. 예를 들어, 전자 장치(100)는 메인 객체 및 메인 객체와 연결된 서브 객체들에 기초하여, 메인 객체 및 메인 객체와 연결된 서브 객체들의 카테고리와 동일 또는 유사한 카테고리에 속하는 객체를 가상 객체로 결정할 수 있다. 다만, 이에 한정되는 것은 아니다. The electronic device 100 may determine a virtual object to be added to the image based on the connection relationship between the main object and the sub-objects. For example, the electronic device 100 may determine, as a virtual object, an object belonging to the same or similar category to the main object and sub-objects connected to the main object, based on the main object and sub-objects connected to the main object. . However, the present invention is not limited thereto.
일 실시예에서, 가상 객체가 메인 객체의 카테고리 등에 기초하여 결정됨으로써, 메인 객체와 관련된 객체가 가상 객체로 식별된 경우, 전자 장치(100)는 메인 객체와 가상 객체를 연결할 수 있다. 일 실시예에 따른 전자 장치(100)는 메인 객체 및 메인 객체와 연결된 가상 객체에 대응되는 정황적 궤적을 식별할 수 있다. 이 경우, 정황적 궤적의 식별은 인공지능 모델(208)을 이용하여 출력된 정황적 궤적 식별 정보에 기초하여 수행될 수 있다.In an embodiment, when an object related to the main object is identified as a virtual object by determining the virtual object based on the category of the main object, the electronic device 100 may connect the main object and the virtual object. The electronic device 100 according to an embodiment may identify a contextual trajectory corresponding to a main object and a virtual object connected to the main object. In this case, the contextual trajectory may be identified based on the contextual trajectory identification information output using the artificial intelligence model 208 .
일 실시예에서, 전자 장치(100)는 이미지의 장면과 가상 객체의 연결 관계를 나타내는 장면-가상 객체 연결 트리를 생성할 수 있다. 장면과 가상 객체의 연결 관계는 예를 들어, 이미지의 장면과 이미지에 부가될 가상 객체가 동일하거나 유사한 카테고리에 속하여 관련성이 높은 경우 연결되고, 이미지의 장면과 이미지에 부가될 가상 객체가 서로 다른 카테고리에 속하여 관련성이 높지 않은 경우 연결되지 않은 것일 수 있다. 다만, 이에 한정되지 않으며 장면-가상 객체 연결 트리는 다양한 방법으로 설정되어 장면 및 가상 객체간 연결 관계를 나타낼 수 있다.In an embodiment, the electronic device 100 may generate a scene-virtual object connection tree indicating a connection relationship between a scene of an image and a virtual object. The connection relationship between the scene and the virtual object is, for example, connected when the scene of the image and the virtual object to be added to the image belong to the same or similar category and are highly related, and the scene of the image and the virtual object to be added to the image are in different categories If it belongs to and is not highly related, it may not be connected. However, the present invention is not limited thereto, and the scene-virtual object connection tree may be set in various ways to indicate a connection relationship between the scene and the virtual object.
전자 장치(100)는 장면 및 가상 객체의 연결 관계에 기초하여, 이미지에 부가될 가상 객체를 결정할 수 있다. 예를 들어, 전자 장치(100)는 장면에 연결된 가상 객체를 이미지에 부가될 가상 객체로 결정할 수 있다. 다만, 이에 한정되는 것은 아니다. 이 경우, 결정된 가상 객체는 전술한 실시예와 달리 메인 객체에 관련된 것이 아닌, 이미지의 장면에 관련된 것이므로, 가상 객체가 메인 객체와 연결되지 않을 수 있다. 일 실시예에 따른 전자 장치(100)가 결정된 가상 객체에 대응되는 정황적 궤적을 식별할 수 있다. 이 경우, 정황적 궤적의 식별은 인공지능 모델(208)을 이용하여 출력된 정황적 궤적 식별 정보에 기초하여 수행될 수 있다.The electronic device 100 may determine a virtual object to be added to the image based on the connection relationship between the scene and the virtual object. For example, the electronic device 100 may determine a virtual object connected to a scene as a virtual object to be added to the image. However, the present invention is not limited thereto. In this case, since the determined virtual object is not related to the main object, but to the scene of the image, unlike the above-described embodiment, the virtual object may not be connected to the main object. The electronic device 100 according to an embodiment may identify a contextual trajectory corresponding to the determined virtual object. In this case, the contextual trajectory may be identified based on the contextual trajectory identification information output using the artificial intelligence model 208 .
도 5는 일 실시예에 따른 전자 장치가 객체 식별 정보, 이미지 깊이 정보, 및 컨텍스트 정보를 이용하여 가상 객체 및 궤적을 결정하는 방법을 설명하기 위한 흐름도이다.5 is a flowchart illustrating a method for an electronic device to determine a virtual object and a trajectory by using object identification information, image depth information, and context information, according to an embodiment.
단계 S510에서, 일 실시예에 따른 전자 장치(100)는 입력(502)을 획득하여, 객체 식별, 객체 분류 및 컨텍스트 분석을 수행할 수 있다. 단계 S510은 도 4의 단계 S404에 대응될 수 있다.In operation S510 , the electronic device 100 according to an embodiment may obtain an input 502 and perform object identification, object classification, and context analysis. Step S510 may correspond to step S404 of FIG. 4 .
단계 S520에서, 전자 장치(100)는 단계 S510의 결과에 기초하여 가상 객체 및 궤적을 결정하기 위한 정보들을 획득할 수 있다. 예를 들어, 전자 장치(100)는 이미지 내에서 식별된 메인 객체, 서브 객체, 이미지에 부가될 가상 객체 후보들, 식별된 객체들에 관련된 액션들, 궤적 후보들 및 장면 메타데이터를 획득할 수 있다. 이 경우, 장면 메타 데이터는 이미지 장면의 주제, 분위기, 계절, 시간 등 이미지 장면의 특징을 나타낼 수 있는 정보일 수 있으나, 이에 한정되는 것은 아니다.In operation S520, the electronic device 100 may obtain information for determining a virtual object and a trajectory based on the result of operation S510. For example, the electronic device 100 may obtain a main object, a sub-object, virtual object candidates to be added to the image, actions related to the identified objects, trajectory candidates, and scene metadata identified in the image. In this case, the scene metadata may be information capable of representing characteristics of an image scene, such as a subject, atmosphere, season, and time of the image scene, but is not limited thereto.
단계 S530에서, 전자 장치(100)는 획득된 데이터들을 인공지능 모델에 적용하여, 궤적을 결정할 수 있다. 예를 들어, 전자 장치(100)는 메인 객체, 서브 객체, 가상 객체 후보들, 궤적 후보들을 인공지능 모델(208)에 입력하여, 가상 객체 후보들 각각에 대한 궤적 클러스터를 획득할 수 있다. 이 경우, 인공지능 모델(208)은 각각의 가상 객체에 적합한 궤적을 출력하도록 학습된 모델일 수 있다.In operation S530, the electronic device 100 may determine a trajectory by applying the acquired data to the AI model. For example, the electronic device 100 may input the main object, sub-object, virtual object candidates, and trajectory candidates to the AI model 208 to obtain trajectory clusters for each of the virtual object candidates. In this case, the artificial intelligence model 208 may be a model trained to output a trajectory suitable for each virtual object.
예를 들어, 제1 후보 가상 객체에 대응되는 후보 궤적들의 클러스터는 T1, 제2 후보 가상 객체에 대응되는 후보 궤적들의 클러스터는 T2일 수 있다. 전자 장치(100)는 획득된 궤적 클러스터들을 분석하여, 각각의 궤적 클러스터들 내에서, 후보 가상 객체에 대한 궤적을 결정할 수 있다. 전자 장치(100)는, 후보 가상 객체들 각각에 대하여 메인 객체 또는 서브 객체와의 관련성을 분석할 수 있다. 예를 들어, 전자 장치(100)는 후보 가상 객체가 메인 객체와 관련성이 높은지 또는 서브 객체와 관련성이 높은지 여부를 결정할 수 있다.For example, the cluster of candidate trajectories corresponding to the first candidate virtual object may be T1, and the cluster of candidate trajectories corresponding to the second candidate virtual object may be T2. The electronic device 100 may analyze the obtained trajectory clusters and determine the trajectory of the candidate virtual object within each trajectory cluster. The electronic device 100 may analyze a relationship with a main object or a sub-object for each of the candidate virtual objects. For example, the electronic device 100 may determine whether the candidate virtual object has high relevance to the main object or whether the candidate virtual object has high relevance to the sub-object.
단계 S540에서, 전자 장치(100)는 메인 객체 및 서브 객체 중에서 적어도 일부의 객체를 선택할 수 있다. 전자 장치(100)가 객체를 선택하는 방법은, 메인 객체만을 선택하는 방법, 서브 객체만을 선택하는 방법, 장면 메타데이터를 이용하여 선택하는 방법, 기 설정된 조건들을 이용하여 선택하는 방법, 기타 다른 방법 등일 수 있으며, 어느 하나의 방법으로 한정되지 않는다.In operation S540, the electronic device 100 may select at least some of the main object and the sub-object. The method for the electronic device 100 to select an object includes a method of selecting only a main object, a method of selecting only a sub-object, a method of selecting using scene metadata, a method of selecting using preset conditions, and other methods. and the like, and is not limited to any one method.
전자 장치(100)는 후보 가상 객체들 중에서 선택된 객체에 대응되는 가상 객체를 선택할 수 있다. 예를 들어, 전자 장치(100)가 메인 객체를 선택한 경우, 가상 객체는 후보 가상 객체들 중에서 메인 객체에 대응되는 객체일 수 있다. 다른 예에서, 전자 장치(100)가 서브 객체를 선택한 경우, 서브 객체는 후보 가상 객체들 중에서 서브 객체에 대응되는 객체일 수 있다.The electronic device 100 may select a virtual object corresponding to the selected object from among the candidate virtual objects. For example, when the electronic device 100 selects the main object, the virtual object may be an object corresponding to the main object from among the candidate virtual objects. As another example, when the electronic device 100 selects a sub-object, the sub-object may be an object corresponding to the sub-object from among the candidate virtual objects.
일 실시예에 따른 전자 장치(100)는 선택된 객체(메인 객체 또는 서브 객체), 선택된 가상 객체 및 선택된 가상 객체에 대하여 결정된 궤적을 이용하여, 이미지를 증강시킬 수 있다. 또한, 전자 장치(100)는 입력 이미지에 대하여 선택된 객체 및 선택된 가상 객체를 학습 데이터로 사용하여, 인공지능 모델(208)을 학습시킬 수 있다. 전자 장치(100)는 특정 이미지가 입력되는 경우, 이미지를 증강시키기 위해 전자 장치(100)에 의하여 선택되는 객체, 선택되는 객체에 대응되는 가상 객체 및 가상 객체에 대응되는 궤적을 추천할 수 있도록 인공지능 모델을 학습시킬 수 있다.The electronic device 100 according to an embodiment may augment an image by using a selected object (a main object or a sub-object), a selected virtual object, and a trajectory determined for the selected virtual object. Also, the electronic device 100 may train the artificial intelligence model 208 by using the object selected with respect to the input image and the selected virtual object as training data. When a specific image is input, the electronic device 100 may recommend an object selected by the electronic device 100 to augment the image, a virtual object corresponding to the selected object, and a trajectory corresponding to the virtual object. Intelligence models can be trained.
도 6은 일 실시예에 따른 전자 장치가 이미지 내에서 객체를 인식하고, 가상 객체를 획득하는 방법을 설명하기 위한 도면이다.FIG. 6 is a diagram for describing a method for an electronic device to recognize an object in an image and acquire a virtual object, according to an exemplary embodiment.
일 실시예에서, 전자 장치(100)는 이미지(602)를 획득할 수 있다. 이미지(602)는 외부 장치로부터 수신되거나, 전자 장치(100)가 카메라를 통해 촬영하여 획득할 수 있다.In an embodiment, the electronic device 100 may acquire an image 602 . The image 602 may be received from an external device or obtained by photographing the electronic device 100 through a camera.
일 실시예에서, 전자 장치(100)는 이미지(602) 내에서 하나 이상의 객체들(604, 606)을 식별할 수 있다. 전자 장치(100)는 식별된 객체들(604, 606)을 분류할 수 있다. 예를 들어, 전자 장치(100)는 이미지(602)를 분석한 결과에 기초하여, 이미지 촬영 시 주된 피사체는 사람임을 식별하고, 식별된 제1 객체(604) ‘사람’을 메인 객체로 분류하고, 식별된 제2 객체(606) ‘사람의 옷에 프린팅 된 나비’를 서브 객체로 분류할 수 있다.In an embodiment, the electronic device 100 may identify one or more objects 604 and 606 within the image 602 . The electronic device 100 may classify the identified objects 604 and 606 . For example, based on a result of analyzing the image 602 , the electronic device 100 identifies that a main subject is a person when capturing an image, classifies the identified first object 604 'person' as a main object, and , the identified second object 606 'butterfly printed on a person's clothes' may be classified as a sub-object.
일 실시예에서, 전자 장치(100)는 이미지(602)에 깊이 분할을 수행하여, 깊이 정보를 획득할 수 있다. 전자 장치(100)는 이미지(602)에서 인식된 객체에 기초하여, 이미지(602)를 전경 이미지(608) 및 배경 이미지(610)로 분할할 수 있다. 도 6에는 전경 이미지(608) 및 배경 이미지(610)이 각각 하나로 도시되었으나, 전경 이미지(608) 또는 배경 이미지(610)는 각각 서로 다른 깊이를 갖는 하나 이상의 이미지들일 수 있다. 전자 장치(100)는 전경 이미지(608)에 대응되는 깊이 정보를 제1 깊이 정보, 배경 이미지(610)에 대응되는 깊이 정보를 제2 깊이 정보로 획득할 수 있다.In an embodiment, the electronic device 100 may acquire depth information by performing depth division on the image 602 . The electronic device 100 may divide the image 602 into a foreground image 608 and a background image 610 based on the object recognized in the image 602 . Although the foreground image 608 and the background image 610 are shown as one each in FIG. 6 , the foreground image 608 or the background image 610 may be one or more images each having different depths. The electronic device 100 may acquire depth information corresponding to the foreground image 608 as first depth information and depth information corresponding to the background image 610 as second depth information.
일 실시예에서, 전자 장치(100)는 이미지(602)에 부가될 가상 객체(612)를 획득할 수 있다. In an embodiment, the electronic device 100 may acquire a virtual object 612 to be added to the image 602 .
예를 들어, 전자 장치(100)는 외부 장치 또는 사용자의 수동 입력을 통해, 이미지(602)에 부가될 가상 객체(612)를 획득할 수 있다.For example, the electronic device 100 may acquire the virtual object 612 to be added to the image 602 through an external device or a manual input of a user.
다른 예에서, 전자 장치(100)는 메인 객체(604), 서브 객체(606), 이미지의 컨텍스트 정보, 또는 이들의 조합에 기초하여 이미지에 부가될 가상 객체(612)를 결정할 수 있다. 구체적으로, 전자 장치는 서브 객체(606)에 기초하여, 서브 객체(606)와 유사한 ‘나비’를 가상 객체(612)로 결정할 수 있다.In another example, the electronic device 100 may determine the virtual object 612 to be added to the image based on the main object 604 , the sub-object 606 , context information of the image, or a combination thereof. Specifically, the electronic device may determine a 'butterfly' similar to the sub-object 606 as the virtual object 612 based on the sub-object 606 .
일 실시예에서, 전자 장치(100)는 가상 객체 ‘나비’에 대한 궤적 클러스터를 획득할 수 있다. 예를 들어, 전자 장치(100)는 가상 객체(612) ‘나비’에 대응되는 후보 궤적들의 클러스터로 튀기(bounce), 날기(fly), 회전(rotate), 이동하기(예를 들어, 왼쪽에서 오른쪽으로 또는 위에서 아래로)등을 획득할 수 있다. 전자 장치(100)는 메인 객체(604), 서브 객체(606), 이미지의 컨텍스트 정보, 또는 클러스터 분석 결과 등에 기초하여, 획득된 후보 궤적들의 클러스터 내에서 가상 객체(612)에 대응되는 궤적을 결정할 수 있다.In an embodiment, the electronic device 100 may obtain a trajectory cluster for the virtual object 'butterfly'. For example, the electronic device 100 bounces, flies, rotates, or moves (eg, from the left side) to a cluster of candidate trajectories corresponding to the virtual object 612 'butterfly'. to the right or from top to bottom), etc. The electronic device 100 determines a trajectory corresponding to the virtual object 612 in the cluster of obtained candidate trajectories based on the main object 604 , the sub-object 606 , context information of the image, or a cluster analysis result, etc. can
일 실시예에 따른 전자 장치(100)는 가상 객체(612) 및 가상 객체의 궤적을 획득하고, 복수의 이미지에 복수의 가상 객체를 렌더링하여 복수의 증강된 이미지들을 생성함으로써, 메인 객체(604)의 주변에서 궤적을 따라 가상 객체(612)가 이동하는 증강된 동영상을 생성할 수 있다.The electronic device 100 according to an embodiment obtains the virtual object 612 and the trajectory of the virtual object, and renders the plurality of virtual objects on the plurality of images to generate a plurality of augmented images, thereby the main object 604 . It is possible to generate an augmented video in which the virtual object 612 moves along a trajectory around the .
일 실시예에 따른 전자 장치(100)는 획득된 깊이 정보 및 가상 객체에 기초하여, 이미지(602) 내에서 이동되는 가상 객체의 가시성(visibility)을 제어할 수 있다. 예를 들어, 전자 장치(100)는 메인 객체(604)를 기준으로, 획득된 가상 객체(612)가 메인 객체(604)의 주변을 회전하도록 이동시킬 수 있다. 이 경우, 전자 장치(100)는 획득된 깊이 정보에 기초하여, 가상 객체(612)가 메인 객체(604)보다 가까이 있는 상태를 표현하기 위해, 메인 객체(604)를 가상 객체(612) 위에 오버레이하여 가상 객체(612)가 표시되도록 할 수 있다. 또한, 전자 장치(100)는 가상 객체(612)가 메인 객체(604) 보다 멀리 있는 상태(즉, 메인 객체(604)의 뒤에 있는 경우)를 표현하기 위해, 가상 객체(612)의 적어도 일부가 메인 객체(604)에 가려져서 표시되지 않도록 제어함으로써, 가상 객체(612)의 가시성을 제어할 수 있다.The electronic device 100 according to an embodiment may control visibility of the virtual object moved in the image 602 based on the acquired depth information and the virtual object. For example, the electronic device 100 may move the obtained virtual object 612 to rotate around the main object 604 based on the main object 604 . In this case, the electronic device 100 overlays the main object 604 on the virtual object 612 to represent a state in which the virtual object 612 is closer than the main object 604 based on the acquired depth information. Thus, the virtual object 612 may be displayed. In addition, in order to represent a state in which the virtual object 612 is farther than the main object 604 (ie, when it is behind the main object 604 ), the electronic device 100 determines that at least a part of the virtual object 612 is Visibility of the virtual object 612 may be controlled by controlling the main object 604 so that it is not displayed.
일 실시예에서, 전자 장치(100)는 가상 객체(612)가 궤적 상에서 이동할 때, 가상 객체(612)의 크기, 메인 객체에 대한 가상 객체의 방향, 메인 객체에 대한 가상 객체의 위치 및 가상 객체의 사시도(perspective view) 중 적어도 하나를 변경할 수 있다. 이는 도 7을 참조하여 더 설명하기로 한다.In an embodiment, when the virtual object 612 moves on the trajectory, the electronic device 100 determines the size of the virtual object 612, the direction of the virtual object with respect to the main object, the position of the virtual object with respect to the main object, and the virtual object. at least one of the perspective views of This will be further described with reference to FIG. 7 .
도 7은 일 실시예에 따른 전자 장치가 깊이 정보에 기반하여 가상 객체를 이미지 내에서 이동시키는 방법을 설명하기 위한 도면이다.7 is a diagram for describing a method of an electronic device moving a virtual object in an image based on depth information, according to an exemplary embodiment.
도 7을 참조하면, 일 실시예에 따른 전자 장치(100)는 가상 객체(710)의 이동 경로를 나타내는 궤적(들)을 획득할 수 있다. 가상 객체(710)의 이동 경로를 나타내는 궤적은 가상 객체(710)의 이동이 시작되는 점부터 가상 객체(710)의 이동이 끝나는 점까지 가상 객체(710)의 이동 경로상에 있는 모든 점들의 좌표들의 집합일 수 있으나, 이에 한정되지 않는다. 예를 들어, 가상 객체(710)의 궤적은 증강된 동영상에 포함되는 증강된 이미지 프레임들 각각마다, 하나의 이미지 프레임 내에서 가상 객체(710)가 이동하는 거리 및 방향을 나타내는 벡터들의 집합일 수 있다.Referring to FIG. 7 , the electronic device 100 according to an embodiment may obtain trajectory(s) indicating a movement path of the virtual object 710 . The trajectory indicating the movement path of the virtual object 710 is the coordinates of all points on the movement path of the virtual object 710 from the point where the movement of the virtual object 710 starts to the point where the movement of the virtual object 710 ends. It may be a set of these, but is not limited thereto. For example, the trajectory of the virtual object 710 may be a set of vectors indicating the distance and direction in which the virtual object 710 moves within one image frame for each of the augmented image frames included in the augmented video. have.
설명의 편의를 위하여, 이하에서는 가상 객체(710)의 궤적을 제1 궤적(720) 및 제2 궤적(722)으로 구분하여 설명하기로 한다. 이 경우, 제1 궤적은 가상 객체(710)가 메인 객체(730)의 전방으로 회전 이동하는 이동 경로를 나타내는 궤적이고, 제2 궤적은 가상 객체(710)가 메인 객체(730)의 후방으로 회전 이동하는 이동 경로를 나타내는 궤적일 수 있다. 도 7에 도시된 것과 같이, 가상 객체(710)는 이미지 내에서 궤적을 따라 이동함에 따라 크기, 방향, 위치, 사시도 등이 변경될 수 있다.For convenience of explanation, a trajectory of the virtual object 710 will be described below by dividing it into a first trajectory 720 and a second trajectory 722 . In this case, the first trajectory is a trajectory indicating a movement path in which the virtual object 710 rotates forward of the main object 730 , and the second trajectory indicates that the virtual object 710 rotates backward of the main object 730 . It may be a trajectory indicating a moving path. As shown in FIG. 7 , the virtual object 710 may change in size, direction, position, perspective, and the like as it moves along a trajectory in the image.
일 실시예에서, 전자 장치(100)는 가상 객체(710)가 제1 궤적(720) 상에서 이동할 때, 가상 객체(710)의 크기, 메인 객체(730)에 대한 가상 객체(710)의 방향, 메인 객체에 대한 가상 객체의 위치, 및 가상 객체(710)의 사시도(perspective view) 중 적어도 하나를 변경할 수 있다.In an embodiment, when the virtual object 710 moves on the first trajectory 720 , the electronic device 100 determines the size of the virtual object 710 , the direction of the virtual object 710 with respect to the main object 730 , At least one of a position of the virtual object with respect to the main object and a perspective view of the virtual object 710 may be changed.
예를 들어, 전자 장치(100)는 가상 객체(710)가 제1 궤적(720)을 따라 이동할 때, 가상 객체(710)가 메인 객체(730)의 전방으로 이동하며 더 가까이 있는 것처럼 표현되도록 하기 위해, 가상 객체(710)의 크기를 더 크게 조정할 수 있다. 전자 장치(100)는 가상 객체(710)가 메인 객체(730)를 바라보며 메인 객체(730)의 전방으로 회전 이동하는 것처럼 표현되도록 하기 위해, 가상 객체(710)의 위치 및 방향을 조정할 수 있다. 또한, 전자 장치(100)는 가상 객체(710)의 이동에 생동감 있는 효과를 부여하기 위하여, 가상 객체(710)의 사시도(perspective view)를 조정할 수 있다. For example, when the virtual object 710 moves along the first trajectory 720 , the electronic device 100 causes the virtual object 710 to move in front of the main object 730 and to be expressed as being closer to the main object 730 . For this purpose, the size of the virtual object 710 may be adjusted to be larger. The electronic device 100 may adjust the position and direction of the virtual object 710 so that the virtual object 710 is expressed as if it rotates in front of the main object 730 while looking at the main object 730 . Also, the electronic device 100 may adjust a perspective view of the virtual object 710 in order to give a lively effect to the movement of the virtual object 710 .
일 실시예에서, 전자 장치(100)는 사시도를 조정할 때 메인 객체, 가상 객체 및 깊이 정보를 이용할 수 있다. 전자 장치(100)는 깊이 정보, 메인 객체(730)에 대한 가상 객체(710)의 방향, 메인 객체에 대한 가상 객체의 위치, 메인 객체로부터 가상 객체(710)까지의 거리에 기초하여 변경될 수 있다.In an embodiment, the electronic device 100 may use the main object, the virtual object, and the depth information when adjusting the perspective view. The electronic device 100 may change based on depth information, the direction of the virtual object 710 with respect to the main object 730 , the position of the virtual object with respect to the main object, and the distance from the main object to the virtual object 710 . have.
일 실시예에서, 전자 장치(100)는 가상 객체(710)가 제2 궤적(722) 상에서 이동할 때, 가상 객체(710)의 크기, 메인 객체(730)에 대한 가상 객체(710)의 방향, 메인 객체에 대한 가상 객체의 위치, 가상 객체(710)의 사시도(perspective view) 및 가시성(visibility) 중 적어도 하나를 변경할 수 있다.In an embodiment, when the virtual object 710 moves on the second trajectory 722 , the electronic device 100 determines the size of the virtual object 710 , the direction of the virtual object 710 with respect to the main object 730 , At least one of a position of the virtual object with respect to the main object, a perspective view and visibility of the virtual object 710 may be changed.
예를 들어, 전자 장치(100)는 가상 객체(710)가 제2 궤적(722)을 따라 이동할 때, 가상 객체(710)가 메인 객체(730)의 후방으로 이동하며 더 멀리 있는 것처럼 표현되도록 하기 위해, 가상 객체(710)의 크기를 더 작게 조정할 수 있다. 전자 장치(100)는 가상 객체(710)가 메인 객체(730)을 바라보며 메인 객체(730)의 후방으로 회전 이동하는 것처럼 표현되도록 하기 위해, 가상 객체(710)의 위치 및 방향을 조정할 수 있다. 전자 장치(100)는 가상 객체의 이동에 생동감 있는 효과를 부여하기 위하여, 가상 객체(710)의 사시도(perspective view)를 조정할 수 있다. 이 경우, 사시도는 깊이 정보, 메인 객체(730)에 대한 가상 객체(710)의 방향, 메인 객체에 대한 가상 객체의 위치, 메인 객체로부터 가상 객체(710)까지의 거리에 기초하여 변경될 수 있다.For example, when the virtual object 710 moves along the second trajectory 722 , the electronic device 100 causes the virtual object 710 to move backward of the main object 730 and be expressed as if it were farther away. For this purpose, the size of the virtual object 710 may be adjusted to be smaller. The electronic device 100 may adjust the location and direction of the virtual object 710 so that the virtual object 710 is expressed as if it rotates backward of the main object 730 while looking at the main object 730 . The electronic device 100 may adjust a perspective view of the virtual object 710 in order to give a lively effect to the movement of the virtual object. In this case, the perspective view may be changed based on depth information, the direction of the virtual object 710 with respect to the main object 730 , the position of the virtual object with respect to the main object, and the distance from the main object to the virtual object 710 . .
또한, 전자 장치(100)는 가상 객체(710)가 메인 객체(730)의 후방으로 이동함에 따라 메인 객체(730)에 가려 보이지 않게 되는 것을 표현하기 위해, 가상 객체(710)의 가시성을 제어하여 가상 객체(710)의 적어도 일부가 메인 객체(730)에 의해 가려 보이지 않도록 제어할 수 있다.In addition, the electronic device 100 controls the visibility of the virtual object 710 to represent that the virtual object 710 is obscured by the main object 730 as it moves to the rear of the main object 730 . At least a portion of the virtual object 710 may be controlled so that it is not visible because it is obscured by the main object 730 .
일 실시예에서, 전자 장치(100)는 메인 객체(730)의 크기, 위치, 카테고리 중 적어도 하나에 기초하여 가상 객체(710)의 크기, 메인 객체(730)에 대한 가상 객체(710)의 방향, 메인 객체에 대한 가상 객체의 위치, 및 가상 객체(710)의 사시도(perspective view) 중 적어도 하나를 결정할 수 있다.In an embodiment, the electronic device 100 determines a size of the virtual object 710 and a direction of the virtual object 710 with respect to the main object 730 based on at least one of a size, a location, and a category of the main object 730 . , a position of the virtual object with respect to the main object, and at least one of a perspective view of the virtual object 710 may be determined.
예를 들어, 도 7에 도시된 것과 같이 메인 객체(730)가 분류된 카테고리 ‘사람’이고, 가상 객체(710)가 분류된 ‘나비’인 경우, 전자 장치(100)는 메인 객체(730)에 대한 가상 객체(710)의 실물 크기 비율에 기초하여, 가상 객체(710)의 크기를 결정할 수 있다. 또한, 전자 장치(100)는 메인 객체(730)의 위치에 기초하여, 가상 객체(710)가 이미지에 자연스럽게 표시되도록 가상 객체(710)의 방향 및 위치를 조정할 수 있다.For example, as shown in FIG. 7 , when the main object 730 is classified as a category 'person' and the virtual object 710 is classified as 'butterfly', the electronic device 100 sets the main object 730 to 'Butterfly'. The size of the virtual object 710 may be determined based on a ratio of the actual size of the virtual object 710 to . Also, based on the location of the main object 730 , the electronic device 100 may adjust the direction and location of the virtual object 710 so that the virtual object 710 is naturally displayed in the image.
일 실시예에서, 전자 장치(100)는 결정된 가상 객체(710)의 크기, 메인 객체(730)에 대한 가상 객체(710)의 방향, 메인 객체에 대한 가상 객체의 위치, 및 가상 객체(710)의 사시도(perspective view) 중 적어도 하나를 변경할 수 있다.In an embodiment, the electronic device 100 determines the size of the virtual object 710 , the direction of the virtual object 710 with respect to the main object 730 , the location of the virtual object with respect to the main object, and the virtual object 710 . at least one of the perspective views of
도 8은 일 실시예에 따른 전자 장치가 사용자 입력에 기초하여 이미지 내에서 가상 객체를 이동시키는 방법을 설명하기 위한 도면이다.8 is a diagram for describing a method of an electronic device moving a virtual object in an image based on a user input, according to an exemplary embodiment.
일 실시예에 따른 전자 장치(100)는 전자 장치의 디스플레이에 표시된 이미지를 터치하는 사용자 입력에 기초하여, 가상 객체의 이동 경로에 대응되는 궤적을 획득할 수 있다. 이 경우, 궤적은 메인 객체에 대한 상대적인 이동 경로를 나타내는 가상 객체의 궤적일 수 있다. 예를 들어, 전자 장치(100)는 사용자의 제1 터치 입력(810)으로부터 제1 궤적(820)을 획득하고, 제2 터치 입력(812)으로부터 제2 궤적(822)를 획득할 수 있다. 다만, 이에 한정되는 것은 아니며 전자 장치(100)는 사용자의 한번의 터치 입력으로부터 제1 궤적(820) 및 제2 궤적(822)를 포함하는 궤적을 획득할 수 있다.The electronic device 100 according to an embodiment may acquire a trajectory corresponding to the movement path of the virtual object based on a user input of touching an image displayed on the display of the electronic device. In this case, the trajectory may be a trajectory of a virtual object indicating a movement path relative to the main object. For example, the electronic device 100 may obtain a first trajectory 820 from the user's first touch input 810 and acquire a second trajectory 822 from the second touch input 812 . However, the present invention is not limited thereto, and the electronic device 100 may obtain a trajectory including the first trajectory 820 and the second trajectory 822 from the user's one-time touch input.
일 실시예에서, 전자 장치(100)는 이미지에 깊이 분할을 수행하여, 이미지를 전경 이미지(830) 및 배경 이미지(832)로 분할하고, 깊이 정보를 획득할 수 있다. 이는 전술한 실시예들에서 설명하였으므로 설명을 생략하기로 한다.In an embodiment, the electronic device 100 may perform depth division on an image, divide the image into a foreground image 830 and a background image 832 , and obtain depth information. Since this has been described in the above-described embodiments, a description thereof will be omitted.
전자 장치(100)는 사용자의 입력으로부터 획득된 제1 궤적(820) 및 제2 궤적(822)에 기초하여, 가상 객체를 이동시킬 수 있다. 이 경우, 전경 이미지(830) 및 배경 이미지(832)로부터 획득된 깊이 정보가 사용될 수 있다. 전자 장치(100)가 궤적을 따라 가상 객체를 이동시키는 방법은 전술한 실시예들에서 설명하였으므로 동일한 설명은 생략하기로 한다.The electronic device 100 may move the virtual object based on the first trajectory 820 and the second trajectory 822 obtained from the user's input. In this case, depth information obtained from the foreground image 830 and the background image 832 may be used. Since the method of the electronic device 100 moving the virtual object along the trajectory has been described in the above-described embodiments, the same description will be omitted.
도 9는 일 실시예에 따른 전자 장치가 이미지에 증강시킬 가상 객체 및 가상 객체의 궤적을 획득하는 방법을 설명하기 위한 도면이다.FIG. 9 is a diagram for describing a method of obtaining, by an electronic device, a virtual object to be augmented on an image and a trajectory of the virtual object, according to an exemplary embodiment;
도 9를 참조하면, 일 실시예에 따른 전자 장치(100)는 다양한 이미지를 획득하고, 획득한 이미지에 대응되는 가상 객체 및 가상 객체의 궤적을 획득할 수 있다.Referring to FIG. 9 , the electronic device 100 according to an embodiment may acquire various images, and acquire a virtual object corresponding to the acquired image and a trajectory of the virtual object.
일 실시예에서, 전자 장치(100)는 제1 이미지(910)를 획득할 수 있다. 제1 이미지(910)는 ‘장난감을 들고 있는 아이’의 이미지일 수 있다. 전자 장치(100)는 전술한 실시예들에 따라, 제1 이미지(910) 내 객체들인 ‘아이’ 및 ‘장난감’을 식별할 수 있다. 전자 장치(100)는 이미지 내에서 식별된 객체들의 객체 태그 및 이미지의 컨텍스트 정보 중 적어도 일부에 기초하여 제1 이미지(910)에 부가될 제1 가상 객체(912)를 결정할 수 있다. 예를 들어, 전자 장치(100)는 ‘장난감을 들고 있는 아이’의 이미지인 제1 이미지(910) 내 증강시킬 제1 가상 객체(912)로 ‘인형 장난감’을 획득할 수 있다. In an embodiment, the electronic device 100 may acquire the first image 910 . The first image 910 may be an image of 'a child holding a toy'. According to the above-described embodiments, the electronic device 100 may identify objects 'child' and 'toy' in the first image 910 . The electronic device 100 may determine the first virtual object 912 to be added to the first image 910 based on at least a part of object tags of objects identified in the image and context information of the image. For example, the electronic device 100 may acquire a 'doll toy' as a first virtual object 912 to be augmented in a first image 910 that is an image of a 'child holding a toy'.
또한, 전자 장치(100)는 제1 이미지(910) 내에서 제1 가상 객체(912)가 이동하는 제1 궤적(914)을 획득할 수 있다. 일 실시예에서, 제1 궤적(914)은 전자 장치(100) 또는 외부 장치(예를 들어, 서버)에 기저장된 맵핑 테이블에 기초하여 획득될 수 있다. 다른 실시예에서, 제1 궤적(914)은 전자 장치(100)에 대한 사용자의 입력 또는 외부 장치(예를 들어, 스마트 와치, 스타일러스 펜)를 이용한 사용자의 입력으로부터 획득될 수 있다. 다른 실시예에서, 제1 궤적(914)은 객체에 대응되는 궤적을 출력하도록 학습된 인공지능 모델에 기초하여 획득될 수 있다. 제1 궤적(914)은 제1 객체(912)를 인공지능 모델에 입력하여, 인공지능 모델로부터 출력될 수 있다.Also, the electronic device 100 may acquire a first trajectory 914 on which the first virtual object 912 moves within the first image 910 . In an embodiment, the first trajectory 914 may be obtained based on a mapping table pre-stored in the electronic device 100 or an external device (eg, a server). In another embodiment, the first trajectory 914 may be obtained from a user input to the electronic device 100 or a user input using an external device (eg, a smart watch or a stylus pen). In another embodiment, the first trajectory 914 may be obtained based on an artificial intelligence model trained to output a trajectory corresponding to the object. The first trajectory 914 may be output from the AI model by inputting the first object 912 into the AI model.
일 실시예에서, 전자 장치(100)는 제2 이미지(920)를 획득할 수 있다. 제2 이미지(920)는 ‘바다 근처에 있는 남자’의 이미지일 수 있다. 전자 장치(100)는 전술한 실시예들에 따라, 제2 이미지(920) 내 객체를 식별할 수 있다. 전자 장치(100)는 이미지 내에서 식별된 객체의 객체 태그 및 이미지의 컨텍스트 정보 중 적어도 일부에 기초하여 제2 이미지(920)에 부가될 제2 가상 객체(922)를 결정할 수 있다. 예를 들어, 전자 장치(100)는 ‘바다 근처에 있는 남자’의 이미지인 제2 이미지(920) 내 증강시킬 제2 가상 객체(922)로 ‘돌고래’를 획득할 수 있다. In an embodiment, the electronic device 100 may acquire the second image 920 . The second image 920 may be an image of 'a man near the sea'. The electronic device 100 may identify an object in the second image 920 according to the above-described embodiments. The electronic device 100 may determine the second virtual object 922 to be added to the second image 920 based on at least a part of an object tag of an object identified in the image and context information of the image. For example, the electronic device 100 may acquire 'dolphin' as the second virtual object 922 to be augmented in the second image 920 that is an image of 'a man near the sea'.
또한, 전자 장치(100)는 제2 이미지(920) 내에서 제2 가상 객체(922)가 이동하는 제2 궤적(924)을 획득할 수 있다. 이는, 전자 장치(100)가 제1 이미지의 제1 객체에 대한 궤적을 획득하는 실시예에서 설명하였으므로, 설명을 생략하기로 한다.Also, the electronic device 100 may acquire a second trajectory 924 on which the second virtual object 922 moves within the second image 920 . Since this has been described in the embodiment in which the electronic device 100 acquires the trajectory of the first object of the first image, a description thereof will be omitted.
일 실시예에서, 전자 장치(100)는 제3 이미지(930)를 획득할 수 있다. 제3 이미지(930)는 ‘해변 근처에 있는 소녀’의 이미지일 수 있다. 전자 장치(100)는 전술한 실시예들에 따라, 제3 이미지(930) 내 객체를 식별할 수 있다. 전자 장치(100)는 이미지 내에서 식별된 객체의 객체 태그 및 이미지의 컨텍스트 정보 중 적어도 일부에 기초하여 제3 이미지(930)에 부가될 제3 가상 객체(932)를 결정할 수 있다. 예를 들어, 전자 장치(100)는 ‘해변 근처에 있는 소녀’의 이미지인 제3 이미지(930) 내 증강시킬 제3 가상 객체(932)로 ‘돛단배’를 획득할 수 있다. In an embodiment, the electronic device 100 may acquire a third image 930 . The third image 930 may be an image of 'a girl near the beach'. The electronic device 100 may identify an object in the third image 930 according to the above-described embodiments. The electronic device 100 may determine a third virtual object 932 to be added to the third image 930 based on at least a part of an object tag of an object identified in the image and context information of the image. For example, the electronic device 100 may acquire the 'sailboat' as the third virtual object 932 to be augmented in the third image 930 that is an image of the 'girl near the beach'.
또한, 전자 장치(100)는 제3 이미지(930) 내에서 제3 가상 객체(932)가 이동하는 제3 궤적(934)을 획득할 수 있다. 이는, 전자 장치(100)가 제1 이미지의 제1 객체에 대한 궤적을 획득하는 실시예에서 설명하였으므로, 설명을 생략하기로 한다.Also, the electronic device 100 may acquire a third trajectory 934 on which the third virtual object 932 moves within the third image 930 . Since this has been described in the embodiment in which the electronic device 100 acquires the trajectory of the first object of the first image, a description thereof will be omitted.
일 실시예에 따른 전자 장치(100)는 이미지들에 각각에 대하여, 획득된 가상 객체 및 가상 객체의 궤적에 기초하여, 이미지를 증강시킬 수 있다. 예를 들어, 전자 장치(100)는 ‘장난감을 들고 있는 아이’ 이미지인 제1 이미지(910)에 제1 가상 객체(912)를 부가하고, 제1 궤적을 따라 제1 가상 객체(912)를 이동시키고 애니메이션 효과를 부여함으로써, 제1 이미지(910)을 증강시킬 수 있다. 다른 예에서, 전자 장치(100)는 ‘해변 근처에 있는 소녀’ 이미지인 제3 이미지(930)에 제3 가상 객체(932)를 부가하고, 제3 궤적을 따라 제3 가상 객체(932)를 이동시키고 애니메이션 효과를 부여함으로써, 제3 이미지(930)을 증강시킬 수 있다.The electronic device 100 according to an embodiment may augment the images based on the acquired virtual object and the trajectory of the virtual object for each of the images. For example, the electronic device 100 adds a first virtual object 912 to a first image 910 that is an image of a 'child holding a toy', and creates the first virtual object 912 along a first trajectory. By moving and applying an animation effect, the first image 910 may be augmented. In another example, the electronic device 100 adds a third virtual object 932 to a third image 930 that is an image of a 'girl near the beach', and adds the third virtual object 932 along the third trajectory. By moving and applying an animation effect, the third image 930 may be augmented.
도 10은 일 실시예에 따른 전자 장치가 이미지로부터 획득되는 정보에 기초하여 가상 객체를 획득하는 방법을 설명하기 위한 도면이다.FIG. 10 is a diagram for describing a method of obtaining, by an electronic device, a virtual object based on information obtained from an image, according to an exemplary embodiment.
도 10을 참조하면, 일 실시예에 따른 전자 장치(100)는 이미지에 부가될 가상 객체를 식별하기 위하여, 다양한 정보를 획득할 수 있다.Referring to FIG. 10 , the electronic device 100 according to an embodiment may obtain various information to identify a virtual object to be added to an image.
일 실시예에서, 전자 장치(100)는 이미지 내에서 객체들을 식별하고, 식별된 객체들을 분류할 수 있다. 전자 장치(100)는 식별된 객체들을 메인 객체 및 서브 객체로 분류하고, 각각의 객체들의 객체 태그를 획득할 수 있다. 객체 태그는 각각의 객체들을 식별하기 위한 정보로, 객체의 식별 정보, 카테고리 정보 등을 포함할 수 있으나, 이에 한정되는 것은 아니다.In an embodiment, the electronic device 100 may identify objects in an image and classify the identified objects. The electronic device 100 may classify the identified objects into a main object and a sub-object, and obtain an object tag of each object. The object tag is information for identifying each object, and may include object identification information, category information, and the like, but is not limited thereto.
예를 들어, 전자 장치(100)는 ‘장난감을 들고 있는 아이’인 제1 이미지(1010) 내에서 ‘장난감’ 및 ‘아이’를 식별할 수 있다. 이 경우, 전자 장치(100)는 ‘아이’를 메인 객체로 분류하고, ‘장난감’을 서브 객체로 분류할 수 있다. 다만, 이에 한정되는 것은 아니며 전자 장치(100)는 ‘장난감’을 메인 객체로 분류하고, ‘아이’를 서브 객체로 분류할 수 있다.For example, the electronic device 100 may identify a 'toy' and a 'child' in the first image 1010 that is a 'child holding a toy'. In this case, the electronic device 100 may classify 'child' as a main object and classify 'toy' as a sub-object. However, the present invention is not limited thereto, and the electronic device 100 may classify 'toy' as a main object and classify 'child' as a sub-object.
일 실시예에서, 전자 장치(100)는 식별된 객체들을 동일 또는 유사한 카테고리의 그룹으로 분류함으로써, 객체들 간의 관계를 식별할 수 있다. 예를 들어, 전자 장치(100)는 ‘아이’ 및 ‘장난감’을 ‘키즈’ 그룹으로 분류하여, 이미지 내 객체들이 ‘키즈’ 카테고리와 관련된 객체들임을 식별할 수 있다.In an embodiment, the electronic device 100 may identify a relationship between the objects by classifying the identified objects into groups of the same or similar category. For example, the electronic device 100 may classify 'child' and 'toy' into a 'kids' group, and identify objects in the image as objects related to the 'kids' category.
일 실시예에서, 전자 장치(100)는 이미지의 컨텍스트 정보를 획득할 수 있다. 컨텍스트 정보는 예를 들어, 이미지 내 객체의 포즈, 감정, 액션, 이미지의 장면, 이미지 내 이벤트, 이미지가 촬영된 위치 중 적어도 하나를 포함할 수 있으나, 이에 한정되는 것은 아니다.In an embodiment, the electronic device 100 may obtain context information of an image. The context information may include, for example, at least one of a pose, emotion, action, scene of an image, an event in the image, and a location at which the image is captured, of an object in the image, but is not limited thereto.
일 실시예에서, 전자 장치(100)는 이미지 내 메인 객체의 포즈를 식별하여, 이미지 내 메인 객체가 취하고 있는 액션을 식별할 수 있다. 예를 들어, 전자 장치(100)는 ‘장난감을 들고 있는 아이’인 제1 이미지 내에서, ‘아이’를 메인 객체로 분류하고, 아이의 포즈를 식별하여, 아이가 장난감을 안고 있는 액션을 취하고 있음을 식별할 수 있다. 또한, 전자 장치(100)는 아이의 표정을 분석하여 아이의 현재 감정인 ‘행복함’을 식별할 수 있다.일 실시예에 따른 전자 장치(100)는 이미지 내에서 식별된 객체들의 객체 태그, 객체들 간의 관계, 이미지의 컨텍스트 정보 중 적어도 일부에 기초하여, 이미지 내 부가될 가상 객체를 결정할 수 있다. 이 경우, 전자 장치(100)에 의해 결정되는 가상 객체는, 이미지 내에서 식별된 객체와 유사한 객체이거나, 이미지 내에서 식별된 객체와 유사한 객체는 아니지만 이미지의 주제, 분위기 등에 적합한 객체일 수 있다.In an embodiment, the electronic device 100 may identify the pose of the main object in the image to identify the action the main object is taking in the image. For example, the electronic device 100 classifies the 'child' as a main object in the first image that is the 'child holding a toy', identifies the child's pose, and takes the action of the child holding the toy. It can be identified that there is Also, the electronic device 100 may identify the child's current emotion, 'happiness' by analyzing the child's expression. The electronic device 100 according to an exemplary embodiment includes an object tag and an object of the objects identified in the image. A virtual object to be added in the image may be determined based on at least a part of a relationship between the two and the context information of the image. In this case, the virtual object determined by the electronic device 100 may be an object similar to the object identified in the image, or an object that is not similar to the object identified in the image, but suitable for the subject, atmosphere, etc. of the image.
예를 들어, 전자 장치(100)는 ‘장난감을 들고 있는 아이’의 이미지인 제1 이미지(1010)에 대해 객체 식별 및 이미지 분석을 수행하여, 제1 이미지(1010) 내에서 식별된 객체들의 객체 태그, 객체들 간의 관계, 이미지의 컨텍스트 정보를 획득할 수 있다. 전자 장치(100)는 제1 이미지(1010)에 부가될 제1 가상 객체(1012)로, 제1 이미지(1010) 내에 존재하는 ‘장난감’과 유사한 객체인 ‘인형 장난감’을 제1 객체(1012)로 결정할 수 있다.For example, the electronic device 100 performs object identification and image analysis on a first image 1010 that is an image of a 'child holding a toy', and the object of the identified objects in the first image 1010 . You can acquire tags, relationships between objects, and context information of images. As a first virtual object 1012 to be added to the first image 1010 , the electronic device 100 sets a 'doll toy', which is an object similar to a 'toy' existing in the first image 1010 , to the first object 1012 . ) can be determined.
다른 예에서, 제2 이미지(1020)는 ‘바다 근처에 있는 남자’일 수 있다. 전자 장치(100)는 제2 이미지(1020)에 대해 객체 식별 및 이미지 분석을 수행하여, 제2 이미지(1020) 내에서 식별된 객체들의 객체 태그, 객체들 간의 관계, 이미지의 컨텍스트 정보를 획득할 수 있다. 전자 장치(100)는 제2 이미지(1020)에 부가될 제2 가상 객체(1022)로, 제2 이미지(1020) 내에 존재하는 객체인 ‘남자’과 유사하지는 않으나, ‘바다’를 배경으로 하는 제2 이미지(1020)에 적합한 객체인 ‘돌고래’, ‘돛단배’ 등을 제2 객체(1022)로 결정할 수 있다.In another example, the second image 1020 may be 'a man near the sea'. The electronic device 100 performs object identification and image analysis on the second image 1020 to obtain object tags of objects identified in the second image 1020, relationships between objects, and context information of images. can The electronic device 100 is a second virtual object 1022 to be added to the second image 1020, which is not similar to 'man', which is an object existing in the second image 1020 , but has 'the sea' as a background. Objects suitable for the second image 1020 , such as 'dolphins' and 'sailboats', may be determined as the second object 1022 .
다른 예에서, 제3 이미지(1030)는 ‘꽃’일 수 있다. 전자 장치(100)는 제3 이미지(1030)에 대하여 객체 식별 및 이미지 분석을 수행하여, 제2 이미지(1030) 내에서 식별된 객체들의 객체 태그, 객체들 간의 관계, 이미지의 컨텍스트 정보를 획득할 수 있다. 전자 장치(100)는 제3 이미지(1030)에 부가될 제3 가상 객체(1032)로, 제3 이미지(1030) 내에 존재하는 객체인 ‘꽃’과 유사하지는 않으나, ‘꽃’의 제3 이미지(1030)에 적합한 객체인 ‘나비’, ‘벌’ 등을 제3 객체(1032)로 결정할 수 있다.In another example, the third image 1030 may be a 'flower'. The electronic device 100 performs object identification and image analysis on the third image 1030 to obtain object tags of objects identified in the second image 1030, relationships between objects, and context information of images. can The electronic device 100 is a third virtual object 1032 to be added to the third image 1030 , which is not similar to 'flower', which is an object existing in the third image 1030 , but is a third image of 'flower'. 'Butterfly' and 'bee', which are objects suitable for the 1030 , may be determined as the third object 1032 .
도 11은 일 실시예에 따른 전자 장치가 사용자의 입력에 의해 가상 객체를 획득하는 방법을 설명하기 위한 도면이다.11 is a diagram for describing a method of obtaining, by an electronic device, a virtual object by a user input, according to an exemplary embodiment.
도 11을 참조하면, 일 실시예에 따른 전자 장치(100)는 ‘농구공을 들고 있는 농구 선수’ 이미지(1110)를 획득할 수 있다.Referring to FIG. 11 , the electronic device 100 according to an embodiment may acquire an image 1110 of a 'basketball player holding a basketball ball'.
일 실시예에서, 전자 장치(100)는 획득된 이미지(1110) 내에서 관심 영역(1120)을 식별할 수 있다. 전자 장치(100)는 이미지(1110)를 분석하여 관심 영역(1120)을 식별할 수 있으나, 사용자의 관심 영역을 선택하는 입력에 기초하여 관심 영역(1120)을 식별할 수도 있다. 예를 들어, 전자 장치(100)는 외부 장치(예를 들어, 스타일러스 펜)(1130)을 이용하여 사용자가 이미지 내에서 원을 그린 영역에 기초하여, ‘농구공’ 을 관심 영역으로 식별할 수 있다.In an embodiment, the electronic device 100 may identify the region of interest 1120 within the acquired image 1110 . The electronic device 100 may identify the ROI 1120 by analyzing the image 1110 , but may also identify the ROI 1120 based on a user's input for selecting the ROI. For example, the electronic device 100 may use an external device (eg, a stylus pen) 1130 to identify the 'basketball ball' as the region of interest based on the region where the user draws a circle in the image. have.
일 실시예에서, 전자 장치(100)는 관심 영역 내 객체를 식별하고, 관심 영역 내에서 식별된 객체에 기초하여 가상 객체(1150)를 획득할 수 있다. 예를 들어, 전자 장치(100)는 관심 영역 내 객체인 ‘농구공’을 가상 객체(1150)로 식별할 수 있다. 다만, 이에 한정되는 것은 아니며, 전자 장치(100)는 관심 영역 내 객체인 ‘농구공’ 에 기초하여, 농구공과 유사한 객체 또는 농구에 적합한 객체를 가상 객체(1150)로 식별할 수 있다. 예를 들어, 전자 장치(100)는 ‘농구공’을 가상 객체(1150)로 식별할 수 있으나, 이에 한정되는 것은 아니다.In an embodiment, the electronic device 100 may identify an object in the ROI and acquire the virtual object 1150 based on the identified object in the ROI. For example, the electronic device 100 may identify a 'basketball ball' that is an object in the ROI as the virtual object 1150 . However, the present invention is not limited thereto, and the electronic device 100 may identify an object similar to a basketball or an object suitable for basketball as the virtual object 1150 based on a 'basketball ball' that is an object in the region of interest. For example, the electronic device 100 may identify the 'basketball ball' as the virtual object 1150, but is not limited thereto.
일 실시예에서, 전자 장치(100)는 가상 객체(1150)의 궤적(1140)을 획득할 수 있다. 전자 장치(100)는 사용자가 외부 장치(1130)을 이용하여 전자 장치(100)의 터치 스크린에 궤적(1140)을 그리는 입력을 수신할 수 있다. 다만, 이에 한정되는 것은 아니며, 전자 장치(100)는 사용자가 다양한 센서(예를 들어, 모션 센서, 자이로 센서 등)를 포함하는 외부 장치(1130)를 이용하여 빈 공간에 궤적(1140)을 그리는 입력을 수신할 수도 있다.In an embodiment, the electronic device 100 may acquire the trajectory 1140 of the virtual object 1150 . The electronic device 100 may receive an input in which a user draws a trajectory 1140 on the touch screen of the electronic device 100 using the external device 1130 . However, the present invention is not limited thereto, and the electronic device 100 allows a user to draw a trajectory 1140 in an empty space using an external device 1130 including various sensors (eg, a motion sensor, a gyro sensor, etc.). It can also receive input.
일 실시예에 따른 전자 장치(100)는 획득된 가상 객체(1150) 및 궤적(1140)에 기초하여, 이미지 내에서 가상 객체(1150)를 이동시킬 수 있다.The electronic device 100 according to an embodiment may move the virtual object 1150 in the image based on the obtained virtual object 1150 and the trajectory 1140 .
도 12는 일 실시예에 따른 전자 장치가 가상 객체 및 가상 객체의 궤적을 추천하는 방법을 설명하기 위한 도면이다.12 is a diagram for describing a method of an electronic device recommending a virtual object and a trajectory of the virtual object, according to an exemplary embodiment.
도 12를 참조하면, 일 실시예에 따른 전자 장치(100)는 스카이 다이빙 활동을 촬영한 이미지(1202)를 획득할 수 있다.Referring to FIG. 12 , the electronic device 100 according to an embodiment may acquire an image 1202 obtained by photographing a skydiving activity.
일 실시예에서, 전자 장치(100)는 이미지(1202)내에서 식별된 객체들의 객체 태그 및 이미지의 컨텍스트 정보에 기초하여 이미지(1202)에 증강될 가상 객체 및 가상 객체의 궤적을 결정할 수 있다. 전자 장치(100)가 가상 객체 및 가상 객체의 궤적을 결정하는 방법은, 전술한 실시예들에서 설명하였으므로 설명을 생략하기로 한다.In an embodiment, the electronic device 100 may determine the virtual object to be augmented in the image 1202 and the trajectory of the virtual object based on the object tags of the objects identified in the image 1202 and context information of the image. Since the method for the electronic device 100 to determine the virtual object and the trajectory of the virtual object has been described in the above-described embodiments, a description thereof will be omitted.
일 실시예에서, 전자 장치(100)는 사용자의 입력(예를 들어, 사용자의 제스처 (1206), 사용자의 터치 입력(1208))을 수신하여 이미지(1202)를 증강시키기 위해, 전술한 실시예들에 따라 이미지에 부가될 후보로 결정된 가상 객체 및 궤적을 추천하는 사용자 인터페이스(1204)를 디스플레이 할 수 있다. 예를 들어, 전자 장치(100)는 헬리콥터, 낙하산, 스카이 다이빙 중인 사람 등을 스카이 다이빙 이미지(1202)에 부가될 가상 객체 후보로 결정하고, 사용자에게 추천할 수 있다. 또한, 전자 장치(100)는 사각형, 원형, 직선, 왕복 화살표 등의 궤적을 가상 객체의 궤적 후보로 결정하고, 사용자에게 추천할 수 있다. 이 경우, 궤적 후보들은 깊이 정보를 포함하는 3차원 공간 상의 이동 경로를 나타낼 수 있다.In one embodiment, the electronic device 100 receives a user's input (eg, the user's gesture 1206, the user's touch input 1208) to augment the image 1202, A user interface 1204 that recommends virtual objects and trajectories determined as candidates to be added to the image according to the above information may be displayed. For example, the electronic device 100 may determine a helicopter, a parachute, a person in skydiving, etc. as a virtual object candidate to be added to the skydiving image 1202 and recommend it to the user. Also, the electronic device 100 may determine a trajectory of a rectangle, a circle, a straight line, a reciprocating arrow, etc. as a trajectory candidate of the virtual object and recommend it to the user. In this case, the trajectory candidates may indicate a movement path in a 3D space including depth information.
일 실시예에서, 전자 장치(100)는 사용자의 제스처(1206)를 인식하여, 인식된 제스처에 기초하여 이미지 내에 부가된 가상 객체를 이동시키거나, 가상 객체의 궤적을 수정할 수 있다.In an embodiment, the electronic device 100 may recognize the user's gesture 1206 and move the virtual object added to the image or modify the trajectory of the virtual object based on the recognized gesture.
도 13은 일 실시예에 따른 전자 장치가 가상 객체를 이용하여 이미지를 증강하는 다양한 방법을 설명하기 위한 도면이다.13 is a diagram for describing various methods of augmenting an image by an electronic device using a virtual object, according to an exemplary embodiment.
일 실시예에 따른 전자 장치는, 이미지 내에 부가될 가상 객체 및 가상 객체의 궤적을 획득하고, 가상 객체를 궤적상에서 이동시키면서, 가상 객체의 크기, 방향, 위치 및 사시도 중 적어도 하나를 변경할 수 있다. 이는, 전술한 실시예들을 통하여 설명하였으므로, 여기에서는 설명을 생략하기로 한다.The electronic device according to an embodiment may acquire a virtual object to be added to an image and a trajectory of the virtual object, and change at least one of a size, a direction, a position, and a perspective view of the virtual object while moving the virtual object on the trajectory. Since this has been described through the above-described embodiments, a description thereof will be omitted herein.
일 실시예에서, 전자 장치(100)는 해변가에 있는 소녀의 이미지(1310)를 획득하고, 이미지에 부가될 가상 객체를 결정할 수 있다. 전자 장치(100)는 해변가에 있는 소녀의 이미지(1310)에 대하여, 돛단배(1312)를 가상 객체로 결정하고, 가상 객체 돛단배(1312)를 궤적 상에서 자동으로 움직임으로써 이미지(1310)를 증강시킬 수 있다.In an embodiment, the electronic device 100 may acquire an image 1310 of a girl on the beach and determine a virtual object to be added to the image. The electronic device 100 may augment the image 1310 by determining the sailboat 1312 as a virtual object with respect to the image 1310 of the girl on the beach and automatically moving the virtual object sailboat 1312 on the trajectory. have.
일 실시예에서, 전자 장치(100)는 장난감을 들고 있는 아이의 이미지(1320)를 획득하고, 이미지에 부가될 가상 객체를 결정할 수 있다. 전자 장치(100)는 장난감을 들고 있는 아이의 이미지(1320)에 대하여, 인형 장난감(1322)을 가상 객체로 결정하고, 가상 객체 인형 장난감(1322)을 궤적 상에서 자동으로 움직임으로써 이미지(1320)를 증강시킬 수 있다.In an embodiment, the electronic device 100 may acquire an image 1320 of a child holding a toy and determine a virtual object to be added to the image. With respect to the image 1320 of the child holding the toy, the electronic device 100 determines the doll toy 1322 as a virtual object, and automatically moves the virtual object doll toy 1322 on the trajectory to generate the image 1320. can be augmented.
일 실시예에서, 전자 장치(100)는 스카이 다이빙 활동을 촬영한 이미지(1330)를 획득하고, 이미지에 부가될 가상 객체를 결정할 수 있다. 전자 장치(100)는 스카이 다이빙 활동을 촬영한 이미지(1330)에 대하여, 헬리콥터(1332)를 가상 객체(1332)로 선택하는 입력을 수신하여, 이미지에 수동으로 가상 객체 헬리 콥터(1332)를 부가하고, 획득된 궤적 상에서 가상 객체 헬리콥터(1332)를 이동시킬 수 있다.In an embodiment, the electronic device 100 may acquire an image 1330 of a skydiving activity and determine a virtual object to be added to the image. The electronic device 100 receives an input for selecting the helicopter 1332 as the virtual object 1332 with respect to the image 1330 obtained by photographing the skydiving activity, and manually adds the virtual object helicopter 1332 to the image. and the virtual object helicopter 1332 may be moved on the acquired trajectory.
일 실시예에서, 전자 장치(100)는 바다 근처에 있는 남자의 이미지(1340)을 획득하고, 이미지에 부가될 가상 객체를 결정할 수 있다. 전자 장치(100)는 바다 근처에 있는 남자의 이미지(1340)에 대하여, 돌고래(1342)를 가상 객체로 결정하고, 가상 객체 돌고래(1342)를 궤적 상에서 움직임으로써 이미지(1340)를 증강시킬 수 있다. 이 경우, 가상 객체 돌고래(1342)가 이미지 상에서 이동하는 경로는 사용자에 의해 수동으로 설정될 수 있다.In an embodiment, the electronic device 100 may acquire an image 1340 of a man near the sea and determine a virtual object to be added to the image. The electronic device 100 may augment the image 1340 by determining the dolphin 1342 as a virtual object and moving the virtual object dolphin 1342 on a trajectory with respect to the image 1340 of a man near the sea. . In this case, the path that the virtual object dolphin 1342 moves on the image may be manually set by the user.
일 실시예에서, 전자 장치(100)는 남자의 셀피 이미지(1350)에 대하여, 가상 객체 나비(1352)를 이미지에 부가하고, 가상 객체를 궤적상에서 이동시킴으로써 이미지를 증강시킬 수 있다. 이 경우, 가상 객체인 나비(1352)는 이미지 내에서 메인 객체로 분류된 ‘남자’ 주변을 선회하며 애니메이션 효과를 부여할 수 있다.In an embodiment, the electronic device 100 may augment the image by adding a virtual object butterfly 1352 to the image and moving the virtual object on the trajectory with respect to the selfie image 1350 of the man. In this case, the butterfly 1352, which is a virtual object, may give an animation effect while turning around a 'man' classified as a main object in the image.
도 14는 일 실시예에 따른 전자 장치가 사용자 제스처에 기초하여 이미지를 증강시키는 방법을 설명하기 위한 도면이다.14 is a diagram for describing a method of augmenting an image based on a user gesture by an electronic device, according to an exemplary embodiment.
도 14를 참조하면, 일 실시예에 따른 전자 장치(100)는 사용자의 이미지를 증강하기 위한 제스처를 식별할 수 있다. 전자 장치(100)는 기 설정된 이벤트(예를 들어, 사용자의 호출 명령, 이미지 증강 모드 실행 등)의 발생 여부에 기초하여, 사용자가 이미지를 증강시키기 위한 제스처를 취하는 것을 식별할 수 있다. 이 경우, 이미지를 증강시키기 위한 사용자의 제스처는, 기 설정되어 전자 장치(100)에 저장된 것일 수 있으나, 이에 한정되지 않는다.Referring to FIG. 14 , the electronic device 100 according to an embodiment may identify a gesture for augmenting an image of a user. The electronic device 100 may identify that the user makes a gesture for augmenting an image based on whether a preset event (eg, a user's call command, execution of an image augmentation mode, etc.) occurs. In this case, the user's gesture for augmenting the image may be preset and stored in the electronic device 100 , but is not limited thereto.
일 실시예에서, 사용자가 오른손의 검지 손가락을 들어올리는 제스처(1410)를 취하는 경우, 전자 장치(100)는 반짝반짝 거리는 애니메이션 효과를 표시하여 이미지를 증강시킬 수 있다.In an embodiment, when the user makes a gesture 1410 of raising the index finger of his right hand, the electronic device 100 may augment the image by displaying a twinkling animation effect.
일 실시예에서, 사용자가 왼손의 검지손가락 및 새끼손가락을 들어올리는 제스처(1420)를 취하는 경우, 전자 장치(100)는 배경에 무지개가 떠오르는 애니메이션 효과를 표시하여 이미지를 증강시킬 수 있다.In an embodiment, when the user makes a gesture 1420 of raising the index finger and the little finger of the left hand, the electronic device 100 may augment the image by displaying an animation effect in which a rainbow appears in the background.
도 15는 일 실시예에 따른 전자 장치가 이미지를 증강하는 방법을 설명하기 위한 흐름도이다.15 is a flowchart illustrating a method of augmenting an image by an electronic device according to an exemplary embodiment.
단계 S1510에서, 일 실시예에 따른 전자 장치(100)는 이미지에 부가될 가상 객체를 획득할 수 있다. In operation S1510, the electronic device 100 according to an embodiment may acquire a virtual object to be added to an image.
일 실시예에서, 전자 장치(100)는 외부 장치 또는 사용자의 수동 입력을 통해, 이미지에 부가될 가상 객체를 획득할 수 있다.In an embodiment, the electronic device 100 may acquire a virtual object to be added to an image through an external device or a manual input of a user.
일 실시예에서, 전자 장치(100)는 메인 객체, 서브 객체, 이미지의 컨텍스트 정보, 또는 이들의 조합에 기초하여 이미지에 부가될 가상 객체를 결정하고, 결정된 가상 객체를 획득할 수 있다.In an embodiment, the electronic device 100 may determine a virtual object to be added to the image based on the main object, the sub-object, context information of the image, or a combination thereof, and obtain the determined virtual object.
일 실시예에서, 전자 장치(100)는 메인 객체와 서브 객체들 간의 연결 관계, 컨텍스트 연결 트리, 장면-가상 객체 연결 트리 중 적어도 일부 에 기초하여, 가상 객체를 획득할 수 있다.In an embodiment, the electronic device 100 may acquire the virtual object based on at least a part of a connection relationship between the main object and sub-objects, a context connection tree, and a scene-virtual object connection tree.
일 실시예에 따른 전자 장치(100)가 가상 객체를 획득하는 방법들은 전술한 실시예들에 관한 설명에서 서술하였으므로, 동일한 설명은 생략하기로 한다.Methods for the electronic device 100 to obtain a virtual object according to an embodiment have been described in the description of the above-described embodiments, and thus the same description will be omitted.
단계 S1520에서, 일 실시예에 따른 전자 장치(100)는 획득된 가상 객체의 이동경로를 나타내는 궤적을 획득할 수 있다.In operation S1520, the electronic device 100 according to an embodiment may acquire a trajectory indicating a movement path of the obtained virtual object.
일 실시예에서, 전자 장치(100)는 객체에 대응되는 궤적을 출력하도록 학습된 인공지능 모델을 이용하여 가상 객체의 이동 경로에 대응되는 궤적을 획득할 수 있다.In an embodiment, the electronic device 100 may acquire the trajectory corresponding to the movement path of the virtual object by using the artificial intelligence model learned to output the trajectory corresponding to the object.
일 실시예에서, 전자 장치(100)는 사용자 입력(예를 들어, 터치 입력, 모션 입력, 제스처 입력 등)에 기초하여, 가상 객체가 이동 경로에 대응되는 궤적을 획득할 수 있다.In an embodiment, the electronic device 100 may obtain a trajectory corresponding to the movement path of the virtual object based on a user input (eg, a touch input, a motion input, a gesture input, etc.).
일 실시예에 따른 전자 장치(100)가 가상 객체의 궤적을 획득하는 방법들은 전술한 실시예들에 관한 설명에서 서술하였으므로, 동일한 설명은 생략하기로 한다.Methods for the electronic device 100 to obtain the trajectory of the virtual object according to an embodiment have been described in the description of the above-described embodiments, and thus the same description will be omitted.
또한, 일 실시예에서, 전자 장치(100)는 전자 장치(100) 또는 외부 장치에 기저장된 맵핑 테이블에 기초하여, 획득된 가상 객체에 대응되는 궤적을 획득할 수 있다. 이는 도 17에 대한 설명에서 더 서술하기로 한다.Also, according to an embodiment, the electronic device 100 may acquire a trajectory corresponding to the acquired virtual object based on a mapping table pre-stored in the electronic device 100 or an external device. This will be further described in the description of FIG. 17 .
단계 S1530에서, 일 실시예에 따른 전자 장치(100)는 궤적을 따라 가상 객체를 이동시킬 수 있다.In operation S1530, the electronic device 100 according to an embodiment may move the virtual object along the trajectory.
일 실시예에 따른 전자 장치(100)는 이미지 내에서 가상 객체를 궤적을 따라 이동시키면서, 가상 객체의 크기, 메인 객체에 대한 가상 객체의 방향, 메인 객체에 대한 가상 객체의 위치, 및 가상 객체의 사시도 중 적어도 하나를 변경할 수 있다. 전자 장치(100)가 이미지 내에서 가상 객체를 이동시키는 방법에 대한 설명은 전술한 실시예들을 통하여 설명하였으므로, 동일한 설명은 생략하기로 한다.The electronic device 100 according to an embodiment moves the virtual object along a trajectory in the image, and the size of the virtual object, the direction of the virtual object with respect to the main object, the position of the virtual object with respect to the main object, and the position of the virtual object with respect to the main object. At least one of the perspective views may be changed. Since the description of how the electronic device 100 moves the virtual object in the image has been described through the above-described embodiments, the same description will be omitted.
도 16은 일 실시예에 따른 전자 장치가 가상 객체를 획득하는 방법을 설명하기 위한 흐름도이다.16 is a flowchart illustrating a method for an electronic device to acquire a virtual object, according to an embodiment.
단계 S1610에서, 일 실시예에 따른 전자 장치(100)는 이미지 내에서 하나 이상의 객체들을 식별할 수 있다. In operation S1610, the electronic device 100 according to an embodiment may identify one or more objects in the image.
일 실시예에서, 전자 장치(100)는 인공지능 모델을 이용하여 이미지 내에서 객체를 식별하고 분류할 수 있다. 이 경우, 식별된 객체는 메인 객체 및 서브 객체로 분류될 수 있다. 전자 장치(100)가 이미지 내에서 객체를 식별하는 방법에 대한 설명은 전술한 실시예들을 통하여 설명하였으므로, 동일한 설명은 생략하기로 한다.In an embodiment, the electronic device 100 may identify and classify an object in an image using an artificial intelligence model. In this case, the identified object may be classified into a main object and a sub-object. Since the description of the method for the electronic device 100 to identify the object in the image has been described through the above-described embodiments, the same description will be omitted.
단계 S1620에서, 일 실시예에 따른 전자 장치(100)는 객체들 간 관계, 이미지의 관심 영역 및 이미지의 컨텍스트 중 정보 적어도 하나를 식별할 수 있다. 전자 장치(100)는 식별된 객체들 중에서 식별된 서브 객체들 간 관계, 메인 객체와 서브 객체들 간 관계를 식별하고, 이미지의 관심 영역 및 이미지의 컨텍스트를 식별할 수 있다.In operation S1620, the electronic device 100 according to an embodiment may identify at least one of information among a relationship between objects, an ROI of an image, and a context of the image. The electronic device 100 may identify a relationship between identified sub-objects from among the identified objects, a relationship between a main object and sub-objects, and identify an ROI of an image and a context of the image.
단계 S1630에서, 일 실시예에 따른 전자 장치(100)는 객체들 간 관계, 이미지의 관심 영역, 획득된 컨텍스트 정보 중 적어도 하나에 기초하여, 컨텍스트 연결 트리를 생성할 수 있다. 이 경우, 컨텍스트 연결 트리는 메인 객체와 서브 객체들 간의 연결 관계를 나타내는 것일 수 있다. 전자 장치(100)가 컨텍스트 연결 트리를 생성하는 방법에 대한 설명은 전술한 실시예들을 통하여 설명하였으므로, 동일한 설명은 생략하기로 한다.In operation S1630, the electronic device 100 according to an embodiment may generate a context connection tree based on at least one of a relationship between objects, an ROI of an image, and obtained context information. In this case, the context connection tree may indicate a connection relationship between the main object and sub-objects. Since the description of the method in which the electronic device 100 generates the context connection tree has been described through the above-described embodiments, the same description will be omitted.
단계 S1640에서, 일 실시예에 따른 전자 장치(100)는 컨텍스트 연결 트리에 기초하여, 이미지를 증강시키기 위해 이미지에 부가될 가상 객체를 식별할 수 있다. 전자 장치(100)가 가상 객체를 식별하는 방법에 대한 설명은 전술한 실시예들을 통하여 설명하였으므로, 동일한 설명은 생략하기로 한다.In operation S1640, the electronic device 100 according to an embodiment may identify a virtual object to be added to the image in order to augment the image based on the context connection tree. Since the description of the method for the electronic device 100 to identify the virtual object has been described through the above-described embodiments, the same description will be omitted.
도 17은 일 실시예에 따른 전자 장치가 기 저장된 맵핑 테이블에 기초하여 가상 객체의 애니메이션 효과 및 궤적을 획득하는 방법을 설명하기 위한 도면이다.17 is a diagram for describing a method of obtaining, by an electronic device, an animation effect and a trajectory of a virtual object based on a pre-stored mapping table, according to an exemplary embodiment.
일 실시예에서, 전자 장치(100)는 맵핑 테이블(1700)에 기초하여, 가상 객체들에 대응되는 애니메이션 효과 및 궤적을 획득할 수 있다. 이 경우, 전자 장치(100)는 전자 장치(100)에 저장된 맵핑 테이블(1700)을 사용하거나, 외부 장치(예를 들어, 서버)에 저장된 맵핑 테이블(1700)을 사용할 수 있다.In an embodiment, the electronic device 100 may acquire animation effects and trajectories corresponding to the virtual objects based on the mapping table 1700 . In this case, the electronic device 100 may use the mapping table 1700 stored in the electronic device 100 or may use the mapping table 1700 stored in the external device (eg, a server).
도 17을 참조하면, 맵핑 테이블(1700)은 전자 장치가 획득 가능한 가상 객체들(1710)의 리스트 및 각각의 가상 객체들에 대응되는 애니메이션 타입(1720)을 포함할 수 있다. 예를 들어, 전자 장치(100)가 이미지에 부가하고자 하는 가상 객체가 시계인 경우, 전자 장치(100)는 맵핑 테이블(1700)에 기초하여 가상 객체 ‘시계’에 대응되는 애니메이션인 시계 바늘의 회전 효과를 획득하고, 가상 객체 ‘시계’에 획득된 애니메이션 효과를 적용하여 이미지를 증강시킬 수 있다.Referring to FIG. 17 , the mapping table 1700 may include a list of virtual objects 1710 obtainable by the electronic device and an animation type 1720 corresponding to each virtual object. For example, when the virtual object that the electronic device 100 wants to add to the image is a watch, the electronic device 100 rotates the clock hand, which is an animation corresponding to the virtual object 'clock', based on the mapping table 1700 . An image may be augmented by acquiring an effect and applying the acquired animation effect to the virtual object 'clock'.
한편, 도 1 및 도 2에 도시된 전자 장치(100), 객체 컨트롤러(150)의 블록도는 일 실시예를 위한 블록도이다. 블록도의 각 구성요소는 실제 구현되는 각 장치의 사양에 따라 통합, 추가 또는 생략될 수 있다. 즉 필요에 따라 2 이상의 구성요소가 하나의 구성요소로 합쳐지거나, 혹은 하나의 구성요소가 2 이상의 구성요소로 세분되어 구성될 수 있다. 또한, 각 블록에서 수행하는 기능은 실시예들을 설명하기 위한 것이며, 그 구체적인 동작이나 장치는 본 발명의 권리범위를 제한하지 아니한다.Meanwhile, the block diagrams of the electronic device 100 and the object controller 150 illustrated in FIGS. 1 and 2 are block diagrams for an exemplary embodiment. Each component in the block diagram may be integrated, added, or omitted according to the specifications of each device that is actually implemented. That is, two or more components may be combined into one component, or one component may be subdivided into two or more components as needed. In addition, the function performed in each block is for describing the embodiments, and the specific operation or device does not limit the scope of the present invention.
일 실시예에 따른 전자 장치(100)가 가상 객체를 이미지에 증강하는 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 본 발명을 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다.The method of augmenting a virtual object on an image by the electronic device 100 according to an embodiment may be implemented in the form of a program command that can be executed through various computer means and recorded in a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, etc. alone or in combination. The program instructions recorded on the medium may be specially designed and configured for the present invention, or may be known and available to those skilled in the art of computer software. Examples of the computer-readable recording medium include magnetic media such as hard disks, floppy disks and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic such as floppy disks. - includes magneto-optical media, and hardware devices specially configured to store and carry out program instructions, such as ROM, RAM, flash memory, and the like. Examples of program instructions include not only machine language codes such as those generated by a compiler, but also high-level language codes that can be executed by a computer using an interpreter or the like.
또한, 개시된 실시예들에 따른 전자 장치(100)가 가상 객체를 이미지에 증강하는 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다.In addition, a method for the electronic device 100 to augment a virtual object on an image according to the disclosed embodiments may be provided by being included in a computer program product. Computer program products may be traded between sellers and buyers as commodities.
컴퓨터 프로그램 제품은 S/W 프로그램, S/W 프로그램이 저장된 컴퓨터로 읽을 수 있는 저장 매체를 포함할 수 있다. 예를 들어, 컴퓨터 프로그램 제품은 전자 장치의 제조사 또는 전자 마켓(예, 구글 플레이 스토어, 앱 스토어)을 통해 전자적으로 배포되는 S/W 프로그램 형태의 상품(예, 다운로더블 앱)을 포함할 수 있다. 전자적 배포를 위하여, S/W 프로그램의 적어도 일부는 저장 매체에 저장되거나, 임시적으로 생성될 수 있다. 이 경우, 저장 매체는 제조사의 서버, 전자 마켓의 서버, 또는 SW 프로그램을 임시적으로 저장하는 중계 서버의 저장매체가 될 수 있다.The computer program product may include a S/W program and a computer-readable storage medium in which the S/W program is stored. For example, computer program products may include products (eg, downloadable apps) in the form of software programs distributed electronically through manufacturers of electronic devices or electronic markets (eg, Google Play Store, App Store). have. For electronic distribution, at least a portion of the S/W program may be stored in a storage medium or may be temporarily generated. In this case, the storage medium may be a server of a manufacturer, a server of an electronic market, or a storage medium of a relay server temporarily storing a SW program.
컴퓨터 프로그램 제품은, 서버 및 전자 장치(100)로 구성되는 시스템에서, 서버의 저장매체 또는 클라이언트 장치의 저장매체를 포함할 수 있다. 또는, 서버 또는 전자 장치와 통신 연결되는 제3 장치(예, 스마트폰)가 존재하는 경우, 컴퓨터 프로그램 제품은 제3 장치의 저장매체를 포함할 수 있다. 또는, 컴퓨터 프로그램 제품은 서버로부터 클라이언트 장치 또는 제3 장치로 전송되거나, 제3 장치로부터 클라이언트 장치로 전송되는 S/W 프로그램 자체를 포함할 수 있다.The computer program product, in a system including a server and the electronic device 100 , may include a storage medium of a server or a storage medium of a client device. Alternatively, when there is a third device (eg, a smart phone) that is communicatively connected to the server or the electronic device, the computer program product may include a storage medium of the third device. Alternatively, the computer program product may include the S/W program itself transmitted from the server to the client device or the third device, or transmitted from the third device to the client device.
이 경우, 서버, 전자 장치(100) 및 제3 장치 중 하나가 컴퓨터 프로그램 제품을 실행하여 개시된 실시예들에 따른 방법을 수행할 수 있다. 또는, 서버, 전자 장치 및 제3 장치 중 둘 이상이 컴퓨터 프로그램 제품을 실행하여 개시된 실시예들에 따른 방법을 분산하여 실시할 수 있다.In this case, one of the server, the electronic device 100 and the third device may execute a computer program product to perform the method according to the disclosed embodiments. Alternatively, two or more of the server, the electronic device, and the third device may execute the computer program product to distribute the method according to the disclosed embodiments.
이상에서 실시예들에 대하여 상세하게 설명하였지만 본 발명의 권리범위는 이에 한정되는 것은 아니고 다음의 청구범위에서 정의하고 있는 본 발명의 기본 개념을 이용한 당업자의 여러 변형 및 개량 형태 또한 본 발명의 권리범위에 속한다.Although the embodiments have been described in detail above, the scope of the present invention is not limited thereto, and various modifications and improvements by those skilled in the art using the basic concept of the present invention as defined in the following claims are also included in the scope of the present invention. belongs to

Claims (15)

  1. 전자 장치가 가상 객체를 이미지에 증강하는 방법으로서,A method for an electronic device to augment a virtual object on an image, comprising:
    상기 이미지 내에서 하나 이상의 객체들을 식별하는 단계;identifying one or more objects within the image;
    상기 하나 이상의 객체들을 메인 객체 및 서브 객체로 분류하는 단계;classifying the one or more objects into a main object and a sub-object;
    상기 메인 객체 및 서브 객체에 기초하여 상기 메인 객체와 관련된 가상 객체를 획득하는 단계;obtaining a virtual object related to the main object based on the main object and the sub-object;
    상기 이미지가 촬영된 3차원 공간의 깊이 정보를 획득하는 단계;obtaining depth information of a three-dimensional space in which the image is captured;
    상기 깊이 정보에 기초하여, 상기 메인 객체에 대하여 상대적인 3차원의 이동 경로를 나타내는 상기 가상 객체의 궤적을 획득하는 단계;obtaining a trajectory of the virtual object indicating a three-dimensional movement path relative to the main object, based on the depth information;
    상기 궤적을 따라 상기 가상 객체를 이동시키는 단계를 포함하는, 방법.moving the virtual object along the trajectory.
  2. 제1항에 있어서,According to claim 1,
    상기 가상 객체를 이동시키는 단계는,Moving the virtual object comprises:
    상기 가상 객체의 크기, 상기 메인 객체에 대한 상기 가상 객체의 방향, 상기 메인 객체에 대한 상기 가상 객체의 위치 및 상기 가상 객체의 사시도(perspective view) 중 적어도 하나를 변경하는 단계를 포함하는, 방법.changing at least one of a size of the virtual object, a direction of the virtual object with respect to the main object, a position of the virtual object with respect to the main object, and a perspective view of the virtual object.
  3. 제2항에 있어서,3. The method of claim 2,
    상기 가상 객체를 획득하는 단계는,The step of obtaining the virtual object comprises:
    상기 이미지 내에서 식별된 서브 객체들 간 관계, 메인 객체 및 서브 객체들 간 관계, 관심 영역 및 상기 이미지의 컨텍스트 중 적어도 하나를 식별하는 단계;identifying at least one of a relationship between identified sub-objects in the image, a relationship between a main object and sub-objects, a region of interest, and a context of the image;
    상기 서브 객체들 간 관계, 메인 객체 및 서브 객체들 간 관계, 관심 영역 및 상기 이미지의 컨텍스트 중 적어도 하나에 기초하여, 상기 메인 객체와 상기 서브 객체들 간의 연결 관계를 나타내는 컨텍스트 연결 트리를 생성하는 단계; 및Generating a context connection tree representing a connection relationship between the main object and the sub-objects based on at least one of a relationship between the sub-objects, a relationship between a main object and sub-objects, a region of interest, and a context of the image ; and
    상기 컨텍스트 연결 트리에 기초하여 상기 가상 객체를 식별하는 단계를 포함하는, 방법.and identifying the virtual object based on the context connection tree.
  4. 제2항에 있어서,3. The method of claim 2,
    상기 식별된 하나 이상의 객체들에 기초하여, 상기 이미지에 부가될 가상 객체 후보들을 획득하는 단계; 및obtaining virtual object candidates to be added to the image based on the identified one or more objects; and
    상기 가상 객체 후보들 각각에 대하여, 상기 가상 객체 후보들 각각에 대응되는 궤적 후보들을 포함하는, 궤적 클러스터를 획득하는 단계를 더 포함하고,obtaining, for each of the virtual object candidates, a trajectory cluster including trajectory candidates corresponding to each of the virtual object candidates;
    상기 가상 객체를 획득하는 단계는,The step of obtaining the virtual object comprises:
    상기 가상 객체 후보들 중에서, 상기 이미지에 부가될 가상 객체를 선택하는 단계를 포함하고,selecting a virtual object to be added to the image from among the virtual object candidates;
    상기 궤적을 획득하는 단계는,The step of obtaining the trajectory is
    상기 선택된 가상 객체에 대응되는 상기 궤적 클러스터 내에서, 상기 선택된 가상 객체의 이동 경로를 나타내는 궤적을 선택하는 단계를 포함하는, 방법.and selecting a trajectory indicating a movement path of the selected virtual object from within the trajectory cluster corresponding to the selected virtual object.
  5. 제1항에 있어서,According to claim 1,
    상기 가상 객체를 이동시키는 단계는,Moving the virtual object comprises:
    상기 깊이 정보에 기초하여 상기 가상 객체의 가시성(visibility)을 제어하는 단계를 포함하는, 방법.and controlling visibility of the virtual object based on the depth information.
  6. 제2항에 있어서,3. The method of claim 2,
    상기 가상 객체를 이동시키는 단계는,Moving the virtual object comprises:
    상기 깊이 정보, 상기 메인 객체에 대한 상기 가상 객체의 방향 및 상기 메인 객체로부터 상기 가상 객체의 거리에 기초하여 상기 사시도(perspective view)를 변경하는 단계를 더 포함하는, 방법.The method further comprising: changing the perspective view based on the depth information, the orientation of the virtual object with respect to the main object, and the distance of the virtual object from the main object.
  7. 제1항에 있어서,According to claim 1,
    상기 궤적을 획득하는 단계는,The step of obtaining the trajectory is
    상기 전자 장치의 사용자로부터 상기 가상 객체의 이동 경로를 가이드하는 사용자 입력을 획득하는 단계를 포함하는, 방법.and obtaining a user input guiding a movement path of the virtual object from a user of the electronic device.
  8. 가상 객체를 이미지에 증강하는 전자 장치에 있어서,An electronic device for augmenting a virtual object in an image, comprising:
    통신부;communication department;
    디스플레이;display;
    하나 이상의 명령어들(instructions)을 포함하는 프로그램을 저장하는 메모리;a memory storing a program including one or more instructions;
    상기 메모리에 저장된 상기 프로그램의 하나 이상의 명령어들을 실행하는 적어도 하나의 프로세서를 포함하고,at least one processor executing one or more instructions of the program stored in the memory;
    상기 적어도 하나의 프로세서는,the at least one processor,
    상기 이미지 내에서 하나 이상의 객체들을 식별하고,identify one or more objects within the image;
    상기 하나 이상의 객체들을 메인 객체 및 서브 객체로 분류하고,Classifying the one or more objects into a main object and a sub-object,
    상기 메인 객체 및 서브 객체에 기초하여 상기 메인 객체와 관련된 가상 객체를 획득하고,obtaining a virtual object related to the main object based on the main object and the sub-object;
    상기 이미지가 촬영된 3차원 공간의 깊이 정보를 획득하고,Obtaining depth information of the three-dimensional space in which the image was taken,
    상기 깊이 정보에 기초하여, 상기 메인 객체에 대하여 상대적인 3차원의 이동 경로를 나타내는 상기 가상 객체의 궤적을 획득하고,obtaining a trajectory of the virtual object indicating a three-dimensional movement path relative to the main object based on the depth information;
    상기 가상 객체의 이동을 표시하도록 상기 디스플레이를 제어하는, 전자 장치.and controlling the display to indicate movement of the virtual object.
  9. 제8항에 있어서,9. The method of claim 8,
    상기 적어도 하나의 프로세서는,the at least one processor,
    상기 가상 객체의 크기, 상기 메인 객체에 대한 상기 가상 객체의 방향, 상기 메인 객체에 대한 상기 가상 객체의 위치 및 상기 가상 객체의 사시도(perspective view) 중 적어도 하나를 변경하는, 전자 장치.An electronic device for changing at least one of a size of the virtual object, a direction of the virtual object with respect to the main object, a position of the virtual object with respect to the main object, and a perspective view of the virtual object.
  10. 제9항에 있어서,10. The method of claim 9,
    상기 적어도 하나의 프로세서는,the at least one processor,
    상기 이미지 내에서 식별된 서브 객체들 간 관계, 메인 객체 및 서브 객체들 간 관계, 관심 영역 및 상기 이미지의 컨텍스트 중 적어도 하나를 식별하고,identify at least one of a relationship between identified sub-objects in the image, a relationship between a main object and sub-objects, a region of interest, and a context of the image;
    상기 서브 객체들 간 관계, 메인 객체 및 서브 객체들 간 관계, 관심 영역 및 상기 이미지의 컨텍스트 중 적어도 하나에 기초하여, 상기 메인 객체와 상기 서브 객체들 간의 연결 관계를 나타내는 컨텍스트 연결 트리를 생성하고,Based on at least one of a relationship between the sub-objects, a relationship between a main object and sub-objects, a region of interest, and a context of the image, a context connection tree indicating a connection relationship between the main object and the sub-objects is generated,
    상기 컨텍스트 연결 트리에 기초하여 상기 가상 객체를 식별하는, 전자 장치.and identify the virtual object based on the context connection tree.
  11. 제9항에 있어서,10. The method of claim 9,
    상기 적어도 하나의 프로세서는,the at least one processor,
    상기 식별된 하나 이상의 객체들에 기초하여, 상기 이미지에 부가될 가상 객체 후보들을 획득하고,obtaining virtual object candidates to be added to the image based on the identified one or more objects;
    상기 가상 객체 후보들 각각에 대하여, 상기 가상 객체 후보들 각각에 대응되는 궤적 후보들을 포함하는, 궤적 클러스터를 획득하고,obtaining, for each of the virtual object candidates, a trajectory cluster including trajectory candidates corresponding to each of the virtual object candidates;
    상기 가상 객체 후보들 중에서, 상기 이미지에 부가될 가상 객체를 선택하고,selecting a virtual object to be added to the image from among the virtual object candidates;
    상기 선택된 가상 객체에 대응되는 상기 궤적 클러스터 내에서, 상기 선택된 가상 객체의 이동 경로를 나타내는 궤적을 선택하는, 전자 장치.and selecting a trajectory indicating a movement path of the selected virtual object from within the trajectory cluster corresponding to the selected virtual object.
  12. 제8항에 있어서,9. The method of claim 8,
    상기 적어도 하나의 프로세서는,the at least one processor,
    상기 깊이 정보에 기초하여 상기 가상 객체의 가시성(visibility)을 제어하는, 전자 장치.and controlling visibility of the virtual object based on the depth information.
  13. 제9항에 있어서,10. The method of claim 9,
    상기 적어도 하나의 프로세서는,the at least one processor,
    상기 깊이 정보, 상기 메인 객체에 대한 상기 가상 객체의 방향 및 상기 메인 객체로부터 상기 가상 객체의 거리에 기초하여 상기 사시도(perspective view)를 변경하는, 전자 장치.and changing the perspective view based on the depth information, a direction of the virtual object with respect to the main object, and a distance of the virtual object from the main object.
  14. 제8항에 있어서,9. The method of claim 8,
    상기 적어도 하나의 프로세서는,the at least one processor,
    상기 전자 장치의 사용자로부터 상기 가상 객체의 이동 경로를 가이드하는 사용자 입력을 획득하는, 전자 장치.Obtaining a user input for guiding a movement path of the virtual object from a user of the electronic device.
  15. 제1항 내지 제7항 중 어느 한 항의 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.A computer-readable recording medium in which a program for executing the method of any one of claims 1 to 7 on a computer is recorded.
PCT/KR2021/005171 2020-04-30 2021-04-23 Method and electronic device for image augmentation WO2021221394A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
IN202041018541 2020-04-30
IN202041018541 2020-08-31

Publications (1)

Publication Number Publication Date
WO2021221394A1 true WO2021221394A1 (en) 2021-11-04

Family

ID=78332407

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2021/005171 WO2021221394A1 (en) 2020-04-30 2021-04-23 Method and electronic device for image augmentation

Country Status (2)

Country Link
KR (1) KR20210134229A (en)
WO (1) WO2021221394A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023111995A1 (en) * 2021-12-16 2023-06-22 Niantic, Inc. Controlling augmented reality content via selection of real-world locations or objects

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160010475A (en) * 2013-05-14 2016-01-27 퀄컴 인코포레이티드 Augmented reality (ar) capture & play
US20170263029A1 (en) * 2015-12-18 2017-09-14 Snapchat, Inc. Method and system for providing context relevant media augmentation
KR20190035116A (en) * 2017-09-26 2019-04-03 삼성전자주식회사 Method and apparatus for displaying an ar object
KR20190075177A (en) * 2017-01-04 2019-06-28 삼성전자주식회사 Context-based augmented ad
KR20190103335A (en) * 2017-01-09 2019-09-04 스냅 인코포레이티드 Augmented Reality Object Manipulation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160010475A (en) * 2013-05-14 2016-01-27 퀄컴 인코포레이티드 Augmented reality (ar) capture & play
US20170263029A1 (en) * 2015-12-18 2017-09-14 Snapchat, Inc. Method and system for providing context relevant media augmentation
KR20190075177A (en) * 2017-01-04 2019-06-28 삼성전자주식회사 Context-based augmented ad
KR20190103335A (en) * 2017-01-09 2019-09-04 스냅 인코포레이티드 Augmented Reality Object Manipulation
KR20190035116A (en) * 2017-09-26 2019-04-03 삼성전자주식회사 Method and apparatus for displaying an ar object

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023111995A1 (en) * 2021-12-16 2023-06-22 Niantic, Inc. Controlling augmented reality content via selection of real-world locations or objects

Also Published As

Publication number Publication date
KR20210134229A (en) 2021-11-09

Similar Documents

Publication Publication Date Title
WO2021251689A1 (en) Electronic device and controlling method of electronic device
KR101894956B1 (en) Server and method for image generation using real-time enhancement synthesis technology
WO2018143630A1 (en) Device and method for recommending product
EP3908943A1 (en) Method, apparatus, electronic device and computer readable storage medium for image searching
WO2019164374A1 (en) Electronic device and method for managing custom object on basis of avatar
WO2019132518A1 (en) Image acquisition device and method of controlling the same
WO2019027258A1 (en) Electronic device and method for controlling the electronic device
WO2017043857A1 (en) Method for providing application, and electronic device therefor
WO2019143227A1 (en) Electronic device providing text-related image and method for operating the same
WO2020235852A1 (en) Device for automatically capturing photo or video about specific moment, and operation method thereof
WO2021261836A1 (en) Image detection apparatus and operation method thereof
WO2016126083A1 (en) Method, electronic device, and recording medium for notifying of surrounding situation information
WO2016204449A1 (en) Electronic device for displaying a plurality of images and method for processing an image
WO2021221394A1 (en) Method and electronic device for image augmentation
WO2021133053A1 (en) Electronic device and method for controlling same
WO2021025509A1 (en) Apparatus and method for displaying graphic elements according to object
EP3596667A1 (en) Electronic device and method for controlling the electronic device
EP3922036A1 (en) Apparatus and method for generating image
WO2019190142A1 (en) Method and device for processing image
EP3707678A1 (en) Method and device for processing image
WO2021075705A1 (en) Electronic device and control method therefor
WO2022010177A1 (en) Device and method for generating summary video
WO2021040256A1 (en) Electronic device, and method thereof for recommending clothing
WO2018176309A1 (en) Virtual library device, virtual reality headpiece, and virtual reading system
WO2020122513A1 (en) Method for processing two-dimensional image and device for executing method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21795728

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21795728

Country of ref document: EP

Kind code of ref document: A1