WO2019072190A1 - 图像处理方法、电子装置和计算机可读存储介质 - Google Patents
图像处理方法、电子装置和计算机可读存储介质 Download PDFInfo
- Publication number
- WO2019072190A1 WO2019072190A1 PCT/CN2018/109652 CN2018109652W WO2019072190A1 WO 2019072190 A1 WO2019072190 A1 WO 2019072190A1 CN 2018109652 W CN2018109652 W CN 2018109652W WO 2019072190 A1 WO2019072190 A1 WO 2019072190A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- area
- overexposed
- image
- underexposed
- brightness
- Prior art date
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 32
- 238000004590 computer program Methods 0.000 claims description 15
- 210000000746 body region Anatomy 0.000 claims description 7
- 238000003384 imaging method Methods 0.000 claims description 3
- 238000000034 method Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 6
- 230000015572 biosynthetic process Effects 0.000 description 5
- 238000003786 synthesis reaction Methods 0.000 description 5
- 230000008901 benefit Effects 0.000 description 3
- 230000002194 synthesizing effect Effects 0.000 description 3
- 238000003491 array Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 239000002131 composite material Substances 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000004984 smart glass Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/80—Camera processing pipelines; Components thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/194—Segmentation; Edge detection involving foreground-background segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/161—Detection; Localisation; Normalisation
- G06V40/166—Detection; Localisation; Normalisation using acquisition arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N25/00—Circuitry of solid-state image sensors [SSIS]; Control thereof
- H04N25/50—Control of the SSIS exposure
- H04N25/57—Control of the dynamic range
- H04N25/58—Control of the dynamic range involving two or more exposures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30196—Human being; Person
- G06T2207/30201—Face
Definitions
- the present invention relates to the field of image processing technologies, and in particular, to an image processing method, an electronic device, and a computer readable storage medium.
- the existing high dynamic image synthesis technology usually synthesizes a whole picture of multiple images with different exposures. But the way the whole picture is combined will affect the authenticity of the image. For example, when a human face is included in an image, the skin color of the face is sensitive to color, and direct synthesis of faces in images with different exposures may affect the authenticity of the skin color.
- Embodiments of the present invention provide an image processing method, an electronic device, and a computer readable storage medium.
- An image processing method is used for an electronic device.
- the image processing method includes:
- the brightness reference area is maintained unchanged, and the overexposed area and the underexposed area are respectively corrected according to the underexposed image and the overexposed image to obtain a target image.
- An electronic device of an embodiment of the present invention includes a camera and a processor.
- the camera is configured to acquire at least one reference image with a first exposure value, and acquire at least one underexposed image with a second exposure value smaller than the first exposure value, to be greater than the third exposure value
- the exposure value acquires at least one overexposed image.
- the processor is configured to identify a brightness reference area, an under-exposure area, and an over-exposure area in the reference image, and maintain the brightness reference area unchanged, respectively correcting the according to the under-exposed image and the over-exposed image
- the overexposed area and the underexposed area are obtained to obtain a target image.
- An electronic device in accordance with an embodiment of the present invention includes a camera, one or more processors, a memory, and one or more programs.
- the one or more programs are stored in the memory and configured to be executed by the one or more processors, the program comprising instructions for performing the step of: acquiring at least a first exposure value a reference image; acquiring at least one underexposed image with a second exposure value smaller than the first exposure value, acquiring at least one overexposed image with a third exposure value greater than the first exposure value; identifying the a luminance reference region, an underexposed region, and an overexposed region in the reference image; maintaining the luminance reference region unchanged, respectively correcting the overexposed region and the underexposed region according to the underexposed image and the overexposed image To get the target image.
- a computer readable storage medium in accordance with an embodiment of the present invention includes a computer program for use in conjunction with an electronic device capable of imaging.
- the computer program is executable by the processor to: acquire at least one reference image with a first exposure value; acquire at least one underexposed image with a second exposure value that is less than the first exposure value, to be greater than Obtaining at least one overexposed image of the third exposure value of the first exposure value; identifying a luminance reference region, an underexposed region, and an overexposed region in the reference image; maintaining the luminance reference region unchanged, according to the owing
- the exposed image and the overexposed image respectively correct the overexposed region and the underexposed region to obtain a target image.
- the underexposed region in the reference image is replaced with the overexposed image.
- the area corresponding to the underexposed area is replaced with the overexposed area in the reference image as the area corresponding to the overexposed area in the underexposed image, while the brightness reference area remains unchanged, so that the final image is more realistic and viewed. Better. .
- FIG. 1 is a flow chart of an image processing method according to some embodiments of the present invention.
- FIG. 2 is a schematic structural view of an electronic device according to some embodiments of the present invention.
- FIG. 3 is a flow chart of an image processing method according to some embodiments of the present invention.
- FIG. 4 is a flow chart of an image processing method according to some embodiments of the present invention.
- FIG. 5 is a schematic flow chart of an image processing method according to some embodiments of the present invention.
- FIG. 6 is a flow chart of an image processing method according to some embodiments of the present invention.
- FIG. 7 is a schematic diagram of an electronic device in accordance with some embodiments of the present invention.
- Image processing methods include:
- the brightness reference area is maintained unchanged, and the overexposed area and the underexposed area are respectively corrected according to the underexposed image and the overexposed image to obtain a target image.
- the image processing method according to the embodiment of the present invention may be implemented by the electronic device 100 of the embodiment of the present invention.
- the electronic device 100 of the embodiment of the present invention includes a camera 10 and a processor 20. Both step 01 and step 02 can be implemented by the camera 10, and both step 03 and step 04 can be implemented by the processor 20.
- the camera 10 can be configured to acquire at least one reference image with a first exposure value, and acquire at least one underexposed image with a second exposure value that is less than the first exposure value, to be greater than the third exposure value.
- the exposure value acquires at least one overexposed image.
- the processor 20 can be configured to identify the brightness reference area, the under-exposed area, and the over-exposed area in the reference image, and maintain the brightness reference area unchanged, and respectively correct the over-exposed area and the under-exposed area according to the under-exposed image and the over-exposed image to obtain the target. image.
- the electronic device 100 includes a mobile phone, a tablet computer, a notebook computer, a smart watch, a smart bracelet, a smart helmet, smart glasses, and the like.
- the existing high dynamic image synthesis usually combines multiple images with different exposures into an overall picture.
- the image contains some subjects that are sensitive to color, directly synthesizing the corresponding regions of the images in multiple images with different exposures will affect the authenticity of the image.
- the underexposed region in the reference image is replaced with the underexposed region in the overexposed image.
- the area is replaced with the overexposed area in the reference image as the area corresponding to the overexposed area in the underexposed image, while the brightness reference area is kept unchanged, so that the final target image is more realistic and the viewing degree is better.
- the brightness reference area can be a face area or a focus area.
- the face color is more sensitive to color. If the face image in the reference image, the underexposed image and the overexposed image is directly synthesized directly, the face color in the underexposed image and the overexposed image is directly This can cause problems in the face of the synthesized image that are not realistic.
- the focus area when the user uses the camera 10 to shoot, the camera 10 sets the exposure value based on the focus area so that the brightness and color of the focus area in the captured reference image are better. Therefore, the focus area in the reference image usually has better brightness and color, so there is no need to perform correction by using the underexposed image and the overexposed image.
- the face area is the in-focus area
- the face area in the reference image captured by the camera 10 usually has better brightness and color, so no correction is needed.
- the image processing method of the embodiment of the present invention keeps the portion of the luminance reference region unchanged, and only corrects the overexposed and underexposed regions in the reference image by using the overexposed image and the underexposed image, thereby ensuring the true color of the image.
- the luminance reference region is not subjected to synthesis calculation, the image data to be processed by the processor 20 is reduced to some extent, and the image processing time is shortened.
- the reference image includes a body region and a background region, and the body region is a brightness reference region.
- Step 03 identifies that the brightness reference area, the under-exposed area, and the over-exposed area in the reference image include:
- a pixel whose luminance value is smaller than the first brightness threshold is merged into an underexposed area, and a pixel whose brightness value is greater than the second brightness threshold is merged into an overexposed area.
- step 031, step 032, and step 033 can all be implemented by processor 20. That is, the processor 20 may be further configured to process the reference image to divide the body region and the background region, calculate a luminance value of each pixel in the background region, and merge the pixels whose luminance value is smaller than the first luminance threshold into an underexposed region. Pixels whose luminance values are greater than the second luminance threshold are merged into overexposed regions.
- the body area may be a face area or a focus area.
- step 031 can identify the face area by the face recognition algorithm, and the part of the reference image except the face area is the background area.
- the main body area is the in-focus area, the portion in focus when the camera 10 captures the current scene is the in-focus area, and the portion of the reference image except the in-focus area is the background area.
- Processor 20 then performs a calculation of the luminance values for each pixel in the background region.
- the brightness value has a value range of [0, 255], 0 is black, and 255 is white.
- the first brightness threshold has a value range of [0, 20]
- the second brightness threshold has a value range of [230, 255].
- the first brightness threshold may take values of 0, 8, 13, 16.5, 20, and the second brightness threshold may take values of 230, 241, 247.8, 250, 255.
- the underexposed area and the overexposed area are extracted from the reference image, and the underexposure image and the overexposed image are used for correction in the subsequent steps.
- step 033 merges pixels whose luminance values are smaller than the first luminance threshold into an underexposed region, and merges pixels whose luminance values are greater than the second luminance threshold into overexposed regions, including:
- step 0331, step 0332, and step 0333 can all be implemented by processor 20. That is to say, the processor 20 can also be used to merge the pixels whose luminance value is less than the threshold value of the first luminance value into an under-exposure pending region, and merge the pixels whose luminance value is greater than the second luminance threshold into an over-exposure to be determined.
- the area, the area of the under-exposure area to be determined and the area of the over-exposure area to be determined, and the under-exposure area to be larger than the first area threshold are merged into the under-exposed area, and the over-exposure pending area whose area is larger than the second area threshold is merged into Overexposed area.
- a plurality of pixels having a luminance value smaller than the first luminance threshold may be at different positions in the reference image, and a plurality of pixels having a luminance value greater than the second luminance threshold may also be at different positions in the reference image. Therefore, the plurality of pixels whose luminance value is smaller than the first brightness threshold are merged into the same under-exposure pending area, and the plurality of pixels whose brightness value is greater than the second brightness threshold are merged into the same over-exposure pending area. Thus, one or more underexposure pending zones and one or more overexposed zones to be determined can be obtained.
- the processor calculates the area of each underexposed pending zone and each overexposed pending zone. It can be understood that when the area of the under-exposure pending area is small, it indicates that the area may be a darker true color in the shooting scene, and the brightness is not insufficient due to the exposure value being too small. When the area of the over-exposure area is small, it indicates that the area may be a brighter true color in the shooting scene, and the brightness is not too bright due to the excessive exposure value. Therefore, the processor 20 only needs to merge the under-exposure pending area whose area is larger than the first area threshold into the under-exposed area, and merge the over-exposure pending area whose area is larger than the second area threshold into the over-exposed area.
- the number of underexposed regions may be one or more, and the number of overexposed regions may also be one or more.
- the first area threshold and the second area threshold may or may not be equal.
- step 033 merges pixels whose luminance values are smaller than the first luminance threshold into under-exposed regions, and merges pixels whose luminance values are greater than the second luminance threshold into over-exposed regions, including:
- step 0331, step 0334, and step 0335 can all be implemented by processor 20. That is to say, the processor 20 can also be used to merge the pixels whose luminance value is less than the threshold value of the first luminance value into an under-exposure pending region, and merge the pixels whose luminance value is greater than the second luminance threshold into an over-exposure to be determined.
- a plurality of pixels having a luminance value smaller than the first luminance threshold may be at different positions in the reference image, and a plurality of pixels having a luminance value greater than the second luminance threshold may also be at different positions in the reference image. Therefore, the plurality of pixels whose luminance value is smaller than the first brightness threshold are merged into the same under-exposure pending area, and the plurality of pixels whose brightness value is greater than the second brightness threshold are merged into the same over-exposure pending area. Thus, one or more underexposure pending zones and one or more overexposed zones to be determined can be obtained.
- the processor 20 calculates the number of pixels in each underexposed pending area and the number of pixels in each overexposed pending area. It can be understood that when the number of pixels in the under-exposure pending area is small, it indicates that the area may be a darker true color in the shooting scene, and the brightness is not insufficient due to the exposure value being too small. When the number of pixels in the overexposed area is small, it indicates that the area may be a brighter true color in the shooting scene, and the brightness is not too bright due to an excessive exposure value.
- the processor 20 only needs to merge the number of under-exposure pending areas that are greater than the first predetermined number into the under-exposed areas, and merge the number of over-exposure pending areas that are greater than the second predetermined number into over-exposed areas.
- the number of underexposed regions may be one or more, and the number of overexposed regions may also be one or more. Wherein, the first predetermined number and the second predetermined number may or may not be equal.
- the under-exposed area and the over-exposed area in the reference image are identified, which facilitates subsequent correction of the under-exposed area and the over-exposed area.
- step 04 maintains the brightness reference area unchanged, and respectively correcting the overexposed area and the underexposed area according to the underexposed image and the overexposed image to obtain the target image includes:
- step 041 can be implemented by processor 20. That is to say, the processor 20 can also be used to replace the underexposed area in the reference image with the area corresponding to the underexposed area in the overexposed image, and replace the overexposed area in the reference image with the underexposed image and overexposed. The area corresponding to the area to get the target image.
- the processor 20 recognizes the underexposed area in the reference image, extracts an area corresponding to the underexposed area in the overexposed image, and uses the area to replace the underexposed area in the reference image, thereby making the reference image
- the portion of the underexposed region has sufficient brightness.
- the processor 20 recognizes the overexposed area in the reference image, extracts an area corresponding to the overexposed area in the underexposed image, and uses the area to replace the overexposed area in the reference image, thereby causing the reference image to pass
- the brightness of the portion of the exposed area is no longer too high.
- the brightness reference area in the reference image remains unchanged.
- the under-exposed area and the over-exposed area in the base station image are corrected to obtain a target image.
- the target image has a high dynamic range and guarantees the authenticity of the colors in the captured picture.
- the processor 20 may respectively select one of the plurality of reference images as the reference image for the composite target image. Selecting one of the plurality of underexposed images as the underexposed image for synthesizing the target image, and selecting one of the plurality of overexposed images as the overexposed image for synthesizing the target image; or the processor 20 may also A plurality of reference images are integrally synthesized to obtain a reference image, and a plurality of underexposed images are integrally synthesized to obtain an underexposed image, and the plurality of overexposed images are integrally synthesized to obtain an overexposed image, which is synthesized.
- the reference image, the underexposed image, and the overexposed image are used for the synthesis of the target image.
- an electronic device 100 of an embodiment of the present invention includes a camera 10, one or more processors 20, a memory 30, and one or more programs 31.
- one or more programs 31 are stored in the memory 30 and are configured to be executed by one or more processors 20.
- the camera 10 captures at least one reference image with a first exposure value, captures at least one underexposed image with a second exposure value smaller than the first exposure value, and captures a third exposure value greater than the first exposure value. At least one overexposed image.
- the program 31 includes instructions for executing the image processing method of any of the above embodiments.
- the program 31 includes instructions for performing the image processing method described in the following steps:
- the brightness reference area is maintained unchanged, and the overexposed area and the underexposed area are respectively corrected according to the underexposed image and the overexposed image to obtain a target image.
- the program further includes instructions for performing the image processing method described in the following steps:
- a pixel whose luminance value is smaller than the first brightness threshold is merged into an underexposed area, and a pixel whose brightness value is greater than the second brightness threshold is merged into an overexposed area.
- the program further includes instructions for performing the image processing method described in the following steps:
- the program further includes instructions for performing the image processing method described in the following steps:
- the program further includes instructions for performing the image processing method described in the following steps:
- the invention also provides a computer readable storage medium.
- the computer readable storage medium includes a computer program for use with the electronic device 100 capable of imaging.
- the computer program can be executed by the processor 20 to perform the image processing method of any of the above embodiments.
- the camera of the electronic device 100 is capable of capturing at least one reference image with a first exposure value, capturing at least one underexposed image with a second exposure value smaller than the first exposure value, and greater than the first exposure.
- the third exposure value of the value captures at least one overexposed image.
- a computer program can be executed by processor 20 to perform the following steps:
- the brightness reference area is maintained unchanged, and the overexposed area and the underexposed area are respectively corrected according to the underexposed image and the overexposed image to obtain a target image.
- the computer program can also be executed by the processor 20 to complete the following steps:
- a pixel whose luminance value is smaller than the first brightness threshold is merged into an underexposed area, and a pixel whose brightness value is greater than the second brightness threshold is merged into an overexposed area.
- the computer program can also be executed by the processor 20 to complete the following steps:
- the computer program can also be executed by processor 20 to perform the following steps:
- the computer program can also be executed by processor 20 to complete the following steps:
- first and second are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated.
- features defining “first” and “second” may include at least one of the features, either explicitly or implicitly.
- the meaning of "a plurality” is at least two, such as two, three, etc., unless specifically defined otherwise.
- a "computer-readable medium” can be any apparatus that can contain, store, communicate, propagate, or transport a program for use in an instruction execution system, apparatus, or device, or in conjunction with the instruction execution system, apparatus, or device.
- computer readable media include the following: electrical connections (electronic devices) having one or more wires, portable computer disk cartridges (magnetic devices), random access memory (RAM), Read only memory (ROM), erasable editable read only memory (EPROM or flash memory), fiber optic devices, and portable compact disk read only memory (CDROM).
- the computer readable medium may even be a paper or other suitable medium on which the program can be printed, as it may be optically scanned, for example by paper or other medium, followed by editing, interpretation or, if appropriate, other suitable The method is processed to obtain the program electronically and then stored in computer memory.
- portions of the invention may be implemented in hardware, software, firmware or a combination thereof.
- multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system.
- a suitable instruction execution system For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques well known in the art: having logic gates for implementing logic functions on data signals. Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
- each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module.
- the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
- the integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
- the above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Human Computer Interaction (AREA)
- Image Processing (AREA)
- Studio Devices (AREA)
Abstract
一种图像处理方法、电子装置(100)和计算机可读存储介质。图像处理方法包括:以第一曝光值获取至少一张基准图像;以小于第一曝光值的第二曝光值获取至少一张欠曝图像,以大于第一曝光值的第三曝光值获取至少一张过曝图像;识别基准图像中的亮度基准区域、欠曝区域和过曝区域;维持亮度基准区域不变,根据欠曝图像和过曝图像分别修正过曝区域和欠曝区域以得到目标图像。
Description
优先权信息
本申请请求2017年10月12日向中国国家知识产权局提交的、专利申请号为201710945392.2的专利申请的优先权和权益,并且通过参照将其全文并入此处。
本发明涉及图像处理技术领域,特别涉及一种图像处理方法、电子装置和计算机可读存储介质。
现有的高动态图像合成技术通常是将多张曝光度不同的图像的整幅画面进行合成。但将整幅画面进行合成的方式会影响图像的真实性。例如,当图像中包含人脸时,人脸的肤色对色彩较为敏感,多张曝光度不同的图像中的人脸直接进行合成会影响肤色的真实性。
发明内容
本发明的实施例提供了一种图像处理方法、电子装置和计算机可读存储介质。
本发明实施方式的图像处理方法用于电子装置。所述图像处理方法包括:
以第一曝光值获取至少一张基准图像;
以小于所述第一曝光值的第二曝光值获取至少一张欠曝图像,以大于所述第一曝光值的第三曝光值获取至少一张过曝图像;
识别所述基准图像中的亮度基准区域、欠曝区域和过曝区域;和
维持所述亮度基准区域不变,根据所述欠曝图像和所述过曝图像分别修正所述过曝区域和所述欠曝区域以得到目标图像。
本发明实施方式的电子装置包括摄像头和处理器。所述摄像头用于以第一曝光值获取至少一张基准图像,以及以小于所述第一曝光值的第二曝光值获取至少一张欠曝图像,以大于所述第一曝光值的第三曝光值获取至少一张过曝图像。所述处理器用于识别所述基准图像中的亮度基准区域、欠曝区域和过曝区域,以及维持所述亮度基准区域不变,根据所述欠曝图像和所述过曝图像分别修正所述过曝区域和所述欠曝区域以得到目标图像。
本发明实施方式的电子装置包括摄像头、一个或多个处理器、存储器和一个或多个程 序。其中所述一个或多个程序被存储在所述存储器中,并且被配置成由所述一个或多个处理器执行,所述程序包括用于执行以下步骤的指令:以第一曝光值获取至少一张基准图像;以小于所述第一曝光值的第二曝光值获取至少一张欠曝图像,以大于所述第一曝光值的第三曝光值获取至少一张过曝图像;识别所述基准图像中的亮度基准区域、欠曝区域和过曝区域;维持所述亮度基准区域不变,根据所述欠曝图像和所述过曝图像分别修正所述过曝区域和所述欠曝区域以得到目标图像。
本发明实施方式的计算机可读存储介质包括与能够摄像的电子装置结合使用的计算机程序。所述计算机程序可被处理器执行以完成以下步骤:以第一曝光值获取至少一张基准图像;以小于所述第一曝光值的第二曝光值获取至少一张欠曝图像,以大于所述第一曝光值的第三曝光值获取至少一张过曝图像;识别所述基准图像中的亮度基准区域、欠曝区域和过曝区域;维持所述亮度基准区域不变,根据所述欠曝图像和所述过曝图像分别修正所述过曝区域和所述欠曝区域以得到目标图像。
本发明实施方式的图像处理方法、电子装置和计算机可读存储介质识别出基准图像中的亮度基准区域、欠曝区域和过曝区域后,将基准图像中的欠曝区域替换为过曝图像中与欠曝区域对应的区域,并将基准图像中的过曝区域替换为欠曝图像中与过曝区域对应的区域,同时保留亮度基准区域不变,从而使得最终得到的图像更为真实,观赏度更佳。。
本发明的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。
本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:
图1是本发明某些实施方式的图像处理方法的流程示意图。
图2是本发明某些实施方式的电子装置的结构示意图。
图3是本发明某些实施方式的图像处理方法的流程示意图。
图4是本发明某些实施方式的图像处理方法的流程示意图。
图5是本发明某些实施方式的图像处理方法的流程示意图。
图6是本发明某些实施方式的图像处理方法的流程示意图。
图7是本发明某些实施方式的电子装置的示意图。
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本发明,而不能理解为对本发明的限制。
请一并参阅图1和图2,本发明实施方式的图像处理方法用于电子装置100。图像处理方法包括:
01:以第一曝光值获取至少一张基准图像;
02:以小于第一曝光值的第二曝光值获取至少一张欠曝图像,以大于第一曝光值的第三曝光值获取至少一张过曝图像;
03:识别基准图像中的亮度基准区域、欠曝区域和过曝区域;和
04:维持亮度基准区域不变,根据欠曝图像和过曝图像分别修正过曝区域和欠曝区域以得到目标图像。
请再参阅图2,本发明实施方式的图像处理方法可以由本发明实施方式的电子装置100实现。本发明实施方式的电子装置100包括摄像头10和处理器20。步骤01和步骤02均可以由摄像头10实现,步骤03和步骤04均可以由处理器20实现。
也即是说,摄像头10可用于以第一曝光值获取至少一张基准图像,以及以小于第一曝光值的第二曝光值获取至少一张欠曝图像,以大于第一曝光值的第三曝光值获取至少一张过曝图像。处理器20可用于识别基准图像中的亮度基准区域、欠曝区域和过曝区域,以及维持亮度基准区域不变,根据欠曝图像和过曝图像分别修正过曝区域和欠曝区域以得到目标图像。
在某些实施方式中,电子装置100包括手机、平板电脑、笔记本电脑、智能手表、智能手环、智能头盔、智能眼镜等。
可以理解,现有的高动态图像合成通常是将多张曝光度不同的图像进行整体画面的合成。但当图像中包含一些对色彩较为敏感的拍摄物时,将多张曝光度不同的图像中拍摄物对应区域直接进行合成会影响成像的真实性。
本发明实施方式的图像处理方法和电子装置100识别出基准图像中的亮度基准区域、欠曝区域和过曝区域后,将基准图像中的欠曝区域替换为过曝图像中与欠曝区域对应的区域,并将基准图像中的过曝区域替换为欠曝图像中与过曝区域对应的区域,同时保留亮度基准区域不变,从而使得最终得到的目标图像更为真实,观赏度更佳。
在某些实施方式中,亮度基准区域可以是人脸区域或对焦区域。
可以理解,对于人脸区域来说,人脸肤色对色彩较为敏感,若直接将基准图像、欠曝图像和过曝图像中的人脸区域直接合成,欠曝图像和过曝图像中人脸肤色会导致合成的图 像中人脸肤色不真实的问题。对于对焦区域来说,通常用户使用摄像头10拍摄时,摄像头10会以对焦区域为基准进行曝光值的设定,以使得拍摄得到的基准图像中对焦区域的亮度和色彩均较佳。因此,基准图像中的对焦区域通常是具备较好的亮度及色彩的,因此无需借助欠曝图像和过曝图像来进行修正。同样地,当人脸区域为对焦区域时,摄像头10拍摄的基准图像中人脸区域通常也具有较好的亮度和色彩,因此无需进行修正。
如此,本发明实施方式的图像处理方法保留亮度基准区域的部分不变,仅将基准图像中的过曝区域和欠曝区域利用过曝图像和欠曝图像进行修正,一方面保证图像色彩的真实性,另一方面由于亮度基准区域不用进行合成计算,一定程度上减少了处理器20所需处理的图像数据,并缩短了图像处理的时间。
请参阅图3,在某些实施方式中,基准图像包括主体区域和背景区域,主体区域为亮度基准区域。步骤03识别基准图像中的亮度基准区域、欠曝区域和过曝区域包括:
031:处理基准图像以分割主体区域和背景区域;
032:计算背景区域中各个像素的亮度值;和
033:将亮度值小于第一亮度阈值的像素归并为欠曝区域,将亮度值大于第二亮度阈值的像素归并为过曝区域。
请再参阅图2,在某些实施方式中,步骤031、步骤032和步骤033均可以由处理器20实现。也即是说,处理器20可进一步用于处理基准图像以分割主体区域和背景区域,计算背景区域中各个像素的亮度值,以及将亮度值小于第一亮度阈值的像素归并为欠曝区域,将亮度值大于第二亮度阈值的像素归并为过曝区域。
其中,主体区域可为人脸区域或对焦区域。当主体区域为人脸区域时,步骤031可以通过人脸识别算法识别出人脸区域,则基准图像中除却人脸区域的部分即为背景区域。当主体区域为对焦区域时,摄像头10拍摄当前场景时对焦的部分即为对焦区域,基准图像中除却对焦区域的部分即为背景区域。
随后,处理器20对背景区域中的每个像素进行亮度值的计算。通常亮度值的取值范围为[0,255],0为黑色,255为白色。当亮度值小于第一亮度阈值时,该亮度值对应的像素即归并为欠曝区域,当亮度值大于第二亮度阈值时,该亮度值对应的像素即归并为过曝区域。在某些实施方式中,第一亮度阈值的取值范围为[0,20],第二亮度阈值的取值范围为[230,255]。也即是说,第一亮度阈值可取0、8、13、16.5、20等值,第二亮度阈值可取230、241、247.8、250、255等值。如此,从基准图像中提取出欠曝区域和过曝区域,在后续步骤中再利用欠曝图像和过曝图像进行修正。
请参阅图4,在某些实施方式中,步骤033将亮度值小于第一亮度阈值的像素归并为 欠曝区域,将亮度值大于第二亮度阈值的像素归并为过曝区域包括:
0331:将相接的亮度值小于第一亮度值阈值的像素归并为欠曝待定区域,将相接的亮度值大于第二亮度阈值的像素归并为过曝待定区域;
0332:计算欠曝待定区域的面积及过曝待定区域的面积;和
0333:将面积大于第一面积阈值的欠曝待定区域归并为欠曝区域,将面积大于第二面积阈值的过曝待定区域归并为过曝区域。
请再参阅图2,在某些实施方式中,步骤0331、步骤0332和步骤0333均可以由处理器20实现。也即是说,处理器20还可用于将相接的亮度值小于第一亮度值阈值的像素归并为欠曝待定区域,将相接的亮度值大于第二亮度阈值的像素归并为过曝待定区域,计算欠曝待定区域的面积及过曝待定区域的面积,以及将面积大于第一面积阈值的欠曝待定区域归并为欠曝区域,将面积大于第二面积阈值的过曝待定区域归并为过曝区域。
具体地,亮度值小于第一亮度阈值的多个像素可能处于基准图像中的不同位置,亮度值大于第二亮度阈值的多个像素也可能处于基准图像中的不同位置。因此,将亮度值小于第一亮度阈值的相接的多个像素归并为同一个的欠曝待定区域,将亮度值大于第二亮度阈值的相接的多个像素归并为同一个过曝待定区域,如此,即可得到一个或多个欠曝待定区域,以及一个或多个过曝待定区域。
随后,处理器计算每个欠曝待定区域和每个过曝待定区域的面积。可以理解,当欠曝待定区域面积较小时,表明该区域可能为拍摄场景中的较暗的真实色彩,而并非由于曝光值过小而导致的亮度不足。当过曝待定区域面积较小时,表明该区域可能为拍摄场景中较亮的真实色彩,而并未由于曝光值过大而导致的亮度过亮。因此,处理器20仅需要将面积大于第一面积阈值的欠曝待定区域归并为欠曝区域,将面积大于第二面积阈值的过曝待定区域归并为过曝区域。欠曝区域的个数可为一个或多个,过曝区域的个数也可为一个或多个。其中,第一面积阈值和第二面积阈值可以相等也可以不相等。
请参阅图5,在某些实施方式中,步骤033将亮度值小于第一亮度阈值的像素归并为欠曝区域,将亮度值大于第二亮度阈值的像素归并为过曝区域包括:
0331:将相接的亮度值小于第一亮度值阈值的像素归并为欠曝待定区域,将相接的亮度值大于第二亮度阈值的像素归并为过曝待定区域;
0334:计算欠曝待定区域中像素的数目及过曝待定区域中像素的数目;和
0335:将数目大于第一预定数目的欠曝待定区域归并为欠曝区域,将数目大于第二预定数目的过曝待定区域归并为过曝区域。
请再参阅图2,在某些实施方式中,步骤0331、步骤0334和步骤0335均可以由处理 器20实现。也即是说,处理器20还可用于将相接的亮度值小于第一亮度值阈值的像素归并为欠曝待定区域,将相接的亮度值大于第二亮度阈值的像素归并为过曝待定区域,计算欠曝待定区域中像素的数目及过曝待定区域中像素的数目,以及将数目大于第一预定数目的欠曝待定区域归并为欠曝区域,将数目大于第二预定数目的过曝待定区域归并为过曝区域。
具体地,亮度值小于第一亮度阈值的多个像素可能处于基准图像中的不同位置,亮度值大于第二亮度阈值的多个像素也可能处于基准图像中的不同位置。因此,将亮度值小于第一亮度阈值的相接的多个像素归并为同一个的欠曝待定区域,将亮度值大于第二亮度阈值的相接的多个像素归并为同一个过曝待定区域,如此,即可得到一个或多个欠曝待定区域,以及一个或多个过曝待定区域。
随后,处理器20计算每个欠曝待定区域中像素的数目和每个过曝待定区域中像素的数目。可以理解,当欠曝待定区域中像素的数目较小时,表明该区域可能为拍摄场景中的较暗的真实色彩,而并非由于曝光值过小而导致的亮度不足。当过曝待定区域中像素的数目较小时,表明该区域可能为拍摄场景中较亮的真实色彩,而并未由于曝光值过大而导致的亮度过亮。因此,处理器20仅需要将数目大于第一预定数目的欠曝待定区域归并为欠曝区域,将数目大于第二预定数目的过曝待定区域归并为过曝区域。欠曝区域的个数可为一个或多个,过曝区域的个数也可为一个或多个。其中,第一预定数目和第二预定数目可以相等也可以不相等。
如此,识别出基准图像中的欠曝区域和过曝区域,便于后续对欠曝区域和过曝区域的修正。
请参阅图6,在某些实施方式中,步骤04维持亮度基准区域不变,根据欠曝图像和过曝图像分别修正过曝区域和欠曝区域以得到目标图像包括:
041:将基准图像中的欠曝区域替换为过曝图像中与欠曝区域对应的区域,将基准图像中的过曝区域替换为欠曝图像中与过曝区域对应的区域以得到目标图像。
请再参阅图2,在某些实施方式中,步骤041可以由处理器20实现。也即是说,处理器20还可用于将基准图像中的欠曝区域替换为过曝图像中与欠曝区域对应的区域,将基准图像中的过曝区域替换为欠曝图像中与过曝区域对应的区域以得到目标图像。
具体地,处理器20识别出基准图像中的欠曝区域后,提取出过曝图像中与欠曝区域对应的区域,并利用该区域将基准图像中的欠曝区域替换掉,从而使得基准图像中的欠曝区域的部分具有足够的亮度。处理器20识别出基准图像中的过曝区域后,提取出欠曝图像中的与过曝区域对应的区域,并利用该区域将基准图像中的过曝区域替换掉,从而使得基准 图像中的过曝区域的部分的亮度不再过高。其中,基准图像中的亮度基准区域维持不变,如此,基站图像中的欠曝区域和过曝区域经过修正后即可得到目标图像。目标图像具有较高的动态范围,且保证了拍摄的图片中色彩的真实性。
在某些实施方式中,当摄像头10拍摄的基准图像、欠曝图像或过曝图像为多张时,处理器20可分别从多张基准图像中选取一张作为用于合成目标图像的基准图像、从多张欠曝图像中选取一张作为用于合成目标图像的欠曝图像、从多张过曝图像中选取一张作为用于合成目标图像的过曝图像;或者,处理器20也可将多张基准图像进行整体合成以得到一张基准图像,将多张欠曝图像记性整体合成以得到一张欠曝图像,将多张过曝图像整体合成以得到一张过曝图像,合成得到的基准图像、欠曝图像及过曝图像用于目标图像的合成。
请参阅图7,本发明实施方式的电子装置100包括摄像头10、一个或多个处理器20、存储器30和一个或多个程序31。其中,一个或多个程序31被存储在存储器30中,并且被配置成由一个或多个处理器20执行。摄像头10以第一曝光值拍摄至少一张基准图像、以小于所述第一曝光值的第二曝光值拍摄至少一张欠曝图像、及以大于所述第一曝光值的第三曝光值拍摄至少一张过曝图像。程序31包括用于执行上述任意一项实施方式所述的图像处理方法的指令。
例如,请结合图1,程序31包括用于执行以下步骤所述的图像处理方法的指令:
01:获取摄像头10以第一曝光值拍摄的至少一张基准图像;
02:获取摄像头10以小于第一曝光值的第二曝光值拍摄的至少一张欠曝图像及以大于第一曝光值的第三曝光值拍摄的至少一张过曝图像;
03:识别基准图像中的亮度基准区域、欠曝区域和过曝区域;和
04:维持亮度基准区域不变,根据欠曝图像和过曝图像分别修正过曝区域和欠曝区域以得到目标图像。
再例如,请结合图3,程序还包括用于执行以下步骤所述的图像处理方法的指令:
031:处理基准图像以分割主体区域和背景区域;
032:计算背景区域中各个像素的亮度值;和
033:将亮度值小于第一亮度阈值的像素归并为欠曝区域,将亮度值大于第二亮度阈值的像素归并为过曝区域。
再例如,请结合图4,程序还包括用于执行以下步骤所述的图像处理方法的指令:
0331:将相接的亮度值小于第一亮度值阈值的像素归并为欠曝待定区域,将相接的亮度值大于第二亮度阈值的像素归并为过曝待定区域;
0332:计算欠曝待定区域的面积及过曝待定区域的面积;和
0333:将面积大于第一面积阈值的欠曝待定区域归并为欠曝区域,将面积大于第二面积阈值的过曝待定区域归并为过曝区域。
再例如,请结合图5,程序还包括用于执行以下步骤所述的图像处理方法的指令:
0331:将相接的亮度值小于第一亮度值阈值的像素归并为欠曝待定区域,将相接的亮度值大于第二亮度阈值的像素归并为过曝待定区域;
0334:计算欠曝待定区域中像素的数目及过曝待定区域中像素的数目;和
0335:将数目大于第一预定数目的欠曝待定区域归并为欠曝区域,将数目大于第二预定数目的过曝待定区域归并为过曝区域。
再例如,请结合图6,程序还包括用于执行以下步骤所述的图像处理方法的指令:
041:将基准图像中的欠曝区域替换为过曝图像中与欠曝区域对应的区域,将基准图像中的过曝区域替换为欠曝图像中与过曝区域对应的区域以得到目标图像。
本发明还提供一种计算机可读存储介质。计算机可读存储介质包括与能够摄像的电子装置100结合使用的计算机程序。计算机程序可被处理器20执行以完成上述任意一项实施方式所述的图像处理方法。其中,电子装置100的摄像头能够10以第一曝光值拍摄至少一张基准图像、以小于所述第一曝光值的第二曝光值拍摄至少一张欠曝图像、及以大于所述第一曝光值的第三曝光值拍摄至少一张过曝图像。
例如,请结合图1,计算机程序可被处理器20执行以完成以下步骤:
01:获取摄像头10以第一曝光值拍摄的至少一张基准图像;
02:获取摄像头10以小于第一曝光值的第二曝光值拍摄的至少一张欠曝图像及以大于第一曝光值的第三曝光值拍摄的至少一张过曝图像;
03:识别基准图像中的亮度基准区域、欠曝区域和过曝区域;和
04:维持亮度基准区域不变,根据欠曝图像和过曝图像分别修正过曝区域和欠曝区域以得到目标图像。
再例如,请结合图3,计算机程序还可被处理器20执行以完成以下步骤:
031:处理基准图像以分割主体区域和背景区域;
032:计算背景区域中各个像素的亮度值;和
033:将亮度值小于第一亮度阈值的像素归并为欠曝区域,将亮度值大于第二亮度阈值的像素归并为过曝区域。
再例如,请结合图4,计算机程序还可被处理器20执行以完成以下步骤:
0331:将相接的亮度值小于第一亮度值阈值的像素归并为欠曝待定区域,将相接的亮度值大于第二亮度阈值的像素归并为过曝待定区域;
0332:计算欠曝待定区域的面积及过曝待定区域的面积;和
0333:将面积大于第一面积阈值的欠曝待定区域归并为欠曝区域,将面积大于第二面积阈值的过曝待定区域归并为过曝区域。
再例如,请结合图5,计算机程序还可被处理器20执行以完成以下步骤:
0331:将相接的亮度值小于第一亮度值阈值的像素归并为欠曝待定区域,将相接的亮度值大于第二亮度阈值的像素归并为过曝待定区域;
0334:计算欠曝待定区域中像素的数目及过曝待定区域中像素的数目;和
0335:将数目大于第一预定数目的欠曝待定区域归并为欠曝区域,将数目大于第二预定数目的过曝待定区域归并为过曝区域。
再例如,请结合图6,计算机程序还可被处理器20执行以完成以下步骤:
041:将基准图像中的欠曝区域替换为过曝图像中与欠曝区域对应的区域,将基准图像中的过曝区域替换为欠曝图像中与过曝区域对应的区域以得到目标图像。
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。
此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本发明的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本发明的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本发明的实施例所属技术领域的技术人员所理解。
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行 系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,"计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。
应当理解,本发明的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。
此外,在本发明各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。
上述提到的存储介质可以是只读存储器,磁盘或光盘等。尽管上面已经示出和描述了本发明的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在本发明的范围内可以对上述实施例进行变化、修改、替换和变型。
Claims (24)
- 一种图像处理方法,用于电子装置,其特征在于,所述图像处理方法包括:以第一曝光值获取至少一张基准图像;以小于所述第一曝光值的第二曝光值获取至少一张欠曝图像,以大于所述第一曝光值的第三曝光值获取至少一张过曝图像;识别所述基准图像中的亮度基准区域、欠曝区域和过曝区域;和维持所述亮度基准区域不变,根据所述欠曝图像和所述过曝图像分别修正所述过曝区域和所述欠曝区域以得到目标图像。
- 根据权利要求1所述的图像处理方法,其特征在于,所述基准图像包括主体区域和背景区域,所述主体区域为所述亮度基准区域,所述识别所述基准图像中的亮度基准区域、欠曝区域和过曝区域的步骤包括:处理所述基准图像以分割所述主体区域和所述背景区域;计算所述背景区域中各个像素的亮度值;和将所述亮度值小于第一亮度阈值的像素归并为所述欠曝区域,将所述亮度值大于第二亮度阈值的像素归并为所述过曝区域。
- 根据权利要求2所述的图像处理方法,其特征在于,所述将所述亮度值小于第一亮度阈值的像素归并为所述欠曝区域,将所述亮度值大于第二亮度阈值的像素归并为所述过曝区域的步骤包括:将相接的所述亮度值小于所述第一亮度值阈值的像素归并为欠曝待定区域,将相接的所述亮度值大于所述第二亮度阈值的像素归并为过曝待定区域;计算所述欠曝待定区域的面积及所述过曝待定区域的面积;和将所述面积大于第一面积阈值的欠曝待定区域归并为所述欠曝区域,将所述面积大于第二面积阈值的过曝待定区域归并为所述过曝区域。
- 根据权利要求2所述的图像处理方法,其特征在于,所述将所述亮度值小于第一亮度阈值的像素归并为所述欠曝区域,将所述亮度值大于第二亮度阈值的像素归并为所述过曝区域的步骤包括:将相接的所述亮度值小于所述第一亮度阈值的像素归并为欠曝待定区域,将相接的所述亮度值大于所述第二亮度阈值的像素归并为过曝待定区域;计算所述欠曝待定区域中所述像素的数目及所述过曝待定区域中所述像素的数目;和将所述数目大于第一预定数目的欠曝待定区域归并为所述欠曝区域,将所述数目大于第二预定数目的过曝待定区域归并为所述过曝区域。
- 根据权利要求2所述的图像处理方法,其特征在于,所述第一亮度阈值的取值范围为[0,20],所述第二亮度阈值的取值范围为[230,255]。
- 根据权利要求1所述的图像处理方法,其特征在于,所述维持所述亮度基准区域不变,根据所述欠曝图像和所述过曝图像分别修正所述过曝区域和所述欠曝区域以得到目标图像的步骤包括:将所述基准图像中的所述欠曝区域替换为所述过曝图像中与所述欠曝区域对应的区域,将所述基准图像中的所述过曝区域替换为所述欠曝图像中与所述过曝区域对应的区域以得到所述目标图像。
- 一种电子装置,其特征在于,所述电子装置包括:摄像头,所述摄像头用于:以第一曝光值获取至少一张基准图像;和以小于所述第一曝光值的第二曝光值获取至少一张欠曝图像,以大于所述第一曝光值的第三曝光值获取至少一张过曝图像;和处理器,所述处理器用于:识别所述基准图像中的亮度基准区域、欠曝区域和过曝区域;和维持所述亮度基准区域不变,根据所述欠曝图像和所述过曝图像分别修正所述过曝区域和所述欠曝区域以得到目标图像。
- 根据权利要求7所述的电子装置,其特征在于,所述基准图像包括主体区域和背景区域,所述主体区域为所述亮度基准区域,所述处理器进一步用于:处理所述基准图像以分割所述主体区域和所述背景区域;计算所述背景区域中各个像素的亮度值;和将所述亮度值小于第一亮度阈值的像素归并为所述欠曝区域,将所述亮度值大于第二亮度阈值的像素归并为所述过曝区域。
- 根据权利要求8所述的电子装置,其特征在于,所述处理器进一步用于:将相接的所述亮度值小于所述第一亮度值阈值的像素归并为欠曝待定区域,将相接的所述亮度值大于所述第二亮度阈值的像素归并为过曝待定区域;计算所述欠曝待定区域的面积及所述过曝待定区域的面积;和将所述面积大于第一面积阈值的欠曝待定区域归并为所述欠曝区域,将所述面积大于第二面积阈值的过曝待定区域归并为所述过曝区域。
- 根据权利要求8所述的电子装置,其特征在于,所述处理器进一步用于:将相接的所述亮度值小于所述第一亮度阈值的像素归并为欠曝待定区域,将相接的所述亮度值大于所述第二亮度阈值的像素归并为过曝待定区域;计算所述欠曝待定区域中所述像素的数目及所述过曝待定区域中所述像素的数目;和将所述数目大于第一预定数目的欠曝待定区域归并为所述欠曝区域,将所述数目大于第二预定数目的过曝待定区域归并为所述过曝区域。
- 根据权利要求8所述的电子装置,其特征在于,所述第一亮度阈值的取值范围为[0,20],所述第二亮度阈值的取值范围为[230,255]。
- 根据权利要求7所述的电子装置,其特征在于,所述处理器进一步用于:将所述基准图像中的所述欠曝区域替换为所述过曝图像中与所述欠曝区域对应的区域,将所述基准图像中的所述过曝区域替换为所述欠曝图像中与所述过曝区域对应的区域以得到所述目标图像。
- 一种电子装置,其特征在于,所述电子装置包括:摄像头;一个或多个处理器;存储器;和一个或多个程序,其中所述一个或多个程序被存储在所述存储器中,并且被配置成由所述一个或多个处理器执行,所述程序包括用于执行以下步骤的指令:以第一曝光值获取至少一张基准图像;以小于所述第一曝光值的第二曝光值获取至少一张欠曝图像,以大于所述第一曝光值的第三曝光值获取至少一张过曝图像;识别所述基准图像中的亮度基准区域、欠曝区域和过曝区域;和维持所述亮度基准区域不变,根据所述欠曝图像和所述过曝图像分别修正所述过曝区域和所述欠曝区域以得到目标图像。
- 根据权利要求13所述的电子装置,其特征在于,所述基准图像包括主体区域和背景区域,所述主体区域为所述亮度基准区域,所述程序还包括用于执行以下步骤的指令:处理所述基准图像以分割所述主体区域和所述背景区域;计算所述背景区域中各个像素的亮度值;和将所述亮度值小于第一亮度阈值的像素归并为所述欠曝区域,将所述亮度值大于第二亮度阈值的像素归并为所述过曝区域。
- 根据权利要求14所述的电子装置,其特征在于,所述程序还包括用于执行以下步骤的指令:将相接的所述亮度值小于所述第一亮度值阈值的像素归并为欠曝待定区域,将相接的所述亮度值大于所述第二亮度阈值的像素归并为过曝待定区域;计算所述欠曝待定区域的面积及所述过曝待定区域的面积;和将所述面积大于第一面积阈值的欠曝待定区域归并为所述欠曝区域,将所述面积大于第二面积阈值的过曝待定区域归并为所述过曝区域。
- 根据权利要求14所述的电子装置,其特征在于,所述程序还包括用于执行以下步骤的指令:将相接的所述亮度值小于所述第一亮度阈值的像素归并为欠曝待定区域,将相接的所述亮度值大于所述第二亮度阈值的像素归并为过曝待定区域;计算所述欠曝待定区域中所述像素的数目及所述过曝待定区域中所述像素的数目;和将所述数目大于第一预定数目的欠曝待定区域归并为所述欠曝区域,将所述数目大于第二预定数目的过曝待定区域归并为所述过曝区域。
- 根据权利要求14所述的电子装置,其特征在于,所述第一亮度阈值的取值范围为[0,20],所述第二亮度阈值的取值范围为[230,255]。
- 根据权利要求13所述的电子装置,其特征在于,所述程序还包括用于执行以下步骤的指令:将所述基准图像中的所述欠曝区域替换为所述过曝图像中与所述欠曝区域对应的区域,将所述基准图像中的所述过曝区域替换为所述欠曝图像中与所述过曝区域对应的区域以得到所述目标图像。
- 一种计算机可读存储介质,其特征在于,包括与能够摄像的电子装置结合使用的计算机程序,所述计算机程序可被处理器执行以完成以下步骤:以第一曝光值获取至少一张基准图像;以小于所述第一曝光值的第二曝光值获取至少一张欠曝图像,以大于所述第一曝光值的第三曝光值获取至少一张过曝图像;识别所述基准图像中的亮度基准区域、欠曝区域和过曝区域;和维持所述亮度基准区域不变,根据所述欠曝图像和所述过曝图像分别修正所述过曝区域和所述欠曝区域以得到目标图像。
- 根据权利要求19所述的计算机可读存储介质,其特征在于,所述基准图像包括主体区域和背景区域,所述主体区域为所述亮度基准区域,所述计算机程序还可被处理器执行以完成以下步骤:处理所述基准图像以分割所述主体区域和所述背景区域;计算所述背景区域中各个像素的亮度值;和将所述亮度值小于第一亮度阈值的像素归并为所述欠曝区域,将所述亮度值大于第二亮度阈值的像素归并为所述过曝区域。
- 根据权利要求20所述的计算机可读存储介质,其特征在于,所述计算机程序还可被处理器执行以完成以下步骤:将相接的所述亮度值小于所述第一亮度值阈值的像素归并为欠曝待定区域,将相接的所述亮度值大于所述第二亮度阈值的像素归并为过曝待定区域;计算所述欠曝待定区域的面积及所述过曝待定区域的面积;和将所述面积大于第一面积阈值的欠曝待定区域归并为所述欠曝区域,将所述面积大于第二面积阈值的过曝待定区域归并为所述过曝区域。
- 根据权利要求20所述的计算机可读存储介质,其特征在于,所述计算机程序还可被处理器执行以完成以下步骤:将相接的所述亮度值小于所述第一亮度阈值的像素归并为欠曝待定区域,将相接的所述亮度值大于所述第二亮度阈值的像素归并为过曝待定区域;计算所述欠曝待定区域中所述像素的数目及所述过曝待定区域中所述像素的数目;和将所述数目大于第一预定数目的欠曝待定区域归并为所述欠曝区域,将所述数目大于第二预定数目的过曝待定区域归并为所述过曝区域。
- 根据权利要求20所述的计算机可读存储介质,其特征在于,所述第一亮度阈值的取值范围为[0,20],所述第二亮度阈值的取值范围为[230,255]。
- 根据权利要求19所述的计算机可读存储介质,其特征在于,所述计算机程序还可被处理器执行以完成以下步骤:将所述基准图像中的所述欠曝区域替换为所述过曝图像中与所述欠曝区域对应的区域,将所述基准图像中的所述过曝区域替换为所述欠曝图像中与所述过曝区域对应的区域以得到所述目标图像。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710945392.2A CN107809582A (zh) | 2017-10-12 | 2017-10-12 | 图像处理方法、电子装置和计算机可读存储介质 |
CN201710945392.2 | 2017-10-12 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019072190A1 true WO2019072190A1 (zh) | 2019-04-18 |
Family
ID=61592799
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/109652 WO2019072190A1 (zh) | 2017-10-12 | 2018-10-10 | 图像处理方法、电子装置和计算机可读存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107809582A (zh) |
WO (1) | WO2019072190A1 (zh) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112614083A (zh) * | 2020-12-18 | 2021-04-06 | 北京迈格威科技有限公司 | 图像融合方法、装置及电子系统 |
CN112651899A (zh) * | 2021-01-15 | 2021-04-13 | 北京小米松果电子有限公司 | 图像处理方法及装置、电子设备、存储介质 |
CN112991206A (zh) * | 2021-03-10 | 2021-06-18 | 北京百度网讯科技有限公司 | 图像处理方法、装置、设备和存储介质 |
CN113487592A (zh) * | 2021-07-22 | 2021-10-08 | 四川九洲电器集团有限责任公司 | 一种基于统计量的高/多光谱图像过曝检测方法及系统 |
CN114820404A (zh) * | 2021-01-29 | 2022-07-29 | 北京字节跳动网络技术有限公司 | 图像处理方法、装置、电子设备及介质 |
CN115334228A (zh) * | 2021-04-26 | 2022-11-11 | 华为技术有限公司 | 一种视频处理方法及相关装置 |
CN115379128A (zh) * | 2022-08-15 | 2022-11-22 | Oppo广东移动通信有限公司 | 曝光控制方法及装置、计算机可读介质和电子设备 |
Families Citing this family (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107809582A (zh) * | 2017-10-12 | 2018-03-16 | 广东欧珀移动通信有限公司 | 图像处理方法、电子装置和计算机可读存储介质 |
CN108681182B (zh) * | 2018-04-24 | 2020-08-04 | 浙江大华技术股份有限公司 | 一种光圈控制方法及终端设备 |
TWI684165B (zh) * | 2018-07-02 | 2020-02-01 | 華晶科技股份有限公司 | 影像處理方法與電子裝置 |
CN110493538B (zh) * | 2019-08-16 | 2021-08-24 | Oppo广东移动通信有限公司 | 图像处理方法、装置、存储介质及电子设备 |
CN110930335B (zh) * | 2019-11-27 | 2023-03-31 | 维沃移动通信有限公司 | 一种图像处理方法及电子设备 |
CN110958363B (zh) * | 2019-12-04 | 2022-04-15 | RealMe重庆移动通信有限公司 | 图像处理方法及装置、计算机可读介质和电子设备 |
CN114946170B (zh) * | 2019-12-19 | 2024-04-19 | Oppo广东移动通信有限公司 | 生成图像的方法和电子设备 |
CN112288646A (zh) * | 2020-01-07 | 2021-01-29 | 影石创新科技股份有限公司 | 堆叠降噪方法、装置、电子设备及存储介质 |
CN111866400B (zh) * | 2020-07-02 | 2022-01-07 | 京东科技信息技术有限公司 | 一种图像处理方法及装置 |
CN112532891A (zh) * | 2020-11-25 | 2021-03-19 | 维沃移动通信有限公司 | 拍照方法及装置 |
CN112950509B (zh) * | 2021-03-18 | 2023-10-10 | 杭州海康威视数字技术股份有限公司 | 一种图像处理方法、装置及电子设备 |
CN114359210A (zh) * | 2021-12-30 | 2022-04-15 | 武汉华威科智能技术有限公司 | 一种电芯赋码检测方法及装置 |
CN117278865A (zh) * | 2023-11-16 | 2023-12-22 | 荣耀终端有限公司 | 一种图像处理方法及相关装置 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104052933A (zh) * | 2013-03-15 | 2014-09-17 | 聚晶半导体股份有限公司 | 动态范围模式的判定方法及其图像获取装置 |
US20150373245A1 (en) * | 2014-06-19 | 2015-12-24 | Hisense Electric Co., Ltd. | Processing Method Of Scene Image Of Device With Shooting Function, Device With Shooting Function And Storage Medium |
CN106791471A (zh) * | 2016-12-29 | 2017-05-31 | 宇龙计算机通信科技(深圳)有限公司 | 图像优化方法、图像优化装置和终端 |
CN106851124A (zh) * | 2017-03-09 | 2017-06-13 | 广东欧珀移动通信有限公司 | 基于景深的图像处理方法、处理装置和电子装置 |
CN107809582A (zh) * | 2017-10-12 | 2018-03-16 | 广东欧珀移动通信有限公司 | 图像处理方法、电子装置和计算机可读存储介质 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104333708B (zh) * | 2014-11-28 | 2017-10-20 | 广东欧珀移动通信有限公司 | 拍照方法、拍照装置及终端 |
CN105872393A (zh) * | 2015-12-08 | 2016-08-17 | 乐视移动智能信息技术(北京)有限公司 | 高动态范围图像的生成方法和装置 |
CN105578068B (zh) * | 2015-12-21 | 2018-09-04 | 广东欧珀移动通信有限公司 | 一种高动态范围图像的生成方法、装置及移动终端 |
CN105827754B (zh) * | 2016-03-24 | 2019-07-26 | 维沃移动通信有限公司 | 一种高动态范围图像的生成方法及移动终端 |
-
2017
- 2017-10-12 CN CN201710945392.2A patent/CN107809582A/zh active Pending
-
2018
- 2018-10-10 WO PCT/CN2018/109652 patent/WO2019072190A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104052933A (zh) * | 2013-03-15 | 2014-09-17 | 聚晶半导体股份有限公司 | 动态范围模式的判定方法及其图像获取装置 |
US20150373245A1 (en) * | 2014-06-19 | 2015-12-24 | Hisense Electric Co., Ltd. | Processing Method Of Scene Image Of Device With Shooting Function, Device With Shooting Function And Storage Medium |
CN106791471A (zh) * | 2016-12-29 | 2017-05-31 | 宇龙计算机通信科技(深圳)有限公司 | 图像优化方法、图像优化装置和终端 |
CN106851124A (zh) * | 2017-03-09 | 2017-06-13 | 广东欧珀移动通信有限公司 | 基于景深的图像处理方法、处理装置和电子装置 |
CN107809582A (zh) * | 2017-10-12 | 2018-03-16 | 广东欧珀移动通信有限公司 | 图像处理方法、电子装置和计算机可读存储介质 |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112614083A (zh) * | 2020-12-18 | 2021-04-06 | 北京迈格威科技有限公司 | 图像融合方法、装置及电子系统 |
CN112651899A (zh) * | 2021-01-15 | 2021-04-13 | 北京小米松果电子有限公司 | 图像处理方法及装置、电子设备、存储介质 |
CN114820404A (zh) * | 2021-01-29 | 2022-07-29 | 北京字节跳动网络技术有限公司 | 图像处理方法、装置、电子设备及介质 |
CN112991206A (zh) * | 2021-03-10 | 2021-06-18 | 北京百度网讯科技有限公司 | 图像处理方法、装置、设备和存储介质 |
CN112991206B (zh) * | 2021-03-10 | 2023-11-10 | 北京百度网讯科技有限公司 | 图像处理方法、装置、设备和存储介质 |
CN115334228A (zh) * | 2021-04-26 | 2022-11-11 | 华为技术有限公司 | 一种视频处理方法及相关装置 |
CN113487592A (zh) * | 2021-07-22 | 2021-10-08 | 四川九洲电器集团有限责任公司 | 一种基于统计量的高/多光谱图像过曝检测方法及系统 |
CN113487592B (zh) * | 2021-07-22 | 2023-11-17 | 四川九洲电器集团有限责任公司 | 一种基于统计量的高光谱或多光谱图像过曝检测方法及系统 |
CN115379128A (zh) * | 2022-08-15 | 2022-11-22 | Oppo广东移动通信有限公司 | 曝光控制方法及装置、计算机可读介质和电子设备 |
Also Published As
Publication number | Publication date |
---|---|
CN107809582A (zh) | 2018-03-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019072190A1 (zh) | 图像处理方法、电子装置和计算机可读存储介质 | |
CN108335279B (zh) | 图像融合和hdr成像 | |
US20200043225A1 (en) | Image processing apparatus and control method thereof | |
WO2020029732A1 (zh) | 全景拍摄方法、装置和成像设备 | |
CN108616689B (zh) | 基于人像的高动态范围图像获取方法、装置及设备 | |
JP6720881B2 (ja) | 画像処理装置及び画像処理方法 | |
US20190156461A1 (en) | Image processing apparatus, image processing method, and storage medium | |
KR20130031574A (ko) | 영상 처리 방법 및 영상 처리 장치 | |
JP6412386B2 (ja) | 画像処理装置およびその制御方法、プログラムならびに記録媒体 | |
JP7129520B2 (ja) | 画像処理装置、画像処理方法、およびプログラム | |
JP2015082768A (ja) | 画像処理装置及び画像処理方法、プログラム、記憶媒体 | |
KR20120071192A (ko) | 디지털 촬영 장치 및 이의 제어 방법 | |
JP7114335B2 (ja) | 画像処理装置、画像処理装置の制御方法、及び、プログラム | |
JP2017152866A (ja) | 画像処理装置及び画像処理方法 | |
US10863103B2 (en) | Setting apparatus, setting method, and storage medium | |
JP7277158B2 (ja) | 設定装置及び方法、プログラム、記憶媒体 | |
JP2020053805A (ja) | 撮像装置及びその制御方法、並びにプログラム | |
JP6033006B2 (ja) | 画像処理装置、その制御方法、および制御プログラム、並びに撮像装置 | |
JP6663246B2 (ja) | 画像処理装置、撮像装置およびこれらの制御方法ならびにプログラム | |
JP7534866B2 (ja) | 画像処理装置及び方法、プログラム、記憶媒体 | |
JP2015119436A (ja) | 撮像装置 | |
JP6727276B2 (ja) | 画像処理装置、その制御方法、プログラム | |
JP6675461B2 (ja) | 画像処理装置およびその制御方法、ならびにプログラム | |
JP2018190257A (ja) | 画像処理装置 | |
JP2017069871A (ja) | 画像処理装置、その制御方法、プログラム及び記録媒体 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18865459 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18865459 Country of ref document: EP Kind code of ref document: A1 |