CN117994160B - Image processing method and system - Google Patents

Image processing method and system Download PDF

Info

Publication number
CN117994160B
CN117994160B CN202410381897.0A CN202410381897A CN117994160B CN 117994160 B CN117994160 B CN 117994160B CN 202410381897 A CN202410381897 A CN 202410381897A CN 117994160 B CN117994160 B CN 117994160B
Authority
CN
China
Prior art keywords
image
channel
correction
adjustment
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.)
Active
Application number
CN202410381897.0A
Other languages
Chinese (zh)
Other versions
CN117994160A (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.)
Nanchang Institute of Technology
Original Assignee
Nanchang Institute of Technology
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 Nanchang Institute of Technology filed Critical Nanchang Institute of Technology
Priority to CN202410381897.0A priority Critical patent/CN117994160B/en
Publication of CN117994160A publication Critical patent/CN117994160A/en
Application granted granted Critical
Publication of CN117994160B publication Critical patent/CN117994160B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

The invention provides an image processing method and system, wherein the method comprises the steps of preprocessing an initial input image; identifying an environmental noise area of the processed image, and performing environmental noise adjustment processing on the environmental noise area; performing Gaussian color correction and channel correction on the adjustment image respectively to obtain a first correction image and a second correction image, and performing fusion processing on the first correction image and the second correction image; the invention can effectively correct the color deviation in the image, solve the problem of the integral darkness of the image, ensure the integral quality of the output image and fully embody the detail information of the image.

Description

