Image processing method, image processing device and computer storage medium

By dividing the target pixel into sub-pixels with different exposure compensations, acquiring and detecting multiple candidate images, and selecting the appropriate image for output, the problem of detail loss in scenes with large contrast between highlights and shadows in traditional cameras is solved, thereby improving the dynamic range and image quality of the image.

CN121645009APending Publication Date: 2026-03-10ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-31
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

In outdoor scenes with high contrast between highlights and shadows, traditional cameras cause the loss of detail in either the highlight or shadow areas of the image due to exposure compensation. Existing technologies that increase the number of sensors or use multi-frame capture result in structural complexity and image blur.

Method used

By dividing the target pixel into sub-pixels with different exposure compensations, acquiring multiple candidate images, and selecting the appropriate image output through threshold detection, the images with different exposure compensations are fused to improve the dynamic range.

Benefits of technology

Without increasing the number of sensors, the image dynamic range was improved, avoiding image blurring caused by multi-frame capture and outputting wide dynamic range images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121645009A_ABST
    Figure CN121645009A_ABST
Patent Text Reader

Abstract

The invention provides an image processing method, an image processing device and a computer storage medium. The image processing method comprises the following steps: dividing sub-pixels with different exposure compensations according to a target pixel; acquiring a plurality of candidate images by using the sub-pixels with different exposure compensation; detecting whether the dark part of a first candidate image with the minimum exposure compensation in the plurality of candidate images is greater than a preset dark part threshold value or not; and if yes, outputting the first candidate image as a target image of the target pixel. Through the image processing method, different exposure compensation images are selected to improve the dynamic range.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to an image processing method, an image processing apparatus, and a computer storage medium. Background Technology

[0002] With the development of smart IoT technology, camera capture products, as the primary information acquisition source, are placing higher demands on the richness of details within captured images. Mainstream camera capture products generally include components such as lenses, image sensors, drive circuits, power supplies, and structural housings. In outdoor scenes with high contrast between highlights and shadows, traditional camera capture products either reduce exposure compensation to see details in the highlights, resulting in overly dark shadows and loss of detail, or increase exposure compensation to see details in the shadows, resulting in overly bright highlights and loss of detail.

[0003] Industry-standard techniques primarily involve: 1) capturing images from multiple image sensors and synthesizing highlights and shadows. This requires adjusting the lens's imaging optical path to distribute light across two or more image sensors, increasing structural size and assembly complexity; 2) capturing two or more frames with low and high exposure compensation respectively and then synthesizing them. However, the time difference between the two frames can cause blurring or distortion of details, especially for fast-moving objects. Summary of the Invention

[0004] To address the aforementioned technical problems, this application proposes an image processing method, an image processing apparatus, and a computer storage medium.

[0005] To address the aforementioned technical problems, this application proposes an image processing method, which includes: Subpixels with different exposure compensations are divided based on the target pixel; Several candidate images are acquired using sub-pixels with different exposure compensations; Detect whether the dark area of ​​the first candidate image with the smallest exposure compensation among the plurality of candidate images is greater than a preset dark area threshold; If so, the first candidate image is output as the target image of the target pixel.

[0006] The sub-pixels with different exposure compensations include the first sub-pixel, the second sub-pixel, the third sub-pixel, and the fourth sub-pixel, with exposure compensation increasing from small to large.

[0007] Wherein, the first sub-pixel is composed of a first number of compensation pixels, the second sub-pixel is composed of a second number of compensation pixels, the third sub-pixel is composed of a third number of compensation pixels, and the fourth sub-pixel is composed of a fourth number of compensation pixels; The first quantity, the second quantity, the third quantity, and the fourth quantity are in an ascending order.

[0008] The target pixel is one or more of R pixels, G pixels, and B pixels.

[0009] The image processing method further includes: When the dark area of ​​the first candidate image is less than or equal to the preset dark area threshold, a second candidate image with higher exposure compensation than the first candidate image is obtained. Detect whether the dark area of ​​the second candidate image is greater than a preset dark area threshold; If so, detect whether the bright part of the second candidate image is less than a preset bright part threshold; If so, the second candidate image is output as the target image of the target pixel.

