CN111429534A - Image color cast correction method and device - Google Patents

Image color cast correction method and device Download PDF

Info

Publication number
CN111429534A
CN111429534A CN202010097308.8A CN202010097308A CN111429534A CN 111429534 A CN111429534 A CN 111429534A CN 202010097308 A CN202010097308 A CN 202010097308A CN 111429534 A CN111429534 A CN 111429534A
Authority
CN
China
Prior art keywords
color cast
color
correction coefficient
correction
target image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010097308.8A
Other languages
Chinese (zh)
Other versions
CN111429534B (en
Inventor
韩智素
王珏
刘新科
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen 666 International Travel Service Co ltd
Original Assignee
Shenzhen 666 International Travel Service Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen 666 International Travel Service Co ltd filed Critical Shenzhen 666 International Travel Service Co ltd
Priority to CN202010097308.8A priority Critical patent/CN111429534B/en
Publication of CN111429534A publication Critical patent/CN111429534A/en
Application granted granted Critical
Publication of CN111429534B publication Critical patent/CN111429534B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/77Retouching; Inpainting; Scratch removal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/92Dynamic range modification of images or parts thereof based on global image properties

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Processing (AREA)
  • Color Television Image Signal Generators (AREA)

Abstract

According to the image color cast correction method and device disclosed by the embodiment of the invention, a correction seed region in a target image is obtained; calculating a regional color cast correction coefficient of the correction seed region; calculating a global color cast correction coefficient of the target image based on the regional color cast correction coefficient; and performing global correction on the color cast of the pixel points in the target image according to the global color cast correction coefficient. By implementing the method, the global color cast correction coefficient of the image is determined based on the color cast correction coefficient of the local area with obvious color cast in the image, so that the color cast correction is carried out on the whole image without depending on calibration data of a camera for shooting the image, the blind removal of the color shading of the image with unknown source can be effectively carried out, and the method has wider applicability.

Description

Image color cast correction method and device
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method and an apparatus for correcting image color cast.
Background
When a camera is used for taking a picture, a color shading phenomenon tends to occur easily, and the phenomenon tends to be serious in a relatively cheap camera module. The phenomenon is embodied as that the colors of the center and the periphery are not consistent, and the phenomenon is generally embodied as color cast of the center or the periphery, and the physical reason of the phenomenon is that the refraction angles are different due to different wavelengths of various colors and refraction of the lens.
In practical applications, in order to ensure the quality of pictures, it is usually necessary to remove color shading in images, i.e. to correct color cast. At present, a camera is usually calibrated with a correction coefficient when leaving a factory for performing color cast correction on an image actually shot by the camera, however, for an unknown source image which cannot obtain camera calibration data, the method for performing color cast correction cannot be adopted, that is, the applicability of the color cast correction method is limited.
Disclosure of Invention
The embodiment of the invention mainly aims to provide an image color cast correction method and device, which can at least solve the problem that color cast correction cannot be performed on unknown source images which cannot obtain camera calibration data in the related art.
To achieve the above object, a first aspect of an embodiment of the present invention provides an image color cast correcting method, including:
acquiring a correction seed area in a target image;
calculating a regional color cast correction coefficient of the correction seed region;
calculating a global color cast correction coefficient of the target image based on the regional color cast correction coefficient;
and performing global correction on the color cast of the pixel points in the target image according to the global color cast correction coefficient.
To achieve the above object, a second aspect of embodiments of the present invention provides an image color cast correcting device, including:
the acquisition module is used for acquiring a correction seed area in a target image;
the first calculation module is used for calculating the regional color cast correction coefficient of the correction seed region;
the second calculation module is used for calculating a global color cast correction coefficient of the target image based on the regional color cast correction coefficient;
and the correction module is used for carrying out global correction on the color cast of the pixel points in the target image according to the global color cast correction coefficient.
According to the image color cast correction method and device provided by the embodiment of the invention, a correction seed region in a target image is obtained; calculating a regional color cast correction coefficient of the correction seed region; calculating a global color cast correction coefficient of the target image based on the regional color cast correction coefficient; and performing global correction on the color cast of the pixel points in the target image according to the global color cast correction coefficient. By implementing the method, the global color cast correction coefficient of the image is determined based on the color cast correction coefficient of the local area with obvious color cast in the image, so that the color cast correction is carried out on the whole image without depending on calibration data of a camera for shooting the image, the blind removal of the color shading of the image with unknown source can be effectively carried out, and the method has wider applicability.
Other features and corresponding effects of the present invention are set forth in the following portions of the specification, and it should be understood that at least some of the effects are apparent from the description of the present invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram illustrating a basic flow chart of a method for correcting color cast of an image according to a first embodiment of the present invention;
FIG. 2 is a schematic flow chart of correction seed region acquisition according to a first embodiment of the present invention;
fig. 3 is a schematic flowchart of a method for calculating a global color cast correction coefficient according to a first embodiment of the present invention;
FIG. 4 is a diagram illustrating a first embodiment of the present invention for converting an image to polar coordinates for filtering;
FIG. 5 is a schematic structural diagram of an image color cast correcting device according to a second embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to a third embodiment of the invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The first embodiment:
in order to solve the technical problem in the related art that color cast correction cannot be performed on an unknown source image that cannot obtain camera calibration data, the present embodiment provides an image color cast correction method, as shown in fig. 1, which is a basic flow diagram of the image color cast correction method provided by the present embodiment, and the image color cast correction method provided by the present embodiment includes the following steps:
step 101, acquiring a correction seed region in a target image.
Specifically, the Color shading blind removal has the difficulty that the Color cast of the pixel is gradually changed, so that it is difficult to accurately estimate the Color cast of each pixel. Based on this, in the embodiment, first, it is determined that, in an input picture, a region of color rendering is relatively well calculated, that is, a region with a significant color cast is used as a correction seed region, generally, under the irradiation of natural light or indoor white light, a highlight but not overexposed region in the picture should be white, but due to the existence of color rendering, these regions may be relatively light red or blue, these colors may be basically assumed to be the colors of real color rendering, and then the corresponding region is the correction seed region. It should be noted that the image to be corrected input by the present embodiment may be an image of unknown source, for example, an image obtained from a cloud.
As shown in fig. 2, which is a schematic flow chart of a method for acquiring a seed correction region according to this embodiment, in an optional implementation manner of this embodiment, acquiring a seed correction region in a target image specifically includes the following steps:
step 201, converting a target image from an RGB color space to an HSV color space;
step 202, calculating a mask of each pixel point in the target image by adopting a mask value formula;
and step 203, determining a region formed by the pixel points with the mask value of 1 as a correction seed region in the target image.
Specifically, the mask value formula of this embodiment is as follows:
Figure BDA0002385536980000031
wherein, M represents a mask, (x, y) represents coordinates of a pixel point, R, G, B represents three color channels of red, green and blue respectively, V represents gray scale, and S represents saturation.
It should be noted that, in the above formula, the luminance value, that is, the gray level, of a pixel point is checked first, and when the luminance of the pixel point is too low (for example, less than 0.8) or saturated (equal to 1), the pixel point is excluded. Secondly, according to the observation, the colorrendering colors are basically red and green, and the blue color is very little, so if the value of the blue channel of the pixel point is larger than that of the other two channels, the color rendering is also excluded. If the color saturation of the pixel point is too high (for example, greater than 0.1), it indicates that the color of the pixel point is likely to be the color of the object itself and is also excluded. The remaining pixel points are all pixels which are brighter and have a small amount of red and green colors, and the color of the pixel points can be considered to have a high probability caused by color shading.
In the actual use process, some input images often do not have the correction seed regions meeting the conditions, and the algorithm jumps out in the case. Usually, these images are either vivid in the color of the scene itself or the light source itself has a strong color (such as yellow light), in which case the color rendering of the image itself is also hard to see by the naked eye, so it is reasonable that the algorithm does not process these images.
And 102, calculating a regional color cast correction coefficient of the correction seed region.
Specifically, the basic idea of this embodiment is to determine regions with relatively good estimation of color shift amount, estimate local color shift amount of the image in these regions, and then diffuse these local color shift amounts to the whole image to perform color shift correction of the whole image.
In an optional implementation manner of this embodiment, the calculating the regional color cast correction coefficient of the correction seed region includes: calculating the color offset of each pixel point in the correction seed region by adopting a color offset calculation formula; and determining the calculated color offset as a regional color cast correction coefficient of the correction seed region.
Specifically, the color shift amount calculation formula of the present embodiment is expressed as follows:
Figure BDA0002385536980000041
Figure BDA0002385536980000042
where (i, j) represents the coordinates of all the pixel points in a field centered on (x, y).
In this embodiment, each pixel point in the seed region is a pixel point with M (x, y) > 0, and since (i, j) is all pixel points in a field with (x, y) as the center, M (i, j) > 0. It should also be understood that the size of this field is a parameter that can be flexibly set according to the actual usage scenario, and is usually in the width of 3 to 10 pixels. Both offsets should be 1 if there is no color rendering, the RB component would be greater than 1 if it is red, and the GB component would be less than 1 if it is green.
It should be noted that the present embodiment takes the blue channel as the reference channel, and then calculates the ratio of red/blue, and green/blue, of course, in other embodiments, one of the other two channels may be used as the reference channel.
And 103, calculating a global color cast correction coefficient of the target image based on the regional color cast correction coefficient.
Specifically, the present embodiment requires that the calculated color shift amount be diffused from the correction seed area to the full map. Considering that color rendering is irrelevant to the shot scene and is very smooth, the embodiment may implement diffusion in a filtering manner, and diffuse the color correction coefficient from the local part to the whole image.
In practical applications, color shading has an important characteristic that the color is uniformly changed from the optical center of the camera lens to the outside. Assuming that the positions of the lens optical center and the image center are identical, that is, the color shading presents different annular bands outward from the image center. In consideration of this characteristic, the embodiment does not perform filtering in the (x, y) space coordinates of the image during filtering, but converts the image to polar coordinates first, then performs filtering in the polar coordinate space, and then converts the image to space coordinates.
As shown in fig. 3, which is a flowchart of a method for calculating a global color cast correction coefficient according to this embodiment, in an optional implementation manner of this embodiment, calculating a global color cast correction coefficient of a target image based on a regional color cast correction coefficient specifically includes the following steps:
step 301, converting all pixel points in a target image from a space coordinate to a polar coordinate;
step 302, performing Gaussian filtering on masks of all pixel points in a polar coordinate, and performing Gaussian filtering on the regional color cast correction coefficient;
and step 303, calculating the global color cast correction coefficient of the target image by adopting a global color cast correction coefficient calculation formula based on the Gaussian filtering result.
Specifically, the calculation formula of the global color cast correction coefficient of the present embodiment is as follows:
Figure BDA0002385536980000051
Figure BDA0002385536980000052
wherein, M ' is a mask after filtering, RB ' is an RB component of the region color cast correction coefficient after filtering, and GB ' is a GB component of the region color cast correction coefficient after filtering.
Fig. 4 is a schematic diagram of the filtering for converting an image into polar coordinates according to the present embodiment, where a represents in spatial coordinates and B represents in polar coordinates. In this embodiment, for one pixel (x, y) in the image, first the distance r and the angle θ from the center point of the image are calculated, and then its position in polar coordinates is located, with the horizontal axis being the angle and the vertical axis being the distance. In polar coordinates, the mask M is first subjected to an anisotropic Gaussian filter, the Gaussian function g (σ)rθ) Standard deviation of (a)θ>>σrThat is to say, this embodiment encourages the pixel points under the same radius to have more consistent color correction amount by performing filtering of a larger scale in the horizontal direction. The image is then transformed from polar to spatial coordinates after filtering. Ignoring two spatial transformations, filtered masks
Figure BDA0002385536980000061
In addition, RB 'and GB' can be obtained by filtering RB and GB separately in the same manner. It should also be noted that, in practical applications, the gaussian filter function may be replaced by other low-pass filter functions, such as box filters with different lengths and widths, which is not limited herein.
And 104, performing global correction on the color cast of the pixel points in the target image according to the global color cast correction coefficient.
Specifically, color shading in the picture is removed without depending on a pre-calibrated blind algorithm, the color correction coefficient is diffused to the whole picture from the local part, and the color shading removal can be performed to a certain degree on the whole picture under the condition that a camera is not calibrated in advance, so that the quality of the picture is improved.
In an optional implementation manner of this embodiment, performing global correction on color cast of a pixel point in a target image according to a global color cast correction coefficient includes: and based on the global color cast correction coefficient, carrying out global correction on the color cast of the pixel points in the target image in R, G, B three color channels by adopting a color cast correction calculation formula.
In this embodiment, after obtaining the full image correction coefficient, the three channels R, G, and B of the final image are respectively corrected in a manner corresponding to the following color cast correction calculation formula:
Figure BDA0002385536980000062
according to the image color cast correction method provided by the embodiment of the invention, a correction seed region in a target image is obtained; calculating a regional color cast correction coefficient of the correction seed region; calculating a global color cast correction coefficient of the target image based on the regional color cast correction coefficient; and performing global correction on the color cast of the pixel points in the target image according to the global color cast correction coefficient. By implementing the method, the global color cast correction coefficient of the image is determined based on the color cast correction coefficient of the local area with obvious color cast in the image, so that the color cast correction is carried out on the whole image without depending on calibration data of a camera for shooting the image, the blind removal of the color shading of the image with unknown source can be effectively carried out, and the method has wider applicability.
Second embodiment:
in order to solve the technical problem in the related art that the color cast correction cannot be performed on an unknown source image that cannot obtain camera calibration data, the present embodiment shows an image color cast correction device, and specifically, referring to fig. 5, the image color cast correction device of the present embodiment includes:
an obtaining module 501, configured to obtain a correction seed region in a target image;
a first calculating module 502, configured to calculate a regional color cast correction coefficient of the correction seed region;
a second calculating module 503, configured to calculate a global color cast correction coefficient of the target image based on the regional color cast correction coefficient;
and the correction module 504 is configured to perform global correction on color cast of a pixel point in the target image according to the global color cast correction coefficient.
In an optional implementation manner of this embodiment, the obtaining module 501 is specifically configured to: converting the target image from an RGB color space to an HSV color space; calculating the mask of each pixel point in the target image by adopting a mask value taking formula; and determining a region formed by the pixel points with the mask value of 1 as a correction seed region in the target image. Moreover, the mask value formula of the present embodiment is expressed as follows:
Figure BDA0002385536980000071
wherein, M represents a mask, (x, y) represents coordinates of a pixel point, R, G, B represents three color channels of red, green and blue respectively, V represents gray scale, and S represents saturation.
Further, in an optional implementation manner of this embodiment, the first calculating module 502 is specifically configured to: calculating the color offset of each pixel point in the correction seed region by adopting a color offset calculation formula; and determining the calculated color offset as a regional color cast correction coefficient of the correction seed region. Further, the color shift amount calculation formula of the present embodiment is expressed as follows:
Figure BDA0002385536980000072
Figure BDA0002385536980000073
where (i, j) represents the coordinates of all the pixel points in a field centered on (x, y).
Further, in an optional implementation manner of this embodiment, the second calculating module 503 is specifically configured to: converting all pixel points in the target image from the space coordinate to the polar coordinate; performing Gaussian filtering on masks of all pixel points in the polar coordinates, and performing Gaussian filtering on the regional color cast correction coefficient; and calculating the global color cast correction coefficient of the target image by adopting a global color cast correction coefficient calculation formula based on the Gaussian filtering result. The global color cast correction coefficient calculation formula of the present embodiment is expressed as follows:
Figure BDA0002385536980000074
Figure BDA0002385536980000075
wherein, M ' is a mask after filtering, RB ' is an RB component of the region color cast correction coefficient after filtering, and GB ' is a GB component of the region color cast correction coefficient after filtering.
Further, in an optional implementation manner of this embodiment, the correcting module 504 is specifically configured to: and based on the global color cast correction coefficient, carrying out global correction on the color cast of the pixel points in the target image in R, G, B three color channels by adopting a color cast correction calculation formula. The formula for calculating the color cast correction in this embodiment is:
Figure BDA0002385536980000081
it should be noted that, the image color cast correcting method in the foregoing embodiment can be implemented based on the image color cast correcting device provided in this embodiment, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the image color cast correcting device described in this embodiment may refer to the corresponding process in the foregoing method embodiment, and details are not repeated here.
The image color cast correction device provided by the embodiment is adopted to obtain a correction seed area in a target image; calculating a regional color cast correction coefficient of the correction seed region; calculating a global color cast correction coefficient of the target image based on the regional color cast correction coefficient; and performing global correction on the color cast of the pixel points in the target image according to the global color cast correction coefficient. By implementing the method, the global color cast correction coefficient of the image is determined based on the color cast correction coefficient of the local area with obvious color cast in the image, so that the color cast correction is carried out on the whole image without depending on calibration data of a camera for shooting the image, the blind removal of the color shading of the image with unknown source can be effectively carried out, and the method has wider applicability.
The third embodiment:
the present embodiment provides an electronic device, as shown in fig. 6, which includes a processor 601, a memory 602, and a communication bus 603, wherein: the communication bus 603 is used for realizing connection communication between the processor 601 and the memory 602; the processor 601 is configured to execute one or more computer programs stored in the memory 602 to implement at least one step of the image color cast correcting method in the first embodiment.
The present embodiments also provide a computer-readable storage medium including volatile or non-volatile, removable or non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, computer program modules or other data. Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash Memory or other Memory technology, CD-ROM (Compact disk Read-Only Memory), Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer.
The computer-readable storage medium in this embodiment may be used for storing one or more computer programs, and the stored one or more computer programs may be executed by a processor to implement at least one step of the method in the first embodiment.
The present embodiment also provides a computer program, which can be distributed on a computer readable medium and executed by a computing device to implement at least one step of the method in the first embodiment; and in some cases at least one of the steps shown or described may be performed in an order different than that described in the embodiments above.
The present embodiments also provide a computer program product comprising a computer readable means on which a computer program as shown above is stored. The computer readable means in this embodiment may include a computer readable storage medium as shown above.
It will be apparent to those skilled in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software (which may be implemented in computer program code executable by a computing device), firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit.
In addition, communication media typically embodies computer readable instructions, data structures, computer program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to one of ordinary skill in the art. Thus, the present invention is not limited to any specific combination of hardware and software.
The foregoing is a more detailed description of embodiments of the present invention, and the present invention is not to be considered limited to such descriptions. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (10)