Image processing method and system
Technical Field
The invention belongs to the technical field of image processing, and particularly relates to an image processing method and system.
Background
The image processing is a technology for analyzing the image by a computer to achieve a required result, namely image processing, the image processing generally refers to image processing, for the image to be processed, the environment noise is easy to exist in the finally shot image due to the influence of the environment noise, the environment noise in the image is generally removed by a filtering process in the prior art, but artifacts can be generated on the processed image, and meanwhile, the situation of overall darkness and uneven color of the image can also exist, so that the detailed information of the image can not be fully reflected.
Disclosure of Invention
In order to solve the technical problems, the invention provides an image processing method and an image processing system, which are used for solving the technical problems in the prior art.
In one aspect, the present invention provides the following technical solutions, and an image processing method includes:
Acquiring an initial input image, and preprocessing the initial input image to obtain a processed image;
Identifying an environmental noise area of the processed image, and performing environmental noise adjustment processing on the environmental noise area to obtain an adjusted image;
Performing Gaussian color correction and channel correction on the adjustment image respectively to obtain a first correction image and a second correction image, and performing fusion processing on the first correction image and the second correction image to obtain a correction image;
And performing color recovery processing on the corrected image to obtain a recovered image, converting the recovered image from an RGB space to an HSI space to obtain an HSI image, and performing sequential enhancement processing and space conversion processing on the HSI image to obtain an output image.
Compared with the prior art, the application has the beneficial effects that: firstly, acquiring an initial input image, and preprocessing the initial input image to obtain a processed image; then, identifying an environmental noise area of the processed image, and carrying out environmental noise adjustment processing on the environmental noise area to obtain an adjusted image; then, respectively carrying out Gaussian color correction and channel correction on the adjustment image to respectively obtain a first correction image and a second correction image, and carrying out fusion processing on the first correction image and the second correction image to obtain a correction image; finally, color recovery processing is carried out on the corrected image to obtain a recovered image, the recovered image is converted from an RGB space to an HSI space to obtain an HSI image, the HSI image is sequentially subjected to enhancement processing and space conversion processing to obtain an output image, the environmental noise in the image can be fully adjusted and removed by carrying out environmental noise adjustment processing on an environmental noise area of the image, the denoised image is clear and natural and obvious in detail, a better visual effect is achieved, meanwhile, the corrected and color recovered image can effectively correct the condition of color offset existing in the image, the condition of the integral darkness of the image can be solved, the integral brightness of a darkness area is ensured to be improved correspondingly, the saturation and contrast of the image are ensured, the integral quality of the output image is ensured, and the detail information of the image is fully embodied.
Preferably, the step of identifying an ambient noise area of the processed image, and performing an ambient noise adjustment process on the ambient noise area to obtain an adjusted image includes:
determining a first color distance between each pixel point and a white pixel point in the processed image Based on the first color distance/>Determining a noise region image corresponding to the environmental noise region and a correction threshold/>
Determining a selected image in the noise region image based on the selected image and the correction thresholdDetermining ambient light value/>Final environmental correction value/>
Based on the ambient light valueThe final environmental correction value/>Adjusting the noise region image to obtain a region adjustment image/>Adjusting the region to image/>Replacing the noise area image to obtain an adjusted image:
In the method, in the process of the invention, Is a noise area image.
Preferably, the determining of the first color distance between each pixel and the white pixel in the processed imageBased on the first color distance/>Determining a noise region image corresponding to the environmental noise region and a correction threshold/>The method comprises the following steps:
calculating a first color distance between each pixel point and a white pixel point in the processed image
In the method, in the process of the invention,、/>、/>The normalized values of RGB three channels of each pixel point in the processed image are respectively;
Based on the first color distance Determining a color distance histogram, performing multiple trigonometric function fitting processing on the color distance histogram to obtain a fitting curve graph, and taking a first trough point in the fitting curve graph as a region screening threshold/>Screening threshold/>, based on the regionPerforming binarization processing on the processed image to obtain a noise area image corresponding to the environmental noise area;
Respectively determining Performing difference processing on the corresponding binarized images to obtain a joint region image, determining joint pixel points with pixel values of 1 in the joint region image, determining positions of the joint pixel points in the processed image, calculating pixel value average values of the joint pixel points, and taking the pixel value average values of the joint pixel points as correction threshold/>Wherein/>Is a distance threshold.
Preferably, the determining a selected image in the noise region image is based on the selected image and the correction thresholdDetermining ambient light value/>Final environmental correction value/>The method comprises the following steps:
dividing the noise area image into a plurality of sub-images uniformly, and calculating the image gray level aggregation degree of the plurality of sub-images
In the method, in the process of the invention,Is the first/>, of the sub-imageGray level,/>For the probability of occurrence of the corresponding gray level,/>Is the number of gray levels;
Image gray level concentration degree The minimum sub-image is used as an iteration sub-image, and the iteration sub-image is repeatedly subjected to image sharing, image informativity calculation and screening until the area of the iteration sub-image is smaller than an image threshold value and is used as a selected image;
calculating a second color distance between each pixel point and a white pixel in the selected image
In the method, in the process of the invention,、/>、/>Respectively normalizing values of RGB three channels of each pixel point in the selected image;
Determining a second color distance in the selected image The minimum corresponding pixel point is used as a reference pixel point, and the average value of RGB three-channel values of the reference pixel point is calculated to obtain an ambient light value/>
Based on the ambient light valueCalculating initial environmental correction value/>And based on the correction threshold/>And the initial environmental correction value/>Calculating the final environmental correction value/>
In the method, in the process of the invention,Representing ambient medium transmittance,/>Representing the ambient noise region.
Preferably, the step of performing gaussian color correction and channel correction on the adjustment image to obtain a first correction image and a second correction image, respectively, and performing fusion processing on the first correction image and the second correction image to obtain a correction image includes:
determining histograms of RGB three channels of the adjusted image and determining average values of the three channels based on the histograms, respectively And standard deviation/>Calculating the adjustment coefficient/>, of the adjustment image
In the method, in the process of the invention,,/>Respectively represent RGB three channels,/>Representing the maximum pixel value of each channel of the adjusted image,/>Representing the minimum pixel value for each channel of the adjusted image,Representation/>And/>The maximum value of the difference between them;
Based on the adjustment coefficient Performing Gaussian color correction on the adjustment image to obtain a first corrected image:
In the method, in the process of the invention, For each channel of the first corrected image, pixel value,/>Is the position of histogram distribution,/>To adjust the pixel values of each channel of the image,/>、/>Respectively represent the average pixel value when the average pixel value is smaller than 128 and the average pixel value is larger than 128、/>Respectively, adjusting the maximum value and the minimum value of the normalized images,/>Represents the average standard deviation of three channels;
establishing a correction equation set of R, B channels of the adjustment image under the condition that the G channels of the adjustment image are unchanged:
In the method, in the process of the invention, 、/>Is a first correction coefficient and a second correction coefficient,/>,/>Representing adjustment of pixel position in an image to/>Pixel value of R, B channels of pixel points of/>、/>Representing the boundary position of the adjustment image,/>Representing adjustment of pixel position in an image to/>A pixel value of a G channel of the pixel point of (2);
Solving a first correction coefficient and a second correction coefficient based on the correction equation set, and performing channel correction on the adjustment image based on the first correction coefficient and the second correction coefficient to obtain a second correction image:
In the method, in the process of the invention, Pixel values for R, B channels of the second correction image;
the first corrected image And the second correction image/>Fusion processing is performed to obtain a corrected image/>
In the method, in the process of the invention,Is a fusion weight.
Preferably, the step of performing color recovery processing on the corrected image to obtain a recovered image, converting the recovered image from RGB space to HSI space to obtain an HSI image, and performing sequential enhancement processing and space conversion processing on the HSI image to obtain an output image includes:
For the corrected image Performing multi-scale filtering to obtain a filtered image/>
In the method, in the process of the invention,For the number of scales,/>For/>Weight corresponding to scale,/>Represents the/>Gaussian filtering of the scale;
For the filtered image Color recovery processing is performed to obtain a recovered image/>
In the method, in the process of the invention,、/>Control constant and control factor, respectively,/>,/>Representing an image of the corrected image on each channel;
restoring the image Converting from RGB space to HSI space to obtain HSI image, splitting the HSI image into H channel image, S channel image and I channel image;
And respectively carrying out saturation adjustment and brightness adjustment on the S channel image and the I channel image to respectively obtain an S channel adjustment image and an I channel adjustment image, and determining an output image based on the S channel adjustment image and the I channel adjustment image.
Preferably, the step of performing saturation adjustment and brightness adjustment on the S-channel image and the I-channel image to obtain an S-channel adjustment image and an I-channel adjustment image, respectively, and determining an output image based on the S-channel adjustment image and the I-channel adjustment image includes:
and carrying out saturation adjustment on the S channel image to obtain an S channel adjustment image:
In the method, in the process of the invention, 、/>Respectively the maximum value and the minimum value of saturation components,/>、/>The saturation components of the images are respectively adjusted for the S channel image and the S channel image;
and brightness adjustment is carried out on the I channel image so as to obtain an I channel adjustment image:
In the method, in the process of the invention, 、/>Brightness values of the I channel image and the I channel adjustment image are respectively/>As correction factor,/>The brightness average value of the I channel image in the I channel is obtained;
And fusing the I channel adjustment image, the S channel adjustment image and the H channel image to obtain an adjustment HSI image, and converting the adjustment HSI image back to an RGB space to obtain an output image.
In a second aspect, the present invention provides an image processing system, including:
the preprocessing module is used for acquiring an initial input image, and preprocessing the initial input image to obtain a processed image;
The adjusting module is used for identifying an environment noise area of the processed image and carrying out environment noise adjusting processing on the environment noise area so as to obtain an adjusted image;
The correction module is used for carrying out Gaussian color correction and channel correction on the adjustment image respectively to obtain a first correction image and a second correction image, and carrying out fusion processing on the first correction image and the second correction image to obtain a correction image;
And the recovery module is used for carrying out color recovery processing on the corrected image to obtain a recovery image, converting the recovery image from an RGB space to an HSI space to obtain an HSI image, and carrying out sequential enhancement processing and space conversion processing on the HSI image to obtain an output image.
In a third aspect, the present invention provides a computer, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the image processing method as described above when executing the computer program.
In a fourth aspect, the present invention provides a storage medium having a computer program stored thereon, which when executed by a processor implements an image processing method as described above.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments or the description of the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of an image processing method according to a first embodiment of the present invention;
FIG. 2 is a block diagram of an image processing system according to a second embodiment of the present invention;
Fig. 3 is a schematic hardware structure of a computer according to another embodiment of the invention.
Embodiments of the present invention will be further described below with reference to the accompanying drawings.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are exemplary and intended to illustrate embodiments of the invention and should not be construed as limiting the invention.
In the description of the embodiments of the present invention, it should be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," and the like indicate orientations or positional relationships based on the orientation or positional relationships shown in the drawings, merely to facilitate description of the embodiments of the present invention and simplify description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present invention.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the embodiments of the present invention, the meaning of "plurality" is two or more, unless explicitly defined otherwise.
In the embodiments of the present invention, unless explicitly specified and limited otherwise, the terms "mounted," "connected," "secured" and the like are to be construed broadly and include, for example, either permanently connected, removably connected, or integrally formed; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communicated with the inside of two elements or the interaction relationship of the two elements. The specific meaning of the above terms in the embodiments of the present invention will be understood by those of ordinary skill in the art according to specific circumstances.
Example 1
In a first embodiment of the present invention, as shown in fig. 1, an image processing method includes:
s1, acquiring an initial input image, and preprocessing the initial input image to obtain a processed image;
Specifically, after the initial input image is obtained, the image needs to be subjected to corresponding preprocessing so as to facilitate the subsequent operation process, and the preprocessing process specifically includes image cutting, smoothing processing, median filtering processing and the like.
S2, identifying an environmental noise area of the processed image, and performing environmental noise adjustment processing on the environmental noise area to obtain an adjusted image;
Specifically, in order to avoid the situation that the atmospheric light value is erroneously estimated in the high-brightness region, the application first determines the corresponding ambient noise region, and then performs corresponding adjustment processing operation on the ambient noise in the ambient noise region, thereby obtaining an adjustment image without the ambient noise.
Wherein, the step S2 includes:
S21, determining a first color distance between each pixel point and a white pixel point in the processed image Based on the first color distance/>Determining a noise region image corresponding to the environmental noise region and a correction threshold/>
Wherein, the step S21 includes:
S211, calculating a first color distance between each pixel point and a white pixel point in the processed image
In the method, in the process of the invention,、/>、/>The normalized values of RGB three channels of each pixel point in the processed image are respectively;
Specifically, the first color distance Can be used to measure the difference between two colors, the first color distance/>The larger the difference between the two is, the larger the first color distance/>The smaller the difference between the two, and for a processed image with environmental noise, and the environmental noise can be fog, the color characteristics of the pixels of the high brightness area in the processed image are similar to the color characteristics of the white pixels, so that the first color distance/>, between the pixel points of the processed image and the white pixel points can be used for determining the corresponding environmental noise areaAs a basis for determining the area selection, (1, 1) appearing in the above formula represents the RGB three-channel normalized value of the white pixel.
S212, based on the first color distanceDetermining a color distance histogram, performing multiple trigonometric function fitting processing on the color distance histogram to obtain a fitting curve graph, and taking a first trough point in the fitting curve graph as a region screening threshold/>Screening threshold/>, based on the regionPerforming binarization processing on the processed image to obtain a noise area image corresponding to the environmental noise area;
Specifically, in determining the first color distance between all pixels and white pixels in the processed image Thereafter, according to the first color distance/>Drawing a corresponding color distance histogram, wherein the vertexes of the color distance histogram form a continuous line graph, so that in order to enable lines formed by the vertexes to be smoother, a smoother fitting curve graph can be obtained by adopting a polynomial trigonometric function to perform multiple fitting processing on the color distance histogram, and the pixels corresponding to noise have smaller color distances, so that the leftmost first trough point is selected in the fitting curve graph to serve as a region screening threshold/>Screening threshold in selected area/>Thereafter, a region screening threshold/>, is usedAnd performing binarization processing on the processed image, wherein the obtained binarized image is a noise area image corresponding to the environmental noise area.
S213, respectively determiningPerforming difference processing on the corresponding binarized images to obtain a joint region image, determining joint pixel points with pixel values of 1 in the joint region image, determining positions of the joint pixel points in the processed image, calculating pixel value average values of the joint pixel points, and taking the pixel value average values of the joint pixel points as correction threshold/>Wherein/>Is a distance threshold;
specifically, after the noise area image is determined, the noise area image is respectively recorded with 、/>The two binarized images are redetermined as threshold values, and then the two binarized images are subjected to difference processing to obtain a joint region image, wherein the joint region image is an image at the boundary between a noise pixel point and other pixel points, and in the application,/>Taking 0.01, counting the number of 1 pixels in the joint region image after obtaining the joint region image, then processing the position of the joint pixel point with 1 pixels in the image, calculating the sum of the pixels, dividing the sum of the pixels by the number of the joint pixel points to obtain a pixel value average value, wherein the pixel value average value is the correction threshold/>
S22, determining a selected image in the noise area image, and based on the selected image and the correction threshold valueDetermining ambient light value/>Final environmental correction value/>
Wherein, the step S22 includes:
S221, uniformly dividing the noise area image into a plurality of sub-images, and calculating the image gray level aggregation degree of the plurality of sub-images
In the method, in the process of the invention,Is the first/>, of the sub-imageGray level,/>For the probability of occurrence of the corresponding gray level,/>Is the number of gray levels;
specifically, in this step, the image gradation aggregation level The aggregation degree of the image gray level can be reflected, and the aggregation degree/>, of the image gray level is achievedRegarding the degree of dispersion of the gray distribution of the image pixels, when the pixel gray changes greatly, the gray concentration of the image/>The larger.
S222, gathering image gray scaleThe minimum sub-image is used as an iteration sub-image, and the iteration sub-image is repeatedly subjected to image sharing, image informativity calculation and screening until the area of the iteration sub-image is smaller than an image threshold value and is used as a selected image;
Specifically, in step S221, it is assumed that the noise region image is equally divided into four sub-images, and then the image gray scale aggregation levels of the four sub-images are calculated, respectively Selecting the gray level concentration degree/>, of the imageThe smallest sub-image is used as a first iteration sub-image, the noise area image in the step S221 is replaced by the first iteration sub-image, the steps of the steps S221-S222 are repeatedly executed to obtain a second iteration sub-image, the process is repeated until the Q iteration sub-image is obtained, the pixel area of the Q iteration sub-image is smaller than an image threshold value, if not, the step is continuously executed, the image threshold value is specifically 150 pixel points, and the image which finally meets the image threshold value is the selected image.
S223, calculating a second color distance between each pixel point and the white pixel in the selected image
In the method, in the process of the invention,、/>、/>Respectively normalizing values of RGB three channels of each pixel point in the selected image;
in particular, the second color distance Distance from the first color/>The same applies to the measurement of the difference between two colors.
S224, determining the distance of the second color in the selected imageThe minimum corresponding pixel point is used as a reference pixel point, and the average value of RGB three-channel values of the reference pixel point is calculated to obtain an ambient light value/>
Specifically, a second color distance is selected from the selected imageThe pixel point with the smallest time is taken as a reference pixel point, and then three-channel mean value of the reference pixel point is calculated as the final ambient light value/>
S225, based on the ambient light valueCalculating initial environmental correction value/>And based on the correction threshold/>And the initial environmental correction value/>Calculating the final environmental correction value/>
In the method, in the process of the invention,Representing ambient medium transmittance,/>Representing an ambient noise region;
Specifically, in the above, Represents the ambient noise region, and/>Then it is used to represent the rest of the processed image except for the ambient noise region, while for/>In particular, it is a correction term for correcting the initial environment by/>And carrying out attenuation to a larger degree so as to improve the accuracy of final adjustment.
S23, based on the ambient light valueThe final environmental correction value/>Adjusting the noise region image to obtain a region adjustment image/>Adjusting the region to image/>Replacing the noise area image to obtain an adjusted image:
In the method, in the process of the invention, Is a noise area image.
S3, performing Gaussian color correction and channel correction on the adjustment image respectively to obtain a first correction image and a second correction image, and performing fusion processing on the first correction image and the second correction image to obtain a correction image;
Wherein, the step S3 includes:
s31, determining the histograms of RGB three channels of the adjustment image and respectively determining the average value of the three channels based on the histograms And standard deviation/>Calculating the adjustment coefficient/>, of the adjustment image
In the method, in the process of the invention,,/>Respectively represent RGB three channels,/>Representing the maximum pixel value of each channel of the adjusted image,/>Representing the minimum pixel value for each channel of the adjusted image,Representation/>And/>The maximum value of the difference between them;
Specifically, for the adjustment image, the color attenuation of the booster with the scene depth is more serious, so there is a color shift, and therefore in step S3, the adjustment coefficient is calculated And based on adjustment coefficient/>And carrying out Gaussian color correction on the adjustment image, so that the image color can be effectively corrected.
S32, based on the adjustment coefficientPerforming Gaussian color correction on the adjustment image to obtain a first corrected image:
In the method, in the process of the invention, For each channel of the first corrected image, pixel value,/>Is the position of histogram distribution,/>To adjust the pixel values of each channel of the image,/>、/>Respectively represent the average pixel value when the average pixel value is smaller than 128 and the average pixel value is larger than 128、/>Respectively, adjusting the maximum value and the minimum value of the normalized images,/>Represents the average standard deviation of three channels;
Specifically, in this step, 10% Of the gray value range 0-255, and/>90% Of the gray value range 0-255.
S33, establishing a correction equation set of R, B channels of the adjustment image under the condition that the G channels of the adjustment image are unchanged:
In the method, in the process of the invention, 、/>Is a first correction coefficient and a second correction coefficient,/>,/>Representing adjustment of pixel position in an image to/>Pixel value of R, B channels of pixel points of/>、/>Representing the boundary position of the adjustment image,/>Representing adjustment of pixel position in an image to/>A pixel value of a G channel of the pixel point of (2);
Specifically, for the correction equation set, on the premise of unchanged channel G based on the image, a corresponding simultaneous solving equation set, namely a correction equation set, can be established for the other two channels, namely the R channel and the B channel, and in the correction equation set, the other parameters are all known numbers, and only the first correction coefficient and the second correction coefficient are unknown numbers, so that the first correction coefficient and the second correction coefficient can be obtained according to the correction equation set.
S34, solving a first correction coefficient and a second correction coefficient based on the correction equation set, and performing channel correction on the adjustment image based on the first correction coefficient and the second correction coefficient to obtain a second correction image:
In the method, in the process of the invention, Pixel values for R, B channels of the second correction image;
Specifically, after the first correction coefficient and the second correction coefficient are obtained, correction processing can be performed on the R channel and the B channel of the image based on the first correction coefficient and the second correction coefficient to obtain two correction graphs respectively, and then the two correction graphs are combined with the unchanged G channel to obtain the second correction image.
S35, the first corrected imageAnd the second correction image/>Fusion processing is performed to obtain a corrected image/>
In the method, in the process of the invention,Is a fusion weight;
Specifically, in the above steps, two correction modes, namely gaussian color correction and channel correction, are used respectively, in order to effectively preserve contrast and color effect, and simultaneously preserve detailed information of an image, and the images obtained by the two correction modes are fused by adopting a weighted fusion mode, so that a corrected image after correction can be obtained In the present application,/>Taking 0.6, the relative offset is smaller, and the effect of color cast correction can be better achieved.
S4, performing color recovery processing on the corrected image to obtain a recovered image, converting the recovered image from an RGB space to an HSI space to obtain an HSI image, and performing sequential enhancement processing and space conversion processing on the HSI image to obtain an output image.
Wherein, the step S4 includes:
S41, correcting the image Performing multi-scale filtering to obtain a filtered image/>
In the method, in the process of the invention,For the number of scales,/>For/>Weight corresponding to scale,/>Represents the/>Gaussian filtering of the scale;
Specifically, after the image is subjected to denoising and correction, the image is subjected to color recovery processing to further improve the color richness and detail degree of the image, the image is subjected to filtering processing through multi-scale Gaussian filtering, and a corresponding filtered image can be obtained, and meanwhile, in the application, the scale number is as follows 3, Corresponding to three channels.
S42, for the filtered imageColor recovery processing is performed to obtain a recovered image/>
In the method, in the process of the invention,、/>Control constant and control factor, respectively,/>,/>Representing an image of the corrected image on each channel;
Specifically, in this step, 40,/>125. /(I)
S43, restoring the imageConverting from RGB space to HSI space to obtain HSI image, splitting the HSI image into H channel image, S channel image and I channel image;
Specifically, after the above steps, there may be a situation that the saturation is insufficient or the local detail contrast is low in the image, so that saturation adjustment and brightness adjustment are required for the image, and for convenience of processing, the restored image in RGB space needs to be converted into HSI space, because in HIS space, each channel can be processed independently and the channels do not interfere with each other, and the visual characteristics are more met, and the H channel, S channel and I channel correspond to hue, saturation and brightness respectively, so that when saturation adjustment and brightness adjustment are performed, the saturation adjustment is aimed at the S channel image, and the brightness adjustment is aimed at the I channel image.
S44, respectively carrying out saturation adjustment and brightness adjustment on the S channel image and the I channel image to respectively obtain an S channel adjustment image and an I channel adjustment image, and determining an output image based on the S channel adjustment image and the I channel adjustment image.
Wherein, the step S44 includes:
s441, performing saturation adjustment on the S-channel image to obtain an S-channel adjustment image:
In the method, in the process of the invention, 、/>Respectively the maximum value and the minimum value of saturation components,/>、/>The saturation components of the images are respectively adjusted for the S channel image and the S channel image;
Specifically, the overall saturation component of the S-channel adjusted image after saturation adjustment is properly enhanced, so that it can bring about a more visual experience when switching back to RGB space.
S442, performing brightness adjustment on the I channel image to obtain an I channel adjustment image:
In the method, in the process of the invention, 、/>Brightness values of the I channel image and the I channel adjustment image are respectively/>As correction factor,/>The brightness average value of the I channel image in the I channel is obtained;
specifically, the brightness of the I channel adjusted image after brightness adjustment is properly enhanced and adjusted, so that the overall contrast of the image is higher when the image is converted back to the RGB space, and the details of the image can be fully represented.
S443, fusing the I channel adjustment image, the S channel adjustment image and the H channel image to obtain an adjustment HSI image, and converting the adjustment HSI image back to an RGB space to obtain an output image;
Specifically, after the adjusted I channel adjustment image and the adjusted S channel adjustment image are obtained, the adjusted I channel adjustment image and the adjusted S channel adjustment image are fused and combined with the original unadjusted H channel image, and then the combined image is converted back to an RGB space, so that a processed output image can be obtained.
The first embodiment of the application provides an image processing method, which includes the steps of firstly, acquiring an initial input image, and preprocessing the initial input image to obtain a processed image; then, identifying an environmental noise area of the processed image, and carrying out environmental noise adjustment processing on the environmental noise area to obtain an adjusted image; then, respectively carrying out Gaussian color correction and channel correction on the adjustment image to respectively obtain a first correction image and a second correction image, and carrying out fusion processing on the first correction image and the second correction image to obtain a correction image; finally, color recovery processing is carried out on the corrected image to obtain a recovered image, the recovered image is converted from an RGB space to an HSI space to obtain an HSI image, the HSI image is sequentially subjected to enhancement processing and space conversion processing to obtain an output image, the environmental noise in the image can be fully adjusted and removed by carrying out environmental noise adjustment processing on an environmental noise area of the image, the denoised image is clear and natural and obvious in detail, a better visual effect is achieved, meanwhile, the corrected and color recovered image can effectively correct the condition of color offset existing in the image, the condition of the integral darkness of the image can be solved, the integral brightness of a darkness area is ensured to be improved correspondingly, the saturation and contrast of the image are ensured, the integral quality of the output image is ensured, and the detail information of the image is fully embodied.
Example two
As shown in fig. 2, in a second embodiment of the present invention, there is provided an image processing system, including:
the preprocessing module 1 is used for acquiring an initial input image, and preprocessing the initial input image to obtain a processed image;
the adjusting module 2 is used for identifying an environmental noise area of the processed image, and performing environmental noise adjusting processing on the environmental noise area to obtain an adjusted image;
the correction module 3 is used for respectively carrying out Gaussian color correction and channel correction on the adjustment image to respectively obtain a first correction image and a second correction image, and carrying out fusion processing on the first correction image and the second correction image to obtain a correction image;
And the recovery module 4 is used for carrying out color recovery processing on the corrected image to obtain a recovery image, converting the recovery image from an RGB space to an HSI space to obtain an HSI image, and carrying out sequential enhancement processing and space conversion processing on the HSI image to obtain an output image.
The adjustment module 2 includes:
a region determination submodule for determining a first color distance between each pixel point and a white pixel point in the processed image Based on the first color distance/>Determining a noise region image corresponding to an ambient noise region and a correction threshold
A correction sub-module for determining a selected image in the noise region image based on the selected image and the correction thresholdDetermining ambient light value/>Final environmental correction value/>
An adjustment sub-module for adjusting the ambient light valueThe final environmental correction value/>Adjusting the noise region image to obtain a region adjustment image/>Adjusting the region to image/>Replacing the noise area image to obtain an adjusted image:
In the method, in the process of the invention, Is a noise area image.
The region determination submodule includes:
A first distance unit for calculating a first color distance between each pixel point and a white pixel point in the processed image
In the method, in the process of the invention,、/>、/>The normalized values of RGB three channels of each pixel point in the processed image are respectively;
a fitting unit for based on the first color distance Determining a color distance histogram, performing multiple trigonometric function fitting processing on the color distance histogram to obtain a fitting curve graph, and taking a first trough point in the fitting curve graph as a region screening threshold/>Screening threshold/>, based on the regionPerforming binarization processing on the processed image to obtain a noise area image corresponding to the environmental noise area;
Threshold value determining units for determining respectively Performing difference processing on the corresponding binarized images to obtain a joint region image, determining joint pixel points with pixel values of 1 in the joint region image, determining positions of the joint pixel points in the processed image, calculating pixel value average values of the joint pixel points, and taking the pixel value average values of the joint pixel points as correction threshold/>Wherein/>Is a distance threshold.
The correction submodule includes:
a dividing unit for dividing the noise region image into multiple sub-images, and calculating image gray level aggregation degree of the multiple sub-images
In the method, in the process of the invention,Is the first/>, of the sub-imageGray level,/>For the probability of occurrence of the corresponding gray level,/>Is the number of gray levels;
An iteration unit for gathering the image gray scale The minimum sub-image is used as an iteration sub-image, and the iteration sub-image is repeatedly subjected to image sharing, image informativity calculation and screening until the area of the iteration sub-image is smaller than an image threshold value and is used as a selected image;
a second distance unit for calculating a second color distance between each pixel point and the white pixel in the selected image
In the method, in the process of the invention,、/>、/>Respectively normalizing values of RGB three channels of each pixel point in the selected image;
a reference unit for determining a second color distance in the selected image The minimum corresponding pixel point is used as a reference pixel point, and the average value of RGB three-channel values of the reference pixel point is calculated to obtain an ambient light value/>
A correction unit for correcting the ambient light valueCalculating initial environmental correction value/>And based on the correction thresholdAnd the initial environmental correction value/>Calculating the final environmental correction value/>
In the method, in the process of the invention,Representing ambient medium transmittance,/>Representing the ambient noise region.
The correction module 3 includes:
A coefficient determination submodule for determining a histogram of RGB three channels of the adjustment image and respectively determining the average value of the three channels based on the histogram And standard deviation/>Calculating the adjustment coefficient/>, of the adjustment image
In the method, in the process of the invention,,/>Respectively represent RGB three channels,/>Representing the maximum pixel value of each channel of the adjusted image,/>Representing the minimum pixel value for each channel of the adjusted image,Representation/>And/>The maximum value of the difference between them; /(I)
A first correction submodule for adjusting the coefficient based onPerforming Gaussian color correction on the adjustment image to obtain a first corrected image:
In the method, in the process of the invention, For each channel of the first corrected image, pixel value,/>Is the position of histogram distribution,/>To adjust the pixel values of each channel of the image,/>、/>Respectively represent the average pixel value when the average pixel value is smaller than 128 and the average pixel value is larger than 128、/>Respectively, adjusting the maximum value and the minimum value of the normalized images,/>Represents the average standard deviation of three channels;
the equation set determining submodule is used for establishing a correction equation set of R, B channels of the adjustment image under the condition that the G channels of the adjustment image are unchanged:
In the method, in the process of the invention, 、/>Is a first correction coefficient and a second correction coefficient,/>,/>Representing adjustment of pixel position in an image to/>Pixel value of R, B channels of pixel points of/>、/>Representing the boundary position of the adjustment image,/>Representing adjustment of pixel position in an image to/>A pixel value of a G channel of the pixel point of (2);
the second correction submodule is used for solving a first correction coefficient and a second correction coefficient based on the correction equation set, and carrying out channel correction on the adjustment image based on the first correction coefficient and the second correction coefficient so as to obtain a second correction image:
In the method, in the process of the invention, Pixel values for R, B channels of the second correction image;
a fusion sub-module for fusing the first corrected image And the second correction image/>Fusion processing is performed to obtain a corrected image/>
In the method, in the process of the invention,Is a fusion weight.
The recovery module 4 comprises:
A filtering sub-module for correcting the image Performing multi-scale filtering to obtain a filtered image
;/>
In the method, in the process of the invention,For the number of scales,/>For/>Weight corresponding to scale,/>Represents the/>Gaussian filtering of the scale;
a restoration submodule for filtering the image Performing color recovery processing to obtain a recovered image
In the method, in the process of the invention,、/>Control constant and control factor, respectively,/>,/>Representing an image of the corrected image on each channel;
A conversion sub-module for converting the restored image Converting from RGB space to HSI space to obtain HSI image, splitting the HSI image into H channel image, S channel image and I channel image;
and the channel adjustment sub-module is used for respectively carrying out saturation adjustment and brightness adjustment on the S channel image and the I channel image so as to respectively obtain an S channel adjustment image and an I channel adjustment image, and determining an output image based on the S channel adjustment image and the I channel adjustment image.
The channel adjustment submodule includes:
the first channel adjustment unit is used for performing saturation adjustment on the S channel image to obtain an S channel adjustment image:
In the method, in the process of the invention, 、/>Respectively the maximum value and the minimum value of saturation components,/>、/>The saturation components of the images are respectively adjusted for the S channel image and the S channel image;
the second channel adjusting unit is used for adjusting the brightness of the I channel image to obtain an I channel adjusted image:
In the method, in the process of the invention, 、/>Brightness values of the I channel image and the I channel adjustment image are respectively/>As correction factor,/>The brightness average value of the I channel image in the I channel is obtained;
And the channel fusion unit is used for fusing the I channel adjustment image, the S channel adjustment image and the H channel image to obtain an adjustment HSI image, and converting the adjustment HSI image back to an RGB space to obtain an output image.
In other embodiments of the present invention, a computer is provided in the following embodiments, and the computer includes a memory 102, a processor 101, and a computer program stored in the memory 102 and executable on the processor 101, where the processor 101 implements the image processing method as described above when executing the computer program.
In particular, the processor 101 may include a Central Processing Unit (CPU), or an Application SPECIFIC INTEGRATED Circuit (ASIC), or may be configured as one or more integrated circuits that implement embodiments of the present invention.
Memory 102 may include, among other things, mass storage for data or instructions. By way of example, and not limitation, memory 102 may comprise a hard disk drive (HARD DISK DRIVE, abbreviated HDD), a floppy disk drive, a Solid state drive (Solid STATE DRIVE, abbreviated SSD), flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (Universal Serial Bus, abbreviated USB) drive, or a combination of two or more of these. Memory 102 may include removable or non-removable (or fixed) media, where appropriate. The memory 102 may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory 102 is a Non-Volatile (Non-Volatile) memory. In particular embodiments, memory 102 includes Read-Only Memory (ROM) and random access Memory (Random Access Memory, RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, abbreviated PROM), an erasable PROM (Erasable Programmable Read-Only Memory, abbreviated EPROM), an electrically erasable PROM (ELECTRICALLY ERASABLE PROGRAMMABLE READ-Only Memory, abbreviated EEPROM), an electrically rewritable ROM (ELECTRICALLY ALTERABLE READ-Only Memory, abbreviated EAROM), or a FLASH Memory (FLASH), or a combination of two or more of these. The RAM may be a Static Random-Access Memory (SRAM) or a dynamic Random-Access Memory (Dynamic Random Access Memory DRAM), where the DRAM may be a fast page mode dynamic Random-Access Memory (Fast Page Mode Dynamic Random Access Memory, FPMDRAM), an extended data output dynamic Random-Access Memory (Extended Date Out Dynamic Random Access Memory, EDODRAM), a synchronous dynamic Random-Access Memory (Synchronous Dynamic Random-Access Memory, SDRAM), or the like, as appropriate.
Memory 102 may be used to store or cache various data files that need to be processed and/or communicated, as well as possible computer program instructions for execution by processor 101.
The processor 101 implements the above-described image processing method by reading and executing computer program instructions stored in the memory 102.
In some of these embodiments, the computer may also include a communication interface 103 and a bus 100. As shown in fig. 3, the processor 101, the memory 102, and the communication interface 103 are connected to each other by the bus 100 and perform communication with each other.
The communication interface 103 is used to implement communications between modules, devices, units, and/or units in embodiments of the invention. The communication interface 103 may also enable communication with other components such as: and the external equipment, the image/data acquisition equipment, the database, the external storage, the image/data processing workstation and the like are used for data communication.
Bus 100 includes hardware, software, or both, coupling components of a computer device to each other. Bus 100 includes, but is not limited to, at least one of: data Bus (Data Bus), address Bus (Address Bus), control Bus (Control Bus), expansion Bus (Expansion Bus), local Bus (Local Bus). By way of example, and not limitation, bus 100 may comprise a graphics acceleration interface (ACCELERATED GRAPHICS Port, abbreviated as AGP) or other graphics Bus, an enhanced industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) Bus, a Front Side Bus (Front Side Bus, abbreviated as FSB), a HyperTransport (abbreviated as HT) interconnect, an industry standard architecture (Industry Standard Architecture, abbreviated as ISA) Bus, a wireless bandwidth (InfiniBand) interconnect, a Low Pin Count (LPC) Bus, a memory Bus, a micro channel architecture (Micro Channel Architecture, abbreviated as MCA) Bus, a peripheral component interconnect (PERIPHERAL COMPONENT INTERCONNECT, abbreviated as PCI) Bus, a PCI-Express (PCI-X) Bus, a serial advanced technology attachment (SERIAL ADVANCED Technology Attachment, abbreviated as SATA) Bus, a video electronics standards Association local (Video Electronics Standards Association Local Bus, abbreviated as VLB) Bus, or other suitable Bus, or a combination of two or more of these. Bus 100 may include one or more buses, where appropriate. Although embodiments of the invention have been described and illustrated with respect to a particular bus, the invention contemplates any suitable bus or interconnect.
The computer may execute the image processing method of the present invention based on the acquired image processing system, thereby realizing image processing.
In still other embodiments of the present invention, in combination with the above-described image processing method, embodiments of the present invention provide a storage medium having a computer program stored thereon, which when executed by a processor, implements the above-described image processing method.
Those of skill in the art will appreciate that the logic and/or steps represented in the flow diagrams or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the invention, which are described in detail and are not to be construed as limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.

