Electronic device for editing image on basis of focal length, and operating method thereof
By using an AI-driven image generation model, the electronic device effectively edits images to change the focal length, addressing the limitations of existing methods and achieving high-quality, natural image modifications.
Patent Information
- Application Number
- PCT/KR2024/016139
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-19
- Filing Date
- 2024-10-23
- Publication Date
- 2025-05-01
AI Technical Summary
Existing electronic devices struggle to naturally and effectively edit images to change the focal length, often resulting in reduced image quality due to enlargement of the middle part of the image.
The electronic device employs an image generation model using AI to modify the first subject image and background image based on a target focal length, allowing for natural and high-quality image editing.
This approach enables the electronic device to naturally provide images with modified focal points, maintaining image quality and allowing users to achieve high-end camera effects with electronic devices.
Smart Images

Figure KR2024016139_01052025_PF_FP_ABST
Abstract
Description
Electronic device for editing images based on focal length and method of operation thereof
[0001] The present disclosure relates to an electronic device for editing an image based on a focal length and a method of operating the same.
[0002] Thanks to remarkable advancements in information and communication technology and semiconductor technology, the proliferation and use of various electronic devices is rapidly increasing. Electronic devices are being developed to enable users to carry and communicate with one another. An electronic device can refer to any device that performs a specific function based on its embedded software, such as a mobile communication terminal, tablet PC, audio / video device, desktop / laptop computer, or in-car navigation system.
[0003] Recently, users have become increasingly interested in acquiring high-quality images, beyond simply capturing them using electronic devices. Electronic devices offer image editing capabilities. Using image editing applications, electronic devices can provide users with an environment where they can edit images stored on their devices.
[0004] In one embodiment, an electronic device may include a processor and a memory storing instructions. In one embodiment, the instructions, when executed by the processor, may be configured to cause the electronic device to obtain a first image captured based on a first focal length. In one embodiment, the instructions, when executed by the processor, may be configured to cause the electronic device to, in response to a command to edit the first image, identify a first subject image corresponding to a first subject included in the first image and a first background image corresponding to a first background of the first subject. In one embodiment, the instructions, when executed by the processor, may be configured to cause the electronic device to obtain a second subject image by transforming the first subject image based on a target focal length using an AI model. According to one embodiment, the instructions, when executed by the processor, may be configured to cause the electronic device to obtain a second image corresponding to the target focal distance, the second subject image including the deformed second subject image based on the target focal distance.
[0005] According to one embodiment, a method of operating an electronic device may include an operation of acquiring a first image captured based on a first focal length. According to one embodiment, the method of operating the electronic device may include an operation of confirming, in response to a command to edit the first image, a first subject image corresponding to a first subject included in the first image and a first background image corresponding to a first background of the first subject. According to one embodiment, the method of operating the electronic device may include an operation of acquiring a second subject image by transforming the first subject image based on a target focal length using an AI model. According to one embodiment, the method of operating the electronic device may include an operation of acquiring a second image corresponding to the target focal length, the second image including the second subject image transformed based on the target focal length.
[0006] In one embodiment, a computer-readable non-transitory recording medium may store instructions that may execute the following operations: acquiring a first image captured based on a first focal length; confirming, in response to a command to edit the first image, a first subject image corresponding to a first subject included in the first image and a first background image corresponding to a first background of the first subject; acquiring a second subject image by transforming the first subject image based on a target focal length using an AI model; and acquiring a second image corresponding to the target focal length that includes the second subject image transformed based on the target focal length.
[0007] FIG. 1 is a block diagram of an electronic device within a network environment, according to one embodiment.
[0008] FIG. 2 is a diagram illustrating a method for converting a first image captured based on a first focal distance into a second image corresponding to a target focal distance, according to one embodiment.
[0009] FIG. 3 is a diagram illustrating a method for learning an image generation model according to one embodiment.
[0010] FIG. 4 is a schematic block diagram of an electronic device according to one embodiment.
[0011] FIG. 5 is a flowchart illustrating the operation of an electronic device according to one embodiment.
[0012] FIG. 6 is a diagram for explaining the operation of an image generation model according to one embodiment.
[0013] FIG. 7 is a flowchart illustrating a method for an electronic device to change a focal length of a subject or background included in a first image, according to one embodiment.
[0014] FIG. 8A is a diagram illustrating a method for an electronic device to change a focal length of a background included in a first image, according to one embodiment.
[0015] FIG. 8B is a diagram illustrating a method for an electronic device to change a focal length of a subject included in a first image, according to one embodiment.
[0016] FIG. 9 is a flowchart illustrating a method for an electronic device to adjust the focal length of an image based on the direction and distance of a user input, according to one embodiment.
[0017] FIG. 10A is a diagram illustrating a method for an electronic device to adjust a focal length of an image based on a user input to a slide bar, according to one embodiment.
[0018] FIG. 10B is a diagram illustrating a method for an electronic device to adjust a focal length of an image based on a specified user input, according to one embodiment.
[0019] FIG. 10C is a diagram illustrating a method for an electronic device to adjust a focal length of an image based on a specified user input, according to one embodiment.
[0020] FIG. 11 is a flowchart illustrating a method for an electronic device to adjust a focal length of an image based on a distance between a user and a display or an image displayed through a display, according to one embodiment.
[0021] FIG. 12A is a diagram illustrating a method for an electronic device to adjust a focal length of an image based on a distance between a display and a user, according to one embodiment.
[0022] FIG. 12B is a diagram illustrating a method for an electronic device to adjust a focal length of an image displayed on a display based on a distance between the image and a user, according to one embodiment.
[0023] FIG. 1 is a block diagram of an electronic device (101) within a network environment (100), according to one embodiment. Referring to FIG. 1 , in the network environment (100), the electronic device (101) may communicate with the electronic device (102) via a first network (198) (e.g., a short-range wireless communication network), or may communicate with at least one of the electronic device (104) or the server (108) via a second network (199) (e.g., a long-range wireless communication network). In one embodiment, the electronic device (101) may communicate with the electronic device (104) via the server (108). According to one embodiment, the electronic device (101) may include a processor (120), a memory (130), an input module (150), an audio output module (155), a display module (160), an audio module (170), a sensor module (176), an interface (177), a connection terminal (178), a haptic module (179), a camera module (180), a power management module (188), a battery (189), a communication module (190), a subscriber identification module (196), or an antenna module (197). In some embodiments, the electronic device (101) may omit at least one of these components (e.g., the connection terminal (178)), or may have one or more other components added. In some embodiments, some of these components (e.g., the sensor module (176), the camera module (180), or the antenna module (197)) may be integrated into one component (e.g., the display module (160)).
[0024] The processor (120) may, for example, execute software (e.g., a program (140)) to control at least one other component (e.g., a hardware or software component) of the electronic device (101) connected to the processor (120) and perform various data processing or operations. According to one embodiment, as at least a part of the data processing or operations, the processor (120) may store commands or data received from other components (e.g., a sensor module (176) or a communication module (190)) in a volatile memory (132), process the commands or data stored in the volatile memory (132), and store result data in a non-volatile memory (134). According to one embodiment, the processor (120) may include a main processor (121) (e.g., a central processing unit or an application processor) or an auxiliary processor (123) (e.g., a graphics processing unit, a neural processing unit (NPU), an image signal processor, a sensor hub processor, or a communication processor) that can operate independently or together with the main processor (121). For example, when the electronic device (101) includes the main processor (121) and the auxiliary processor (123), the auxiliary processor (123) may be configured to use less power than the main processor (121) or to be specialized for a given function. The auxiliary processor (123) may be implemented separately from the main processor (121) or as a part thereof.
[0025] The auxiliary processor (123) may control at least a portion of functions or states associated with at least one component (e.g., a display module (160), a sensor module (176), or a communication module (190)) of the electronic device (101), for example, on behalf of the main processor (121) while the main processor (121) is in an inactive (e.g., sleep) state, or together with the main processor (121) while the main processor (121) is in an active (e.g., application execution) state. In one embodiment, the auxiliary processor (123) (e.g., an image signal processor or a communication processor) may be implemented as a part of another functionally related component (e.g., a camera module (180) or a communication module (190)). In one embodiment, the auxiliary processor (123) (e.g., a neural network processing unit) may include a hardware structure specialized for processing artificial intelligence models. The artificial intelligence models may be generated through machine learning. This learning can be performed, for example, on the electronic device (101) itself where the artificial intelligence model is executed, or can be performed through a separate server (e.g., server (108)). The learning algorithm can include, for example, supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but is not limited to the examples described above. The artificial intelligence model can include multiple artificial neural network layers.The artificial neural network may be one of a deep neural network (DNN), a convolutional neural network (CNN), a recurrent neural network (RNN), a restricted Boltzmann machine (RBM), a deep belief network (DBN), a bidirectional recurrent deep neural network (BRDNN), a deep Q-network, or a combination of two or more of the above, but is not limited to the examples described above. In addition to, or alternatively to, a hardware structure, an artificial intelligence model may include a software structure.
[0026] The memory (130) can store various data used by at least one component (e.g., processor (120) or sensor module (176)) of the electronic device (101). The data can include, for example, software (e.g., program (140)) and input data or output data for commands related thereto. The memory (130) can include volatile memory (132) or non-volatile memory (134).
[0027] The program (140) may be stored as software in the memory (130) and may include, for example, an operating system (142), middleware (144), or an application (146).
[0028] The input module (150) can receive commands or data to be used in a component of the electronic device (101) (e.g., a processor (120)) from an external source (e.g., a user) of the electronic device (101). The input module (150) can include, for example, a microphone, a mouse, a keyboard, a key (e.g., a button), or a digital pen (e.g., a stylus pen).
[0029] The audio output module (155) can output audio signals to the outside of the electronic device (101). The audio output module (155) can include, for example, a speaker or a receiver. The speaker can be used for general purposes, such as multimedia playback or recording playback. The receiver can be used to receive incoming calls. In one embodiment, the receiver can be implemented separately from the speaker or as part of the speaker.
[0030] The display module (160) can visually provide information to an external party (e.g., a user) of the electronic device (101). The display module (160) may include, for example, a display, a holographic device, or a projector and a control circuit for controlling the device. According to one embodiment, the display module (160) may include a touch sensor configured to detect a touch, or a pressure sensor configured to measure the intensity of a force generated by the touch.
[0031] The audio module (170) can convert sound into an electrical signal, or vice versa, convert an electrical signal into sound. According to one embodiment, the audio module (170) can acquire sound through the input module (150), output sound through the sound output module (155), or an external electronic device (e.g., electronic device (102)) (e.g., speaker or headphone) directly or wirelessly connected to the electronic device (101).
[0032] The sensor module (176) can detect the operating status (e.g., power or temperature) of the electronic device (101) or the external environmental status (e.g., user status) and generate an electrical signal or data value corresponding to the detected status. According to one embodiment, the sensor module (176) can include, for example, a gesture sensor, a gyro sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an IR (infrared) sensor, a biometric sensor, a temperature sensor, a humidity sensor, or an illuminance sensor.
[0033] The interface (177) may support one or more designated protocols that may be used to directly or wirelessly connect the electronic device (101) with an external electronic device (e.g., the electronic device (102)). In one embodiment, the interface (177) may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, an SD card interface, or an audio interface.
[0034] The connection terminal (178) may include a connector through which the electronic device (101) may be physically connected to an external electronic device (e.g., electronic device (102)). According to one embodiment, the connection terminal (178) may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).
[0035] The haptic module (179) can convert electrical signals into mechanical stimuli (e.g., vibration or movement) or electrical stimuli that a user can perceive through tactile or kinesthetic sensations. According to one embodiment, the haptic module (179) can include, for example, a motor, a piezoelectric element, or an electrical stimulation device.
[0036] The camera module (180) can capture still images and videos. According to one embodiment, the camera module (180) may include one or more lenses, image sensors, image signal processors, or flashes.
[0037] The power management module (188) can manage power supplied to the electronic device (101). According to one embodiment, the power management module (188) can be implemented as, for example, at least a part of a power management integrated circuit (PMIC).
[0038] A battery (189) may power at least one component of the electronic device (101). In one embodiment, the battery (189) may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell.
[0039] The communication module (190) may support the establishment of a direct (e.g., wired) communication channel or a wireless communication channel between the electronic device (101) and an external electronic device (e.g., electronic device (102), electronic device (104), or server (108)), and the performance of communication through the established communication channel. The communication module (190) may operate independently from the processor (120) (e.g., application processor) and may include one or more communication processors that support direct (e.g., wired) communication or wireless communication. According to one embodiment, the communication module (190) may include a wireless communication module (192) (e.g., a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module (194) (e.g., a local area network (LAN) communication module, or a power line communication module). Among these communication modules, the corresponding communication module can communicate with an external electronic device (104) via a first network (198) (e.g., a short-range communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)) or a second network (199) (e.g., a long-range communication network such as a legacy cellular network, a 5G network, a next-generation communication network, the Internet, or a computer network (e.g., a LAN or WAN)). These various types of communication modules can be integrated into a single component (e.g., a single chip) or implemented as multiple separate components (e.g., multiple chips). The wireless communication module (192) can verify or authenticate the electronic device (101) within a communication network such as the first network (198) or the second network (199) by using subscriber information (e.g., an international mobile subscriber identity (IMSI)) stored in the subscriber identification module (196).
[0040] The wireless communication module (192) can support 5G networks and next-generation communication technologies following the 4G network, such as NR access technology (new radio access technology). The NR access technology can support high-speed transmission of high-capacity data (eMBB (enhanced mobile broadband)), minimization of terminal power and connection of multiple terminals (mMTC (massive machine type communications)), or high reliability and low latency (URLLC (ultra-reliable and low-latency communications)). The wireless communication module (192) can support, for example, a high-frequency band (e.g., mmWave band) to achieve a high data transmission rate. The wireless communication module (192) can support various technologies for securing performance in a high-frequency band, such as beamforming, massive multiple-input and multiple-output (MIMO), full dimensional MIMO (FD-MIMO), array antenna, analog beam-forming, or large scale antenna. The wireless communication module (192) can support various requirements specified in the electronic device (101), an external electronic device (e.g., the electronic device (104)), or a network system (e.g., the second network (199)). According to one embodiment, the wireless communication module (192) can support a peak data rate (e.g., 20 Gbps or more) for eMBB realization, a loss coverage (e.g., 164 dB or less) for mMTC realization, or a U-plane latency (e.g., 0.5 ms or less for downlink (DL) and uplink (UL), or 1 ms or less for round trip) for URLLC realization.
[0041] The antenna module (197) can transmit or receive signals or power to or from an external device (e.g., an external electronic device). In one embodiment, the antenna module (197) may include an antenna including a radiator formed of a conductor or a conductive pattern formed on a substrate (e.g., a PCB). In one embodiment, the antenna module (197) may include a plurality of antennas (e.g., an array antenna). In this case, at least one antenna suitable for a communication method used in a communication network, such as the first network (198) or the second network (199), may be selected from the plurality of antennas, for example, by the communication module (190). A signal or power may be transmitted or received between the communication module (190) and an external electronic device via the at least one selected antenna. In some embodiments, in addition to the radiator, another component (e.g., a radio frequency integrated circuit (RFIC)) may be additionally formed as a part of the antenna module (197).
[0042] According to various embodiments, the antenna module (197) may form a mmWave antenna module. In one embodiment, the mmWave antenna module may include a printed circuit board, an RFIC disposed on or adjacent a first side (e.g., a bottom side) of the printed circuit board and capable of supporting a designated high-frequency band (e.g., a mmWave band), and a plurality of antennas (e.g., an array antenna) disposed on or adjacent a second side (e.g., a top side or a side side) of the printed circuit board and capable of transmitting or receiving signals in the designated high-frequency band.
[0043] At least some of the above components can be interconnected and exchange signals (e.g., commands or data) with each other via a communication method between peripheral devices (e.g., a bus, GPIO (general purpose input and output), SPI (serial peripheral interface), or MIPI (mobile industry processor interface)).
[0044] According to one embodiment, commands or data may be transmitted or received between the electronic device (101) and an external electronic device (104) via a server (108) connected to a second network (199). Each of the external electronic devices (102 or 104) may be the same or a different type of device as the electronic device (101). According to one embodiment, all or part of the operations executed in the electronic device (101) may be executed in one or more of the external electronic devices (102, 104, or 108). For example, when the electronic device (101) is to perform a certain function or service automatically or in response to a request from a user or another device, the electronic device (101) may, instead of or in addition to executing the function or service itself, request one or more external electronic devices to perform the function or at least a part of the service. One or more external electronic devices that receive the request may execute at least a portion of the requested function or service, or an additional function or service related to the request, and transmit the result of the execution to the electronic device (101). The electronic device (101) may process the result as is or additionally and provide it as at least a portion of a response to the request. For this purpose, cloud computing, distributed computing, mobile edge computing (MEC), or client-server computing technology may be used, for example. The electronic device (101) may provide an ultra-low latency service by using distributed computing or mobile edge computing, for example. In another embodiment, the external electronic device (104) may include an Internet of Things (IoT) device. The server (108) may be an intelligent server utilizing machine learning and / or a neural network. According to one embodiment, the external electronic device (104) or the server (108) may be included in the second network (199).The electronic device (101) can be applied to intelligent services (e.g., smart home, smart city, smart car, or healthcare) based on 5G communication technology and IoT-related technology.
[0045] In the detailed description below, reference numerals in the drawings may be used interchangeably or omitted for components that can be easily understood through the preceding embodiments, and their detailed descriptions may also be omitted. An electronic device according to an embodiment disclosed in this document may be implemented by selectively combining components of different embodiments, and components of one embodiment may be replaced by components of another embodiment. For example, it should be noted that the present invention is not limited to specific drawings or embodiments.
[0046] FIG. 2 is a diagram illustrating a method for converting a first image captured based on a first focal distance into a second image corresponding to a target focal distance, according to one embodiment.
[0047] Referring to FIG. 2, according to one embodiment, an electronic device (e.g., the electronic device 101 of FIG. 1 or the electronic device 201 of FIG. 4) may store an image generation model (202). For example, the image generation model (202) may include at least one artificial intelligence (AI) model. For example, the image generation model (202) may receive a first image (210) corresponding to a first focal length and information about a target focal length, and may generate (or obtain) a second image (215) corresponding to the target focal length. For example, the second image (215) may include only a portion of the background included in the first image (210) or may further include a background image not included in the first image (210). The second image (215) may include a subject similar to the subject included in the first image (210). However, the subject included in the second image (215) may have a shape that is somewhat modified based on the target focal distance of the subject included in the first image (210). For example, the subject included in the second image (215) may have a more three-dimensional shape or a more flat shape compared to the subject included in the first image (210).
[0048] Conventional electronic devices have been able to easily convert images captured using cameras with lenses of a specific focal length into images corresponding to different focal lengths. For example, when converting a wide-angle image captured using a camera with a short focal length lens into a telephoto image, conventional electronic devices have utilized a method of enlarging the central portion of the image. However, enlarging the central portion of an image can result in a reduction in image resolution. In other words, electronic devices have been unable to obtain natural, high-quality images using conventional methods.
[0049] An electronic device (101) according to various embodiments of the present disclosure can effectively acquire an image corresponding to a target focal length using an image generation model (202) including at least one AI model. Through this, the electronic device (101) can provide a user with an image with a naturally modified focal length.
[0050] FIG. 3 is a diagram illustrating a method for learning an image generation model according to one embodiment.
[0051] Referring to FIG. 3, according to one embodiment, the image generation model (202) may include at least one AI model. For example, the at least one AI model may include a generative AI model. For example, a generative AI model may represent an artificial intelligence (AI) model that utilizes content such as text, audio, and / or images to create similar content. The generative AI model may learn patterns in the content and generate new content based on the inference results. For example, in the field of images, a generative AI model may regenerate an image that mimics the characteristics of a specific image.
[0052] According to one embodiment, at least one AI model can be trained using images (211, 212, and 213) captured by multiple focal lengths for the same region of interest or subject. For example, images (211, 212, and 213) of a subject (203) captured based on multiple focal lengths can be used as a database for training an image generation model (202). The image generation model (202) can receive information about a specific focal length (25 mm, 100 mm, or 200 mm) and an image (211, 212, or 213) of a subject (203) captured based on the specific focal length, and perform a training operation to generate an image corresponding to the adjusted focal length that includes the subject (203).
[0053] According to one embodiment, the electronic device (101) may store a pre-learned image generation model (202) according to the method described above. The electronic device (101) may transform a first image (e.g., the first image (210) of FIG. 2) in which a subject (203) is captured based on a specific focal length into a second image (e.g., the second image (215) of FIG. 2) corresponding to the target focal length using the pre-learned image generation model (202). For example, in the second image (215), when compared to the first image (210), a part of the shape of the subject (203) may be changed based on the target focal length.
[0054] FIG. 4 is a schematic block diagram of an electronic device according to one embodiment.
[0055] Referring to FIG. 4, according to one embodiment, the electronic device (201) may include a camera (205), a processor (220), a memory (230), a communication module (250), and a display (260). For example, the electronic device (201) may be implemented in the same or similar manner as the electronic device (101) of FIG. 1.
[0056] According to one embodiment, the electronic device (201) may transform a first image (e.g., the first image (210) of FIG. 2) captured based on a specific focal length into a second image (e.g., the second image (215) of FIG. 2) corresponding to the target focal length using an image generation model (202). For example, the image generation model (202) may be stored in a memory (230).
[0057] According to one embodiment, the processor (220) may control the overall operation of the electronic device (201). For example, the processor (220) may be implemented identically or similarly to the processor (120) of FIG. 1.
[0058] According to one embodiment, the processor (220) may acquire a first image captured based on a first focal length. For example, the processor (220) may acquire a first image captured by capturing a region of interest (ROI) or a specific subject (hereinafter, referred to as the first subject) using the camera (205). Alternatively, the processor (220) may acquire a first image captured based on the first focal length from an external electronic device. For example, the first subject may include an object, a person, an animal, and / or a plant.
[0059] For example, the first image may include an image of a first subject captured based on a focal length specified for a lens included in a camera (205) (e.g., the camera module (180) of FIG. 1). Alternatively, the first image may include an image acquired from an external electronic device via a communication module (250) (e.g., the communication module (190) of FIG. 1).
[0060] According to one embodiment, the processor (220) may store the first image in a memory (230) (e.g., memory (130) of FIG. 1).
[0061] In one embodiment, the processor (220) may perform an operation of editing or modifying the first image in response to a command to edit the first image. For example, the processor (220) may generate or obtain a second image in which the focal length of the first image is adjusted to a target focal length. For example, the command to edit the first image may be confirmed (or generated) in response to a user input.
[0062] According to one embodiment, the processor (220) may identify a first subject included in the first image and a first background of the first subject to adjust the focal length of the first image to a target focal length. For example, the first subject may include an object, a person, an animal, and / or a plant. The first background may represent a portion of the first image excluding the first subject.
[0063] According to one embodiment, the processor (220) may separate a first subject (or a portion corresponding to the first subject) and a first background (or a portion corresponding to the first background) from a first image. For example, the processor (220) may separate the first subject and the first background using an object separation model (e.g., object separation model (610) of FIG. 6) stored in the memory (230). For example, the processor (220) may obtain a first subject image corresponding to the first subject and a first background image corresponding to the first background based on an operation of separating the first subject and the first background. For example, the first subject image may represent an image of a portion corresponding to the first subject. The first background image may represent an image of a portion corresponding to the background of the first subject (e.g., the first background).
[0064] According to one embodiment, the processor (220) may transform a first subject image corresponding to a first subject and a second subject image corresponding to a first background based on a target focal distance using an image generation model (202) (or a focal distance transformation model (640) of FIG. 6) stored in the memory (230) or stored in an external server. For example, the processor (220) may obtain a first subject image and a second background image, respectively, which are obtained by transforming the first subject image and the first background image based on the target focal distance.
[0065] According to one embodiment, the processor (220) may obtain (or generate) a second image corresponding to the target focal distance by using (or synthesizing) a second subject image and a second background image transformed based on the target focal distance. Alternatively, the processor (220) may obtain (or generate) a second image corresponding to the target focal distance by using (or synthesizing) a second subject image and a first background image transformed based on the target focal distance. Alternatively, the processor (220) may obtain (or generate) a second image corresponding to the target focal distance by using (or synthesizing) a first subject image and a first background image or a second background image. The processor (220) may display the second image on a display (260) (e.g., the display module (160) of FIG. 1).
[0066] According to one embodiment, when the image generation model (202) is stored in an external server, the processor (220) may request the external server to transform the first subject image and the second subject image using the communication module (250). The processor (220) may obtain a second subject image and a second background image whose focal distances are changed based on the target focal distance from the external server. At this time, the processor (220) may obtain (or generate) a second image corresponding to the target focal distance using (or synthesizing) either the subject image of the first subject image or the second subject image transformed based on the target focal distance and either the background image of the first background image or the second background image. Alternatively, the processor (220) may obtain the second image corresponding to the target focal distance from the external server.
[0067] According to one embodiment, the processor (220) may obtain (or generate) a second image in which only the focal length of either the first subject or the first background included in the first image is changed. For example, the processor (220) may change the focal length of either the first subject or the first background to correspond to the target focal length based on a user input for either the first subject or the first background. For example, if a user input for the first background is confirmed, the processor (220) may change the focal length of the first background image based on the target focal length while maintaining the focal length of the first subject image. Alternatively, if a user input for the first subject is confirmed, the processor (220) may change the focal length of the first subject image based on the target focal length while maintaining the focal length of the first background image. The processor (220) may display a user interface for changing the focal length of either the first subject or the first background on the display (260).
[0068] According to one embodiment, the processor (220) may acquire (or generate) a second image corresponding to an image in which the focal distance of the first image is increased or decreased based on the direction and distance of a pre-specified user input (e.g., a drag input or a pinch input). The processor (220) may display a user interface for confirming the pre-specified user input on the display (260).
[0069] According to one embodiment, when a first image is displayed on the display (260), the processor (220) may use the camera (205) and / or a sensor (e.g., an acceleration sensor) included in the electronic device (201) to determine a distance between the display (260) and the user. The processor (220) may determine a target focal distance for changing the focal distance of the first image based on the determined distance. Thereafter, the processor (220) may display a second image corresponding to the determined target focal distance on the display (260) instead of the first image.
[0070] According to one embodiment, the processor (220) may display a virtual first image through the display (260) when the electronic device (201) is implemented as AR glasses, a VR device, or a head mounted display (HMD) device. The processor (220) may check the distance between the virtual first image and the user using a sensor (e.g., an acceleration sensor) included in the electronic device (201). The processor (220) may determine a target focal distance for changing the focal distance of the first image based on the checked distance. Thereafter, the processor (220) may display a virtual second image corresponding to the determined target focal distance through the display (260).
[0071] According to one embodiment, the processor (220) may generate or acquire a plurality of images corresponding to a plurality of focal lengths from a first image corresponding to a first focal length. The processor (220) may utilize the plurality of images corresponding to the plurality of focal lengths as substitutes for images captured by various photographing devices (e.g., devices including lenses having different focal lengths). In this way, the processor (220) may utilize the plurality of images captured by a single photographing device as images similar to images captured by various photographing devices. For example, the processor (220) may utilize the plurality of images as data for detection, classification, and 3D modeling. Alternatively, the processor (220) may sort the plurality of images corresponding to the plurality of focal lengths in order of focal length (e.g., ascending or descending order) and generate a video (or video frame) using the sorted plurality of images. The generated video may provide a dolly zoom effect because it shares features of the same subject.
[0072] As described above, the electronic device (201) can change a first image captured based on a specific focal length into a second image corresponding to a target focal length. Through this, the electronic device (201) can provide the user with an image with a naturally changed focal length.
[0073] At least some of the operations of the electronic device (201) described below may be performed by the processor (220) and the image generation model (202). However, for convenience of explanation, the operations below will be described as being performed by the electronic device (201).
[0074] FIG. 5 is a flowchart illustrating the operation of an electronic device according to one embodiment.
[0075] Referring to FIG. 5, according to one embodiment, in operation 501, an electronic device (e.g., electronic device (201) of FIG. 4) may acquire a first image captured based on a first focal length. For example, the first image may include a first subject captured based on the first focal length.
[0076] According to one embodiment, in operation 503, the electronic device (201) may, in response to a command to edit the first image, identify a first subject and a first background included in the first image. The electronic device (201) may identify and obtain a first subject image corresponding to the first subject. The electronic device (201) may, using an AI model (e.g., the painting model (630) of FIG. 6), perform an in-painting operation or an out-painting operation on a first area corresponding to the first subject image corresponding to the first subject excluded from the first image, thereby obtaining a first background image corresponding to the first background.
[0077] According to one embodiment, in operation 505, the electronic device (201) may transform at least one of the first subject or the first background based on the target focal distance using an AI model stored in a memory (e.g., the memory (230) of FIG. 4) or an external server. The electronic device (401) may obtain a second subject image and / or a second background image transformed based on the target focal distance. Alternatively, the electronic device (201) may obtain a second subject image and / or a second background image transformed based on the target focal distance using an AI model stored in a memory (e.g., the memory (230) of FIG. 4) or an external server (e.g., the focal distance conversion model (640) of FIG. 6).
[0078] According to one embodiment, in operation 507, the electronic device (201) may obtain a second image corresponding to the target focal distance, which includes a second subject image deformed based on the target focal distance. For example, the electronic device (201) may obtain a second image corresponding to the target focal distance by synthesizing the second subject image with a first background image or a second background image. Depending on the implementation, the electronic device (201) may also obtain a second image corresponding to the target focal distance (or a third image, for example, the third image may be an image in which only the background is deformed based on the target focal distance) by synthesizing the first subject image with a second background image. The electronic device (201) may store the second image (and / or the third image) or display it on a display (e.g., the display (260) of FIG. 4).
[0079] FIG. 6 is a diagram for explaining the operation of an image generation model according to one embodiment.
[0080] Referring to FIG. 6, according to one embodiment, the image generation model (202) may include an object separation model (610), a matting model (620), a painting model (630), a focal length conversion model (640), a boundary generation unit (650), and a synthesis unit (660). For example, at least some of the components (610, 620, 630, 640, 650, and 660) included in the image generation model (202) may be implemented as an AI model. Depending on the implementation, at least some of the components (610, 620, 630, 640, 650, and 660) included in the image generation model (202) may be omitted. Alternatively, the image generation model (202) may further include other components (e.g., other AI models).
[0081] According to one embodiment, the object separation model (610) can separate a subject and a background from a first image. For example, the object separation model (610) can separate (or acquire, confirm) a portion corresponding to the subject from the first image. In addition, the object separation model (610) can separate (or acquire, confirm) a portion excluding the subject from the first image as the background. The object separation model (610) can provide the separated subject to the matting model (620) and the separated background to the painting model (630).
[0082] In one embodiment, a matting model (620) may compare the separated subject with the first image to process details of the separated subject (e.g., details of the boundary) to make them more visually apparent.
[0083] According to one embodiment, the painting model (630) may perform an in-painting operation or an out-painting operation on the background. For example, if the target focal length is shorter than the first focal length, the painting model (630) may perform an out-painting operation to generate a background portion that is not included in the first image. Alternatively, if the target focal length is longer than the first focal length, the painting model (630) may perform an in-painting operation to generate a background portion that was covered by the subject. The painting model (630) may provide the background image obtained by performing the in-painting operation or the out-painting operation to the synthesis unit (660).
[0084] According to one embodiment, the focal length conversion model (640) may obtain image information for the first image and information on the target focal length in order to convert the focal lengths of the subject and the background. For example, the image information may include information on the lens that captured the first image (e.g., focal length and / or angle of view), information on the angle of view of the first image, information on the first focal length, and the distance between the first subject and the camera that captured the first image. The focal length conversion model (640) may receive image information and information on the target focal length in order to change the focal length of the first image. For example, the image information may be identified based on metadata included in the first image. However, if the first image does not include image information, the electronic device (201) may also obtain image information by analyzing the first image.
[0085] According to one embodiment, the focal length conversion model (640) can generate (or obtain) a subject obtained from the matting model (620) by transforming the subject based on the target focal length. The focal length conversion model (640) can provide the transformed subject to the boundary generation unit (650). The boundary generation unit (650) can compare the first image and the transformed subject to generate the boundary of the transformed subject. The focal length conversion model (640) can generate (or obtain) a background image obtained from the painting model (630) by transforming the background image based on the target focal length. The focal length conversion model (640) can provide the transformed background image to the synthesis unit (660).
[0086] According to one embodiment, the synthesis unit (660) can generate or obtain a second image corresponding to the target focal distance by combining the modified subject with the created boundary and the deformed background image.
[0087] Meanwhile, the configurations and operation sequence of the image generation model (202) described in FIG. 6 are merely exemplary, and the technical features of the present invention may not be limited thereto. For example, the method or sequence by which the image generation model (202) acquires a second image based on a first image may be changed.
[0088] FIG. 7 is a flowchart illustrating a method for an electronic device to change a focal length of a subject or background included in a first image, according to one embodiment.
[0089] Referring to FIG. 7, according to one embodiment, in operation 701, an electronic device (e.g., electronic device (201) of FIG. 4) may verify a user input for a first image. For example, the user input may include a touch input and / or a gesture input for the first image.
[0090] According to one embodiment, in operation 703, the electronic device (201) may determine whether the user input is an input for a first subject included in a first image. For example, if a touch input for the first subject is identified in the first image displayed on a display (e.g., the display (260) of FIG. 4), the electronic device (201) may determine that the user input is an input for the first subject. On the other hand, if a touch input for an area other than the first subject (e.g., an area corresponding to the first background of the first image) in the first image displayed on the display (260) is identified, the electronic device (201) may determine that the user input is an input for the first background.
[0091] According to one embodiment, if it is determined that the user input is an input for a first subject (example of operation 703), in operation 705, the electronic device (201) may change the focal length of the first subject image corresponding to the first subject based on the target focal length while maintaining the focal length of the first background image corresponding to the first background. For example, the electronic device (201) may obtain a second subject image that is modified based on the target focal length by using an AI model (e.g., the focal length modification model (640) of FIG. 6). The electronic device (201) may obtain (or generate) a second image in which the focal length of the first subject is modified by combining or synthesizing the second subject image with the first background image.
[0092] According to one embodiment, if it is determined that the user input is not an input for the first subject (NO in operation 703), in operation 707, the electronic device (201) may change the focal length of the first background image corresponding to the first background based on the target focal length while maintaining the focal length of the first subject image corresponding to the first subject. For example, the electronic device (201) may obtain a second background image modified based on the target focal length using an AI model (e.g., the focal length modification model (640) of FIG. 6). In addition, the electronic device (201) may obtain (or generate) the second background image based on performing in-painting or out-painting on a portion corresponding to the first background image. The electronic device (201) may obtain (or generate) a second image in which the focal length of the first background is changed by combining the first subject image with the second background image.
[0093] FIG. 8A is a diagram illustrating a method for an electronic device to change a focal length of a background included in a first image, according to one embodiment.
[0094] Referring to FIG. 8A, according to one embodiment, an electronic device (e.g., the electronic device (201) of FIG. 4) may identify a user input (e.g., a touch input) for a first background included in a first image (810) corresponding to a first focal length displayed on a display (e.g., the display (260) of FIG. 4). In response to the user input for the first background, the electronic device (201) may change the focal length of the first background image while maintaining the focal length of the first subject image included in the first image (810). For example, the electronic device (201) may maintain the shape of the first subject and deform the shape of the first background.
[0095] According to one embodiment, the electronic device (201) may deform the shape of the first background to make the first background feel larger and closer in the case of telephoto conversion (or when the target focal length is longer than the first focal length). At this time, the background of the deformed first image (820) may have a blank portion that was previously covered by the first subject. The electronic device (201) may obtain an image in which the blank portion (or area) is colored by performing an in-painting operation. The electronic device (201) may obtain a second background image using at least a portion of the first background image and an image in which the blank portion is colored. The electronic device (201) may obtain a second image (830) by synthesizing the second background image and the first subject. For example, the second image (830) may represent an image in which the focal distance of the first background is changed to the target focal distance (e.g., the focal distance is increased) while maintaining the focal distance of the first subject included in the first image (810).
[0096] According to one embodiment, in the case of wide-angle conversion (or when the target focal length is shorter than the first focal length), the electronic device (201) may deform the shape of the first background so that the first background feels small and far away. At this time, the background of the deformed first image (840) may have a blank portion that was not visible in the existing first background. The electronic device (201) may obtain a background image in which the blank portion (or area) is colored by performing an out-painting operation. The electronic device (201) may obtain a second background image using the first background image and the image in which the blank portion is colored. The electronic device (201) may obtain a second image (850) by synthesizing the second background image and the first subject. For example, the second image (850) may represent an image in which the focal length of the first background is changed to the target focal length (e.g., the focal length is reduced) while maintaining the focal length of the first subject included in the first image (810).
[0097] FIG. 8B is a diagram illustrating a method for an electronic device to change a focal length of a subject included in a first image, according to one embodiment.
[0098] Referring to FIG. 8B, according to one embodiment, an electronic device (e.g., the electronic device (201) of FIG. 4) may identify a user input (e.g., a touch input) for a first subject included in a first image (810) corresponding to a first focal length displayed on a display (e.g., the display (260) of FIG. 4). In response to the user input for the first subject, the electronic device (201) may change the focal length of the first subject image while maintaining the focal length of the first background image included in the first image (810). For example, the electronic device (201) may maintain the shape of the first background and deform the shape of the first subject.
[0099] According to one embodiment, the electronic device (201) may deform the shape of the first subject to make the first subject feel more flat in the case of telephoto conversion (or when the target focal length is longer than the first focal length). For example, the first subject image corresponding to the first subject of the deformed first image (860) may have features (e.g., a part of an ear covered by hair) that were not reflected in the original first subject added. Depending on the implementation, the deformed first subject may be larger than the original first subject. In this case, the electronic device (201) may remove distortion of the first subject due to the change in focal length. The electronic device (201) may obtain a second image (870) by synthesizing a first background image and a second subject image including the deformed first subject. For example, the second image (870) may represent an image in which the focal distance of the first background is changed to the target focal distance (e.g., the focal distance is increased) while maintaining the focal distance of the first subject included in the first image (810).
[0100] According to one embodiment, the electronic device (201) may deform the shape of the first subject to make the first subject feel more three-dimensional in the case of wide-angle conversion (or when the target focal length is shorter than the first focal length). Depending on the implementation, the deformed first subject may be smaller than the original first subject. In this case, the first background image of the deformed first image (880) may have a blank space in a portion that was previously covered by the original first subject. The electronic device (201) may obtain a background image in which the blank space (or area) is colored by performing an in-painting operation. The electronic device (201) may obtain the first background image using at least a portion of the first background image and an image in which the blank space is colored. In this case, the electronic device (201) may obtain a second subject image in which the distortion of the first subject due to the change in focal length is added. The electronic device (201) can obtain a second image (890) by synthesizing a first background image and a second subject image. For example, the second image (890) can represent an image in which the focal length of the first subject is changed to a target focal length (e.g., the focal length is reduced) while maintaining the focal length of the first background included in the first image (810).
[0101] FIG. 9 is a flowchart illustrating a method for an electronic device to adjust the focal length of an image based on the direction and distance of a user input, according to one embodiment.
[0102] Referring to FIG. 9, according to one embodiment, in operation 901, an electronic device (e.g., the electronic device (201) of FIG. 4) may determine a direction and distance of a user input designated to adjust a focal length of a first image. For example, the user input may include a drag input or a pinch input with respect to the first image displayed on a display (e.g., the display (260) of FIG. 4). For example, the user input designated to adjust the focal length of the first image may vary depending on a specific application or a specific function.
[0103] According to one embodiment, in operation 903, the electronic device (201) may determine (e.g., determine or judge) a target focal distance based on the direction and distance of the user input. For example, the electronic device (201) may determine whether to increase or decrease the focal distance of an existing first image based on the direction of the user input. The electronic device (201) may determine how much to adjust the focal distance of the first image based on the distance (or movement distance) of the user input. The electronic device (201) may determine the target focal distance based on how much to increase or decrease the focal distance of the first image.
[0104] According to one embodiment, in operation 905, the electronic device (201) may acquire a second image corresponding to the target focal distance based on a user input, and display the acquired second image on the display (260).
[0105] FIG. 10A is a diagram illustrating a method for an electronic device to adjust a focal length of an image based on a user input to a slide bar, according to one embodiment.
[0106] Referring to FIG. 10A, according to one embodiment, an electronic device (1001) (e.g., the electronic device (201) of FIG. 4) may display a first image (1010) on a display. The electronic device (1001) may display a first object (1015) for changing a focal length of the first image (1010).
[0107] According to one embodiment, when a user input (e.g., a touch input) for a first object (1015) is confirmed, the electronic device (1001) may display a user interface (e.g., a slide bar (1020)) for adjusting a focal length of a first image (1010) on the display. For example, the electronic device (1001) may display a second image in which the focal length of the first image is adjusted to a target focal length corresponding to the user input, based on the user input for the slide bar (1020). For example, when the user input indicates a focal length of a first value (e.g., 24 mm), the electronic device (1001) may display a second image (1030) corresponding to the focal length. When the user input indicates a focal length of a second value (e.g., 70 mm), the electronic device (1001) may display a second image (1040) corresponding to the focal length. If the user input indicates a focal length of a third value (e.g., 135 mm), the electronic device (1001) may display a second image (1040) corresponding to the focal length. Depending on the implementation, the user input may be a continuous input (e.g., a drag input), and the electronic device (1001) may continuously display images corresponding to different target focal lengths according to the continuous user input. For example, if the user input is dragged in a rightward direction, the electronic device (1001) may display images with a continuously increased focal length. Alternatively, if the user input is dragged in a leftward direction, the electronic device (1001) may display images with a continuously decreased focal length.
[0108] According to one embodiment, when a portrait photo (e.g., a selfie) is taken by a camera (e.g., 205), the electronic device (1001) may generate a portrait photo (automatically or based on a user request) that reflects a user-preset focal length (e.g., a user-preferred focal length) in the captured portrait photo. For example, the electronic device (1001) may generate a portrait photo that reflects the preset focal length (e.g., a user-preferred focal length) using an AI model (e.g., a generative AI model). In addition, the electronic device (1001) may output (e.g., display on a display) and store the generated portrait photo.
[0109] Meanwhile, although FIG. 10A illustrates a linear slide bar for adjusting the focal length of an image, the technical features of the present invention may not be limited thereto. For example, the user interface for adjusting the focal length of an image may be implemented in various forms. For example, the user interface for adjusting the focal length of an image may be implemented as a donut-shaped circular bar, and the electronic device (1001) may increase the focal length by a clockwise user input to the circular bar, and decrease the focal length by a counterclockwise user input.
[0110] FIG. 10B is a diagram illustrating a method for an electronic device to adjust a focal length of an image based on a specified user input, according to one embodiment.
[0111] Referring to FIG. 10B, according to one embodiment, an electronic device (1001) (e.g., the electronic device (201) of FIG. 4) may display a first image (1010) on a display. The electronic device (1001) may display a first object (1015) for changing a focal length of the first image (1010).
[0112] According to one embodiment, when a user input (e.g., a touch input) for a first object (1015) is confirmed, the electronic device (1001) may adjust the focal length of the first image (1010) based on an additional input (e.g., a pinch input). For example, the electronic device (1001) may display a second image (1030) corresponding to a target focal length (e.g., 24 mm) that is reduced from the focal length of the first image (1010) based on a pinch input in the form of two fingers coming closer together. Alternatively, the electronic device (1001) may display an image (1040) corresponding to a target focal length (e.g., 70 mm) that is increased from the focal length of the second image (1030) based on a pinch input in the form of two fingers coming apart.
[0113] According to the above-described method, the electronic device (1001) may display an image whose angle of view is enlarged or reduced based on the first image. For example, the angle of view and the focal length may be inversely proportional to each other. For example, the electronic device (1001) may display a second image (1030) corresponding to an angle of view wider than that of the first image (1010) based on a pinch input in the form of two fingers closing together. Alternatively, the electronic device (1001) may display an image (1040) corresponding to an angle of view reduced than that of the second image (1030) based on a pinch input in the form of two fingers spreading apart.
[0114] FIG. 10C is a diagram illustrating a method for an electronic device to adjust a focal length of an image based on a specified user input, according to one embodiment.
[0115] Referring to FIG. 10c, according to an embodiment, when the electronic device (201) is implemented as a virtual reality (VR) device, an augmented reality (AR) device, a mixed reality (MR) device, an extended reality (XR) device, a video-see through (VST) device, or a head mounted display (HMD) device, the electronic device (201) may display a first image (1050) corresponding to a first focal length (e.g., 100 mm) on the display (1005). When a user's gesture of grabbing the first image (1050) and moving it in a forward or backward direction is confirmed, the electronic device (201) may display a second image (1060) with an adjusted focal length. For example, when a user's gesture of grabbing and moving a first image (1050) in a forward direction is confirmed, the electronic device (201) may display a second image (1060) corresponding to a focal length shorter than the first focal length (e.g., 24 mm) on the display (1005).
[0116] According to one embodiment, the electronic device (201) may display a panoramic screen on the display (1005) when displaying the screen in a panoramic mode (or immersive mode) based on a user input. For example, the electronic device (201) may display an image (1070) corresponding to a minimum focal length or a preset focal length (e.g., 24 mm) as a panoramic screen.
[0117] FIG. 11 is a flowchart illustrating a method for an electronic device to adjust a focal length of an image based on a distance between a user and a display or an image displayed through a display, according to one embodiment.
[0118] Referring to FIG. 11, according to an embodiment, an electronic device (e.g., the electronic device (201) of FIG. 4) may, in operation 1101, determine a distance between a user and a first image displayed through a display (e.g., the display (260) of FIG. 4) or a display (e.g., the display (1005) of FIG. 10C). For example, the electronic device (201) may determine a movement of the user using a camera (e.g., the camera (205) of FIG. 4) and / or a sensor, and, based on the determined movement, determine a distance between the user and the first image displayed through the display (260) or the display (1005).
[0119] According to one embodiment, in operation 1103, the electronic device (201) may determine a target focal distance based on the identified distance. For example, the electronic device (201) may decrease the focal distance as the identified distance gets closer. That is, the electronic device (201) may determine the target focal distance to be shorter than the existing focal distance as the identified distance gets closer. Alternatively, the electronic device (201) may increase the focal distance as the identified distance gets farther. That is, the electronic device (201) may determine the target focal distance to be longer than the existing focal distance as the identified distance gets farther.
[0120] In one embodiment, at operation 1105, the electronic device (201) may acquire and display a second image corresponding to the target focal distance.
[0121] According to the method described above, the electronic device (201) can display an image with a changed focal length as the user approaches or moves away from the electronic device (201). Through this, the electronic device (201) can provide an effect in which a subject included in the image gradually approaches or moves away from the user depending on the distance from the user.
[0122] FIG. 12A is a diagram illustrating a method for an electronic device to adjust a focal length of an image based on a distance between a display and a user, according to one embodiment.
[0123] Referring to FIG. 12A, according to one embodiment, an electronic device (1201) (e.g., the electronic device (201) of FIG. 4) can determine the distance between a display (e.g., the display (260) of FIG. 4) and a user. For example, the electronic device (201) can determine the movement of the user using a camera (e.g., the camera (205) of FIG. 4) and / or a sensor, and determine the distance between the display (260) and the user based on the determined movement.
[0124] According to one embodiment, the electronic device (1201) may decrease the focal length of the first image (1210) as the distance between the electronic device (1201) and the user decreases. For example, the electronic device (1201) may display the first image (1210) corresponding to the first focal length (e.g., 135 mm) when the distance between the electronic device (1201) and the user is a first length. The electronic device (1201) may display the second image (1220) corresponding to the second focal length (e.g., 35 mm) shorter than the first focal length (e.g., 135 mm) when the distance between the electronic device (1201) and the user is a second length shorter than the first length.
[0125] According to one embodiment, the electronic device (1201) may increase the focal length of the first image (1210) as the distance between the electronic device (1201) and the user increases.
[0126] According to the above-described method, the electronic device (1201) can provide an effect in which a subject included in an image gradually approaches or moves away depending on the distance between the user and the electronic device (1201).
[0127] FIG. 12B is a diagram illustrating a method for an electronic device to adjust a focal length of an image displayed on a display based on a distance between the image and a user, according to one embodiment.
[0128] Referring to FIG. 12B, according to one embodiment, an electronic device (1201) (e.g., the electronic device (201) of FIG. 4) can determine the distance between a display (e.g., the display (260) of FIG. 4) and a user. For example, the electronic device (201) can determine the movement of the user using a camera (e.g., the camera (205) of FIG. 4) and / or a sensor, and determine the distance between the display (260) and the user based on the determined movement.
[0129] According to one embodiment, the electronic device (e.g., VR device) (1202) may decrease the focal length of the first image (1230) as the distance between the electronic device (1202) and the user decreases. For example, the electronic device (1201) may display the first image (1230) corresponding to the first focal length when the distance between the electronic device (1201) and the user is a first length (e.g., 1 m). The electronic device (1202) may display the second image (1240) corresponding to the second focal length that is shorter than the first focal length when the distance between the electronic device (1201) and the user is a second length (e.g., 0.5 m) that is shorter than the first length.
[0130] In one embodiment, the electronic device (1202) may increase the focal length of the first image (1230) as the distance between the electronic device (1202) and the user increases.
[0131] According to the method described above, the electronic device (1202) can provide an effect in which a subject included in an image gradually approaches or moves away depending on the distance between the user and the electronic device (1202).
[0132] According to an embodiment, an electronic device (201) may include a processor (220) and a memory (230) storing instructions. According to an embodiment, the instructions, when executed by the processor, may be configured to cause the electronic device to obtain a first image captured based on a first focal length. According to an embodiment, the instructions, when executed by the processor, may be configured to cause the electronic device to, in response to a command to edit the first image, identify a first subject image corresponding to a first subject included in the first image and a first background image corresponding to a first background of the first subject. According to an embodiment, the instructions, when executed by the processor, may be configured to cause the electronic device to obtain a second subject image by transforming the first subject image based on a target focal length using an AI model. According to one embodiment, the instructions, when executed by the processor, may be configured to cause the electronic device to obtain a second image corresponding to the target focal distance, the second subject image including the deformed second subject image based on the target focal distance.
[0133] In one embodiment, the instructions, when executed by the processor, may be configured to cause the electronic device to separate the first subject and the first background included in the first image. In one embodiment, the instructions, when executed by the processor, may be configured to cause the electronic device to perform, using the AI model, an in-painting operation or an out-painting operation on a first area corresponding to the first subject image excluded from the first image to obtain the first background image. In one embodiment, the instructions, when executed by the processor, may be configured to cause the electronic device to deform at least one of the first subject image or the first background image based on the target focal distance.
[0134] In one embodiment, the instructions, when executed by the processor, may be configured to cause the electronic device to, based on a first user input for the first background among the first subject or the first background, deform the first background image based on the target focal distance while maintaining the first subject image.
[0135] In one embodiment, the instructions, when executed by the processor, may be configured to cause the electronic device to, when the target focal distance is longer than the focal distance of the first background, perform an in-facing operation on a portion of the first background image corresponding to the target focal distance and a first area corresponding to the first subject image, and obtain a second background image corresponding to the target focal distance using a second area obtained by performing the in-facing operation on a first area of the first background image corresponding to the target focal distance. In one embodiment, the instructions, when executed by the processor, may be configured to cause the electronic device to, when the target focal distance is shorter than the focal distance of the first background, obtain the second background image using the first background image and a third area obtained by performing the out-facing operation on the first background image. In one embodiment, the instructions, when executed by the processor, may be configured to cause the electronic device to, when executed, obtain a third image by synthesizing the second background image and the first subject image.
[0136] In one embodiment, the instructions, when executed by the processor, may be configured to cause the electronic device to deform the first subject image based on the target focal distance while maintaining the first background image based on a second user input with respect to the first subject among the first subject or the first background.
[0137] In one embodiment, the instructions, when executed by the processor, may be configured to cause the electronic device to obtain a second subject image, which is a transformed first subject image based on the target focal distance, when the target focal distance is longer than the focal distance of the first subject. In one embodiment, the instructions, when executed by the processor, may be configured to cause the electronic device to obtain a second subject image, which is a transformed first subject image based on the target focal distance, when the target focal distance is shorter than the focal distance of the first subject. In one embodiment, the instructions, when executed by the processor, may be configured to cause the electronic device to obtain the second image by synthesizing the second subject image with the first background image.
[0138] According to one embodiment, the instructions, when executed by the processor, may be configured to cause the electronic device to perform an in-painting operation on a portion of a first area corresponding to the first subject image to obtain a second background image corresponding to the target focal distance when the target focal distance is shorter than the focal distance of the first subject.
[0139] According to one embodiment, the instructions, when executed by the processor, may be configured to cause the electronic device to input information about a lens that captured the first image, an angle of view of the first image, the first focal length, a distance between the first subject and a camera that captured the first image, and the target focal length into the AI model, and to deform at least one of the first subject image or the first background image based on the target focal length.
[0140] According to one embodiment, the instructions, when executed by the processor, may be configured to cause the electronic device to acquire the second image corresponding to an image having an increased or decreased focal length of the first image based on a direction and distance of a pre-specified user input.
[0141] According to one embodiment, the instructions, when executed by the processor, may be configured to cause the electronic device to determine the target focal distance based on a distance between a display (260) included in the electronic device and a user.
[0142] According to one embodiment, a method of operating an electronic device (201) may include an operation of acquiring a first image captured based on a first focal length. According to one embodiment, the method of operating the electronic device may include an operation of confirming, in response to a command to edit the first image, a first subject image corresponding to a first subject included in the first image and a first background image corresponding to a first background of the first subject. According to one embodiment, the method of operating the electronic device may include an operation of acquiring a second subject image by deforming the first subject image based on a target focal length using an AI model. According to one embodiment, the method of operating the electronic device may include an operation of acquiring a second image corresponding to the target focal length that includes the second subject image deformed based on the target focal length.
[0143] The operating method of the electronic device may further include an operation of separating the first subject and the first background included in the first image. The operating method of the electronic device may further include an operation of obtaining the first background image by performing an in-painting operation or an out-painting operation on a first area corresponding to the first subject image excluded from the first image using the AI model. The operating method of the electronic device may further include an operation of transforming at least one of the first subject image or the first background image based on the target focal distance.
[0144] The operating method of the electronic device may further include an operation of deforming the first background image based on the target focal distance while maintaining the first subject image based on a first user input for the first background among the first subject or the first background.
[0145] The operating method of the electronic device may further include an operation of obtaining a second background image corresponding to the target focal distance by using a second area obtained by performing an in-facing operation on a part of the first background image corresponding to the target focal distance and a first area corresponding to the first subject image when the target focal distance is longer than the focal distance of the first background. The operating method of the electronic device may further include an operation of obtaining the second background image by using the first background image and a third area obtained by performing an out-facing operation on the first background image when the target focal distance is shorter than the focal distance of the first background. The operating method of the electronic device may further include an operation of obtaining a third image by synthesizing the second background image and the first subject image.
[0146] The method of operating the electronic device may further include an operation of deforming the first subject image based on the target focal distance while maintaining the first background image based on a second user input for the first subject among the first subject or the first background.
[0147] The operating method of the electronic device may further include an operation of obtaining the second subject image by transforming the first subject image based on the target focal distance when the target focal distance is longer than the focal distance of the first subject. The operating method of the electronic device may further include an operation of obtaining the second subject image by transforming the first subject image based on the target focal distance when the target focal distance is shorter than the focal distance of the first subject. The operating method of the electronic device may further include an operation of obtaining the second image by synthesizing the second subject image with the first background image.
[0148] The operating method of the electronic device may further include an operation of performing an in-painting operation on a portion of a first area corresponding to the first subject image to obtain a second background image corresponding to the target focal distance when the target focal distance is shorter than the focal distance of the first subject.
[0149] The operating method of the electronic device may further include an operation of acquiring the second image corresponding to an image in which the focal distance of the first image is increased or decreased based on a direction and distance of a pre-specified user input.
[0150] The operating method of the electronic device may further include an operation of determining the target focal distance based on a distance between a display (260) included in the electronic device and a user.
[0151] According to one embodiment, a computer-readable non-transitory recording medium (130, 230) may store instructions that may execute an operation of obtaining a first image captured based on a first focal length, an operation of confirming a first subject image corresponding to a first subject included in the first image and a first background image corresponding to a first background of the first subject in response to a command to edit the first image, an operation of obtaining a second subject image by deforming the first subject image based on a target focal length using an AI model, and an operation of synthesizing the second subject image deformed based on the target focal length with the first background image or the second background image to obtain a second image corresponding to the target focal length.
[0152] Electronic devices according to the various embodiments disclosed in this document may take various forms. Electronic devices may include, for example, portable communication devices (e.g., smartphones), computer devices, portable multimedia devices, portable medical devices, cameras, wearable devices, or home appliances. Electronic devices according to the embodiments of this document are not limited to the aforementioned devices.
[0153] The various embodiments of this document and the terminology used therein are not intended to limit the technical features described in this document to specific embodiments, but should be understood to include various modifications, equivalents, or substitutes of the embodiments. In connection with the description of the drawings, similar reference numerals may be used for similar or related components. The singular form of a noun corresponding to an item may include one or more of the items, unless the context clearly indicates otherwise. In this document, each of the phrases "A or B", "at least one of A and B", "at least one of A or B", "A, B, or C", "at least one of A, B, and C", and "at least one of A, B, or C" can include any one of the items listed together in the corresponding phrase among those phrases, or all possible combinations thereof. Terms such as "first," "second," or "first" or "second" may be used merely to distinguish one component from another, and do not limit the components in any other respect (e.g., importance or order). When a component (e.g., a first component) is referred to as "coupled" or "connected" to another (e.g., a second component), with or without the terms "functionally" or "communicatively," it means that the component can be connected to the other component directly (e.g., wired), wirelessly, or through a third component.
[0154] The term "module" used in various embodiments of this document may include a unit implemented in hardware, software, or firmware, and may be used interchangeably with terms such as logic, logic block, component, or circuit. A module may be an integral component, or a minimum unit or part of such a component that performs one or more functions. For example, according to one embodiment, a module may be implemented in the form of an application-specific integrated circuit (ASIC).
[0155] Various embodiments of the present document may be implemented as software (e.g., a program (1440)) including one or more instructions stored in a storage medium (e.g., an internal memory (1436) or an external memory (1438)) readable by a machine (e.g., an electronic device (1401)). For example, a processor (e.g., a processor (1420)) of the machine (e.g., an electronic device (1401)) may call at least one instruction among the one or more instructions stored from the storage medium and execute it. This enables the machine to operate to perform at least one function according to the at least one called instruction. The one or more instructions may include code generated by a compiler or code executable by an interpreter. The machine-readable storage medium may be provided in the form of a non-transitory storage medium. Here, 'non-transitory' simply means that the storage medium is a tangible device and does not contain signals (e.g., electromagnetic waves), and the term does not distinguish between cases where data is stored semi-permanently or temporarily on the storage medium.
[0156] According to one embodiment, the method according to various embodiments disclosed in the present document may be provided as included in a computer program product. The computer program product may be traded as a product between a seller and a buyer. The computer program product may be distributed in the form of a machine-readable storage medium (e.g., compact disc read only memory (CD-ROM)), or may be distributed online (e.g., downloaded or uploaded) via an application store (e.g., Play Store™) or directly between two user devices (e.g., smart phones). In the case of online distribution, at least a portion of the computer program product may be temporarily stored or temporarily generated in a machine-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or an intermediary server.
[0157] According to various embodiments, each component (e.g., a module or a program) of the above-described components may include one or more entities, and some of the entities may be separated and placed in other components. According to various embodiments, one or more components or operations of the aforementioned components may be omitted, or one or more other components or operations may be added. Alternatively or additionally, a plurality of components (e.g., a module or a program) may be integrated into a single component. In such a case, the integrated component may perform one or more functions of each of the plurality of components identically or similarly to those performed by the corresponding component among the plurality of components prior to the integration. According to various embodiments, the operations performed by a module, program, or other component may be executed sequentially, in parallel, iteratively, or heuristically, or one or more of the operations may be executed in a different order, omitted, or one or more other operations may be added.
Claims
1. In an electronic device (201), Processor (220); and A memory (230) for storing instructions, wherein the instructions, when executed by the processor, cause the electronic device to: Acquire a first image captured based on the first focal length, In response to a command to edit the first image, a first subject image and a first background image included in the first image are checked, Using an AI model, the first subject image is transformed based on a target focal distance different from the first focal distance to obtain a second subject image, An electronic device set to acquire a second image corresponding to the target focal distance, the second subject image including the second subject image transformed based on the target focal distance.
2. In the first paragraph, the instructions, when executed by the processor, cause the electronic device to: Separating the first subject and the first background included in the first image, Using the above AI model, an in-painting operation or an out-painting operation is performed on a first area corresponding to the first subject image excluded from the first image to obtain a first background image, An electronic device configured to transform at least one of the first subject image or the first background image based on the target focal distance.
3. In any one of paragraphs 1 to 2, the instructions, when executed by the processor, cause the electronic device to: An electronic device configured to transform the first background image based on the target focal distance while maintaining the first subject image based on a first user input regarding the first background among the first subject or the first background.
4. In any one of paragraphs 1 to 3, the instructions, when executed by the processor, cause the electronic device to: If the target focal distance is longer than the focal distance of the first background, a second area is obtained by performing an in-painting operation on a part of the first background image corresponding to the target focal distance and a first area corresponding to the first subject image, and a second background image corresponding to the target focal distance is obtained by using the second area. When the target focal length is shorter than the focal length of the first background, the second background image is obtained by using the first background image and the third area obtained by performing an out-fating operation on the first background image, An electronic device set to obtain a third image by synthesizing the second background image and the first subject image.
5. In any one of paragraphs 1 to 4, the instructions, when executed by the processor, cause the electronic device to: An electronic device configured to transform an image of the first subject based on the target focal distance while maintaining the first background image based on a second user input regarding the first subject among the first subject or the first background.
6. In any one of paragraphs 1 to 5, the instructions, when executed by the processor, cause the electronic device to: If the target focal distance is longer than the focal distance of the first subject, the second subject image is obtained by transforming the first subject image based on the target focal distance, If the target focal distance is shorter than the focal distance of the first subject, the second subject image is obtained by transforming the first subject image based on the target focal distance, An electronic device set to obtain the second image by synthesizing the second subject image with the first background image.
7. In any one of paragraphs 1 to 6, the instructions, when executed by the processor, cause the electronic device to: An electronic device configured to perform an in-painting operation on a portion of a first area corresponding to the first subject image to obtain a second background image corresponding to the target focal distance when the target focal distance is shorter than the focal distance of the first subject.
8. In any one of paragraphs 1 to 7, the instructions, when executed by the processor, cause the electronic device to: An electronic device configured to input information about a lens that captured the first image, an angle of view of the first image, the first focal length, a distance between the first subject and the camera that captured the first image, and the target focal length into the AI model, and to transform at least one of the first subject image or the first background image based on the target focal length.
9. In any one of paragraphs 1 to 8, the instructions, when executed by the processor, cause the electronic device to: An electronic device configured to acquire a second image corresponding to an image having an increased or decreased focal length of the first image based on a direction and distance of a pre-specified user input.
10. In any one of paragraphs 1 to 9, the instructions, when executed by the processor, cause the electronic device to: An electronic device configured to determine the target focal distance based on a distance between a display (260) included in the electronic device and a user.
11. In the operating method of an electronic device (201), An operation of acquiring a first image captured based on a first focal length; In response to a command to edit the first image, an operation of confirming a first subject image corresponding to a first subject included in the first image and a first background image corresponding to a first background of the first subject; An operation of obtaining a second subject image by transforming the first subject image based on the target focal distance using an AI model; and A method of operating an electronic device, comprising: obtaining a second image corresponding to the target focal distance, the second subject image including the second subject image transformed based on the target focal distance.
12. In paragraph 11, An action of separating the first subject and the first background included in the first image; An operation of obtaining a first background image by performing an in-painting operation or an out-painting operation on a first area corresponding to the first subject image excluded from the first image using the above AI model; A method of operating an electronic device further comprising an action of transforming at least one of the first subject image or the first background image based on the target focal distance.
13. In any one of paragraphs 11 to 12, A method of operating an electronic device further comprising: an operation of deforming the first background image based on the target focal distance while maintaining the first subject image based on a first user input for the first background among the first subject or the first background.
14. In any one of paragraphs 11 to 13, An operation of obtaining a second background image corresponding to the target focal distance by using a second area obtained by performing an in-painting operation on a part of the first background image corresponding to the target focal distance and a first area corresponding to the first subject image when the target focal distance is longer than the focal distance of the first background; An operation of obtaining the second background image by using the first background image and the third area obtained by performing an out-fating operation on the first background image when the target focal distance is shorter than the focal distance of the first background; and An operating method of an electronic device further comprising an operation of obtaining a third image by synthesizing the second background image and the first subject image.
15. In any one of paragraphs 11 to 14, A method of operating an electronic device further comprising an action of deforming an image of the first subject based on the target focal distance while maintaining the first background image based on a second user input for the first subject among the first subject or the first background.
Citation Information
Patent Citations
Device and method for transforming image style and computer readable program for the same
KR1020230103855A
Display device and method for manufacturing the display device
KR1020250050191A
Hepatotoxicity Assessment System
KR1020250052833A
Selectively increasing depth-of-field in scenes with multiple regions of interest
US20230012219A1
Systems and methods for generating synthetic depth of field effects
US20230091313A1