Image color correction method, storage medium and electronic equipment

By collecting and analyzing infrared fill-light images, positioning and correcting the color cast area in the true color night vision image due to infrared light reflection, the problem of color casting in the true color night vision image is solved, and the accuracy of color correction and the authenticity of the image are improved.

CN120339152APending Publication Date: 2025-07-18HUNAN GOKE MICROELECTRONICS CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510482470.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

In true color night vision images, some objects with high infrared radiation reflectivity have serious color casting problems, and the prior art is difficult to effectively solve.

Method used

The original image and infrared fill light images in the same scene are collected, the target area in the original image is located through the infrared fill light image, and the target area is color corrected, and the color cast area is recognized and corrected by infrared fill light intensity reflection.

Benefits of technology

It improves the color accuracy of the image, avoids the influence of the processing of non-color cast areas, maintains the naturalness and authenticity of the image, and improves the problem of color distortion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120339152A_ABST
    Figure CN120339152A_ABST
Patent Text Reader

Abstract

The invention provides an image color correction method, a storage medium and electronic equipment. The method comprises the following steps: acquiring an original image and an infrared light supplementing image in the same scene; positioning a target area in the original image according to the infrared light supplementing image; the target area is an area which generates color cast due to infrared light intensity reflection in the original image; and performing color correction on the target area in the original image to obtain a corrected image. The color distortion caused by the fact that the original image is limited by hardware can be improved, and the authenticity of the original image is enhanced.
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 particularly to an image color correction method, a storage medium, and an electronic device. Background Art

[0002] Near-infrared radiation is an important component of night sky light. Making full use of near-infrared radiation is an effective means to improve the signal-to-noise ratio of a true-color night vision imaging system.

[0003] In some implementation scenarios of security monitoring products, using infrared light can improve the signal-to-noise ratio and eliminate the need for an infrared filter, reducing the product cost. Therefore, more and more security monitoring products using a double-pass or all-pass filter are emerging. However, when such products are in use, some objects with a high reflectivity of infrared radiation have a serious color cast problem in true-color night vision images. Summary of the Invention

[0004] The purpose of this application is to provide an image color correction method, a computer-readable storage medium, and an electronic device, aiming to solve the problem that some objects with a high reflectivity of infrared radiation have a serious color cast in images, especially true-color night vision images.

[0005] To solve the above technical problems, this application provides an image color correction method, and the specific technical solution is as follows:

[0006] Collect the original image and the infrared supplementary light image in the same scene;

[0007] Locate the target area in the original image according to the infrared supplementary light image; the target area is the area in the original image where strong reflection of infrared light causes color cast.

[0008] Perform color correction on the target area in the original image to obtain the corrected image.

[0009] Optionally, the locating the target area in the original image according to the infrared supplementary light image includes:

[0010] Determine the dark area with strong reflection of infrared light according to the infrared supplementary light image;

[0011] Locate the target area in the original image through the dark area with strong reflection of infrared light.

[0012] Optionally, the determining the dark area with strong reflection of infrared light according to the infrared supplementary light image includes:

[0013] Compare the infrared supplementary light image with the original image to determine the area with strong reflection of infrared light;

[0014] Perform an extraction operation on the area that strongly reflects infrared light to obtain a dark area that strongly reflects infrared light.

[0015] Optionally, comparing the infrared supplementary light image with the original image to determine the area that strongly reflects infrared light includes:

[0016] Calculate the difference between the grayscale images corresponding to the original image and the infrared supplementary light image respectively to obtain a first difference image;

[0017] Perform binarization processing on the first difference image to obtain a first binary image; the area where the pixel grayscale value is large in the first binary image is the area that strongly reflects infrared light.

[0018] Optionally, performing the extraction operation on the area that strongly reflects infrared light to obtain a dark area that strongly reflects infrared light includes:

[0019] Extract the intersection of the second binary image corresponding to the original image and the area that strongly reflects infrared light to obtain a dark area that strongly reflects infrared light.