[0010] The image processing method further includes: When the dark area of ​​the first candidate image is less than or equal to the preset dark area threshold, the dark area of ​​the second candidate image is greater than the preset dark area threshold, and the bright area of ​​the second candidate image is greater than or equal to the preset bright area threshold, the image after fusing the bright area of ​​the first candidate image and the dark area of ​​the second candidate image is output as the target image of the target pixel.

[0011] The image processing method further includes: When the dark area of ​​the second candidate image is less than or equal to the preset dark area threshold, a third candidate image with an exposure compensation higher than that of the second candidate image is obtained. When the dark part of the third candidate image is greater than the preset dark part threshold and the bright part of the third candidate image is less than the preset bright part threshold, the third candidate image is output as the target image of the target pixel.

[0012] After obtaining a third candidate image with exposure compensation higher than that of the second candidate image, the image processing method further includes: When the dark part of the third candidate image is greater than the preset dark part threshold, the bright part of the third candidate image is greater than or equal to the preset bright part threshold, and the bright part of the second candidate image is less than the preset bright part threshold, the image after fusing the bright part of the second candidate image and the dark part of the third candidate image is output as the target image of the target pixel. When the dark part of the third candidate image is greater than the preset dark part threshold, the bright part of the third candidate image is greater than or equal to the preset bright part threshold, and the bright part of the second candidate image is greater than or equal to the preset bright part threshold, the image after fusing the bright part of the first candidate image and the dark part of the third candidate image is output as the target image of the target pixel.

[0013] The image processing method further includes: When the dark area of ​​the third candidate image is less than or equal to the preset dark area threshold, a fourth candidate image with an exposure compensation higher than that of the third candidate image is obtained. When the bright part of the fourth candidate image is less than the preset bright part threshold, the fourth candidate image is output as the target image of the target pixel.

[0014] After obtaining a fourth candidate image with exposure compensation higher than that of the third candidate image, the image processing method further includes: When the bright part of the fourth candidate image is greater than or equal to the preset bright part threshold, and the bright part of the third candidate image is less than the preset bright part threshold, the image after fusing the bright part of the third candidate image and the dark part of the fourth candidate image is output as the target image of the target pixel. When the bright part of the fourth candidate image is greater than or equal to the preset bright part threshold, the bright part of the third candidate image is greater than or equal to the preset bright part threshold, and the bright part of the second candidate image is less than the preset bright part threshold, the image after fusing the bright part of the second candidate image and the dark part of the fourth candidate image is output as the target image of the target pixel. When the bright part of the fourth candidate image is greater than or equal to the preset bright part threshold, the bright part of the third candidate image is greater than or equal to the preset bright part threshold, and the bright part of the second candidate image is greater than or equal to the preset bright part threshold, the image after fusing the bright part of the first candidate image and the dark part of the fourth candidate image is output as the target image of the target pixel.

[0015] To address the aforementioned technical problems, this application also proposes an image processing apparatus, which includes a memory and a processor coupled to the memory; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the image processing method described above.

[0016] To address the aforementioned technical problems, this application also proposes a computer storage medium for storing program data, which, when executed by a computer, is used to implement the aforementioned image processing method.

[0017] Compared with the prior art, the beneficial effects of this application are: the image processing device can divide the target pixel into sub-pixels with different exposure compensation, and then acquire images through sub-pixels with different exposure compensation to improve the dynamic range of the image; by comparing the dark areas of the detected image with a threshold, the image with appropriate exposure is selected as the image output of the target pixel. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein: Figure 1 This is a flowchart illustrating the first embodiment of the image processing method provided in this application; Figure 2 This is a flowchart illustrating the image determination output provided in this application; Figure 3 This is a schematic diagram of the pixel arrangement of an image sensor provided by current technology; Figure 4 This is a top view of the pixel arrangement of an image sensor provided by current technology; Figure 5 This is a top view of the G-subpixel arrangement of the image sensor provided in this application; Figure 6 This is a schematic diagram of an embodiment of sub-pixel division provided in this application; Figure 7 This is a schematic diagram of another embodiment of sub-pixel division provided in this application; Figure 8 This is a schematic diagram of the image sensor pixel photoelectric conversion circuit provided in this application; Figure 9 This is a schematic diagram illustrating the contrast between the light and dark areas of a face and a license plate in the traffic capture image provided in this application; Figure 10 This is a flowchart illustrating the second embodiment of the image processing method provided in this application; Figure 11 This is a flowchart illustrating the third embodiment of the image processing method provided in this application; Figure 12 This is a flowchart illustrating the fourth embodiment of the image processing method provided in this application; Figure 13 This is a schematic diagram of the structure of an embodiment of the image processing apparatus provided in this application; Figure 14 This is a schematic diagram of the structure of an embodiment of the computer storage medium provided in this application. Detailed Implementation

