An electronic device, comprising: a camera; a display; and a processor, wherein the processor is configured to: determine whether a document is included in an image provided from the camera; when a document is not included in the image, provide a first user interface to the display that includes the image and at least one first graphic object for photographing the image; when a document is included in the image, provide a second user interface to the display for providing a function related to the document, wherein the second user interface comprises the image, the at least one first graphic object, a second graphic object indicating that the document exists in the image, and at least one third graphic object for performing a function related to the document, wherein the second graphic object comprises a graphic effect indicating an area where the document is recognized in the image, wherein the at least one third graphic object provides a function for scanning the document; when a user input to the third graphic object for scanning the document is detected in a state in which the second user interface is provided, extract from the image only the document in the area where the document is recognized in the image; and when a user input to the first graphic object for photographing the image is detected in a state in which the second user interface is provided, photograph the image including the document. a camera; a display; and a processor, wherein the processor is configured to: determine whether a document is included in an image provided from the camera; when a document is not included in the image, provide a first user interface to the display that includes the image and at least one first graphic object for photographing the image; when a document is included in the image, provide a second user interface to the display for providing a function related to the document, wherein the second user interface comprises the image, the at least one first graphic object, a second graphic object indicating that the document exists in the image, and at least one third graphic object for performing a function related to the document, wherein the second graphic object comprises a graphic effect indicating an area where the document is recognized in the image, wherein the at least one third graphic object provides a function for scanning the document; when a user input to the third graphic object for scanning the document is detected in a state in which the second user interface is provided, extract from the image only the document in the area where the document is recognized in the image; and when a user input to the first graphic object for photographing the image is detected in a state in which the second user interface is provided, photograph the image including the document. determine whether a document is included in an image provided from the camera; when a document is not included in the image, provide a first user interface to the display that includes the image and at least one first graphic object for photographing the image; when a document is included in the image, provide a second user interface to the display for providing a function related to the document, wherein the second user interface comprises the image, the at least one first graphic object, a second graphic object indicating that the document exists in the image, and at least one third graphic object for performing a function related to the document, wherein the second graphic object comprises a graphic effect indicating an area where the document is recognized in the image, wherein the at least one third graphic object provides a function for scanning the document; when a user input to the third graphic object for scanning the document is detected in a state in which the second user interface is provided, extract from the image only the document in the area where the document is recognized in the image; and when a user input to the first graphic object for photographing the image is detected in a state in which the second user interface is provided, photograph the image including the document.