Patent Description:
With the growth of digital technologies, a great variety of electronic devices, such as a mobile communication terminal, a personal digital assistant (PDA), a smart phone, and a tablet personal computer (PC), capable of processing wireless communication and various tasks have been popularized.

Normally the electronic device may include at least one camera mounted therein to capture an image, for example, a front camera disposed on the front surface thereof and a rear camera disposed on the rear surface thereof. In some cases, the electronic device may include a plurality of cameras on the front and/or rear surface(s).

In accordance with its abstract, US patent application document <CIT> provides an electronic device. The electronic device includes at least two camera modules, a motion sensor, and a control circuit configured to determine whether a first camera module of the at least two camera modules is activated, and when it is determined that the first camera module of the at least two camera modules is activated, control optical image stabilization of the first camera module using a signal received from the motion sensor.

In accordance with its abstract, European patent application document <CIT> describes that in a method for image stabilization a number of operations are performed to stabilize an image and to output a focal length value. The steps include capturing video by means of a video camera with unknown focal length running an image stabilization process operating on an input from a hardware detector detecting the displacement of the camera and on an adjustable focal length value. Inter-image displacement is corrected based on the input from the hardware detector and the adjustable focal length value. By evaluating the displacement and adjusting the focal length value until a satisfactory image stabilization is achieved a value of the focal length may be output.

In accordance with its abstract, Chinese patent application document <CIT> discloses a vehicle-mounted system and an on-vehicle image adjustment method thereof. The vehicle-mounted image adjustment method comprises the following steps: an on-vehicle image processing device of the on-vehicle system obtains image adjustment parameters of a received image, wherein, the image adjustment parameters include an image mirror direction and an image rotation angle; the received image is adjusted by image mirroring and/or image rotation according to image adjustment parameters. An on-board image processing apparatus is controlled by setting parameters, so that the vehicle-mounted image processing device realizes image vertical mirroring through image horizontal mirroring and image rotation, or horizontal rotation is realized by image vertical mirror image and image rotation. The vehicle-mounted image processing device does not need to have two functions of image vertical mirror image and image horizontal mirror image at the same time, can adjust when the acquired image is deviated, and does not increase the cost of the equipment.

In accordance with aspect of the disclosure is to provide an electronic device to capture an image through the front camera or the rear camera and display the captured image through a display thereof. In the conventional art, it is difficult for the electronic device to flip the captured image. (e.g., left/right switching, top/bottom switching).

Accordingly, an aspect of the disclosure is to provide an electronic device to capture an image through the front camera or the rear camera and display the captured image through a display thereof. In addition, the electronic device may perform a horizontal flip (e.g., left/right switching) and/or vertical flip (e.g., top/bottom switching) of the captured image and store a resultant image in a memory thereof. Also, the electronic device may perform an image stabilization such as a video digital image stabilization (VDIS) of the captured image.

Another aspect of the disclosure is to provide techniques to correct images (e.g., moving images) when an electronic device including front and rear cameras captures the images.

Another aspect of the disclosure is to provide an electronic device and method for correcting images (e.g., moving images) in switching from a front camera to a rear camera and vice versa.

The above and other aspects, features and advantages of certain embodiments of the disclosure will be more apparent from the following description taken in conjunction with the accompanying drawings, in which:.

<FIG> illustrates an electronic device in a network environment according to an embodiment of the disclosure.

Referring to <FIG>, an electronic device <NUM> in a network environment <NUM> may communicate with an electronic device <NUM> via a first network <NUM> (e.g., a short-range wireless communication network), or an electronic device <NUM> or a server <NUM> via a second network <NUM> (e.g., a long-range wireless communication network). The electronic device <NUM> may communicate with the electronic device <NUM> via the server <NUM>. The electronic device <NUM> includes a processor <NUM>, memory <NUM>, an input device <NUM>, an audio output device <NUM>, a display device <NUM>, an audio module <NUM>, a sensor module <NUM>, an interface <NUM>, a haptic module <NUM>, a camera module <NUM>, a power management module <NUM>, a battery <NUM>, a communication module <NUM>, a subscriber identity module (SIM) <NUM>, or an antenna module <NUM>.

The non-volatile memory <NUM> may include an internal memory <NUM> or external memory <NUM>.

The audio output device <NUM> may output sound signals to the outside of the electronic device <NUM>. The audio output device <NUM> may include, for example, a speaker or a receiver. The receiver may be implemented as separate from, or as part of the speaker.

The audio module <NUM> may obtain the sound via the input device <NUM>, or output the sound via the audio output device <NUM> or a headphone of an external electronic device (e.g., an electronic device <NUM>) directly (e.g., wiredly) or wirelessly coupled with the electronic device <NUM>.

A connection terminal <NUM> may include a connector via which the electronic device <NUM> may be physically connected with the external electronic device (e.g., the electronic device <NUM>). The connection terminal <NUM> may include, for example, a HDMI connector, a USB connector, a SD card connector, or an audio connector (e.g., a headphone connector).

According to an embodiment, the camera module <NUM> may include a front camera disposed on the front surface of the electronic device <NUM> and a rear camera disposed on the rear surface of the electronic device <NUM>.