[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0020] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0021] The image processing method provided in this application aims to solve the problem of generating multiple images from a single frame without increasing the number of sensors, and to improve dynamic range by fusing images with different exposure compensations. Please refer to [link / reference] for details. Figure 1 and Figure 2 , Figure 1 This is a flowchart illustrating the first embodiment of the image processing method provided in this application. Figure 2 This is a flowchart illustrating the image determination output provided in this application.

[0022] The image processing method of this application is applied to an image processing apparatus, which can be a server, a terminal device, or a system in which the server and the terminal device cooperate with each other. Accordingly, the various parts of the image processing apparatus, such as each unit, subunit, module, and submodule, can all be set in the server, all in the terminal device, or separately in the server and the terminal device.

[0023] Furthermore, the aforementioned server can be either hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software programs or software modules, such as software or software modules used to provide distributed server functionality, or as a single software program or software module; no specific limitations are made here.

[0024] like Figure 1 As shown, the specific steps are as follows: Step S11: Divide the target pixel into sub-pixels with different exposure compensations.

[0025] In the embodiments of this application, please refer to the current image sensor pixel technology. Figure 3 and Figure 4 , Figure 3 This is a schematic diagram of the pixel arrangement of an image sensor provided by current technology. Figure 4 This is a top view of the pixel arrangement of an image sensor provided by current technology.

[0026] The image processing method implemented in this application is mainly aimed at Figure 3 and Figure 4 The pixels of the image sensor are optimized. Therefore, the target pixel of this application can be one or more of R pixels, G pixels, and B pixels. The following explanation uses G pixels as the target pixel.

[0027] Traditional pixel layout top view as follows Figure 4 As shown, after optimization, pixel G can be divided into 4 sub-pixels, with a total area of ​​4. =Total area of ​​G pixels before optimization , forming as Figure 5 The image sensor G subpixel arrangement shown is a top view of the image sensor provided in this application. In other embodiments, the G pixel may also be divided into other numbers of subpixels, which are not listed here. Each subpixel captures an image simultaneously: the first subpixel, in conjunction with pixels B and R, captures image 1 (first candidate image); the second subpixel, in conjunction with pixels B and R, captures image 2 (second candidate image); the third subpixel, in conjunction with pixels B and R, captures image 3 (third candidate image); and the fourth subpixel, in conjunction with pixels B and R, captures image 4 (fourth candidate image). The above four subpixels capture images according to different exposure compensations.

[0028] In one specific implementation, the four images are set with different exposure compensations of 0%, 25%, 50%, and 75%, respectively. Traditionally, a single pixel can only be set to a fixed gain level of 0% to 100%, such as 25% or 50%.

[0029] The sub-pixel setting schemes include, but are not limited to, the following two schemes: First, please refer to the details. Figure 6 , Figure 6 This is a schematic diagram of an embodiment of sub-pixel division provided in this application. Figure 6As shown, subpixels 1, 2, 3, and 4 in pixel G are set to exposure compensation of 0%, 25%, 50%, and 75%, respectively. These subpixels are expanded into region I in the captured image using an image expansion algorithm. The expansion algorithm does not change the pixel size in the image, but rather the exposure value. Subpixel 1 expands region I with a total exposure compensation of 0%, subpixel 2 with 25%, subpixel 3 with 50%, and subpixel 4 with 75%. After expansion, the relative positions of subpixels G remain unchanged, all falling within region I, resulting in images 1, 2, 3, and 4, respectively. In this proposal, R, B, and G pixels can be used together or selected to divide subpixels with a single color. A pixel can be equally divided into n subpixels of arbitrary shape, with subpixel exposure compensation values ​​set to 0%, (1 / n)%, ..., [(n-1) / n]%.

