Electronic device and method for providing augmented reality content
An electronic device is provided. The electronic device includes a camera, a touch panel, a display, a communication circuit, at least one processor operatively connected with the camera, the touch panel, the display, and the communication circuit, and a memory operatively connected with the at least one processor The memory stores one or more instructions, when executed, causing the at least one processor to display a first image captured by the camera and a second image received from an external electronic device through the communication circuit on the display, display first augmented reality content on the first image, display second augmented reality content on the second image, and display an animation effect of the first augmented reality content using the second augmented reality content based on a user input through the touch panel.
1 . An electronic device, comprising:
a camera;
a touch panel;
a display;
a communication circuit;
at least one processor operatively connected with the camera, the touch panel, the display, and the communication circuit; and
a memory operatively connected with the at least one processor,
wherein the memory stores one or more instructions, when executed, causing the at least one processor to:
display a first image captured by the camera and a second image received from an external electronic device through the communication circuit on the display,
receive a drawing input of a first user of the electronic device on the displayed first image,
display first augmented reality content obtained by the electronic device based on the drawing input of the first user of the electronic device on the displayed first image,
display second augmented reality content obtained by the external electronic device based on a drawing input of a second user of the external electronic device on the second image, and
display an animation effect of the first augmented reality content using the second augmented reality content based on a user input through the touch panel.
2 . The electronic device of claim 1 ,
wherein the first augmented reality content is generated based on the drawing input of the first user, and
wherein the second augmented reality content is generated based on the drawing input of the second user and is transmitted from the external electronic device through the communication circuit.
3 . The electronic device of claim 2 , wherein the drawing input of the first user or the drawing input of the second user comprises an input using a stylus pen.
4 . The electronic device of claim 1 , wherein the instructions further cause the at least one processor to:
identify at least one object included in the first augmented reality content and the second augmented reality content, and
display the animation effect corresponding to the identified at least one object among animation effects specified according to objects, in response to the user input.
5 . The electronic device of claim 1 ,
wherein the animation effect comprises at least one animation effect for the same object, and
wherein the instructions further cause the at least one processor to:
display the animation effect corresponding to the user input among the at least one animation effect.
6 . The electronic device of claim 1 ,
wherein the first image comprises a preview image obtained by the camera, and
wherein the second image comprises a preview image obtained by a camera of the external electronic device.
7 . The electronic device of claim 1 , wherein the instructions further cause the at least one processor to:
identify a body part of a first user where the first augmented reality content is displayed from the first image, and
display the first augmented reality content on a body part of a second user, the body part corresponding to the body part of the first user, on the second image.
8 . The electronic device of claim 7 , wherein the instructions further cause the at least one processor to:
identify a body part of the second user where the second augmented reality content is displayed from the second image, and
display the second augmented reality content on a body part of the first user, the body part corresponding to the body part of the second user, on the first image.
9 . The electronic device of claim 1 ,
wherein the instructions further cause the at least one processor to:
transmit the first augmented reality content to the external electronic device through the communication circuit.
10 . The electronic device of claim 1 ,
wherein the camera comprises a first camera disposed towards the same direction as a direction where a display area of the display is exposed and a second camera disposed towards a direction opposite to the direction of the first camera, and
wherein the instructions further cause the at least one processor to:
display a third image captured by the first camera, a fourth image captured by the second camera, and a fifth image in which the third image and the fourth image are synthesized with each other,
display third augmented reality content on the fifth image as the third augmented reality content is displayed on the third image based on a user input through the touch panel and display fourth augmented reality content on the fifth image as the fourth augmented reality content is displayed on the fourth image based on a user input through the touch panel, and
store the fifth image where at least one of the third augmented reality content or the fourth augmented reality content is displayed.
11 . The electronic device of claim 10 , wherein the instructions further cause the at least one processor to:
recognize a specified body part of a user from the third image or the fourth image, and
change a location where the third augmented reality content or the fourth augmented reality content is displayed on the fifth image based on interaction using the specified body part or display an animation effect of the third augmented reality content or an animation effect of the fourth augmented reality content.
12 . The electronic device of claim 1 , further comprising:
a sensor,
wherein the instructions further cause the at least one processor to:
detect, by the sensor, proximity of a body part of a user or a stylus pen to the display using the sensor, and
activate and display a user interface for generating augmented reality content on the display based on an input using the body part of the user or the stylus pen, based on the detected result of the sensor.
13 . The electronic device of claim 12 ,
wherein the user interface comprises a color selection element and a virtual pen selection element, and
wherein the instructions further cause the at least one processor to:
change at least one of a color or a line type of the augmented reality content based on a user input through the user interface.
14 . The electronic device of claim 12 ,
wherein the display comprises a flexible display, and
wherein the instructions further cause the at least one processor to:
sense a change in display size using the sensor, and
adjust the user interface to correspond to the display size.
15 . The electronic device of claim 14 , wherein the instructions further cause the at least one processor to:
change a size or layout of at least one element included in the user interface to correspond to the display size.
16 . A method for providing augmented reality content, performed by an electronic device, comprises:
displaying a first image captured by a camera of the electronic device and a second image received from an external electronic device through a communication circuit of the electronic device;
receiving a drawing input of a first user of the electronic device on the displayed first image,
displaying first augmented reality content obtained by the electronic device based on the drawing input of the first user of the electronic device on the displayed first image on a display of the electronic device;
displaying second augmented reality content obtained by the external electronic device based on a drawing input of a second user of the external electronic device on the second image; and
displaying an animation effect of the first augmented reality content using the second augmented reality content based on a user input through a touch panel of the electronic device.
17 . The method of claim 16 ,
wherein the first augmented reality content is generated based on the drawing input of the first user, and
wherein the second augmented reality content is generated based on the drawing input of the second user and is transmitted from the external electronic device through the communication circuit.
18 . The method of claim 17 , wherein the drawing input of the first user or the drawing input of the second user comprises an input using a stylus pen.
19 . The method of claim 16 , further comprising:
identifying at least one object included in the first augmented reality content and the second augmented reality content; and
displaying the animation effect corresponding to the identified at least one object among animation effects specified according to objects, in response to the user input.
20 . The method of claim 16 ,
wherein the animation effect comprises at least one animation effect for the same object, and
wherein the displaying of the animation effect comprises a preview image obtained by a camera of the external electronic device.