[0020] Optionally, extracting the intersection of the second binary image corresponding to the original image and the area that strongly reflects infrared light to obtain a dark area that strongly reflects infrared light includes:

[0021] Extract the intersection of the second binary image corresponding to the original image and the area that strongly reflects infrared light;

[0022] Regard several connected components in the intersection whose area is larger than the area threshold as the dark area that strongly reflects infrared light.

[0023] Optionally, extracting the intersection of the second binary image corresponding to the original image and the area that strongly reflects infrared light includes:

[0024] Perform desaturation processing on the original image to obtain a desaturated image;

[0025] Extract the intersection of the binary image corresponding to the desaturated image and the area that strongly reflects infrared light.

[0026] Optionally, locating the target area in the original image through the dark area that strongly reflects infrared light includes:

[0027] In the original image, taking the image block where the dark area that strongly reflects infrared light is located as the starting block, determine a target image block that is similar in feature and adjacent in position to the starting block, and obtain the target area including the starting block and the target image block.

[0028] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-described image color correction method are implemented.

[0029] The present application also provides an electronic device, including a memory and a processor. A computer program is stored in the memory. When the processor calls the computer program in the memory, the steps of the above-described image color correction method are implemented.

[0030] The present application provides an image color correction method, including: collecting an original image and an infrared supplementary light image in the same scene; positioning a target area in the original image according to the infrared supplementary light image; the target area is an area in the original image where strong infrared light reflection causes color cast; performing color correction on the target area in the original image to obtain a corrected image.

[0031] Considering that related products such as security monitoring products omit the infrared filter, and the reflection of infrared light by objects, especially dark objects, is related to the material of the objects, not all objects have obvious color cast under infrared light. Therefore, on the basis of obtaining the original image, the present application also obtains the infrared supplementary light image in the same scene through infrared lamp photometry, and can identify and locate the area with color cast caused by strong infrared light reflection in the original image by means of the infrared supplementary light image, so as to perform color correction on the target area and improve color accuracy.

[0032] Compared with the scheme of reducing the global saturation in the related art, the original colors of other areas in the original image are retained, avoiding the problem that non-color-cast areas are processed and affecting the naturalness of the original image, resulting in a deterioration of the overall color effect of the image, improving the color distortion of the original image limited by the hardware, and helping to maintain the authenticity of the original image. At the same time, by means of the joint analysis of the infrared supplementary light image and the original image, the present application can accurately locate the target area and improve the accuracy of color correction for the original image.

[0033] Generally, it solves the problem that some objects with high reflectivity to infrared radiation in images, especially true-color night vision images, have serious color cast.

[0034] The present application also provides a computer-readable storage medium and an electronic device, which have the above beneficial effects and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.

[0036] Figure 1 Flow chart of an image color correction method provided by an embodiment of the present application;

[0037] Figure 2 Schematic diagram of an original image with color cast provided by an embodiment of the present application;

[0038] Figure 3 For Figure 2 Schematic diagram of the first binary image formed after post - processing the captured scene;

[0039] Figure 4 For Figure 2 Schematic diagram of the second binary image formed after post - processing the captured scene;

[0040] Figure 5 For Figure 3 And Figure 4 Effect diagram obtained by taking the intersection of the schematic diagrams involved;

[0041] Figure 6 For Figure 2 Effect diagram after super - pixel segmentation;

[0042] Figure 7 Schematic diagram for locating the target area;

[0043] Figure 8 Schematic diagram of generating a mask image for the color - cast area;

[0044] Figure 9 Schematic diagram of the corrected image corresponding to the original image provided by an embodiment of the present application;

[0045] Figure 10 Flow chart of an exemplary image color correction method provided by an embodiment of the present application;

[0046] Figure 11 Structural diagram of the electronic device provided by an embodiment of the present application. Detailed implementation manners

[0047] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0048] The object information involved in this application, including but not limited to object device information, object personal information, etc., and data, including but not limited to data for analysis, stored data, displayed data, etc., are all information and data authorized by the object or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with the laws, regulations, and standards of relevant countries and regions.