[0030] Second, please refer to the details. Figure 7 , Figure 7 This is a schematic diagram of another embodiment of sub-pixel division provided in this application. For example... Figure 7 As shown, all sub-pixels in pixel G have 25% exposure compensation. Region II contains one 25% exposure compensation sub-pixel. Region II is expanded into Region I in the captured image using an image augmentation algorithm to obtain image 1. Region III contains three 25% exposure compensation sub-pixels, and all three sub-pixels are simultaneously photosensitive. The photosensitive area of ​​Region III is three times that of Region II, meaning that under the same exposure time, the exposure of Region III is three times that of Region II. Region III is expanded into Region I in the captured image using an image augmentation algorithm to obtain image 3. Image 1 represents the 25% exposure compensation effect, and image 3 represents the 75% exposure compensation effect. The difference between image 3 and image 1 is used to obtain image 2. The sum of image 3 and image 1 is used to obtain image 4.

[0031] It should be noted that in this application, R pixel, B pixel, and G pixel can be divided into two sub-pixels by combining or selecting one of the colors. The areas of the two sub-pixels are respectively 1 / n and (n-1) / n of the area of ​​the pixel before division, and the corresponding exposure compensation values ​​of the sub-pixels are set to (1 / n)% and [(n-1) / n]%.

[0032] by Figure 6 For the technical implementation of the first scheme shown, please refer to the following documentation. Figure 8 , Figure 8 This is a schematic diagram of the image sensor pixel photoelectric conversion circuit provided in this application.

[0033] like Figure 8As shown, all G sub-pixels 1 in the image sensor are connected in series to form a sub-pixel 1 photoelectric conversion circuit; all G sub-pixels 2 in the image sensor are connected in series to form a sub-pixel 2 photoelectric conversion circuit; all G sub-pixels 3 in the image sensor are connected in series to form a sub-pixel 3 photoelectric conversion circuit; and all G sub-pixels 4 in the image sensor are connected in series to form a sub-pixel 4 photoelectric conversion circuit. Each floating diffusion potential is set with a different capacitance value, causing the four sub-pixels with the same number of photogenerated electrons to generate different voltages, thus producing different gradient digital signals. The four G sub-pixel digital signals are respectively combined with the shared R and B pixel digital signals to output images, achieving images 1, 2, 3, and 4 with different exposure compensation effects.

[0034] Step S12: Acquire several candidate images using sub-pixels with different exposure compensations.

[0035] In this embodiment of the application, the image processing device acquires image 1, image 2, image 3 and image 4 according to the basic principle of step S11.

[0036] Furthermore, the image processing device also needs to actively identify or autonomously define the bright and dark areas of the image; please refer to [link to relevant documentation] for details. Figure 9 , Figure 9 This is a schematic diagram illustrating the contrast between the brightness of a face and a license plate in a traffic capture image provided in this application. For example, when capturing a high-speed moving vehicle in a traffic scene, it is necessary to clearly see the face in area A and the license plate in area C. Since the license plate has a higher reflectivity than the face, the face area is often too dark to be easily distinguished while the license plate is clearly visible. Therefore, area A can be defined as the dark area and area C as the bright area. A threshold α is set for the dark area, and a threshold β for the bright area. Images 1, 2, 3, and 4 are obtained by capturing one frame with exposure compensation of 0%, 25%, 50%, and 75%, respectively.

[0037] In other scenarios, the areas can be divided into bright and dark areas according to the pre-defined bright and dark areas set by the staff, which will not be elaborated here.

[0038] Step S13: Detect whether the dark area of ​​the first candidate image with the smallest exposure compensation among several candidate images is greater than the preset dark area threshold.

[0039] In the embodiments of this application, such as Figure 2 As shown, the image processing device determines whether the dark area of ​​image 1 is higher than the threshold α; if so, it proceeds to step S14.

[0040] Step S14: Output the first candidate image as the target image of the target pixel.

[0041] In this embodiment of the application, the image processing device outputs image 1 as the image output result of the image sensor.

[0042] exist Figure 1 Based on the image processing method shown, this application also provides another image processing method, please refer to the following: Figure 10 , Figure 10 This is a flowchart illustrating the second embodiment of the image processing method provided in this application.

[0043] like Figure 10 As shown, the specific steps are as follows: Step S21: When the dark area of ​​the first candidate image is less than or equal to a preset dark area threshold, obtain a second candidate image with an exposure compensation higher than that of the first candidate image.

[0044] In the embodiments of this application, such as Figure 2 As shown, when the image processing device determines that the dark part of image 1 is below the threshold α, it continues to detect and judge the dark and bright parts of image 2.

