Electronic device and method for generating synthesized images using region-specific exposure times based on motion mapping
An electronic device according to an embodiment includes an image sensor and at least one processor operatively connected to the image sensor. The at least one processor may be configured to generate a motion map for identifying at least one region of a plurality of image frames as a stop area or a motion area, based on at least a part of the plurality of image frames acquired from the image sensor, set a first exposure time corresponding to the motion area and a second exposure time corresponding to the stop area, based on the generated motion map, acquire a first image corresponding to the first exposure time and a second image corresponding to the second exposure time from the image sensor, and generate a synthesized image by synthesizing the acquired first image and second image, based on the motion map.
1 . An electronic device comprising:
an image sensor; and
at least one processor operatively connected to the image sensor,
wherein the at least one processor is configured to:
generate a motion map for identifying at least one region of a plurality of image frames as one of a stop area and a motion area, based on at least a part of the plurality of image frames acquired from the image sensor;
set a first exposure time corresponding to the motion area, which is identified by the generated motion map and a second exposure time corresponding to the stop area, which is identified by the generated motion map;
acquire a first image corresponding to the first exposure time and a second image corresponding to the second exposure time from the image sensor; and
generate a synthesized image by synthesizing the acquired first image and second image, based on the motion area and the stop area identified by the generated motion map.
2 . The electronic device of claim 1 , wherein the at least one processor is further configured to, as at least a part of the setting the first exposure time and the second exposure time, set the first exposure time, based on whether supersaturation by exposure to the motion area is generated or a resolution of the motion area.
3 . The electronic device of claim 1 , wherein the at least one processor is further configured to, as at least a part of the setting the first exposure time and the second exposure time, set the first exposure time, based on glare of a light source included in the motion area.
4 . The electronic device of claim 1 , wherein the at least one processor is further configured to, as at least a part of the setting the first exposure time and the second exposure time, set a first time range, based on whether supersaturation by exposure to the motion area is generated or a resolution of the motion area, set a second time range, based on glare of a light source included in the motion area, and set the first exposure time, based on the configured first time range and second time range.
5 . The electronic device of claim 1 , wherein the at least one processor is further configured to, as at least a part of the setting the first exposure time and the second exposure time, set a third time range, based on a resolution of the stop area, set a fourth time range obtained by applying a preset available range to the first exposure time, and set the second exposure time, based on the configured third time range and fourth time range.
6 . The electronic device of claim 1 , wherein, the at least one processor is further configured to, as at least a part of the setting the first exposure time and the second exposure time, set the first exposure time or the second exposure time, based on a user input, in response to receiving the user input related to the first exposure time or the second exposure time is received.
7 . The electronic device of claim 1 , wherein the at least one processor is further configured to, as at least a part of the acquiring the first image and the second image, acquire a plurality of first image frames corresponding to the first exposure time from the image sensor and acquire the first image by synthesizing the plurality of acquired first image frames.
8 . The electronic device of claim 7 , wherein the at least one processor is further configured to, as at least a part of the acquiring the first image and the second image, acquire a single second image frame corresponding to the second exposure time as the second image from the image sensor.
9 . The electronic device of claim 1 , wherein, the at least one processor is further configured to, as at least a part of the generating the motion map, identify an area corresponding to a subject as the motion area based on identifying that the subject moves by a preset distance or longer or in a specific direction between successive image frames among the plurality of image frames acquired from the image sensor.
10 . The electronic device of claim 1 , wherein the at least one processor is further configured to, as at least a part of the generating the motion map, update the motion map in real time, based on a part of the plurality of image frames acquired from the image sensor.
11 . The electronic device of claim 10 , wherein the at least one processor is further configured to, as at least a part of the generating the synthesized image synthesize the first image for the motion area and the second image for the stop area based on the updated motion map.
12 . A method of operating an electronic device, the method comprising:
generating a motion map for identifying at least one region of a plurality of image frames as one of a stop area and a motion area, based on at least a part of the plurality of image frames acquired from an image sensor;
setting a first exposure time corresponding to the motion area, which is identified by the generated motion map and a second exposure time corresponding to the stop area, which is identified by the generated motion map;
acquiring a first image corresponding to the first exposure time and a second image corresponding to the second exposure time from the image sensor; and
generating a synthesized image by synthesizing the acquired first image and second image, based on the motion area and the stop area identified by the generated motion map.
13 . The method of claim 12 , wherein the setting of the first exposure time and the second exposure time comprises setting a first time range, based on whether supersaturation by exposure to the motion area is generated or a resolution of the motion area, setting a second time range, based on glare of a light source included in the motion area, and setting the first exposure time, based on the configured first time range and second time range.
14 . The method of claim 12 , wherein the setting of the first exposure time and the second exposure time comprises setting a third time range, based on a resolution of the stop area, setting a fourth time range obtained by applying a preset available range to the first exposure time, and setting the second exposure time, based on the configured third time range and fourth time range.
15 . The method of claim 12 , wherein the acquiring of the first image and the second image comprises acquiring a plurality of first image frames corresponding to the first exposure time from the image sensor and acquiring the first image by synthesizing the plurality of acquired first image frames, and acquiring a single second image frame corresponding to the second exposure time as the second image from the image sensor.
16 . The method of claim 12 , wherein the generating of the motion map comprises updating the motion map in real time, based on a part of the plurality of image frames acquired from the image sensor, and the generating of the synthesized image comprises synthesizing the first image for the motion area and the second image for the stop area, based on the updated motion map to generate the synthesized image.
17 . An electronic device comprising:
an image sensor; and
at least one processor operatively connected to the image sensor,
wherein the at least one processor is configured to:
generate a motion map for identifying at least one region of an output image as one of a stop area and a motion area, based on the output image acquired from the image sensor;
set an exposure time of an image frame, based on the motion area and the stop area identified by the generated motion map;
set a readout cycle of the image frame to correspond to the configured exposure time; and
acquire the image frame according to the configured exposure time from the image sensor, based on the configured readout cycle.
18 . The electronic device of claim 17 , wherein the at least one processor is configured to, as at least a part of the setting the readout cycle of the image frame to correspond to the configured exposure time, set the readout cycle as a reciprocal number of the exposure time of the image frame such that a readout operation of a previous image frame corresponds to a reset operation of a following image frame among a plurality of successive image frames.
19 . The electronic device of claim 17 , further comprising a signal line connecting the image sensor and the at least one processor,
wherein the at least one processor is configured to transmit a control signal of the reset operation of the image frame or the readout operation of the image frame to the image sensor through the signal line.