CN111861899A - Image enhancement method and system based on illumination nonuniformity - Google Patents
Image enhancement method and system based on illumination nonuniformity Download PDFInfo
- Publication number
- CN111861899A CN111861899A CN202010431258.2A CN202010431258A CN111861899A CN 111861899 A CN111861899 A CN 111861899A CN 202010431258 A CN202010431258 A CN 202010431258A CN 111861899 A CN111861899 A CN 111861899A
- Authority
- CN
- China
- Prior art keywords
- image
- path
- pixel
- brightness
- pixel value
- 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.)
- Withdrawn
Links
- 238000005286 illumination Methods 0.000 title claims abstract description 39
- 238000000034 method Methods 0.000 title claims abstract description 15
- 238000012545 processing Methods 0.000 claims abstract description 14
- 230000002194 synthesizing effect Effects 0.000 claims abstract description 6
- 238000004364 calculation method Methods 0.000 claims description 8
- 230000015572 biosynthetic process Effects 0.000 claims description 4
- 238000006243 chemical reaction Methods 0.000 claims description 4
- 238000003786 synthesis reaction Methods 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000003384 imaging method Methods 0.000 description 3
- 238000012360 testing method Methods 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 125000004432 carbon atom Chemical group C* 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000012804 iterative process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/73—Deblurring; Sharpening
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/50—Depth or shape recovery
- G06T7/514—Depth or shape recovery from specularities
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
Abstract
The invention discloses an image enhancement method and system based on uneven illumination, which convert an original color image from an RGB space to an HSV space to obtain a brightness component V of the image; processing the illumination component V by using a path-optimized MR algorithm; and converting the processed HSV space into an RGB space, and synthesizing a new image. The advantages are that: the method is based on the image enhancement algorithm with uneven illumination, and the brightness component V of the image is processed by using the MR algorithm with optimized path, so that the brightness distribution of the image is more uniform. Compared with other algorithms, the algorithm has the advantages that the used paths are more uniform, and the brightness of the processed image is more reasonable in consideration of various different directions such as clockwise direction, anticlockwise direction and the like.
Description
Technical Field
The invention relates to an image enhancement method and system based on illumination nonuniformity, and belongs to the technical field of image processing.
Background
When the imaging device takes a picture, the quality of the picture is greatly affected by illumination. The picture taken during the day is clearly visible, but the picture taken at night is blurred. When images are acquired in underwater imaging, particularly in deep water, an artificial light source is often needed as an auxiliary light source for imaging, which causes uneven illumination and blurred details of the acquired images.
Disclosure of Invention
The technical problem to be solved by the invention is to overcome the defects of the prior art and provide an image enhancement method and system based on illumination nonuniformity.
In order to solve the technical problem, the invention provides an image enhancement method based on illumination nonuniformity, which is characterized in that an original color image is converted from an RGB space to an HSV space, and a brightness component V of the image is obtained; processing the brightness component V by using a path-optimized MR algorithm; and converting the processed HSV space into an RGB space, and synthesizing a new image.
Further, the formula for converting the original color image from the RGB space to the HSV space is as follows:
h represents hue, V represents brightness, S represents saturation, R represents a pixel value of a red channel, G represents a pixel value of a green channel, B represents a pixel value of a blue channel, θ represents a rotation angle, max () represents a maximum value, and min () represents a minimum value.
Further, the process of the path-optimized MR algorithm processing includes:
determining a plurality of paths which are different in starting point or different in direction and depict the brightness change of the image according to the global brightness change;
selecting pixel points on one path, and taking the selected pixel points as part of the pixel points of the estimated illumination image;
Updating the pixel value of the brightness component V by using the contrast between the central pixel point of the obtained brightness component V and a part of pixel points of the estimated illumination image;
iterating for multiple times until the pixel value of the updated brightness component V contains the brightness change of the whole image, and determining the pixel value as the pixel value of the brightness component V after iteration;
and determining the iterated pixel value of the brightness component V of each path, summing the iterated pixel values of the brightness components V of all paths, and taking the average value to obtain the final pixel value of the brightness component V.
Further, the starting point of the path is (-offset, offset), and the path is a spiral path covering the whole image, wherein the offset calculation formula is as follows:
wherein the offset represents coordinates that are the starting point,is a rounded down function; rows and cols respectively represent the number of rows and columns of the image;
the update formula of the pixel values on the path is as follows:
where n denotes the number of iterations, rn(x, y) denotes reflection information obtained in the nth iteration, In(x, y) represents the luminance value of the nth estimation,
where max is the maximum value of the pixel in the original image, and Δ l ═ Sc-SmIs the difference in luminance over the path, ScRepresenting the center pixel value, SmAnd k represents a total of k pixel points on the path.
Further, the formula for converting the processed HSV space into the RGB space is as follows:
hi=[H/60]mod6,f=H/60-hi,p=V×(1-S),q=V×(1-f×S),t=V×(1-(1-f)×S)
wherein h isiP, q, f, t are intermediate variables and mod represents the remainder.
An image enhancement system based on illumination non-uniformity, comprising:
the acquisition module is used for converting the original color image from an RGB space to an HSV space and acquiring a brightness component V of the image;
the processing module is used for processing the brightness component V by using a path-optimized MR algorithm;
and the synthesis module is used for converting the processed HSV space into an RGB space and synthesizing a new image.
Further, the obtaining module includes:
a first conversion module for converting the original color image from the RGB space to the HSV space by,
h represents hue, V represents brightness, S represents saturation, R represents a pixel value of a red channel, G represents a pixel value of a green channel, B represents a pixel value of a blue channel, θ represents a rotation angle, max () represents a maximum value, and min () represents a minimum value.
Further, the processing module comprises:
the first determining module is used for determining a plurality of paths which are different in starting point or different in direction and depict image shading change according to the global shading change;
the selection module is used for selecting pixel points on one path and taking the selected pixel points as part of the pixel points of the estimated illumination image;
The updating module is used for updating the pixel value of the brightness component V by utilizing the light-dark contrast of the central pixel point of the obtained brightness component V and a part of pixel points of the estimated illumination image;
the second determining module is used for iterating for multiple times until the updated pixel value of the brightness component V contains the brightness change of the whole image, and determining the updated pixel value of the brightness component V as the iterated pixel value of the brightness component V;
and the third determining module is used for determining the pixel values of the brightness components V of each path after iteration, summing the pixel values of the brightness components V of all paths after iteration and taking the average value to obtain the final pixel value of the brightness components V.
Further, the first determining module comprises:
a first calculation module for calculating a starting point (-offset, offset) of the path,
the path is a spiral path covering the whole image, wherein the offset calculation formula is as follows:
wherein the offset represents coordinates that are the starting point,is a rounded down function; rows and cols respectively represent the number of rows and columns of the image;
the update module includes:
a second calculation module for updating the pixel values on the path using the following formula,
where n denotes the number of iterations, rn(x, y) denotes reflection information obtained in the nth iteration, I n(x, y) represents the luminance value of the nth estimation,
where max is the maximum value of the pixel in the original image, and Δ l ═ Sc-SmIs the difference in luminance over the path, ScRepresenting the center pixel value, SmAnd k represents a total of k pixel points on the path.
Further, the synthesis module comprises:
a second conversion module for converting the treated HSV space into an RGB space using the following formula,
hi=[H/60]mod6,f=H/60-hi,p=V×(1-S),q=V×(1-f×S),t=V×(1-(1-f)×S)
wherein h isiP, q, f, t are intermediate variables and mod represents the remainder.
The invention achieves the following beneficial effects:
the method is based on an image enhancement algorithm with uneven illumination, and the brightness (V) of the image is processed by using an MR algorithm with optimized path, so that the brightness distribution of the image is more uniform.
Compared with other algorithms, the algorithm has the advantages that the used paths are more uniform, and the brightness of the processed image is more reasonable in consideration of various different directions such as clockwise direction, anticlockwise direction and the like.
Drawings
FIG. 1 is a flow chart of an image enhancement algorithm based on illumination non-uniformity according to the present invention;
FIG. 2 is a partial path diagram used by the MR algorithm of the present invention;
FIG. 3(a) is a diagram of a clockwise path used by the MR algorithm of the present invention, and FIG. 3(b) is a diagram of a counterclockwise path used by the MR algorithm of the present invention;
Fig. 4(a) is an original image before image enhancement in the present invention, and fig. 4(b) is a diagram after image enhancement in the present 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 obvious that the embodiments described below 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 invention discloses an image enhancement algorithm based on illumination nonuniformity, which specifically comprises the following steps
(1) Converting an original color image from an RGB space to an HSV space, and acquiring an illumination component V of the image;
(2) processing the illumination component V by using a path-optimized MR algorithm;
(3) and transferring from the HSV space to the RGB space, and synthesizing a new image.
The formula for converting the original color image from the RGB space to the HSV space in the step (1) is as follows:
the MR algorithm for path optimization in the step (2) comprises the following steps:
a, selecting a path which can depict the brightness change of the image according to the global brightness change;
b, selecting pixel points on the designated path, and taking the selected pixel points as part of the pixel points of the estimated illumination image;
c, updating the pixel value by using the light-dark contrast of the central pixel point and the pixel point on the path;
d after a number of iterations, the central pixel value will contain the entire image shading.
In the present invention, the starting point of the path is (-offset, offset), where offset represents the distance from the target pixel, the initial distance is set to an exponent of 2, and the exponent part is smaller than the length and width of the input image, which is expressed as follows:
in the above formula, the first and second carbon atoms are,is a rounded down function; rows and cols represent the number of rows and columns, respectively, of the image. When an initial point (-offset, offset) is determined, the points that need to be determined subsequently are (offset, offset/2), (offset/2, -offset), (-offset, -offset/2). The offset value is halved in each iteration compared with the previous iteration until the iteration is finished when | offset | is less than 1. The path of fig. 2 is finally obtained.
When the corresponding point is selected, the points on the path need to be compared and updated, and the formula is as follows:
in the above formula, n represents the number of iterations rn(x, y) representing reflection information obtained in the nth iteration, I n(x, y) represents the luminance value estimated at the nth time, and n is 4 in the experiment. To ensure that the maximum pixel value of the original is not exceeded:
in the above formula, max is the maximum value of the pixel in the original image, and Δ l is Sc-SmIs the difference in luminance over the path, ScRepresenting the center pixel value, SmAnd k represents a total of k pixel points on the path. Therefore, iteration operation is carried out according to the pixel difference on the continuous comparison path, and the unstable illumination information value in the whole image is estimated through continuous iteration, so that the influence of the illumination information is eliminated, and the reflection component value is calculated.
Although the path of fig. 2 already covers the image global, it is not considered that the path of the farther pixel point in the counterclockwise direction of the initial point includes the clockwise direction and the counterclockwise direction, and the present invention selects the above paths in the four directions respectively and completes the iterative process as shown in fig. 3(a) and 3 (b). And finally, averaging the illumination information obtained by four different paths.
The formula for converting the color image from the HSV space to the RGB space in the step (3) is as follows:
hi=[H/60]mod6,f=H/60-hi,p=V×(1-S),q=V×(1-f×S),t=V×(1-(1-f)×S)
in order to verify the effectiveness of the algorithm, a plurality of image tests are adopted to carry out comparison tests on the images before and after enhancement.
Fig. 4(a) shows the original image with blur and uneven illumination. After the algorithm processing, as shown in fig. 4(b), the picture is clear, the image brightness is more uniform, and the enhancement effect is significant compared with the original image.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (10)
1. An image enhancement method based on illumination nonuniformity is characterized in that,
converting an original color image from an RGB space to an HSV space, and acquiring a brightness component V of the image;
processing the brightness component V by using a path-optimized MR algorithm;
and converting the processed HSV space into an RGB space, and synthesizing a new image.
2. The illumination non-uniformity based image enhancement method according to claim 1,
the formula for converting the original color image from the RGB space to the HSV space is as follows:
h represents hue, V represents brightness, S represents saturation, R represents a pixel value of a red channel, G represents a pixel value of a green channel, B represents a pixel value of a blue channel, θ represents a rotation angle, max () represents a maximum value, and min () represents a minimum value.
3. The illumination non-uniformity based image enhancement method according to claim 1,
the process of the path-optimized MR algorithm processing comprises the following steps:
determining a plurality of paths which are different in starting point or different in direction and depict the brightness change of the image according to the global brightness change;
selecting pixel points on one path, and taking the selected pixel points as part of the pixel points of the estimated illumination image;
Updating the pixel value of the brightness component V by using the contrast between the central pixel point of the obtained brightness component V and a part of pixel points of the estimated illumination image;
iterating for multiple times until the pixel value of the updated brightness component V contains the brightness change of the whole image, and determining the pixel value as the pixel value of the brightness component V after iteration;
and determining the iterated pixel value of the brightness component V of each path, summing the iterated pixel values of the brightness components V of all paths, and taking the average value to obtain the final pixel value of the brightness component V.
4. The illumination non-uniformity based image enhancement method according to claim 3,
the starting point of the path is (-offset, offset), and the path is a spiral path covering the whole image, wherein the offset calculation formula is as follows:
wherein the offset represents coordinates that are the starting point,is a rounded down function; rows and cols respectively represent the number of rows and columns of the image;
the update formula of the pixel values on the path is as follows:
where n denotes the number of iterations, rn(x, y) denotes reflection information obtained in the nth iteration, In(x, y) represents the luminance value of the nth estimation,
where max is the maximum value of the pixel in the original image, and Δ l ═ Sc-SmIs the difference in luminance over the path, S cRepresenting the center pixel value, SmAnd k represents a total of k pixel points on the path.
5. The illumination non-uniformity based image enhancement method according to claim 1,
the formula for converting the processed HSV space into the RGB space is as follows:
hi=[H/60]mod6,f=H/60-hi,p=V×(1-S),q=V×(1-f×S),t=V×(1-(1-f)×S)
wherein h isiP, q, f, t are intermediate variables and mod represents the remainder.
6. An image enhancement system based on illumination non-uniformity, comprising:
the acquisition module is used for converting the original color image from an RGB space to an HSV space and acquiring a brightness component V of the image;
the processing module is used for processing the brightness component V by using a path-optimized MR algorithm;
and the synthesis module is used for converting the processed HSV space into an RGB space and synthesizing a new image.
7. The illumination non-uniformity based image enhancement system according to claim 6, wherein said acquisition module comprises:
a first conversion module for converting the original color image from the RGB space to the HSV space by,
h represents hue, V represents brightness, S represents saturation, R represents a pixel value of a red channel, G represents a pixel value of a green channel, B represents a pixel value of a blue channel, θ represents a rotation angle, max () represents a maximum value, and min () represents a minimum value.
8. The illumination non-uniformity based image enhancement system according to claim 6, wherein said processing module comprises:
the first determining module is used for determining a plurality of paths which are different in starting point or different in direction and depict image shading change according to the global shading change;
the selection module is used for selecting pixel points on one path and taking the selected pixel points as part of the pixel points of the estimated illumination image;
the updating module is used for updating the pixel value of the brightness component V by utilizing the light-dark contrast of the central pixel point of the obtained brightness component V and a part of pixel points of the estimated illumination image;
the second determining module is used for iterating for multiple times until the updated pixel value of the brightness component V contains the brightness change of the whole image, and determining the updated pixel value of the brightness component V as the iterated pixel value of the brightness component V;
and the third determining module is used for determining the pixel values of the brightness components V of each path after iteration, summing the pixel values of the brightness components V of all paths after iteration and taking the average value to obtain the final pixel value of the brightness components V.
9. The illumination non-uniformity based image enhancement system of claim 8, wherein said first determination module comprises:
A first calculation module for calculating a starting point (-offset, offset) of the path,
the path is a spiral path covering the whole image, wherein the offset calculation formula is as follows:
wherein the offset represents coordinates that are the starting point,is a rounded down function; rows and cols respectively represent the number of rows and columns of the image;
the update module includes:
a second calculation module for updating the pixel values on the path using the following formula,
where n denotes the number of iterations, rn(x, y) denotes reflection information obtained in the nth iteration, In(x, y) represents the luminance value of the nth estimation,
where max is the maximum value of the pixel in the original image, and Δ l ═ Sc-SmIs the difference in luminance over the path, ScRepresenting the center pixel value, SmAnd k represents a total of k pixel points on the path.
10. The illumination non-uniformity based image enhancement system according to claim 1,
the synthesis module comprises:
a second conversion module for converting the treated HSV space into an RGB space using the following formula,
hi=[H/60]mod6,f=H/60-hi,p=V×(1-S),q=V×(1-f×S),t=V×(1-(1-f)×S)
wherein h isiP, q, f, t are intermediate variables and mod represents the remainder.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010431258.2A CN111861899A (en) | 2020-05-20 | 2020-05-20 | Image enhancement method and system based on illumination nonuniformity |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010431258.2A CN111861899A (en) | 2020-05-20 | 2020-05-20 | Image enhancement method and system based on illumination nonuniformity |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111861899A true CN111861899A (en) | 2020-10-30 |
Family
ID=72985142
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010431258.2A Withdrawn CN111861899A (en) | 2020-05-20 | 2020-05-20 | Image enhancement method and system based on illumination nonuniformity |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111861899A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111968065A (en) * | 2020-10-23 | 2020-11-20 | 浙江科技学院 | Self-adaptive enhancement method for image with uneven brightness |
CN114638765A (en) * | 2022-03-30 | 2022-06-17 | 南京信息工程大学 | Low-illumination image enhancement method based on complementary gamma conversion |
-
2020
- 2020-05-20 CN CN202010431258.2A patent/CN111861899A/en not_active Withdrawn
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111968065A (en) * | 2020-10-23 | 2020-11-20 | 浙江科技学院 | Self-adaptive enhancement method for image with uneven brightness |
CN114638765A (en) * | 2022-03-30 | 2022-06-17 | 南京信息工程大学 | Low-illumination image enhancement method based on complementary gamma conversion |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109410126B (en) | Tone mapping method of high dynamic range image with detail enhancement and brightness self-adaption | |
CN112330531B (en) | Image processing method, image processing device, electronic equipment and storage medium | |
CN107016647B (en) | Panoramic picture color tone consistency correcting method and system | |
CN112734650A (en) | Virtual multi-exposure fusion based uneven illumination image enhancement method | |
CN103778900B (en) | A kind of image processing method and system | |
Wang et al. | Variational single nighttime image haze removal with a gray haze-line prior | |
CN113129391B (en) | Multi-exposure fusion method based on multi-exposure image feature distribution weight | |
CN109801233B (en) | Method for enhancing true color remote sensing image | |
TWI489416B (en) | Image recovery method | |
CN113222866B (en) | Gray scale image enhancement method, computer readable medium and computer system | |
CN113409221B (en) | Image color matting method, system, computer equipment and storage medium | |
CN111861899A (en) | Image enhancement method and system based on illumination nonuniformity | |
CN113706393A (en) | Video enhancement method, device, equipment and storage medium | |
CN114998141A (en) | Space environment high dynamic range imaging method based on multi-branch network | |
CN110009574A (en) | A kind of method that brightness, color adaptively inversely generate high dynamic range images with details low dynamic range echograms abundant | |
CN113284061A (en) | Underwater image enhancement method based on gradient network | |
CN117291816A (en) | Method for enhancing image contrast based on Zero-DCE network structure | |
CN114677295A (en) | Method and device for enhancing mirror highlight image of real scene and storage medium | |
CN114155173A (en) | Image defogging method and device and nonvolatile storage medium | |
CN111640068A (en) | Unsupervised automatic correction method for image exposure | |
CN108447034B (en) | Marine foggy day image defogging method based on illumination decomposition | |
CN113409196B (en) | High-speed global chromatic aberration correction method for real-time video splicing | |
CN101938661A (en) | Method and device for processing image and video image frame | |
CN110148188B (en) | Method for estimating low-illumination image illumination distribution based on maximum difference image | |
CN108307121B (en) | Local image mapping method and vehicle camera |
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 | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20201030 |
|
WW01 | Invention patent application withdrawn after publication |