[0045] Step S22: Detect whether the dark area of ​​the second candidate image is greater than the preset dark area threshold.

[0046] In the embodiments of this application, such as Figure 2 As shown, the image processing device determines whether the dark area of ​​image 2 is higher than the threshold α; if so, it proceeds to step S23.

[0047] Step S23: Detect whether the bright part of the second candidate image is less than the preset bright part threshold.

[0048] In the embodiments of this application, such as Figure 2 As shown, the image processing device determines whether the bright part of image 2 is higher than the threshold β; if so, it proceeds to step S24.

[0049] Furthermore, when the image processing device determines that the bright part of image 2 is higher than the threshold β, it outputs a fused image of the bright part of image 1 and the dark part of image 2 as the image output result of the image sensor.

[0050] Step S24: Output the second candidate image as the target image of the target pixel.

[0051] In this embodiment of the application, the image processing device outputs image 2 as the image output result of the image sensor.

[0052] exist Figure 10 Based on the image processing method shown, this application also provides another image processing method, please refer to the following: Figure 11 , Figure 11 This is a flowchart illustrating the third embodiment of the image processing method provided in this application.

[0053] like Figure 11 As shown, the specific steps are as follows: Step S31: When the dark area of ​​the second candidate image is less than or equal to the preset dark area threshold, obtain a third candidate image with an exposure compensation higher than that of the second candidate image.

[0054] In the embodiments of this application, such as Figure 2 As shown, when the image processing device determines that the dark part of image 2 is below the threshold α, it continues to detect and judge the dark and bright parts of image 3.

[0055] Step S32: When the dark part of the third candidate image is greater than the preset dark part threshold and the bright part of the third candidate image is less than the preset bright part threshold, the third candidate image is output as the target image of the target pixel.

[0056] In the embodiments of this application, such as Figure 2 As shown, when the image processing device determines that the dark areas of image 3 are higher than the threshold α, it continues to determine whether the bright areas of image 3 are lower than the threshold β. If so, the image processing device outputs image 3 as the image output result of the image sensor for this time.

[0057] Step S33: When the dark part of the third candidate image is greater than the preset dark part threshold, the bright part of the third candidate image is greater than or equal to the preset bright part threshold, and the bright part of the second candidate image is less than the preset bright part threshold, the image after fusing the bright part of the second candidate image and the dark part of the third candidate image is output as the target image of the target pixel.

[0058] In the embodiments of this application, such as Figure 2 As shown, when the image processing device determines that the dark areas of image 3 are above the threshold α, it continues to determine whether the bright areas of image 3 are below the threshold β. If not, the image processing device continues to determine whether the bright areas of image 2 are below the threshold β. If so, the image processing device outputs a fused image of the bright areas of image 2 and the dark areas of image 3 as the image output result of the image sensor for this time.

[0059] Step S34: When the dark part of the third candidate image is greater than the preset dark part threshold, the bright part of the third candidate image is greater than or equal to the preset bright part threshold, and the bright part of the second candidate image is greater than or equal to the preset bright part threshold, the image after fusing the bright part of the first candidate image and the dark part of the third candidate image is output as the target image of the target pixel.

[0060] In the embodiments of this application, such as Figure 2 As shown, when the image processing device determines that the dark areas of image 3 are above the threshold α, it continues to determine whether the bright areas of image 3 are below the threshold β. If not, the image processing device continues to determine whether the bright areas of image 2 are below the threshold β. If not, the image processing device outputs a fused image of the bright areas of image 1 and the dark areas of image 3 as the image output result of the image sensor for this time.

[0061] exist Figure 11Based on the image processing method shown, this application also provides another image processing method, please refer to the following: Figure 12 , Figure 12 This is a flowchart illustrating the fourth embodiment of the image processing method provided in this application.

[0062] like Figure 12 As shown, the specific steps are as follows: Step S41: When the dark area of ​​the third candidate image is less than or equal to the preset dark area threshold, obtain the fourth candidate image with an exposure compensation higher than that of the third candidate image.

[0063] In the embodiments of this application, such as Figure 2 As shown, when the image processing device determines that the dark part of image 3 is below the threshold α, it continues to detect and judge the dark and bright parts of image 4.