[0049] See Figure 1 , Figure 1 which is a flowchart of an image color correction method provided by an embodiment of this application. The method includes:

[0050] S101: Acquire the original image and the infrared supplementary light image under the same scene;

[0051] S102: Locate the target area in the original image according to the infrared supplementary light image; the target area is the area in the original image where the infrared light intensity reflection causes color cast.

[0052] S103: Perform color correction on the target area in the original image to obtain the corrected image.

[0053] Considering that related products, such as security monitoring products, omit the infrared filter, and the reflection of infrared light by objects, especially dark objects, is related to the material of the objects, and not all objects have obvious color cast under infrared light. Therefore, on the basis of obtaining the original image, this application also obtains the infrared supplementary light image under the same scene by measuring the infrared light with an infrared lamp, and can identify and locate the area with color cast caused by the strong reflection of infrared light in the original image through the infrared supplementary light image, so as to perform color correction on the target area and improve color accuracy.

[0054] Compared with the scheme of reducing the global saturation in the related art, the original colors of other areas in the original image are retained, avoiding the problem that the non-color-cast areas are processed and affecting the naturalness of the original image, resulting in a deterioration of the overall color effect of the image, improving the color distortion of the original image limited by the hardware, and helping to maintain the authenticity of the original image. At the same time, through the joint analysis of the infrared supplementary light image and the original image, this application can accurately locate the target area and improve the accuracy of color correction for the original image.

[0055] Generally, it solves the problem that some objects with high reflectivity to infrared radiation have serious color cast in images, especially in true-color night vision images.

[0056] First, the technical solution of this application can be triggered and executed during image shooting to achieve real-time color correction. For example, taking true-color night vision images as an example, when the original true-color night vision image meets the trigger condition, the infrared supplementary light lamp can be turned on to shoot an image of the current scene to obtain the infrared supplementary light image. The trigger condition can be set according to the scene or actual needs.

[0057] That is, for the color correction solution, it is actually necessary to capture a frame of the current scene under the scenario without an infrared fill light and under the scenario with an infrared fill light respectively.

[0058] The image captured under the scenario without an infrared fill light is the to-be-corrected image with color cast. After the original image is captured, the infrared fill light can be turned on to automatically capture another frame of image to form an infrared fill light image. Since the infrared fill light is turned on and the device itself omits the infrared filter, the color cast of the captured infrared fill light image is more serious than that of the original image.

[0059] After that, the infrared fill light image can be used. For example, by comparing the infrared fill light image and the original image, the area in the original image that causes color cast due to strong infrared light reflection can be determined. See Figure 2 , Figure 2 which is a schematic diagram of the original image with color cast provided by the embodiment of the present application. For example, Figure 2 the actual colors of the clothes on the model and the seat cushion in

[0060] should be black (both are shown by red wire frames), but the colors presented in the actual shooting are reddish.

[0061] It can be understood that generally, some dark objects have a high reflectivity to infrared radiation, that is, the areas with strong infrared light reflection are usually dark areas, and color cast is more likely to occur in these areas. Therefore, the determination of the target area can be split into the above two steps, and thus the area with color cast problems in the dark areas with strong infrared light reflection, that is, the target area, can be found.

[0062] Specifically, the infrared fill light image and the original image can be compared to determine the area with strong infrared light reflection, and then an extraction operation is performed on the area with strong infrared light reflection to obtain the dark area with strong infrared light reflection.

[0063] It should be noted that each image has a corresponding relationship in position. Therefore, the above area with strong infrared light reflection or dark area can be in the original image, or in the process image obtained by processing the original image and / or the infrared fill light image, such as in the subsequent binary image or in the difference image.

[0064] To determine the area that strongly reflects infrared light, the original image and the infrared supplementary light image can be grayscale processed respectively, and then the difference between the grayscale images corresponding to the original image and the infrared supplementary light image is calculated to obtain a first difference image. Then, the first difference image is binarized to obtain a first binary image. At this time, the area where the pixel grayscale value is large in the first binary image is the area that strongly reflects infrared light.