1. An image color cast correction method, comprising:
acquiring a correction seed area in a target image;
calculating a regional color cast correction coefficient of the correction seed region;
calculating a global color cast correction coefficient of the target image based on the regional color cast correction coefficient;
and performing global correction on the color cast of the pixel points in the target image according to the global color cast correction coefficient.
2. The method for correcting image color cast according to claim 1, wherein the obtaining of the correction seed region in the target image comprises:
converting the target image from an RGB color space to an HSV color space;
calculating the mask of each pixel point in the target image by adopting a mask value taking formula; the mask value formula is expressed as follows:
Figure FDA0002385536970000011
wherein, M represents a mask, (x, y) represents coordinates of a pixel point, R, G, B represents three color channels of red, green and blue respectively, V represents gray scale, and S represents saturation;
and determining a region formed by the pixel points with the mask value of 1 as a correction seed region in the target image.
3. The method for image color cast correction according to claim 2, wherein the calculating the regional color cast correction coefficient of the correction seed region includes:
calculating the color offset of each pixel point in the correction seed region by adopting a color offset calculation formula; the color shift amount calculation formula is expressed as follows:
Figure FDA0002385536970000012
Figure FDA0002385536970000013
wherein (i, j) represents the coordinates of all pixel points within a field centered at (x, y);
and determining the calculated color offset as a regional color cast correction coefficient of the correction seed region.
4. The method according to claim 3, wherein the calculating a global color cast correction coefficient for the target image based on the regional color cast correction coefficient comprises:
converting all pixel points in the target image from a space coordinate to a polar coordinate;
performing Gaussian filtering on the masks of all the pixel points in a polar coordinate, and performing Gaussian filtering on the regional color cast correction coefficient;
calculating a global color cast correction coefficient of the target image by adopting a global color cast correction coefficient calculation formula based on a Gaussian filtering result; the global color cast correction coefficient calculation formula is expressed as follows:
Figure FDA0002385536970000021
Figure FDA0002385536970000022
wherein, M ' is a mask after filtering, RB ' is an RB component of the region color cast correction coefficient after filtering, and GB ' is a GB component of the region color cast correction coefficient after filtering.
5. The method according to claim 4, wherein the globally correcting color cast of pixels in the target image according to the global color cast correction coefficient comprises:
based on the global color cast correction coefficient, adopting a color cast correction calculation formula to carry out global correction on color cast of pixel points in the target image in R, G, B three color channels; the color cast correction calculation formula is expressed as:
Figure FDA0002385536970000023
6. an image color cast correcting device, comprising:
the acquisition module is used for acquiring a correction seed area in a target image;
the first calculation module is used for calculating the regional color cast correction coefficient of the correction seed region;
the second calculation module is used for calculating a global color cast correction coefficient of the target image based on the regional color cast correction coefficient;
and the correction module is used for carrying out global correction on the color cast of the pixel points in the target image according to the global color cast correction coefficient.
7. The image color cast correction device of claim 6, wherein the obtaining module is specifically configured to:
converting the target image from an RGB color space to an HSV color space;
calculating the mask of each pixel point in the target image by adopting a mask value taking formula; the mask value formula is expressed as follows:
Figure FDA0002385536970000031
wherein, M represents a mask, (x, y) represents coordinates of a pixel point, R, G, B represents three color channels of red, green and blue respectively, V represents gray scale, and S represents saturation;
and determining a region formed by the pixel points with the mask value of 1 as a correction seed region in the target image.
8. The image color cast correction device of claim 7, wherein the first computing module is specifically configured to:
calculating the color offset of each pixel point in the correction seed region by adopting a color offset calculation formula; the color shift amount calculation formula is expressed as follows:
Figure FDA0002385536970000032
Figure FDA0002385536970000033
wherein (i, j) represents the coordinates of all pixel points within a field centered at (x, y);
and determining the calculated color offset as a regional color cast correction coefficient of the correction seed region.
9. The image color cast correction device of claim 8, wherein the second calculation module is specifically configured to:
converting all pixel points in the target image from a space coordinate to a polar coordinate;
performing Gaussian filtering on the masks of all the pixel points in a polar coordinate, and performing Gaussian filtering on the regional color cast correction coefficient;
calculating a global color cast correction coefficient of the target image by adopting a global color cast correction coefficient calculation formula based on a Gaussian filtering result; the global color cast correction coefficient calculation formula is expressed as follows:
Figure FDA0002385536970000034
Figure FDA0002385536970000035
wherein, M ' is a mask after filtering, RB ' is an RB component of the region color cast correction coefficient after filtering, and GB ' is a GB component of the region color cast correction coefficient after filtering.
10. The image color cast correction device of claim 9, wherein the correction module is specifically configured to:
based on the global color cast correction coefficient, adopting a color cast correction calculation formula to carry out global correction on color cast of pixel points in the target image in R, G, B three color channels; the color cast correction calculation formula is expressed as:
Figure FDA0002385536970000041
CN202010097308.8A 2020-02-17 2020-02-17 Image color cast correction method and device Active CN111429534B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010097308.8A CN111429534B (en) 2020-02-17 2020-02-17 Image color cast correction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010097308.8A CN111429534B (en) 2020-02-17 2020-02-17 Image color cast correction method and device