[0064] Step S42: When the bright part of the fourth candidate image is less than the preset bright part threshold, the fourth candidate image is output as the target image of the target pixel.

[0065] In the embodiments of this application, such as Figure 2 As shown, when the image processing device determines that the bright part of image 4 is lower than the threshold β, it outputs image 4 as the image output result of the image sensor for this time.

[0066] Step S43: When the bright part of the fourth candidate image is greater than or equal to the preset bright part threshold, and the bright part of the third candidate image is less than the preset bright part threshold, the image after fusing the bright part of the third candidate image and the dark part of the fourth candidate image is output as the target image of the target pixel.

[0067] In the embodiments of this application, such as Figure 2 As shown, when the image processing device determines that the bright part of image 4 is higher than the threshold β, it continues to determine whether the bright part of image 3 is lower than the threshold β. If so, the image processing device outputs a fused image of the bright part of image 3 and the dark part of image 4 as the image output result of the image sensor for this time.

[0068] Step S44: When the bright part of the fourth candidate image is greater than or equal to the preset bright part threshold, the bright part of the third candidate image is greater than or equal to the preset bright part threshold, and the bright part of the second candidate image is less than the preset bright part threshold, the image after fusing the bright part of the second candidate image and the dark part of the fourth candidate image is output as the target image of the target pixel.

[0069] In the embodiments of this application, such as Figure 2As shown, when the image processing device determines that the bright areas of image 4 are above the threshold β, it continues to determine whether the bright areas of image 3 are below the threshold β. If not, the image processing device continues to determine whether the bright areas of image 2 are below the threshold β. If so, the image processing device outputs a fused image of the bright areas of image 2 and the dark areas of image 4 as the image output result of the image sensor for this time.

[0070] Step S45: When the bright part of the fourth candidate image is greater than or equal to the preset bright part threshold, the bright part of the third candidate image is greater than or equal to the preset bright part threshold, and the bright part of the second candidate image is greater than or equal to the preset bright part threshold, the image after fusing the bright part of the first candidate image and the dark part of the fourth candidate image is output as the target image of the target pixel.

[0071] In the embodiments of this application, such as Figure 2 As shown, when the image processing device determines that the bright areas of image 4 are above the threshold β, it continues to determine whether the bright areas of image 3 are below the threshold β. If not, the image processing device continues to determine whether the bright areas of image 2 are below the threshold β. If not, the image processing device outputs a fused image of the bright areas of image 1 and the dark areas of image 4 as the image output result of the image sensor for this time.

[0072] The image processing method of this application can acquire low-exposure and high-exposure images with a wider dynamic range from the photosensitive layer using a single image sensor; the image processing method of this application can also capture multiple images from a single frame, avoiding image blurring caused by multiple frame captures, and outputting wide dynamic range images.

[0073] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0074] To implement the above image processing method, this application also proposes an image processing apparatus, which can be found in detail below. Figure 13 , Figure 13 This is a schematic diagram of an embodiment of the image processing apparatus provided in this application.

[0075] The image processing apparatus 500 of this embodiment includes a processor 51, a memory 52, an input / output device 53, and a bus 54.

[0076] The processor 51, memory 52, and input / output device 53 are respectively connected to the bus 54. The memory 52 stores program data, and the processor 51 is used to execute the program data to implement the image processing method described in the above embodiments.

[0077] In this embodiment, processor 51 can also be referred to as a CPU (Central Processing Unit). Processor 51 may be an integrated circuit chip with signal processing capabilities. Processor 51 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor, or processor 51 can be any conventional processor.

[0078] This application also provides a computer storage medium; please refer to the following: Figure 14 , Figure 14 This is a schematic diagram of a computer storage medium according to an embodiment of the present application. The computer storage medium 600 stores a computer program 61, which, when executed by a processor, is used to implement the image processing method of the above embodiment.

[0079] When the embodiments of this application are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0080] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. An image processing method, characterized by, The image processing method comprises: dividing a target pixel into sub-pixels with different exposure compensations; acquiring a plurality of candidate images by using the sub-pixels with different exposure compensations; detecting whether a dark part of a first candidate image with the smallest exposure compensation in the plurality of candidate images is greater than a preset dark part threshold; if yes, outputting the first candidate image as a target image of the target pixel.

2. The image processing method of claim 1, wherein the sub-pixels with different exposure compensations comprise a first sub-pixel, a second sub-pixel, a third sub-pixel and a fourth sub-pixel with exposure compensations from small to large.