[0065] See Figure 3 , Figure 3 For Figure 2 The schematic diagram of the first binary image formed by post-processing the captured scene, where the highlighted white area is the area with strong infrared light reflection. The actual corresponding area includes Figure 2 the clothes on the model and the area where the seat cushion is located in

[0066] When binarizing the first difference image, a first preset threshold can be set, so that the pixel grayscale values greater than the first preset threshold in the first difference image are set to a first preset value, such as 255, and the pixel grayscale values less than or equal to the first preset threshold are set to a second preset value, such as 0, where the first preset value is greater than the second preset value.

[0067] According to the setting of the pixel grayscale value, the one set to 255 / the first preset value is the pixel with a large grayscale value, and the area where the grayscale value is 255 / the first preset value is the area that strongly reflects infrared light. Here, the specific value of the first preset threshold is not limited and can be set by those skilled in the art themselves.

[0068] It should be noted that the areas that strongly reflect infrared light and are prone to color cast are usually dark areas. In actual applications, the color cast in black areas is relatively serious. In other examples, dark colors can also be dark blue and other colors.

[0069] Correspondingly, when performing the extraction operation, the intersection of the second binary image corresponding to the original image and the area that strongly reflects infrared light can be extracted to obtain the dark area that strongly reflects infrared light.

[0070] Extracting the intersection of the binary image corresponding to the original image and the area that strongly reflects infrared light can be performed using a logical AND operation, that is, performing a logical AND operation on each pixel of the two, and the dark area that strongly reflects infrared light can be obtained.

[0071] Taking the dark area as a black area as an example, after determining the area that strongly reflects infrared light, to determine the black area that strongly reflects infrared light, the grayscale image of the original image can be used. The pixel grayscale values less than the second preset threshold in the grayscale image of the original image are set to a first preset value, such as 255, and the grayscale values greater than or equal to the second preset threshold are set to a second preset value, such as 0, to obtain a second binary image.

[0072] For other dark regions, by adjusting the value of the second preset threshold, for example, increasing or decreasing the second preset threshold, other dark regions lighter than black can be extracted.

[0073] See Figure 4 , where the region with a pixel grayscale value of 255 is the white region in the second binary image processed under the Figure 2 scenario, which actually corresponds to the darker region in the original image.

[0074] In addition, in order to improve the extraction accuracy of, for example, black regions with strong infrared light reflection, the saturation of the original image can be reduced first to reduce the extraction error for black regions.

[0075] In a feasible implementation manner, the original image can be processed to reduce saturation to obtain a desaturated image, and then the intersection of the binary image corresponding to the desaturated image and the region with strong infrared light reflection can be extracted as the dark region with strong infrared light reflection. As Figure 5 shown, Figure 5 for Figure 3 and Figure 4 the intersection is extracted, where the prominent white region is the dark / black region with strong infrared light reflection.

[0076] In some feasible implementation manners, after extracting the intersection of the second binary image corresponding to the original image and the region with strong infrared light reflection, several connected components in the intersection with an area larger than the area threshold can be used as the dark region with strong infrared light reflection.

[0077] It should be noted that directly using the intersection as the dark region with strong infrared light reflection may affect the saturation of other colors. By using several connected components in the intersection with an area larger than the area threshold as the dark region with strong infrared light reflection, for example, using two connected components in the intersection with an area larger than the area threshold as the dark region with strong infrared light reflection, the possible non-dark regions of smaller connected components can be screened out, thereby optimizing the color cast phenomenon of dark objects without reducing the saturation of other colors and reducing errors.

[0078] After determining the dark region with strong infrared light reflection, the dark region (target region) to be corrected that causes color cast with strong infrared light reflection can be located in the original image.

[0079] In some feasible implementation manners, in the original image, starting from the image block where the dark region with strong infrared light reflection is located, a target image block with similar features and adjacent position to the starting block can be determined, and the target region including the starting block and the target image block can be obtained.