Claims (5)

1. An image processing method, comprising:
Acquiring an initial input image, and preprocessing the initial input image to obtain a processed image;
Identifying an environmental noise area of the processed image, and performing environmental noise adjustment processing on the environmental noise area to obtain an adjusted image;
Performing Gaussian color correction and channel correction on the adjustment image respectively to obtain a first correction image and a second correction image, and performing fusion processing on the first correction image and the second correction image to obtain a correction image;
Performing color recovery processing on the corrected image to obtain a recovered image, converting the recovered image from an RGB space to an HSI space to obtain an HSI image, and performing sequential enhancement processing and space conversion processing on the HSI image to obtain an output image;
The step of identifying the environmental noise area of the processed image and performing environmental noise adjustment processing on the environmental noise area to obtain an adjusted image includes:
determining a first color distance between each pixel point and a white pixel point in the processed image Based on the first color distance/>Determining a noise region image corresponding to the environmental noise region and a correction threshold/>
Determining a selected image in the noise region image based on the selected image and the correction thresholdDetermining ambient light value/>Final environmental correction value/>
Based on the ambient light valueThe final environmental correction value/>Adjusting the noise region image to obtain a region adjustment image/>Adjusting the region to image/>Replacing the noise area image to obtain an adjusted image:
In the method, in the process of the invention, Is a noise area image;
The first color distance between each pixel point and the white pixel point in the processed image is determined Based on the first color distance/>Determining a noise region image corresponding to the environmental noise region and a correction threshold/>The method comprises the following steps:
calculating a first color distance between each pixel point and a white pixel point in the processed image
In the method, in the process of the invention,、/>、/>The normalized values of RGB three channels of each pixel point in the processed image are respectively;
Based on the first color distance Determining a color distance histogram, performing multiple trigonometric function fitting processing on the color distance histogram to obtain a fitting curve graph, and taking a first trough point in the fitting curve graph as a region screening threshold/>Screening threshold/>, based on the regionPerforming binarization processing on the processed image to obtain a noise area image corresponding to the environmental noise area;
Respectively determining Performing difference processing on the corresponding binarized images to obtain a joint region image, determining joint pixel points with pixel values of 1 in the joint region image, determining positions of the joint pixel points in the processed image, calculating pixel value average values of the joint pixel points, and taking the pixel value average values of the joint pixel points as correction threshold/>Wherein/>Is a distance threshold;
the determining of the selected image in the noise region image is based on the selected image and the correction threshold Determining ambient light value/>Final environmental correction value/>The method comprises the following steps:
dividing the noise area image into a plurality of sub-images uniformly, and calculating the image gray level aggregation degree of the plurality of sub-images
In the method, in the process of the invention,Is the first/>, of the sub-imageGray level,/>For the probability of occurrence of the corresponding gray level,/>Is the number of gray levels;
Image gray level concentration degree The minimum sub-image is used as an iteration sub-image, and the iteration sub-image is repeatedly subjected to image sharing, image informativity calculation and screening until the area of the iteration sub-image is smaller than an image threshold value and is used as a selected image;
calculating a second color distance between each pixel point and a white pixel in the selected image
In the method, in the process of the invention,、/>、/>Respectively normalizing values of RGB three channels of each pixel point in the selected image;
Determining a second color distance in the selected image The minimum corresponding pixel point is used as a reference pixel point, and the average value of RGB three-channel values of the reference pixel point is calculated to obtain an ambient light value/>
Based on the ambient light valueCalculating initial environmental correction value/>And based on the correction threshold/>And the initial environmental correction value/>Calculating the final environmental correction value/>
In the method, in the process of the invention,Representing ambient medium transmittance,/>Representing an ambient noise region;
The step of performing color recovery processing on the corrected image to obtain a recovered image, converting the recovered image from an RGB space to an HSI space to obtain an HSI image, and performing sequential enhancement processing and space conversion processing on the HSI image to obtain an output image includes:
For the corrected image Performing multi-scale filtering to obtain a filtered image/>
In the method, in the process of the invention,For the number of scales,/>For/>Weight corresponding to scale,/>Represents the/>Gaussian filtering of the scale;
For the filtered image Color recovery processing is performed to obtain a recovered image/>
In the method, in the process of the invention,、/>Control constant and control factor, respectively,/>,/>Representing an image of the corrected image on each channel;
restoring the image Converting from RGB space to HSI space to obtain HSI image, splitting the HSI image into H channel image, S channel image and I channel image;
Respectively carrying out saturation adjustment and brightness adjustment on the S channel image and the I channel image to respectively obtain an S channel adjustment image and an I channel adjustment image, and determining an output image based on the S channel adjustment image and the I channel adjustment image;
The step of respectively performing saturation adjustment and brightness adjustment on the S-channel image and the I-channel image to respectively obtain an S-channel adjustment image and an I-channel adjustment image, and determining an output image based on the S-channel adjustment image and the I-channel adjustment image includes:
and carrying out saturation adjustment on the S channel image to obtain an S channel adjustment image:
In the method, in the process of the invention, 、/>Respectively the maximum value and the minimum value of saturation components,/>、/>The saturation components of the images are respectively adjusted for the S channel image and the S channel image;
and brightness adjustment is carried out on the I channel image so as to obtain an I channel adjustment image:
In the method, in the process of the invention, 、/>Brightness values of the I channel image and the I channel adjustment image are respectively/>As correction factor,/>The brightness average value of the I channel image in the I channel is obtained;
And fusing the I channel adjustment image, the S channel adjustment image and the H channel image to obtain an adjustment HSI image, and converting the adjustment HSI image back to an RGB space to obtain an output image.
2. The image processing method according to claim 1, wherein the step of performing gaussian color correction and channel correction on the adjustment image to obtain a first correction image and a second correction image, respectively, and performing fusion processing on the first correction image and the second correction image to obtain a correction image includes:
determining histograms of RGB three channels of the adjusted image and determining average values of the three channels based on the histograms, respectively And standard deviation/>Calculating the adjustment coefficient/>, of the adjustment image
In the method, in the process of the invention,,/>Respectively represent RGB three channels,/>Representing the maximum pixel value of each channel of the adjusted image,/>Representing the minimum pixel value for each channel of the adjusted image,Representation/>And/>The maximum value of the difference between them;
Based on the adjustment coefficient Performing Gaussian color correction on the adjustment image to obtain a first corrected image:
In the method, in the process of the invention, For each channel of the first corrected image, pixel value,/>Is the position of histogram distribution,/>To adjust the pixel values of each channel of the image,/>、/>Respectively represent the average pixel value when the average pixel value is smaller than 128 and the average pixel value is larger than 128、/>Respectively, adjusting the maximum value and the minimum value of the normalized images,/>Represents the average standard deviation of three channels;
establishing a correction equation set of R, B channels of the adjustment image under the condition that the G channels of the adjustment image are unchanged:
In the method, in the process of the invention, 、/>Is a first correction coefficient and a second correction coefficient,/>,/>Representing adjustment of pixel position in an image to/>Pixel value of R, B channels of pixel points of/>、/>Indicating that the boundary position of the image is adjusted,Representing adjustment of pixel position in an image to/>A pixel value of a G channel of the pixel point of (2);
Solving a first correction coefficient and a second correction coefficient based on the correction equation set, and performing channel correction on the adjustment image based on the first correction coefficient and the second correction coefficient to obtain a second correction image:
In the method, in the process of the invention, Pixel values for R, B channels of the second correction image;
the first corrected image And the second correction image/>Fusion processing is performed to obtain a corrected image/>
In the method, in the process of the invention,Is a fusion weight.
3. An image processing system, the system comprising:
the preprocessing module is used for acquiring an initial input image, and preprocessing the initial input image to obtain a processed image;
The adjusting module is used for identifying an environment noise area of the processed image and carrying out environment noise adjusting processing on the environment noise area so as to obtain an adjusted image;
The correction module is used for carrying out Gaussian color correction and channel correction on the adjustment image respectively to obtain a first correction image and a second correction image, and carrying out fusion processing on the first correction image and the second correction image to obtain a correction image;
the recovery module is used for carrying out color recovery processing on the corrected image to obtain a recovery image, converting the recovery image from an RGB space to an HSI space to obtain an HSI image, and carrying out sequential enhancement processing and space conversion processing on the HSI image to obtain an output image;
The adjustment module includes:
a region determination submodule for determining a first color distance between each pixel point and a white pixel point in the processed image Based on the first color distance/>Determining a noise region image corresponding to the environmental noise region and a correction threshold/>
A correction sub-module for determining a selected image in the noise region image based on the selected image and the correction thresholdDetermining ambient light value/>Final environmental correction value/>
An adjustment sub-module for adjusting the ambient light valueThe final environmental correction value/>Adjusting the noise region image to obtain a region adjustment image/>Adjusting the region to image/>Replacing the noise area image to obtain an adjusted image:
In the method, in the process of the invention, Is a noise area image;
The region determination submodule includes:
A first distance unit for calculating a first color distance between each pixel point and a white pixel point in the processed image
In the method, in the process of the invention,、/>、/>The normalized values of RGB three channels of each pixel point in the processed image are respectively;
a fitting unit for based on the first color distance Determining a color distance histogram, performing multiple trigonometric function fitting processing on the color distance histogram to obtain a fitting curve graph, and taking a first trough point in the fitting curve graph as a region screening threshold/>Screening threshold/>, based on the regionPerforming binarization processing on the processed image to obtain a noise area image corresponding to the environmental noise area;
Threshold value determining units for determining respectively Performing difference processing on the corresponding binarized images to obtain a joint region image, determining joint pixel points with pixel values of 1 in the joint region image, determining positions of the joint pixel points in the processed image, calculating pixel value average values of the joint pixel points, and taking the pixel value average values of the joint pixel points as correction threshold/>Wherein/>Is a distance threshold;
The correction submodule includes:
a dividing unit for dividing the noise region image into multiple sub-images, and calculating image gray level aggregation degree of the multiple sub-images
In the method, in the process of the invention,Is the first/>, of the sub-imageGray level,/>For the probability of occurrence of the corresponding gray level,/>Is the number of gray levels;
An iteration unit for gathering the image gray scale The minimum sub-image is used as an iteration sub-image, and the iteration sub-image is repeatedly subjected to image sharing, image informativity calculation and screening until the area of the iteration sub-image is smaller than an image threshold value and is used as a selected image;
a second distance unit for calculating a second color distance between each pixel point and the white pixel in the selected image
In the method, in the process of the invention,、/>、/>Respectively normalizing values of RGB three channels of each pixel point in the selected image;
a reference unit for determining a second color distance in the selected image The minimum corresponding pixel point is used as a reference pixel point, and the average value of RGB three-channel values of the reference pixel point is calculated to obtain an ambient light value/>
A correction unit for correcting the ambient light valueCalculating initial environmental correction value/>And based on the correction threshold/>And the initial environmental correction value/>Calculating the final environmental correction value/>
In the method, in the process of the invention,Representing ambient medium transmittance,/>Representing an ambient noise region;
the recovery module includes:
A filtering sub-module for correcting the image Performing multi-scale filtering to obtain a filtered image/>
In the method, in the process of the invention,For the number of scales,/>For/>Weight corresponding to scale,/>Represents the/>Gaussian filtering of the scale;
a restoration submodule for filtering the image Color recovery processing is performed to obtain a recovered image/>
In the method, in the process of the invention,、/>Control constant and control factor, respectively,/>,/>Representing an image of the corrected image on each channel;
A conversion sub-module for converting the restored image Converting from RGB space to HSI space to obtain HSI image, splitting the HSI image into H channel image, S channel image and I channel image;
The channel adjustment sub-module is used for respectively carrying out saturation adjustment and brightness adjustment on the S channel image and the I channel image to respectively obtain an S channel adjustment image and an I channel adjustment image, and determining an output image based on the S channel adjustment image and the I channel adjustment image;
The channel adjustment submodule includes:
the first channel adjustment unit is used for performing saturation adjustment on the S channel image to obtain an S channel adjustment image:
In the method, in the process of the invention, 、/>Respectively the maximum value and the minimum value of saturation components,/>、/>The saturation components of the images are respectively adjusted for the S channel image and the S channel image;
the second channel adjusting unit is used for adjusting the brightness of the I channel image to obtain an I channel adjusted image:
In the method, in the process of the invention, 、/>Brightness values of the I channel image and the I channel adjustment image are respectively/>As correction factor,/>The brightness average value of the I channel image in the I channel is obtained;
And the channel fusion unit is used for fusing the I channel adjustment image, the S channel adjustment image and the H channel image to obtain an adjustment HSI image, and converting the adjustment HSI image back to an RGB space to obtain an output image.
4. A computer comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the image processing method according to any of claims 1 to 2 when executing the computer program.
5. A storage medium having stored thereon a computer program which, when executed by a processor, implements the image processing method according to any of claims 1 to 2.
CN202410381897.0A 2024-04-01 2024-04-01 Image processing method and system Active CN117994160B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410381897.0A CN117994160B (en) 2024-04-01 2024-04-01 Image processing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410381897.0A CN117994160B (en) 2024-04-01 2024-04-01 Image processing method and system