3. The image processing method of claim 2, wherein the first sub-pixel is composed of a first number of compensation pixels, the second sub-pixel is composed of a second number of compensation pixels, the third sub-pixel is composed of a third number of compensation pixels, and the fourth sub-pixel is composed of a fourth number of compensation pixels; the first number, the second number, the third number and the fourth number are in a relationship from small to large.

4. The image processing method of claim 1, wherein the target pixel is one or more of an R pixel, a G pixel and a B pixel.

5. The image processing method of claim 1, further comprising: when the dark part of the first candidate image is less than or equal to the preset dark part threshold, acquiring a second candidate image with an exposure compensation higher than that of the first candidate image; detecting whether a dark part of the second candidate image is greater than a preset dark part threshold; if yes, detecting whether a bright part of the second candidate image is less than a preset bright part threshold; if yes, outputting the second candidate image as a target image of the target pixel.

6. The image processing method of claim 5, further comprising: when the dark part of the first candidate image is less than or equal to the preset dark part threshold, the dark part of the second candidate image is greater than the preset dark part threshold, and the bright part of the second candidate image is greater than or equal to the preset bright part threshold, outputting an image fused by the bright part of the first candidate image and the dark part of the second candidate image as a target image of the target pixel.

7. The image processing method of claim 5, further comprising: when the dark part of the second candidate image is less than or equal to the preset dark part threshold, acquiring a third candidate image with an exposure compensation higher than that of the second candidate image; when the dark part of the third candidate image is greater than the preset dark part threshold, and the bright part of the third candidate image is less than the preset bright part threshold, outputting the third candidate image as a target image of the target pixel.

8. The image processing method of claim 7, wherein after the acquiring of the third candidate image with the exposure compensation higher than that of the second candidate image, the image processing method further comprises: ​ ​ ​ ​ when the dark part of the third candidate image is greater than the preset dark part threshold, the bright part of the third candidate image is greater than or equal to the preset bright part threshold, and the bright part of the second candidate image is less than the preset bright part threshold, an image fused from the bright part of the second candidate image and the dark part of the third candidate image is output as the target image of the target pixel; when the dark part of the third candidate image is greater than the preset dark part threshold, the bright part of the third candidate image is greater than or equal to the preset bright part threshold, and the bright part of the second candidate image is greater than or equal to the preset bright part threshold, an image fused from the bright part of the first candidate image and the dark part of the third candidate image is output as the target image of the target pixel.

9. The image processing method of claim 7, wherein the image processing method further comprises: when the dark part of the third candidate image is less than or equal to the preset dark part threshold, a fourth candidate image with exposure compensation higher than that of the third candidate image is obtained; when the bright part of the fourth candidate image is less than the preset bright part threshold, the fourth candidate image is output as the target image of the target pixel.

10. The image processing method of claim 9, wherein after the fourth candidate image with exposure compensation higher than that of the third candidate image is obtained, the image processing method further comprises: when the bright part of the fourth candidate image is greater than or equal to the preset bright part threshold, and the bright part of the third candidate image is less than the preset bright part threshold, an image fused from the bright part of the third candidate image and the dark part of the fourth candidate image is output as the target image of the target pixel; when the bright part of the fourth candidate image is greater than or equal to the preset bright part threshold, the bright part of the third candidate image is greater than or equal to the preset bright part threshold, and the bright part of the second candidate image is less than the preset bright part threshold, an image fused from the bright part of the second candidate image and the dark part of the fourth candidate image is output as the target image of the target pixel; when the bright part of the fourth candidate image is greater than or equal to the preset bright part threshold, the bright part of the third candidate image is greater than or equal to the preset bright part threshold, and the bright part of the second candidate image is greater than or equal to the preset bright part threshold, an image fused from the bright part of the first candidate image and the dark part of the fourth candidate image is output as the target image of the target pixel.

11. An image processing apparatus characterized by comprising: the image processing apparatus comprises a memory and a processor coupled with the memory; wherein the memory is configured to store program data, and the processor is configured to execute the program data to implement the image processing method according to any one of claims 1 to 10.

12. A computer storage medium, characterized in that the computer storage medium is configured to store program data, which when executed by a computer, is configured to implement the image processing method according to any one of claims 1 to 10.