[0080] The original image can be segmented into superpixels. According to the feature similarity of the image pixels, the image is divided into several irregular image patches, such as Figure 6 As shown in Figure 2 the effect diagram after superpixel segmentation of

[0081] Further combined with Figures 5 to 7 where Figure 7 shows the located dark color regions with color cast. In implementation, the central coordinates of two connected components can be marked as center1 and center2. In the original image after superpixel segmentation, the image patches where center1 and center2 are located are used as the starting patches, and the image patches with similar features and close positions to the starting patches are searched. The region formed by the similar image patches and the starting patches is the located target region.

[0082] After determining the target region, color correction can be performed on the target region in the original image to obtain the corrected image. Referring to Figure 8 when performing color correction, a mask image of the color cast region can be generated. The so-called mask image of the target region is the image obtained after binarizing the target region, which is convenient for performing color correction on the original image. Among them, the target region is set to 255, and other regions are set to 0.

[0083] Specifically, the original image or the original image with reduced color saturation can be multiplied by the above mask image, and the obtained result can replace the corresponding region of the original image to obtain the final corrected result.

[0084] In some feasible implementation manners, color correction can be performed with reference to the following formula.

[0085] ;

[0086] Among them, is the original image, is the result of reducing the saturation of the original image. is the final result after color correction, is the mask image of the target region.

[0087] Such as Figure 2 and Figure 9 shown, Figure 9 is the original image provided by the embodiment of the present application corresponding corrected image . Obviously, compared with Figure 9 , Figure 2 where the colors of the skirt and the seat are distorted and reddish, after being processed by the corresponding process of the embodiment of the present application Figure 9, the black dress and the black seat are closer to the real color and have no negative impact on the colors of other areas of the picture.

[0088] In summary, the embodiments of the present application accurately locate the positions of the dark areas with color cast in the image by using infrared supplementary light images and the judgment of pixel gray values, etc. Further, according to the positions of the dark areas with color cast, the target areas to be corrected are located in the original image, which can correct the color cast without affecting the colors of other areas. Overall, it can simply and quickly optimize the phenomenon that static dark objects in the image under infrared scenes are purplish red under the influence of infrared light, and does not reduce the saturation of other colors while optimizing the color cast of the dark areas.

[0089] The following describes the image color correction method provided by the present application in an exemplary execution manner of the present application. See Figure 10 , Figure 10 is a flowchart of an exemplary image color correction method provided by the embodiments of the present application. The process includes:

[0090] First step, acquire a frame of original image;

[0091] Second step, after turning on the infrared supplementary light, acquire a frame of infrared supplementary light image;

[0092] Third step, after converting both the original image and the infrared supplementary light image into grayscale images, calculate the first difference image between the two grayscale images;

[0093] Fourth step, perform binarization processing on the first difference image, set the pixels with gray values greater than thr1 in the image to 255, and set the pixels less than or equal to thr1 to 0 to obtain the first binary image;

[0094] Fifth step, convert the original image into a grayscale image, and set the pixels with gray values less than thr2 to 255, and set the pixels greater than or equal to thr2 to 0 to obtain the second binary image;

[0095] Sixth step, take the intersection of the first binary image and the second binary image to obtain the first mask image; the area corresponding to the large pixel values in the first mask image is the black area to be corrected;

[0096] In some examples, after obtaining the above intersection, the first mask image can be obtained through closing operation.

[0097] Seventh step, record the central point coordinates of the two areas to be corrected in the mask image as the first central coordinate and the second central coordinate;

[0098] Eighth step, perform image block segmentation on the original image to obtain several irregular image blocks;

[0099] Step 9: Take the image patches where the first central coordinate and the second central coordinate are located as the starting patches, determine the target image patches that are similar in feature and adjacent in position to the starting patches, and obtain a target region that includes the starting patches and the target image patches;

[0100] Step 10: Generate a second mask image for the target region. In the second mask image, the black regions with color cast are set to 255, and other regions are set to 0;

[0101] Step 11: Use the second mask image to perform color correction on the target region in the original image to obtain a corrected image.