Publications (2)

Publication Number Publication Date
CN117994160A CN117994160A (en) 2024-05-07
CN117994160B true CN117994160B (en) 2024-06-04

Family

ID=90894407

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410381897.0A Active CN117994160B (en) 2024-04-01 2024-04-01 Image processing method and system

Country Status (1)

Country Link
CN (1) CN117994160B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011067755A1 (en) * 2009-12-02 2011-06-09 Yissum Research Development Company Of The Hebrew University Of Jerusalem, Ltd. Method and system for automatically recovering chromaticity and image variation of colour clipped image regions
CN115937019A (en) * 2022-11-04 2023-04-07 沈阳工业大学 Non-uniform defogging method combining LSD (local Scale decomposition) quadratic segmentation and deep learning
CN116681606A (en) * 2023-05-23 2023-09-01 中山大学 Underwater uneven illumination image enhancement method, system, equipment and medium
CN117173070A (en) * 2023-11-02 2023-12-05 南昌理工学院 Image processing fusion method and system based on FPGA
CN117252773A (en) * 2023-09-19 2023-12-19 齐鲁理工学院 Image enhancement method and system based on self-adaptive color correction and guided filtering
CN117475121A (en) * 2023-12-04 2024-01-30 河南科技大学 Image processing system and image processing method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8989436B2 (en) * 2010-03-30 2015-03-24 Nikon Corporation Image processing method, computer-readable storage medium, image processing apparatus, and imaging apparatus

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011067755A1 (en) * 2009-12-02 2011-06-09 Yissum Research Development Company Of The Hebrew University Of Jerusalem, Ltd. Method and system for automatically recovering chromaticity and image variation of colour clipped image regions
CN115937019A (en) * 2022-11-04 2023-04-07 沈阳工业大学 Non-uniform defogging method combining LSD (local Scale decomposition) quadratic segmentation and deep learning
CN116681606A (en) * 2023-05-23 2023-09-01 中山大学 Underwater uneven illumination image enhancement method, system, equipment and medium
CN117252773A (en) * 2023-09-19 2023-12-19 齐鲁理工学院 Image enhancement method and system based on self-adaptive color correction and guided filtering
CN117173070A (en) * 2023-11-02 2023-12-05 南昌理工学院 Image processing fusion method and system based on FPGA
CN117475121A (en) * 2023-12-04 2024-01-30 河南科技大学 Image processing system and image processing method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
结合曲率滤波的HTM算法去除遥感影像云雾;杨珂珂;贾渊;沈川;;中国图象图形学报;20200415(04);全文 *