The communication module <NUM> may include one or more communication processors that are operable independently from the processor <NUM> (e.g., the AP) and supports a direct (e.g., wired) communication or a wireless communication. The communication module <NUM> may include a wireless communication module <NUM> (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 <NUM> (e.g., a local area network (LAN) communication module or a power line communication (PLC) module). A corresponding one of these communication modules may communicate with the external electronic device via the first network <NUM> (e.g., a short-range communication network, such as Bluetooth™, wireless-fidelity (Wi-Fi) direct, or a standard of the Infrared Data Association (IrDA)) or the second network <NUM> (e.g., a long-range communication network, such as a cellular network, the Internet, or a computer network (e.g., LAN or wide area network (WAN)). The wireless communication module <NUM> may identify and authenticate the electronic device <NUM> in a communication network, such as the first network <NUM> or the second network <NUM>, using subscriber information (e.g., international mobile subscriber identity (IMSI)) stored in the SIM <NUM>.

The antenna module <NUM> may include an antenna including a radiating element composed of a conductive material or a conductive pattern formed in or on a substrate (e.g., a printed circuit board (PCB)). The antenna module <NUM> may include a plurality of antennas. Another component (e.g., a radio frequency integrated circuit (RFIC)) other than the radiating element may be additionally formed as part of the antenna module <NUM>.

<FIG> illustrates a perspective view showing a front surface of a mobile electronic device according to an embodiment of the disclosure.

<FIG> illustrates a perspective view showing a rear surface of the mobile electronic device shown in <FIG> according to an embodiment of the disclosure.

The electronic device <NUM> of <FIG> may be similar at least in part to the electronic device <NUM> of <FIG>, or may include other embodiments of the electronic device.

Referring to <FIG>, the mobile electronic device <NUM> may include a housing <NUM> that includes a first surface (or front surface) 210A, a second surface (or rear surface) 210B, and a lateral surface 210C that surrounds a space between the first surface 210A and the second surface 210B. The housing <NUM> may refer to a structure that forms a part of the first surface 210A, the second surface 210B, and the lateral surface 210C. The first surface 210A may be formed of a front plate <NUM> (e.g., a glass plate or polymer plate coated with a variety of coating layers) at least a part of which is substantially transparent. The second surface 210B may be formed of a rear plate <NUM> which is substantially opaque. The rear plate <NUM> may be formed of, for example, coated or colored glass, ceramic, polymer, metal (e.g., aluminum, stainless steel (STS), or magnesium), or any combination thereof. The lateral surface 210C may be formed of a lateral bezel structure (or "lateral member") <NUM> which is combined with the front plate <NUM> and the rear plate <NUM> and includes a metal and/or polymer. The rear plate <NUM> and the lateral bezel structure <NUM> may be integrally formed and may be of the same material (e.g., a metallic material such as aluminum).

The front plate <NUM> may include two first regions 210D disposed at long edges thereof, respectively, and bent and extended seamlessly from the first surface 210A toward the rear plate <NUM>. Similarly, the rear plate <NUM> may include two second regions 210E disposed at long edges thereof, respectively, and bent and extended seamlessly from the second surface 210B toward the front plate <NUM>. The front plate <NUM> (or the rear plate <NUM>) may include only one of the first regions 210D (or of the second regions 210E). The first regions 210D or the second regions 210E may be omitted in part. When viewed from a lateral side of the mobile electronic device <NUM>, the lateral bezel structure <NUM> may have a first thickness (or width) on a lateral side where the first region 210D or the second region 210E is not included, and may have a second thickness, being less than the first thickness, on another lateral side where the first region 210D or the second region 210E is included.

The mobile electronic device <NUM> may include at least one of a display <NUM>, audio modules <NUM>, <NUM> and <NUM>, sensor modules <NUM> and <NUM>, camera modules <NUM>, <NUM> and <NUM>, a key input device <NUM>-<NUM>, <NUM>-<NUM>, <NUM>-<NUM>, a light emitting device, and connector holes <NUM> and <NUM>. The mobile electronic device <NUM> may omit at least one (e.g., the key input device <NUM>-<NUM>, <NUM>-<NUM>, <NUM>-<NUM> or the light emitting device) of the above components, or may further include other components.

The display <NUM> may be exposed through a substantial portion of the front plate <NUM>, for example. At least a part of the display <NUM> may be exposed through the front plate <NUM> that forms the first surface 210A and the first region 210D of the lateral surface 210C. The display <NUM> may be combined with, or adjacent to, a touch sensing circuit, a pressure sensor capable of measuring the touch strength (pressure), and/or a digitizer for detecting a stylus pen. At least a part of the sensor modules <NUM> and <NUM> and/or at least a part of the key input device <NUM>-<NUM>, <NUM>-<NUM>, <NUM>-<NUM> may be disposed in the first region 210D and/or the second region 210E.

The audio modules <NUM>, <NUM> and <NUM> may correspond to a microphone hole <NUM> and speaker holes <NUM> and <NUM>, respectively. The microphone hole <NUM> may contain a microphone disposed therein for acquiring external sounds and, in a case, contain a plurality of microphones to sense a sound direction. The speaker holes <NUM> and <NUM> may be classified into an external speaker hole <NUM> and a call receiver hole <NUM>. In some embodiments, microphones <NUM>, speakers, and connector holes <NUM> and <NUM> may be disposed in the space of the electronic device <NUM> and exposed to the outside through at least one hole formed in the housing <NUM>. In some embodiments, the microphone hole <NUM> and the speaker holes <NUM> and <NUM> may be implemented as a single hole. In some embodiments, a speaker (e.g., a piezo speaker) may be provided without the speaker holes <NUM> and <NUM>.

The sensor modules <NUM> and <NUM> may generate electrical signals or data corresponding to an internal operating state of the mobile electronic device <NUM> or to an external environmental condition. The sensor modules <NUM> and <NUM> may include a first sensor module <NUM> (e.g., a proximity sensor) and/or a second sensor module (e.g., a fingerprint sensor) disposed on the first surface 210A of the housing <NUM>, and/or a third sensor module <NUM> (e.g., a heart rate monitor (HRM) sensor) and/or a fourth sensor module (e.g., a fingerprint sensor) disposed on the second surface 210B of the housing <NUM>. The fingerprint sensor may be disposed on the second surface 210B as well as the first surface 210A (e.g., the display <NUM>) of the housing <NUM>. The electronic device <NUM> may further include at least one of a gesture sensor, a gyro sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a color sensor, an infrared (IR) sensor, a biometric sensor, a temperature sensor, a humidity sensor, or an illuminance sensor. According to an embodiment, the electronic device <NUM> may identify gyro data for the electronic device <NUM> through the gyro sensor and, based on the identified gyro data, correct images displayed on the display <NUM>. According to an embodiment, the electronic device <NUM> may correct, based on the gyro data, moving images (or video) captured through the camera modules <NUM>, <NUM>, and <NUM>.

The camera modules <NUM>, <NUM> and <NUM> may include a first camera module <NUM> disposed on the first surface 210A of the electronic device <NUM>, and a second camera module <NUM> and/or a flash <NUM> disposed on the second surface 210B. The camera module <NUM> or the camera module <NUM> may include one or more lenses, an image sensor, and/or an image signal processor. The flash <NUM> may include, for example, a light emitting diode or a xenon lamp. Two or more lenses (infrared cameras, wide angle and telephoto lenses) and image sensors may be disposed on one side of the electronic device <NUM>.

The key input devices <NUM>-<NUM>, <NUM>-<NUM>, and <NUM>-<NUM> may be disposed on the lateral surface 210C of the housing <NUM>. The mobile electronic device <NUM> may not include some or all of the key input devices <NUM>-<NUM>, <NUM>-<NUM>, and <NUM>-<NUM> described above, and the key input device <NUM>-<NUM>, <NUM>-<NUM>, or <NUM>-<NUM> which is not included may be implemented in another form such as a soft key on the display <NUM>. The key input devices <NUM>-<NUM>, <NUM>-<NUM>, and <NUM>-<NUM> may include the sensor module disposed on the second surface 210B of the housing <NUM>. In another embodiment, the key input devices <NUM>-<NUM>, <NUM>-<NUM>, and <NUM>-<NUM> may be implemented using a pressure sensor included in the display <NUM>.

The light emitting device may be disposed on the first surface 210A of the housing <NUM>. For example, the light emitting device may provide status information of the electronic device <NUM> in an optical form. The light emitting device may provide a light source associated with the operation of the camera module <NUM>. The light emitting device may include, for example, a light emitting diode (LED), an IR LED, or a xenon lamp.

The connector holes <NUM> and <NUM> may include a first connector hole <NUM> adapted for a connector (e.g., a USB connector) for transmitting and receiving power and/or data to and from an external electronic device, and/or a second connector hole <NUM> adapted for a connector (e.g., an earphone jack) for transmitting and receiving an audio signal to and from an external electronic device.

Some sensor modules of camera modules <NUM> and <NUM>, some sensor modules <NUM> of sensor modules <NUM> and <NUM>, or an indicator may be arranged to be exposed through a display <NUM>. For example, the camera module <NUM>, the sensor module <NUM>, or the indicator may be arranged in the internal space of an electronic device <NUM> so as to be brought into contact with an external environment through an opening of the display <NUM>, which is perforated up to a front plate <NUM>. In another embodiment, some sensor modules <NUM> may be arranged to perform their functions without being visually exposed through the front plate <NUM> in the internal space of the electronic device. For example, in this case, an area of the display <NUM> facing the sensor module may not require a perforated opening.

<FIG> illustrates an exploded perspective view showing a mobile electronic device shown in <FIG> according to an embodiment of the disclosure.

Referring to <FIG>, the mobile electronic device <NUM> may include a lateral bezel structure <NUM>, a first support member <NUM> (e.g., a bracket), a front plate <NUM>, a display <NUM>, an electromagnetic induction panel, a PCB <NUM>, a battery <NUM>, a second support member <NUM> (e.g., a rear case), an antenna <NUM>, and a rear plate <NUM>. The mobile electronic device <NUM> may omit at least one (e.g., the first support member <NUM> or the second support member <NUM>) of the above components or may further include another component. Some components of the electronic device <NUM> may be the same as or similar to those of the mobile electronic device <NUM> shown in <FIG>, thus, descriptions thereof are omitted below.

The first support member <NUM> is disposed inside the mobile electronic device <NUM> and may be connected to, or integrated with, the lateral bezel structure <NUM>. The first support member <NUM> may be formed of, for example, a metallic material and/or a non-metal (e.g., polymer) material. The first support member <NUM> may be combined with the display <NUM> at one side thereof and also combined with the PCB <NUM> at the other side thereof. On the PCB <NUM>, a processor, a memory, and/or an interface may be mounted. The processor may include, for example, one or more of a CPU, an AP, a GPU, an ISP, a sensor hub processor, or a CP.

The memory <NUM> may include, for example, volatile memory <NUM> or non-volatile memory <NUM>.

The interface may include, for example, a high definition multimedia interface (HDMI), a USB interface, a secure digital (SD) card interface, and/or an audio interface. The interface may electrically or physically connect the mobile electronic device <NUM> with an external electronic device and may include a USB connector, an SD card/multimedia card (MMC) connector, or an audio connector.

The battery <NUM> is a device for supplying power to at least one component of the mobile electronic device <NUM>, and may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell. At least a part of the battery <NUM> may be disposed on substantially the same plane as the PCB <NUM>. The battery <NUM> may be integrally disposed within the mobile electronic device <NUM>, and may be detachably disposed from the mobile electronic device <NUM>.

<FIG> are diagrams illustrating a method of correcting an image when capturing the image through a front camera or a rear camera according to various embodiments of the disclosure.

Referring to <FIG>, it illustrates a method of correcting an image captured using a rear camera (e.g., the rear camera module <NUM> in <FIG>) of an electronic device (e.g., the electronic device <NUM> in <FIG>). According to an embodiment, when the electronic device <NUM> captures a first image <NUM> by using the rear camera module <NUM>, the electronic device <NUM> may identify an exchangeable image file format (EXIF) value <NUM> corresponding to the rear camera module <NUM> at a shooting time. For example, the EXIF value <NUM> is a value for correcting the direction of the captured image and may be set corresponding to at least one camera. According to an embodiment, the EXIF value <NUM> may be set by a developer and stored in a memory (e.g., the memory <NUM> in <FIG>) in the form of a file. According to another embodiment, using a gyro sensor or an acceleration sensor included in a sensor module (e.g., the sensor module <NUM> in <FIG>), the electronic device <NUM> may identify angle information (e.g., posture information and/or direction information) about the electronic device <NUM>. The electronic device <NUM> may store the identified angle information in the memory <NUM>. According to another embodiment, the electronic device <NUM> may store the angle information in at least one field of an EXIF format. The angle information may be a value measured using the gyro sensor or the acceleration sensor. The electronic device <NUM> may calculate the EXIF value, based on the angle information stored in the EXIF format. For example, the electronic device <NUM> may determine a correction direction of the first image <NUM>, based on the EXIF value <NUM> (e.g., about <NUM> degrees) of the rear camera module <NUM>. Then the electronic device <NUM> may correct the first image <NUM> in accordance with the correction direction, store the corrected image <NUM> in the memory <NUM>, and display the corrected image <NUM> through a display (e.g., the display <NUM> in <FIG>). According to another embodiment, the electronic device <NUM> may perform correction on the first image <NUM> in real time and output the corrected image <NUM> through the display <NUM>. According to an embodiment, the electronic device <NUM> may encode the first image <NUM>, based on the EXIF value <NUM> of the rear camera module <NUM>. The electronic device <NUM> may generate the corrected image <NUM> through the encoding and store it in the memory <NUM>. The electronic device <NUM> may display the corrected image <NUM> through the display <NUM>.

Referring to <FIG>, it illustrates a method of correcting an image captured using a front camera (e.g., the front camera module <NUM> in <FIG>) of the electronic device <NUM>. According to an embodiment, when the electronic device <NUM> captures a second image <NUM> by using the front camera module <NUM>, the electronic device <NUM> may identify an EXIF value <NUM> corresponding to the front camera module <NUM> at a shooting time. The electronic device <NUM> may determine a correction direction of the second image <NUM>, based on the EXIF value <NUM> (e.g., about <NUM> degrees) of the front camera module <NUM>. Then the electronic device <NUM> may correct the second image <NUM> in accordance with the correction direction, store the corrected image <NUM> in the memory <NUM>, and display the corrected image <NUM> through the display <NUM>. According to another embodiment, the electronic device <NUM> may perform correction on the second image <NUM> in real time and output the corrected image <NUM> through the display <NUM>. According to an embodiment, the electronic device <NUM> may encode the second image <NUM>, based on the EXIF value <NUM> of the front camera module <NUM>. The electronic device <NUM> may generate the corrected image <NUM> through the encoding and store it in the memory <NUM>. The electronic device <NUM> may display the corrected image <NUM> through the display <NUM>.

<FIG> is a diagram illustrating an image correction method in switching from a rear camera to a front camera according to an embodiment of the disclosure.

Referring to <FIG>, when the electronic device <NUM> shoots using the rear camera module <NUM>, the first image <NUM> may be substantially generated. Then, the electronic device <NUM> may correct the first image <NUM>, based on an EXIF value corresponding to the rear camera module <NUM>. When the electronic device <NUM> shoots using the front camera module <NUM>, the second image <NUM> may be substantially generated. Then, the electronic device <NUM> may correct the second image <NUM>, based on an EXIF value corresponding to the front camera module <NUM>.

According to various embodiments, when camera switching is performed, the electronic device <NUM> may correct an image captured by a certain camera, based on a set EXIF value. For example, the set EXIF value may be determined corresponding to the camera being capturing the image at a shooting time. According to an embodiment, when the camera switching is done from the rear camera module <NUM> to the front camera module <NUM>, the electronic device <NUM> may identify the EXIF value <NUM> (e.g., about <NUM> degrees) corresponding to the rear camera module <NUM> and, based on the identified EXIF value <NUM>, correct the captured image.

Referring to <FIG>, the electronic device <NUM> may decode the first image <NUM> captured by the rear camera module <NUM>, based on the EXIF value <NUM>, and thereby generate a third image <NUM>. Then the electronic device <NUM> may store the third image <NUM> in the memory <NUM>.

Referring to <FIG>, the electronic device <NUM> may decode the second image <NUM> captured by the front camera module <NUM>, based on the EXIF value <NUM>, and thereby generate a fourth image <NUM>. Then the electronic device <NUM> may store the fourth image <NUM> in the memory <NUM>.

According to various embodiments, the electronic device <NUM> may capture the first image <NUM> by using the rear camera module <NUM> and, based on the EXIF value <NUM>, decode the captured first image <NUM>. According to an embodiment, while capturing the first image <NUM> by using the rear camera module <NUM>, the electronic device <NUM> may identify a camera switching command <NUM> and switch from the rear camera module <NUM> to the front camera module <NUM>. Then, the electronic device <NUM> may capture the second image <NUM> by using the front camera module <NUM> and, based on the EXIF value <NUM>, decode the captured second image <NUM> into the fourth image <NUM>. The electronic device <NUM> may store the fourth image <NUM> in the memory <NUM>.

According to various embodiments, when switching from the rear camera module <NUM> to the front camera module <NUM>, the second image <NUM> captured using the front camera module <NUM> needs to be corrected to meet the user's intention. The second image <NUM> may be corrected based on at least one of an EXIF value or angle information (e.g., posture information and/or direction information) of the electronic device <NUM>. According to an embodiment, the electronic device <NUM> may identify a command of switching from the rear camera module <NUM> to the front camera module <NUM> and, in response to the command, identify the angle information (e.g., posture information and/or direction information) of the electronic device <NUM> through at least one sensor (e.g., the sensor module <NUM> in <FIG>). Then, based on the identified angle information, the electronic device <NUM> may decode an image captured through the front camera module <NUM> and store the decoded image in the memory <NUM>.

<FIG> is a block diagram illustrating a camera module according to an embodiment of the disclosure.

Referring to <FIG>, in the block diagram <NUM>, the camera module <NUM> may include a lens assembly <NUM>, a flash <NUM>, an image sensor <NUM>, an image stabilizer <NUM>, a memory <NUM> (e.g., a buffer memory), and/or an image signal processor <NUM>. The lens assembly <NUM> may collect light reflected from an object which is a target to be image-captured. The lens assembly <NUM> may include one or more lenses. According to an embodiment, the camera module <NUM> may include a plurality of the lens assemblies <NUM>. The camera module <NUM> may be, for example, a dual camera, a <NUM>-degree camera, or a spherical camera. The plurality of lens assemblies <NUM> may have the same lens attributes (e.g., a view angle, a focal length, an auto focus, an f-number, and/or an optical zoom), or at least one lens assembly may have one or more lens attributes different from those of the other lens assemblies. The lens assembly <NUM> may include, for example, a wide-angle lens or a telephoto lens. The flash <NUM> may emit light to enhance light reflected from the object. The flash <NUM> may include one or more light emitting diodes (LEDs) (e.g., a red-green-blue (RGB) LED, a white LED, an infrared (IR) LED, or an ultraviolet (UV) LED) or a xenon lamp.

According to various embodiments, the image sensor <NUM> may convert light, collected from the object through the lens assembly <NUM>, into an electrical signal and thereby acquire an image corresponding to the object. According to an embodiment, the image sensor <NUM> may include one image sensor selected from image sensors having different attributes, such as an RGB sensor, a black-and-white (BW) sensor, an IR sensor, or a UV sensor, a plurality of image sensors having the same attributes, or a plurality of image sensors having different attributes. The image sensor <NUM> may be implemented as, for example, a charged coupled device (CCD) sensor or a complementary metal oxide semiconductor (CMOS) sensor. According to an embodiment, the image sensor <NUM> may correct, at least in part, an image captured through the camera module <NUM>. For example, the image sensor <NUM> may switch the left/right or top/bottom of the captured image. According to an embodiment, the image sensor <NUM> may be a plurality of image sensors and may include a first image sensor corresponding to a front camera (e.g., the front camera module <NUM> in <FIG>) included in the camera module <NUM> and/or a second image sensor corresponding to a rear camera (e.g., the rear camera module <NUM> in <FIG>).

According to various embodiments, in response to a movement of the camera module <NUM> or the electronic device <NUM>, the image stabilizer <NUM> may move the image sensor <NUM> or at least one lens included in the lens assembly <NUM> in a particular direction or control it (e.g., adjust a read-out timing) so as to at least partially compensate for a negative effect (e.g., image blurring) by the movement on an image being captured. According to an embodiment, the image stabilizer <NUM> may be implemented as, for example, an optical image stabilizer and may detect the movement of the electronic device <NUM> by using a gyro sensor (not shown) or an acceleration sensor (not shown) disposed inside or outside the camera module <NUM>. According to an embodiment, the image stabilizer <NUM> may identify the read-out timing for correcting a rolling shutter (RS) by using the gyro sensor or the acceleration sensor and, based on the identified read-out timing, perform the RS correction.

According to various embodiments, in correcting a captured image, the electronic device <NUM> may perform a motion correction based on the top/bottom or left/right switching of the captured image and/or an RS correction based on the read-out timing.

According to various embodiments, the memory <NUM> may store, at least temporarily, at least a part of an image acquired through the image sensor <NUM> for a subsequent image processing task. For example, if image acquisition is delayed due to shutter lag, or if multiple images are quickly acquired, the acquired original image (e.g., a high-resolution image) may be stored in the memory <NUM>, and a corresponding copy image (e.g., a low-resolution image) may be previewed through the display <NUM> (e.g., the display device <NUM> in <FIG>). According to an embodiment, the electronic device <NUM> may capture a first image by using at least one camera (e.g., the front camera and/or the rear camera) and store the first image in the memory <NUM>. The electronic device <NUM> may identify an EXIF value corresponding to the at least one camera and correct the first image into a second image, based on the EXIF value. The electronic device <NUM> may store the second image in the memory <NUM>. According to an embodiment, when a specified condition is satisfied (e.g., when a predetermined user input or system command is received), the electronic device <NUM> may acquire and process at least a part of the original image, stored in the memory <NUM>, through the image signal processor <NUM>. According to an embodiment, the memory <NUM> may be configured as at least a part of the memory <NUM> shown in <FIG> or as a separate memory that is operated independently from the memory <NUM>.

According to various embodiments, the image signal processor <NUM> may perform image processing on an image acquired through the image sensor <NUM> or an image stored in the memory <NUM>. The image processing may include, for example, depth map generation, three-dimensional (3D) modeling, panorama generation, feature point extraction, image synthesizing, and/or image compensation (e.g., noise reduction, resolution adjustment, brightness adjustment, blurring, sharpening, or softening). Additionally or alternatively, the image signal processor <NUM> may perform control (e.g., exposure time control or read-out timing control) for at least one component (e.g., the image sensor <NUM>) included in the camera module <NUM>. An image processed by the image signal processor <NUM> may be stored again in the memory <NUM> for further processing or delivered to an external component (e.g., the memory <NUM>, the display device <NUM>, the electronic device <NUM>, the electronic device <NUM>, or the server <NUM>) outside the camera module <NUM>. According to an embodiment, although not shown, the image signal processor <NUM> may be configured as at least a part of the processor <NUM> or as a separate processor that is operated independently from the processor <NUM> and the camera module <NUM>. In the latter case, an image processed by the image signal processor <NUM> may be stored in the memory <NUM> as it is or after being further processed by the processor <NUM>. An image stored in the memory <NUM> may be displayed through the display device <NUM>. According to an embodiment, the image signal processor <NUM> may correct an image captured through at least one camera and store the corrected image in the memory <NUM>. According to an embodiment, the image signal processor <NUM> may identify a set EXIF value corresponding to the camera module <NUM> and, based on the identified EXIF value, perform top/bottom/left/right switching of a captured image.

According to an embodiment, the electronic device <NUM> may include two or more camera modules <NUM> having different attributes or functions. In this case, at least one camera module may be a wide-angle camera or a front camera, and the other camera module(s) may be a telephoto camera or a rear camera. According to an embodiment, the camera module <NUM> may include a front camera (e.g., the front camera module <NUM> in <FIG>) disposed on the front surface of the electronic device <NUM> and a rear camera (e.g., the rear camera module <NUM> in <FIG>) disposed on the rear surface of the electronic device <NUM>.

According to various embodiments, a flip direction (e.g., a vertical flip and/or a horizontal flip) for the electronic device <NUM> may be changed corresponding to a mounting direction of the image sensor <NUM>. Specifically, when the mounting direction of the image sensor <NUM> is changed, an axis for flipping an image may be changed, and thus the flip direction for the electronic device <NUM> may also be changed. For example, when the image sensor <NUM> is mounted after being rotated by about <NUM> degrees, the electronic device <NUM> may perform a vertical flip based on Y-axis motion information instead of performing a vertical flip based on X-axis motion information. In an embodiment disclosed herein, the electronic device <NUM> performs a vertical flip and then performs a horizontal flip in response to switching from the front camera module <NUM> to the rear camera module <NUM>, but this flip sequence is only an example. According to an embodiment, a flip direction of an image may be varied depending on the mounting direction of the image sensor <NUM>.

According to various embodiments, an electronic device (e.g., the electronic device <NUM> in <FIG> or the electronic device <NUM> in <FIG>) may include a housing (e.g., the housing <NUM> in <FIG>) including a front plate (e.g., the front plate <NUM> in <FIG>), a rear plate (e.g., the rear plate <NUM> in <FIG>) opposed to and spaced apart from the front plate <NUM>, and a lateral member (e.g., the lateral member <NUM> in <FIG>) surrounding a space between the front plate <NUM> and the rear plate <NUM>; a camera module (e.g., the camera module <NUM> in <FIG>) including a first camera (e.g., the first camera module <NUM> in <FIG>) disposed in the space and performing shooting based on a first direction corresponding to the front plate <NUM>, a second camera (e.g., the second camera module <NUM> in <FIG>) disposed in the space and performing shooting based on a second direction corresponding to the rear plate <NUM>, and an image signal processor (e.g., the image signal processor <NUM> in <FIG>) for correcting images captured using at least one of the first camera module <NUM> or the second camera module <NUM>; a memory (e.g., the memory <NUM> in <FIG>); a gyro sensor; and/or a processor (e.g., the processor <NUM> in <FIG>) operatively connected to the camera module <NUM>, the memory <NUM>, and the gyro sensor.

According to various embodiments, the processor <NUM> may be configured to control at least one of the first camera module <NUM> or the second camera module <NUM> to capture images, to identify a camera switching command while capturing the images, to acquire gyro motion information through the gyro sensor in response to the camera switching command, and to control the image signal processor <NUM> to correct the captured images, based on the acquired gyro motion information.

According to an embodiment, the gyro motion information may include X-axis motion information, Y-axis motion information, and Z-axis motion information, and the processor <NUM> may be further configured to perform a vertical flip for the images, based on the Y-axis motion information and the Z-axis motion information, and to perform a horizontal flip for the images, based on the X-axis motion information and the Z-axis motion information.

According to an embodiment, the processor <NUM> may be further configured to, in case of performing the vertical flip for the images, change a motion direction for the Y-axis motion information and the Z-axis motion information, and to correct the images by vertically flipping the images, based on the changed motion direction.

According to an embodiment, the processor <NUM> may be further configured to, in case of performing the horizontal flip for the images, change a motion direction for the X-axis motion information and the Z-axis motion information, and to correct the images by horizontally flipping the images, based on the changed motion direction.

According to an embodiment, the processor <NUM> may be further configured to determine whether an option for capturing the images as previewed is activated, and to perform the horizontal flip for the images when the option is activated.

According to various embodiments, the X-axis motion information may include motion direction information corresponding to an X-axis of coordinates, the Y-axis motion information may include motion direction information corresponding to a Y-axis of the coordinates, and the Z-axis motion information may include rotation information corresponding to a Z-axis of the coordinates.

<FIG> is a diagram illustrating a change in a read-out direction during a horizontal flip of an image according to an embodiment of the disclosure.

Referring to <FIG>, when capturing an image by using a camera module (e.g., the camera module <NUM> in <FIG>), a processor (e.g., the processor <NUM> in <FIG>) of an electronic device (e.g., the electronic device <NUM> in <FIG>) may perform a horizontal flip (e.g., left/right switching) of the captured image. For example, the horizontal flip may be an operation of switching the left/right of an image. According to an embodiment, the processor <NUM> may perform the horizontal flip of a first image <NUM> captured through the camera module <NUM> and thereby generate a second image <NUM>. The processor <NUM> may store the generated second image <NUM> in a memory (e.g., the memory <NUM> in <FIG>). The processor <NUM> may display the second image <NUM> through a display (e.g., the display device <NUM> in <FIG>). According to an embodiment, the processor <NUM> may store the first image <NUM> or the second image <NUM> in the memory <NUM>.

According to an embodiment, the processor <NUM> may acquire gyro motion information about the first image <NUM> (e.g., motion information <NUM> about the X-axis, motion information <NUM> about the Y-axis, and/or rotation information <NUM> about the Z-axis). For example, the motion information <NUM> about the X-axis may include motion direction information (e.g., from left to right, from right to left) corresponding to the X-axis of the coordinates, and the motion information <NUM> about the Y-axis may include motion direction information (e.g., from top to bottom, from bottom to top) corresponding to the Y-axis of the coordinates.

According to an embodiment, the processor <NUM> may display the first image <NUM> on the display device <NUM>, based on the gyro motion information. Specifically, the processor <NUM> may identify a read-out direction <NUM> and/or a read-out order for the first image <NUM>, based on the gyro motion information. The read-out direction may include direction information on whether to output an image from left to right or from right to left. The read-out order may include order information on whether to output an image from top to bottom or from bottom to top. According to an embodiment, the processor <NUM> may determine the read-out direction <NUM> for the first image <NUM> as a first direction (e.g., from left to right), based on the motion information <NUM> about the X-axis. In addition, based on the motion information <NUM> about the Y-axis, the processor <NUM> may identify that the read-out order for the first image <NUM> is from top to bottom. According to an embodiment, based on the rotation information <NUM> about the Z-axis included in the gyro motion information, the processor <NUM> may identify whether a horizontal flip (e.g., rotation to reverse the left/right of an image around the Y-axis) or a vertical flip (e.g., rotation to reverse the top/bottom of an image around the X-axis) has occurred for the first image <NUM>. A change in the rotation information <NUM> about the Z-axis means that at least one of the horizontal flip or the vertical flip has occurred for an image.

According to an embodiment, the processor <NUM> may convert the first image <NUM> into the second image <NUM> in response to a horizontal flip command for the captured image. According to an embodiment, the horizontal flip command may change the motion information <NUM> about the X-axis and the rotation information <NUM> about the Z-axis in the gyro motion information. For example, the processor <NUM> may change the gyro motion information about the first image <NUM> to the gyro motion information about the second image <NUM>. According to an embodiment, in case of the horizontal flip, the processor <NUM> may change the read-out direction to the opposite direction. For example, when the read-out direction is a first read-out direction <NUM> (e.g., from left to right), the read-out direction may be changed to a second read-out direction <NUM> (e.g., from right to left) upon reception of the horizontal flip command. According to an embodiment, in response to the horizontal flip command, the processor <NUM> may change the motion information <NUM> about the X-axis and the rotation information <NUM> about the Z-axis in opposite directions.

According to an embodiment, the processor <NUM> may acquire gyro motion information about the second image <NUM> (e.g., motion information <NUM> about the X-axis, motion information <NUM> about the Y-axis, and/or rotation information <NUM> about the Z-axis). According to an embodiment, compared to those of the gyro motion information about the first image <NUM>, the motion information <NUM> about the X-axis and the rotation information <NUM> about the Z-axis may be changed in the gyro motion information about the second image <NUM>. According to an embodiment, in response to the horizontal flip command, the processor <NUM> may change the gyro motion information about the first image <NUM> to the gyro motion information about the second image <NUM> and also display the second image <NUM> on the display device <NUM>. For example, the processor <NUM> may determine the read-out direction <NUM> for the second image <NUM> as a second direction (e.g., from right to left), based on the motion information <NUM> about the X-axis. In addition, based on the motion information <NUM> about the Y-axis, the processor <NUM> may identify that the read-out order for the second image <NUM> is from top to bottom.

According to an embodiment, the electronic device <NUM> may perform the horizontal flip for an image by controlling an image signal processor (e.g., the image signal processor <NUM> in <FIG>) of the camera module <NUM>.

According to another embodiment, the electronic device <NUM> may perform the horizontal flip for an image by controlling an application processor (AP).

<FIG> is a diagram illustrating a change in a read-out direction during a vertical flip of an image according to an embodiment of the disclosure.

Referring to <FIG>, when capturing an image by using a camera module (e.g., the camera module <NUM> in <FIG>), a processor (e.g., the processor <NUM> in <FIG>) of an electronic device (e.g., the electronic device <NUM> in <FIG>) may perform a vertical flip (e.g., top/bottom switching) of the captured image. For example, the vertical flip may be an operation of switching the top/bottom of an image. According to an embodiment, the processor <NUM> may perform the vertical flip of a first image <NUM> captured through the camera module <NUM> and thereby generate a second image <NUM>. The processor <NUM> may store the generated second image <NUM> in a memory (e.g., the memory <NUM> in <FIG>). The processor <NUM> may display the second image <NUM> through a display (e.g., the display device <NUM> in <FIG>). According to an embodiment, the processor <NUM> may store the first image <NUM> or the second image <NUM> in the memory <NUM>.

According to an embodiment, the processor <NUM> may acquire gyro motion information about the first image <NUM> (e.g., motion information <NUM> about the X-axis, motion information <NUM> about the Y-axis, and/or rotation information <NUM> about the Z-axis). According to an embodiment, the processor <NUM> may display the first image <NUM> on the display device <NUM>, based on the acquired gyro motion information. Specifically, the processor <NUM> may identify a read-out direction <NUM> and/or a read-out order for the first image <NUM>, based on the gyro motion information. The read-out direction may include direction information on whether to output an image from left to right or from right to left. The read-out order may include order information on whether to output an image from top to bottom or from bottom to top. According to an embodiment, the processor <NUM> may determine the read-out direction <NUM> for the first image <NUM> as a first direction (e.g., from left to right), based on the motion information <NUM> about the X-axis. In addition, based on the motion information <NUM> about the Y-axis, the processor <NUM> may identify that the read-out order for the first image <NUM> is from top <NUM> to bottom <NUM>. According to an embodiment, based on the rotation information <NUM> about the Z-axis included in the gyro motion information, the processor <NUM> may identify whether a horizontal flip (e.g., rotation to reverse the left/right of an image around the Y-axis) or a vertical flip (e.g., rotation to reverse the top/bottom of an image around the X-axis) has occurred for the first image <NUM>. A change in the rotation information <NUM> about the Z-axis means that at least one of the horizontal flip or the vertical flip has occurred for an image.

According to an embodiment, the processor <NUM> may convert the first image <NUM> into the second image <NUM> in response to a vertical flip command for the captured image. According to an embodiment, the vertical flip command may change the motion information <NUM> about the Y-axis and the rotation information <NUM> about the Z-axis in the gyro motion information. For example, the processor <NUM> may change the gyro motion information about the first image <NUM> to the gyro motion information about the second image <NUM>. According to an embodiment, in case of the vertical flip, the processor <NUM> may change the read-out order to the opposite order. For example, when the read-out order is a first direction (e.g., from top to bottom), the read-out order may be changed to a second direction (e.g., from bottom to top) upon reception of the vertical flip command. According to an embodiment, in response to the vertical flip command, the processor <NUM> may change the motion information <NUM> about the Y-axis and the rotation information <NUM> about the Z-axis in opposite directions.

According to an embodiment, the processor <NUM> may acquire gyro motion information about the second image <NUM> (e.g., motion information <NUM> about the X-axis, motion information <NUM> about the Y-axis, and/or rotation information <NUM> about the Z-axis). According to an embodiment, compared to those of the gyro motion information about the first image <NUM>, the motion information <NUM> about the Y-axis and the rotation information <NUM> about the Z-axis may be changed in the gyro motion information about the second image <NUM>. According to an embodiment, in response to the vertical flip command, the processor <NUM> may change the gyro motion information about the first image <NUM> to the gyro motion information about the second image <NUM> and also display the second image <NUM> on the display device <NUM>. For example, the processor <NUM> may determine the read-out order for the second image <NUM> as a second direction (e.g., from bottom to top), based on the motion information <NUM> about the Y-axis. In addition, based on the motion information <NUM> about the X-axis, the processor <NUM> may identify that the read-out direction for the second image <NUM> is from left to right.

<FIG> is a diagram illustrating a change in order of gyro data for correcting a rolling shutter (RS) in switching between front and rear cameras according to an embodiment of the disclosure.

According to various embodiments, an electronic device (e.g., the electronic device <NUM> in <FIG>) may correct an image by using one of an image signal processor (ISP) (e.g., the image signal processor <NUM> in <FIG>) included in a camera module (e.g., the camera module <NUM> in <FIG>) or an application processor (AP) (e.g., the main processor <NUM> in <FIG>). According to an embodiment, in switching between the front and rear cameras, one of the image signal processor <NUM> or the application processor may correct, at least in part, an image captured through the camera module <NUM>. According to an embodiment, the image signal processor <NUM> may control a plurality of image sensors that may include a first image sensor corresponding to the front camera and a second image sensor corresponding to the rear camera. According to an embodiment, when the front camera captures an image, the first image sensor may correct the image captured by the front camera. If camera switching is made from the front camera to the rear camera, the second image sensor may correct an image captured by the rear camera.

According to an embodiment, when an image is corrected by the image signal processor <NUM>, the image signal processor <NUM> may identify a read-out direction (e.g., from left to right, from right to left) and a read-out order (e.g., from top to bottom, from bottom to top), based on gyro motion information. According to an embodiment, the image signal processor <NUM> may display an image corrected based on the read-out direction and the read-out order. According to an embodiment, the image correction by the image signal processor <NUM> may be performed in consideration of only the read-out direction and the read-out order. According to an embodiment, the image signal processor <NUM> may perform a motion correction <NUM> based on the gyro motion information.

According to an embodiment, when an image is corrected by the application processor, the application processor may perform both the motion correction <NUM> based on the gyro motion information and a rolling shutter (RS) correction <NUM> based on gyro data. For example, the gyro data may include an RS correction value, and the RS correction value may include timing information of a read-out performed for each line when corrected images are generated. For example, the corrected image may be displayed/outputted for each line, based on the read-out timing corresponding to each line. According to an embodiment, the application processor may perform the RS correction <NUM> based on the gyro data including the RS correction value so that the image is not distorted. According to an embodiment, the application processor may change the order of the gyro data and perform the RS correction <NUM>.

Referring to <FIG>, the electronic device <NUM> may perform both the motion correction <NUM> and the RS correction <NUM> when generating an image in case of camera switching between the front and rear cameras. For example, the motion correction <NUM> may be performed to switch the left/right/top/bottom of an image, based on gyro motion information (e.g., motion information about the X-axis, motion information about the Y-axis, and/or rotation information about the-Z axis). The motion correction <NUM> may include a horizontal flip for switching the left/right of an image, based on the motion information about the X-axis and the rotation information about the Z-axis, and/or a vertical flip for switching the top/bottom of an image, based on the motion information about the Y-axis and the rotation information about the Z-axis. The RS correction <NUM> may be performed to correct an image, based on a read-out timing included in gyro data, so that the image is not distorted. According to an embodiment, the RS correction <NUM> may change the order of read-out timing included in the gyro data to the reverse order and display an image in accordance with the changed order of read-out timing.

According to an embodiment, the electronic device <NUM> may perform the motion correction under the control of the image signal processor <NUM> of the camera module <NUM>. According to an embodiment, the electronic device <NUM> may perform both the motion correction and the RS correction under the control of the application processor (e.g., the image signal processor <NUM> in <FIG>).

According to various embodiments, an electronic device (e.g., the electronic device <NUM> in <FIG> or the electronic device <NUM> in <FIG>) may include a housing (e.g., the housing <NUM> in <FIG>) including a front plate (e.g., the front plate <NUM> in <FIG>), a rear plate (e.g., the rear plate <NUM> in <FIG>) opposed to and spaced apart from the front plate <NUM>, and a lateral member (e.g., the lateral member <NUM> in <FIG>) surrounding a space between the front plate <NUM> and the rear plate <NUM>; a first camera (e.g., the first camera module <NUM> in <FIG>) disposed in the space and performing shooting based on a first direction corresponding to the front plate <NUM>; a second camera (e.g., the second camera module <NUM> in <FIG>) disposed in the space and performing shooting based on a second direction corresponding to the rear plate <NUM>; a memory (e.g., the memory <NUM> in <FIG>); a gyro sensor; and an application processor (e.g., the processor <NUM> in <FIG>) operatively connected to the first camera module <NUM>, the second camera module <NUM>, the memory <NUM>, and the gyro sensor, and correcting images captured using at least one of the first camera module <NUM> or the second camera module <NUM>.

According to various embodiments, the application processor <NUM> may be configured to control at least one of the first camera module <NUM> or the second camera module <NUM> to capture images, to identify a camera switching command while capturing the images, to acquire gyro motion information through the gyro sensor in response to the camera switching command, to calculate a rolling shutter (RS) correction value corresponding to the acquired gyro motion information, and to correct the captured images, based on the acquired gyro motion information and the calculated RS correction value.

According to an embodiment, the gyro motion information may include X-axis motion information, Y-axis motion information, and Z-axis motion information, and the application processor may be further configured to perform a vertical flip for the images, based on the Y-axis motion information and the Z-axis motion information, and to perform a horizontal flip for the images, based on the X-axis motion information and the Z-axis motion information.

According to an embodiment, the application processor may be further configured to, in case of performing the vertical flip for the images, change a motion direction for the Y-axis motion information and the Z-axis motion information, and to correct the images by vertically flipping the images, based on the changed motion direction and the calculated RS correction value.

According to an embodiment, the application processor may be further configured to, in case of performing the horizontal flip for the images, change a motion direction for the X-axis motion information and the Z-axis motion information, and to correct the images by horizontally flipping the images, based on the changed motion direction and the calculated RS correction value.

According to an embodiment, the application processor is further configured to determine whether an option for capturing the images as previewed is activated, and to perform the horizontal flip for the images when the option is activated.

<FIG> is a flow diagram illustrating a method of correcting an image in camera switching according to an embodiment of the disclosure.

Referring to <FIG>, at operation <NUM>, a processor (e.g., the processor <NUM> in <FIG>) of an electronic device (e.g., the electronic device <NUM> in <FIG>) may control one of a front camera (e.g., the front camera module <NUM> in <FIG>) or a rear camera (e.g., the rear camera module <NUM> in <FIG>) to capture images (e.g., moving images). Specifically, the electronic device <NUM> may execute a camera-related application, select one of the front camera module <NUM> or the rear camera module <NUM> through the camera-related application, and control the selected camera to capture images. For example, the electronic device <NUM> may identify an EXIF value corresponding to the selected camera and, based on the identified EXIF value, correct the captured images.

At operation <NUM>, the electronic device <NUM> may identify a camera switching command. For example, the camera switching command may refer to a command of switching from the front camera module <NUM> to the rear camera module <NUM> or a command of switching from the rear camera module <NUM> to the front camera module <NUM>. For example, the electronic device <NUM> may identify the camera switching command from a user input. According to an embodiment, the electronic device <NUM> may receive the camera switching command while capturing images. The captured images may be stored in a memory (e.g., the memory <NUM> in <FIG>) of the electronic device <NUM>.

At operation <NUM>, in response to the camera switching command, the electronic device <NUM> may acquire motion information (e.g., X-axis motion information, Y-axis motion information, and/or Z-axis motion (rotation) information) about the electronic device <NUM> through at least one sensor (e.g., a gyro sensor or an acceleration sensor). For example, the electronic device <NUM> may acquire angle information (e.g., posture information and/or direction information) about the electronic device <NUM>.

At operation <NUM>, the electronic device <NUM> may correct the captured image, based on the acquired motion information. Specifically, the electronic device <NUM> may determine one of the front camera module <NUM> or the rear camera module <NUM> in response to the camera switching command. Then the electronic device <NUM> may correct images captured through the determined camera, based on the acquired motion information. For example, the electronic device <NUM> may perform a vertical flip or horizontal flip of the captured images and also perform an image stabilization of the captured images. In addition, the electronic device <NUM> may perform a rolling shutter (RS) correction on the captured images. According to an embodiment, in response to the camera switching command, the electronic device <NUM> may correct the captured images to meet a user's intention. According to an embodiment, the electronic device <NUM> may have an option for capturing images as previewed (e.g., a "save as previewed" option). In this case, the electronic device <NUM> may determine whether the option for capturing images as previewed is activated. If the option is activated, the electronic device <NUM> may perform the horizontal flip of the captured images.

Although not shown, the electronic device <NUM> may store the corrected images in a memory (e.g., the memory <NUM> in <FIG>). Also, the electronic device <NUM> may display the corrected images through a display (e.g., the display device <NUM> in <FIG>). For example, the electronic device <NUM> may determine a procedure for outputting images, based on the motion information acquired at the operation <NUM>, and display the corrected images in accordance with the determined procedure.

<FIG> is a flow diagram illustrating a method of correcting an image through an image signal processor of a camera module according to an embodiment of the disclosure. That is, <FIG> illustrates a process of performing a motion correction under the control of the image signal processor of the camera module in an electronic device.

Referring to <FIG>, at operation <NUM>, a processor (e.g., the processor <NUM> in <FIG>) of an electronic device (e.g., the electronic device <NUM> in <FIG>) may identify a camera switching command for front and rear cameras during shooting. For example, while capturing images by using one of a front camera (e.g., the front camera module <NUM> in <FIG>) or a rear camera (e.g., the rear camera module <NUM> in <FIG>), the electronic device <NUM> may identify the camera switching command for the front/rear cameras. For example, the electronic device <NUM> may execute a camera-related application and identify a camera switching command for the front and rear cameras through the camera-related application.

At operation <NUM>, in response to the camera switching command, an image signal processor (e.g., the image signal processor <NUM> in <FIG>) included in a camera module (e.g., the camera module <NUM> in <FIG>) of the electronic device <NUM> may perform a vertical flip for a corrected image (e.g., a second image) of a first image being captured through the camera module <NUM>. For example, the image signal processor <NUM> may acquire gyro motion information about the first image (e.g., motion information about the X-axis, motion information about the Y-axis, and/or motion information about the Z-axis). The gyro motion information may include motion information corresponding to the front camera module <NUM> and motion information corresponding to the rear camera module <NUM> and may be stored in a memory (e.g., the memory <NUM> in <FIG>) of the electronic device <NUM>.

At operation <NUM>, the image signal processor <NUM> may change directions of the Y-axis motion information and the Z-axis motion information included in the gyro motion information. According to an embodiment, when performing the vertical flip for images, the image signal processor <NUM> may change the directions of the Y-axis motion information and the Z-axis motion information (e.g., Z-axis rotation information) included in the gyro motion information. For example, when the Y-axis motion information has a first direction from top to bottom, the image signal processor <NUM> may change the first direction of the Y-axis motion information to a second direction from bottom to top by the vertical flip. The vertical flip may be an operation of changing each direction of the Y-axis motion information and the Z-axis motion information from a predetermined direction to the opposite direction. The image signal processor <NUM> may change each direction of the Y-axis motion information and the Z-axis motion information to the reverse direction (i.e., the opposite direction).

At operation <NUM>, the electronic device <NUM> may determine whether a "save as previewed" option is activated. In general, when the electronic device <NUM> captures a first image and generates a corrected image (second image), the left/right of an object may be switched. Thus, when the "save as previewed" option is activated, the image signal processor <NUM> may perform a horizontal flip for the image at operation <NUM>. If the "save as previewed" option is not activated, the electronic device <NUM> may skip the horizontal flip.

At operation <NUM>, the image signal processor <NUM> may perform the horizontal flip for the corrected image (second image) of the first image being captured through the camera module <NUM>.

At operation <NUM>, the image signal processor <NUM> may change directions of the X-axis motion information and the Z-axis motion information included in the gyro motion information. According to an embodiment, when performing the horizontal flip for images, the image signal processor <NUM> may change the directions of the X-axis motion information and the Z-axis motion information (e.g., Z-axis rotation information) included in the gyro motion information. For example, when the X-axis motion information has a first direction from left to right, the image signal processor <NUM> may change the first direction of the X-axis motion information to a second direction from right to left by the horizontal flip. The horizontal flip may be an operation of changing each direction of the X-axis motion information and the Z-axis motion information from a predetermined direction to the opposite direction. The image signal processor <NUM> may change each direction of the X-axis motion information and the Z-axis motion information to the reverse direction (i.e., the opposite direction).

At operation <NUM>, the electronic device <NUM> may perform an image stabilization such as a video digital image stabilization (VDIS). The image stabilization may be an operation of reducing/correcting image blurring due to camera shake.

According to various embodiments, the electronic device <NUM> may perform the vertical flip and/or the horizontal flip under the control of the image signal processor <NUM>. According to an embodiment, the image signal processor <NUM> may perform only a motion correction without an RS correction in camera switching. For example, the motion correction may include the vertical flip of switching the top/bottom of images and/or the horizontal flip of switching the left/right of images.

<FIG> is a flow diagram illustrating a method of correcting an image through an application processor according to an embodiment of the disclosure. That is, <FIG> illustrates a process of performing a motion correction (e.g., a vertical flip and/or a horizontal flip) and/or a rolling shutter (RS) correction under the control of the application processor in an electronic device.

Referring to <FIG>, at operation <NUM>, a processor (e.g., the processor <NUM>, e.g., the application processor (AP), in <FIG>) of an electronic device (e.g., the electronic device <NUM> in <FIG>) may identify a camera switching command for front and rear cameras during shooting. For example, while capturing images by using one of a front camera (e.g., the front camera module <NUM> in <FIG>) or a rear camera (e.g., the rear camera module <NUM> in <FIG>), the electronic device <NUM> may identify the camera switching command for the front/rear cameras. For example, the electronic device <NUM> may execute a camera-related application and identify a camera switching command for the front and rear cameras through the camera-related application.

At operation <NUM>, in response to the camera switching command, the processor <NUM> (e.g., the application processor) may perform a vertical flip for a corrected image (e.g., a second image) of a first image being captured through a camera module (e.g., the camera module <NUM> in <FIG>). For example, the processor <NUM> may acquire gyro motion information about the first image (e.g., motion information about the X-axis, motion information about the Y-axis, and/or motion information about the Z-axis). The gyro motion information may include motion information corresponding to the front camera module <NUM> and motion information corresponding to the rear camera module <NUM> and may be stored in a memory (e.g., the memory <NUM> in <FIG>) of the electronic device <NUM>.

At operation <NUM>, the processor <NUM> may change directions of the Y-axis motion information and the Z-axis motion information included in the gyro motion information. According to an embodiment, when performing the vertical flip for images, the processor <NUM> may change the directions of the Y-axis motion information and the Z-axis motion information (e.g., Z-axis rotation information) included in the gyro motion information. For example, when the Y-axis motion information has a first direction from top to bottom, the image signal processor <NUM> may change the first direction of the Y-axis motion information to a second direction from bottom to top by the vertical flip. The vertical flip may be an operation of changing each direction of the Y-axis motion information and the Z-axis motion information from a predetermined direction to the opposite direction. The image signal processor <NUM> may change each direction of the Y-axis motion information and the Z-axis motion information to the reverse direction (i.e., the opposite direction).

At operation <NUM>, the electronic device <NUM> may change the order of gyro data under the control of the application processor. For example, the gyro data may include an RS correction value, and the RS correction value may include timing information of a read-out performed for each line when corrected images are generated/displayed. According to an embodiment, because the readout timing is varied depending on the line, the processor <NUM> may change the order of the gyro data and perform the RS correction. According to an embodiment, the processor <NUM> may perform the RS correction based on the gyro data having the changed order so as to prevent the corrected images from being distorted when displayed.

At operation <NUM>, the processor <NUM> may calculate an RS correction value included in the gyro data. According to an embodiment, the processor <NUM> may generate corrected images based on the calculated RS correction value, and may store the corrected images in the memory <NUM>. The processor <NUM> may display the corrected images through a display (e.g., the display device <NUM> in <FIG>).

At operation <NUM>, the processor <NUM> may determine whether a "save as previewed" option is activated. In general, when the electronic device <NUM> captures a first image and generates a corrected image (second image), the left/right of an object may be switched. Thus, when the "save as previewed" option is activated, the processor <NUM> may perform a horizontal flip for the image at operation <NUM>. If the "save as previewed" option is not activated, the electronic device <NUM> may skip the horizontal flip.

At operation <NUM>, the processor <NUM> may perform the horizontal flip for the corrected image (second image) of the first image being captured through the camera module <NUM>.

At operation <NUM>, the processor <NUM> may change directions of the X-axis motion information and the Z-axis motion information included in the gyro motion information. According to an embodiment, when performing the horizontal flip for images, the processor <NUM> may change the directions of the X-axis motion information and the Z-axis motion information (e.g., Z-axis rotation information) included in the gyro motion information. For example, when the X-axis motion information has a first direction from left to right, the processor <NUM> may change the first direction of the X-axis motion information to a second direction from right to left by the horizontal flip. The horizontal flip may be an operation of changing each direction of the X-axis motion information and the Z-axis motion information from a predetermined direction to the opposite direction. The processor <NUM> may change each direction of the X-axis motion information and the Z-axis motion information to the reverse direction (i.e., the opposite direction).

At operation <NUM>, the processor <NUM> may perform an image stabilization such as a VDIS and also perform the RS correction based on the RS correction value.

According to various embodiments, the electronic device <NUM> may perform the vertical flip and/or the horizontal flip under the control of the application processor (e.g., the processor <NUM>). The application processor may calculate the RS correction value and perform the RS correction based on the RS correction value. According to an embodiment, the application processor may perform the motion correction (e.g., the vertical flip and/or the horizontal flip) and/or the RS correction in camera switching. For example, the motion correction may include the vertical flip of switching the top/bottom of images and/or the horizontal flip of switching the left/right of images. The RS correction may include operations of changing the order of readout timing included in the gyro data to the reverse order and correcting images based on the changed order of readout timing.

According to various embodiments, an image correction method of an electronic device (e.g., the electronic device <NUM> in <FIG> or the electronic device <NUM> in <FIG>) may include capturing images by using at least one of a first camera (e.g., the first camera module <NUM> in <FIG>) or a second camera (e.g., the second camera module <NUM> in <FIG>), wherein the first camera module <NUM> performs shooting based on a first direction corresponding to a front plate (e.g., the front plate <NUM> in <FIG>) of the electronic device <NUM> or <NUM>, and the second camera module <NUM> performs shooting based on a second direction corresponding to a rear plate (e.g., the rear plate <NUM> in <FIG>) of the electronic device <NUM> or <NUM>; identifying a camera switching command while capturing the images; acquiring gyro motion information through a gyro sensor of the electronic device <NUM> or <NUM> in response to the camera switching command; and correcting the captured images, based on the acquired gyro motion information, by an image signal processor (e.g., the image signal processor <NUM> in <FIG>) of the electronic device <NUM> or <NUM>.

According to an embodiment, the method may further include calculating a rolling shutter (RS) correction value corresponding to the acquired gyro motion information; and correcting the captured images, based on the acquired gyro motion information and the calculated RS correction value, by an application processor of the electronic device <NUM> or <NUM>.

According to an embodiment, the gyro motion information may include X-axis motion information, Y-axis motion information, and Z-axis motion information, and correcting the captured images may include performing a vertical flip for the images, based on the Y-axis motion information and the Z-axis motion information; performing a horizontal flip for the images, based on the X-axis motion information and the Z-axis motion information; and correcting the images through the vertical flip and the horizontal flip.

According to an embodiment, performing the vertical flip may include changing a motion direction for the Y-axis motion information and the Z-axis motion information; and vertically flipping the images, based on the changed motion direction.

According to an embodiment, performing the vertical flip may include changing a motion direction for the Y-axis motion information and the Z-axis motion information; and vertically flipping the images, based on the changed motion direction and the calculated RS correction value.

According to an embodiment, performing the horizontal flip may include changing a motion direction for the X-axis motion information and the Z-axis motion information; and horizontally flipping the images, based on the changed motion direction.

According to an embodiment, performing the horizontal flip may include changing a motion direction for the X-axis motion information and the Z-axis motion information; and horizontally flipping the images, based on the changed motion direction and the calculated RS correction value.

According to an embodiment, the method may further include determining whether an option for capturing the images as previewed is activated; and performing the horizontal flip for the images when the option is activated.

According to an embodiment, the X-axis motion information may include motion direction information corresponding to an X-axis of coordinates, the Y-axis motion information may include motion direction information corresponding to a Y-axis of the coordinates, and the Z-axis motion information may include rotation information corresponding to a Z-axis of the coordinates.

While the disclosure has been particularly shown and described with reference to various embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the subject matter as defined by the appended claims.

An electronic device according to an embodiment may be one of various types of electronic devices. The electronic device may include a portable communication device (e.g., a smart phone), a computer device, a portable multimedia device, a portable medical device, a camera, a wearable device, or a home appliance. However, the electronic device is not limited to any of those described above.

A singular form of a noun corresponding to an item may include one or more of the things, unless the relevant context clearly indicates otherwise. As used herein, each of such phrases as "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" may include any one of, or all possible combinations of the items enumerated together in a corresponding one of the phrases.

As used herein, such terms as "1st" and "2nd", or "first" and "second" may be used to simply distinguish a corresponding component from another, and does not limit the components in other aspect (e.g., importance or order). If an element (e.g., a first element) is referred to, with or without the term "operatively" or "communicatively", as "coupled with", "coupled to", "connected with", or "connected to" another element (e.g., a second element), it means that the element may be coupled with the other element directly (e.g., wiredly), wirelessly, or via a third element.

The term "module" may include a unit implemented in hardware, software, or firmware, and may interchangeably be used with other terms, for example, "logic", "logic block", "part", or "circuitry".

A method according to an embodiment of the disclosure may be included and provided in a computer program product.

Each component (e.g., a module or a program) of the above-described components may include a single entity or multiple entities. One or more of the above-described components may be omitted, or one or more other components may be added. In such a case, the integrated component may still perform one or more functions of each of the plurality of components in the same or similar manner as they are performed by a corresponding one of the plurality of components before the integration. Operations performed by the module, the program, or another component may be carried out sequentially, in parallel, repeatedly, or one or more other operations may be added.

Claim 1:
A mobile electronic device (<NUM>) comprising:
a housing (<NUM>) comprising a front plate (<NUM>), a rear plate (<NUM>) opposed to and spaced apart from the front plate (<NUM>), and a lateral member (<NUM>) surrounding a space between the front plate (<NUM>) and the rear plate (<NUM>);
a camera module (<NUM>) including a first camera (<NUM>) disposed on the front plate (<NUM>), a second camera (<NUM>) disposed on the rear plate (<NUM>), and an image signal processor (<NUM>) for correcting images captured using at least one of the first camera (<NUM>) or the second camera (<NUM>);
a display (<NUM>) exposed through a substantial portion of the front plate (<NUM>);
a memory (<NUM>) included in the housing (<NUM>);
a gyro sensor included in the housing (<NUM>); and
a processor (<NUM>) included in the housing (<NUM>) and operatively connected to the camera module (<NUM>), the memory (<NUM>), and the gyro sensor, wherein the processor (<NUM>) is configured to:
select the first camera (<NUM>) to capture images,
identify first motion information corresponding to the selected first camera (<NUM>) based on gyro motion information acquired by using the gyro sensor, wherein the gyro motion information comprises X-axis motion information, Y-axis motion information, and Z-axis motion information,
control the image signal processor (<NUM>) for displaying a first image captured by the first camera (<NUM>) based on the first motion information through the display (<NUM>),
switch, in response to a camera switching command, from the first camera (<NUM>) to the second camera (<NUM>) to capture images,
identify second motion information corresponding to the second camera (<NUM>) based on the same gyro motion information acquired by using the gyro sensor, and
control the image signal processor (<NUM>) for performing a vertical flip based on the Y-axis motion information and the Z-axis motion information or a horizontal flip based on the X-axis motion information and the Z-axis motion information for a second image captured by the second camera (<NUM>), based on the second motion information.