[0102] Where thr1 is the first preset threshold described above, and thr2 is the second preset threshold described above. It can be seen that Figure 11 Step 5 is a parallel step with Steps 2 to 4, and there is no requirement for a fixed execution order. The first mask image and the second mask image described in this embodiment are both binary images.

[0103] This application also provides an image color correction system, and the specific technical solution is as follows:

[0104] An image acquisition module, configured to acquire an original image and an infrared fill light image in the same scene;

[0105] A target region positioning module, configured to locate the target region in the original image according to the infrared fill light image; the target region is the region in the original image that causes color cast due to strong reflection of infrared light;

[0106] A color correction module, configured to perform color correction on the target region in the original image to obtain a corrected image.

[0107] Based on the above embodiment, as a preferred embodiment, the target region positioning module includes:

[0108] A region screening unit, configured to determine the dark regions that strongly reflect infrared light according to the infrared fill light image;

[0109] A region positioning unit, configured to locate the target region in the original image through the dark regions that strongly reflect infrared light.

[0110] Based on the above embodiment, as a preferred embodiment, the region screening unit includes:

[0111] An image comparison sub-unit, configured to compare the infrared fill light image with the original image to determine the regions that strongly reflect infrared light;

[0112] A region extraction sub-unit, configured to perform an extraction operation on the regions that strongly reflect infrared light to obtain the dark regions that strongly reflect infrared light.

[0113] Based on the above embodiments, as a preferred embodiment, the image comparison sub-unit is a sub-unit for performing the following steps:

[0114] Calculate the difference between the grayscale images corresponding to the original image and the infrared supplementary light image respectively to obtain a first difference image;

[0115] Perform binarization processing on the first difference image to obtain a first binary image; the region where the pixel grayscale maximum value is located in the first binary image is the region that reflects infrared light intensity.

[0116] Based on the above embodiments, as a preferred embodiment, the region extraction sub-unit is a sub-unit for extracting the intersection of the second binary image corresponding to the original image and the region that reflects infrared light intensity to obtain the dark region that reflects infrared light intensity.

[0117] Based on the above embodiments, as a preferred embodiment, the region extraction sub-unit is a sub-unit for performing the following steps:

[0118] Extract the intersection of the second binary image corresponding to the original image and the region that reflects infrared light intensity;

[0119] Regard several connected regions in the intersection whose areas are larger than the area threshold as the dark regions that reflect infrared light intensity.

[0120] Based on the above embodiments, as a preferred embodiment, the region extraction sub-unit is a sub-unit including performing the following steps:

[0121] Perform desaturation processing on the original image to obtain a desaturated image; extract the intersection of the binary image corresponding to the desaturated image and the region that reflects infrared light intensity.

[0122] Based on the above embodiments, as a preferred embodiment, the region positioning unit is a unit for performing the following steps:

[0123] In the original image, take the image block where the dark region that reflects infrared light intensity is located as the starting block, determine a target image block that is similar in feature and adjacent in position to the starting block, and obtain the target region including the starting block and the target image block.

[0124] This application also provides a computer-readable storage medium, on which there is a computer program, and when the computer program is executed, the steps provided by the above embodiments can be implemented. The storage medium may include: various media such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs that can store program codes.

[0125] The present application also provides an electronic device. Refer to Figure 11 , a structural diagram of an electronic device provided by an embodiment of the present application, as Figure 11 shown, which may include a processor 1410 and a memory 1420.

[0126] Among them, the processor 1410 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1410 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1410 may also include a main processor and a coprocessor. The main processor is a processor used to process data in the wake state, also known as the CPU (Central Processing Unit); the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 1410 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1410 may further include an AI (Artificial Intelligence) processor, and the AI processor is used to process computational operations related to machine learning.

[0127] The memory 1420 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 1420 may further include a high-speed random access memory and a non-volatile memory, such as one or more disk storage devices and flash storage devices. In this embodiment, the memory 1420 is at least used to store the following computer program 1421. After the computer program is loaded and executed by the processor 1410, it can implement the relevant steps in the method executed by the electronic device side disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 1420 may further include an operating system 1422 and data 1423, etc., and the storage method may be transient storage or permanent storage. Among them, the operating system 1422 may include Windows, Linux, Android, etc.