Publications (2)

Publication Number Publication Date
CN111429534A true CN111429534A (en) 2020-07-17
CN111429534B CN111429534B (en) 2020-11-13

Family

ID=71547126

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010097308.8A Active CN111429534B (en) 2020-02-17 2020-02-17 Image color cast correction method and device

Country Status (1)

Country Link
CN (1) CN111429534B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114219736A (en) * 2021-12-21 2022-03-22 爱芯元智半导体(上海)有限公司 Image chromatic aberration correction method and device, electronic equipment and storage medium
CN114739644A (en) * 2022-06-10 2022-07-12 武汉精立电子技术有限公司 Method, device and equipment for judging color cast and readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104424626A (en) * 2013-09-09 2015-03-18 联发科技(新加坡)私人有限公司 Method and associated apparatus for correcting color artifact of image
US20150371370A1 (en) * 2014-06-19 2015-12-24 Microsoft Corporation Identifying gray regions for auto white balancing
US20170069066A1 (en) * 2015-09-09 2017-03-09 Ichikawa Soft Laboratory Co., Ltd. Image processor and image processing method
CN109697705A (en) * 2018-12-24 2019-04-30 北京天睿空间科技股份有限公司 Chromatic aberration correction method suitable for video-splicing
CN110033412A (en) * 2018-01-12 2019-07-19 华为技术有限公司 A kind of image processing method and device
CN110148097A (en) * 2019-05-27 2019-08-20 电子科技大学 The color calibration method of cataract image
CN110335208A (en) * 2019-06-10 2019-10-15 武汉大学 It is a kind of based on the spissatus minimizing technology of high-resolution remote sensing image gradually corrected

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104424626A (en) * 2013-09-09 2015-03-18 联发科技(新加坡)私人有限公司 Method and associated apparatus for correcting color artifact of image
US20150371370A1 (en) * 2014-06-19 2015-12-24 Microsoft Corporation Identifying gray regions for auto white balancing
US20170069066A1 (en) * 2015-09-09 2017-03-09 Ichikawa Soft Laboratory Co., Ltd. Image processor and image processing method
CN110033412A (en) * 2018-01-12 2019-07-19 华为技术有限公司 A kind of image processing method and device
CN109697705A (en) * 2018-12-24 2019-04-30 北京天睿空间科技股份有限公司 Chromatic aberration correction method suitable for video-splicing
CN110148097A (en) * 2019-05-27 2019-08-20 电子科技大学 The color calibration method of cataract image
CN110335208A (en) * 2019-06-10 2019-10-15 武汉大学 It is a kind of based on the spissatus minimizing technology of high-resolution remote sensing image gradually corrected

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114219736A (en) * 2021-12-21 2022-03-22 爱芯元智半导体(上海)有限公司 Image chromatic aberration correction method and device, electronic equipment and storage medium
CN114739644A (en) * 2022-06-10 2022-07-12 武汉精立电子技术有限公司 Method, device and equipment for judging color cast and readable storage medium