Also Published As

Publication number Publication date
CN117994160A (en) 2024-05-07

Similar Documents

Publication Publication Date Title
Bai et al. Underwater image enhancement based on global and local equalization of histogram and dual-image multi-scale fusion
CN109978890B (en) Target extraction method and device based on image processing and terminal equipment
CN107507173B (en) No-reference definition evaluation method and system for full-slice image
US20060291741A1 (en) Image processing apparatus, image processing method, program, and recording medium therefor
CN110390643B (en) License plate enhancement method and device and electronic equipment
CN110570360A (en) Retinex-based robust and comprehensive low-quality illumination image enhancement method
CN109447912B (en) Fluorescent image self-adaptive enhancement and noise reduction method of fluorescent navigation endoscope system
US11526963B2 (en) Image processing apparatus, image processing method, and storage medium
CN112053302B (en) Denoising method and device for hyperspectral image and storage medium
CN111696064B (en) Image processing method, device, electronic equipment and computer readable medium
CN116681606A (en) Underwater uneven illumination image enhancement method, system, equipment and medium
CN109712134B (en) Iris image quality evaluation method and device and electronic equipment
US9053552B2 (en) Image processing apparatus, image processing method and non-transitory computer readable medium
US9092862B2 (en) Image processing apparatus, image adjusting apparatus, image processing method and computer readable medium
CN117994160B (en) Image processing method and system
CN115345961B (en) Dense fog color reconstruction method and device based on HSV color space mutual operation
CN108876845B (en) Fresnel pattern center determining method and device
CN111311610A (en) Image segmentation method and terminal equipment
JP5822739B2 (en) Image processing apparatus, method, and program
Zhou et al. Multiscale Fusion Method for the Enhancement of Low‐Light Underwater Images
CN115564682A (en) Uneven-illumination image enhancement method and system
CN111179197B (en) Contrast enhancement method and device
CN113538295A (en) Endoscope weak texture image enhancement method and device
Anandh et al. Visual Enhancement of Underwater Images Using Transmission Estimation and Multi-Scale Fusion.
CN113379631B (en) Image defogging method and device

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