[0128] In some embodiments, the electronic device may further include a display screen 1430, an input / output interface 1440, a communication interface 1450, a sensor 1460, a power supply 1470, and a communication bus 1480.

[0129] Of course, Figure 11 the structure of the electronic device shown does not constitute a limitation on the electronic device in the embodiments of the present application. In practical applications, the electronic device may include more or fewer components than Figure 11 those shown, or combine certain components.

[0130] The various embodiments in the specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other. For the system provided in the embodiment, since it corresponds to the method provided in the embodiment, the description is relatively simple. For the relevant parts, refer to the description in the method part.

[0131] Specific examples are used in this article to elaborate on the principles and implementation manners of the present application. The descriptions of the above embodiments are only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the present application.

[0132] It should also be noted that in this specification, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.

Claims

1. An image color correction method, characterized in that Comprising: Collecting an original image and an infrared fill-light image in the same scene; Locating a target area in the original image according to the infrared fill-light image; The target area is the area in the original image where the infrared light intensity reflection causes color cast; Performing color correction on the target area in the original image to obtain a corrected image.

2. The image color correction method according to claim 1, wherein The locating the target area in the original image according to the infrared fill-light image includes: Determining a dark area that reflects infrared light intensity according to the infrared fill-light image; Locating the target area in the original image through the dark area that reflects infrared light intensity.

3. The image color correction method according to claim 2, characterized in that, The determining a dark area that reflects infrared light intensity according to the infrared fill-light image includes: Comparing the infrared fill-light image with the original image to determine the area that reflects infrared light intensity; Performing an extraction operation on the area that reflects infrared light intensity to obtain a dark area that reflects infrared light intensity.

4. The image color correction method according to claim 3, wherein The comparing the infrared fill-light image with the original image to determine the area that reflects infrared light intensity includes: Calculating the difference between the grayscale images corresponding to the original image and the infrared fill-light image respectively to obtain a first difference image; Performing binarization processing on the first difference image to obtain a first binary image; the area where the pixel grayscale maximum value is located in the first binary image is the area that reflects infrared light intensity.

5. The image color correction method according to claim 3, wherein The performing an extraction operation on the area that reflects infrared light intensity to obtain a dark area that reflects infrared light intensity includes: Extracting the intersection of the second binary image corresponding to the original image and the area that reflects infrared light intensity to obtain a dark area that reflects infrared light intensity.

6. The image color correction method according to claim 5, characterized in that, The extracting the intersection of the second binary image corresponding to the original image and the area that reflects infrared light intensity to obtain a dark area that reflects infrared light intensity includes: Extracting the intersection of the second binary image corresponding to the original image and the area that reflects infrared light intensity; Taking several connected components in the intersection whose area is greater than the area threshold as the dark area that reflects infrared light intensity.

7. The image color correction method according to claim 5 or 6, characterized in that The extracting the intersection of the second binary image corresponding to the original image and the area that reflects infrared light intensity includes: Performing a desaturation process on the original image to obtain a desaturated image; Extracting the intersection of the binary image corresponding to the desaturated image and the area that reflects infrared light intensity.

8. The image color correction method according to claim 2, wherein The locating the target area in the original image through the dark area that reflects infrared light intensity includes: In the original image, taking the image block where the dark area that reflects infrared light intensity is located as the starting block, determining target image blocks that are similar in feature and adjacent in position to the starting block, and obtaining the target area including the starting block and the target image blocks.

9. An electronic device, characterized in that, Comprising: A memory for storing a computer program; A processor for implementing the steps of the method according to any one of claims 1 to 8 when executing the computer program.

10. A computer-readable storage medium, characterized in that, A computer program is stored on a computer-readable storage medium, and when the computer program is executed, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Cited By

  • Image enhancement method based on depth information guidance

    CN122199317A