Also Published As

Publication number Publication date
CN111429534B (en) 2020-11-13

Similar Documents

Publication Publication Date Title
CN107590840B (en) Color shadow correction method based on grid division and correction system thereof
CN107403421B (en) Image defogging method, storage medium and terminal equipment
CN109191406B (en) Image processing method, device and equipment
CN111429534B (en) Image color cast correction method and device
CN111784605B (en) Image noise reduction method based on region guidance, computer device and computer readable storage medium
CN106447602A (en) Image mosaic method and device
CN111368587B (en) Scene detection method, device, terminal equipment and computer readable storage medium
WO2015141050A1 (en) Multi-area white balance control device, multi-area white balance control method, multi-area white balance control program, computer on which multi-area white balance control program has been recorded, multi-area white balance image processing device, multi-area white balance image processing method, multi-area white balance image processing program, computer on which multi-area white balance image processing program has been recorded, and imaging device provided with multi-area white balance image processing device
CN111163301B (en) Color adjustment method, device and computer readable storage medium
JP2016151955A (en) Image processing apparatus, imaging device, distance measuring device, and image processing method
CN112788251B (en) Image brightness processing method and device, and image processing method and device
CN115049658B (en) RGB-D camera quality detection method, electronic device and storage medium
CN112218065B (en) Image white balance method, system, terminal device and storage medium
CN112911174A (en) Image dead pixel cluster correction method, computer device and computer readable storage medium
CN107172323B (en) Method and device for removing dark corners of images of large-view-field camera
CN110175967B (en) Image defogging processing method, system, computer device and storage medium
US11323618B2 (en) Method for displaying a model of a surrounding area, control unit and vehicle
US11373279B2 (en) Image processing method and device
CN110782400A (en) Self-adaptive uniform illumination realization method and device
KR101373471B1 (en) Apparatus and method for compensation of stereo image
CN111784575A (en) Method for demosaicing monitoring camera based on calibration
CN113766203A (en) Image white balance processing method
CN116485645A (en) Image stitching method, device, equipment and storage medium
US10692269B2 (en) Method and device for image processing
KR20180057365A (en) Method and Apparatus for Processing Image to Simultaneously Enhance Contrast and Saturation of Image

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: An image color deviation correction method and device

Effective date of registration: 20210721

Granted publication date: 20201113

Pledgee: Shenzhen hi tech investment small loan Co.,Ltd.

Pledgor: Shenzhen 666 International Travel Service Co.,Ltd.

Registration number: Y2021980006547

PC01 Cancellation of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20230106

Granted publication date: 20201113

Pledgee: Shenzhen hi tech investment small loan Co.,Ltd.

Pledgor: Shenzhen 666 International Travel Service Co.,Ltd.

Registration number: Y2021980006547