Image enhancement method based on computer vision
The image enhancement method addresses inefficiencies in existing methods by using deep learning for preprocessing, enhancement, and generation, effectively improving image quality and efficiency in computer vision systems.
Patent Information
- Application Number
- CN202411296636.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2024-12-31
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing image enhancement methods in computer vision lack efficiency and effectiveness in processing high-quality images due to the lack of deep learning technology, leading to rough and slow enhancements and inability to quickly obtain detailed images.
An image enhancement method utilizing deep learning models for preprocessing, enhancement, restoration, and generation, including scaling, cropping, flipping, data augmentation, adaptive contrast and brightness adjustments, and generative adversarial networks to improve image quality.
The method enhances image quality by adjusting brightness, contrast, and color, removes noise and blur, and autonomously learns to generate high-quality images efficiently through deep learning models and generative adversarial networks.
Smart Images

Figure CN119228663A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image processing, and in particular relates to an image enhancement method based on computer vision. Background Art
[0002] Image enhancement technology is an important research direction in the field of computer vision. Its main goal is to process the input image and improve the image quality by utilizing the recognition and detection performance of the computer vision system.
[0003] In a Chinese patent with publication number CN118247191A, a computer vision-based image enhancement method is mentioned, including: obtaining an outdoor monitoring grayscale image and a local area of a dynamic object in the image, then obtaining the enhancement expectation of each local area of the dynamic object and the overall enhancement requirement of the outdoor monitoring grayscale image, obtaining an adaptive enhancement coefficient of each local area of the dynamic object in the outdoor monitoring grayscale image according to the enhancement expectation of the local area of the dynamic object and the overall enhancement requirement of the outdoor monitoring grayscale image, and obtaining an outdoor monitoring enhanced image according to the adaptive enhancement coefficient of the local area of the dynamic object and the grayscale value of the pixel in the area. The present invention calculates the mapping value of the grayscale value of all pixels in each local area of the dynamic object through a linear transformation function combined with the adaptive enhancement coefficient of each local area of the dynamic object, thereby improving the quality of outdoor monitoring image enhancement.
[0004] During the application process, the applicant discovered that the above application had defects during use. The image enhancement method disclosed in the application mainly targets the loss of image detail information caused by images being too bright or too dark. Although technologies such as pixel grayscale value processing and local area image enhancement processing of objects are disclosed, cutting-edge deep learning technology is not used, resulting in rough and slow image enhancement processing, and the inability to quickly obtain high-quality enhanced images. Summary of the invention
[0005] The purpose of the present invention is to provide an image enhancement method based on computer vision to solve the problems raised in the above background technology.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] A computer vision-based image enhancement method comprises the following steps:
[0008] S1, obtain and input the image before processing;
[0009] S2, preprocessing the input image before processing to improve the model training efficiency and performance;
[0010] S3, performing enhancement processing on the pre-processed image to improve the image quality;
[0011] S4, processes the factors that affect image quality through a deep learning model and learns to restore the original image;
[0012] S5, using the generative adversarial network to generate new enhanced images.
[0013] Preferably, in S2, the image preprocessing operation includes:
[0014] Scaling: Reduce the image to a smaller value by changing its width and height to reduce the amount of calculation;
[0015] Cropping: Crop a smaller area from the image by changing the width and height of the image as the input image;
[0016] Flip: Flip the input image horizontally and vertically to increase the generalization ability of the model;
[0017] Data augmentation: Generate new image samples through random rotation, translation, and distortion operations to increase the amount of training data for the model.
[0018] Preferably, in S3, the image enhancement approach includes:
[0019] Adaptive historical contrast adjustment, according to the grayscale distribution of the image, adaptively adjusts the image contrast. The adaptive historical contrast adjustment formula is expressed as:
[0020] I enhanced (x,y)=I(x,y)+α(x,y)(max(I(x,y))-min(I(x,y)))
[0021] Among them, I enhanced (x, y) represents the enhanced image, I(x, y) represents the original image, and α(x, y) represents the contrast adjustment coefficient.
[0022] Preferably, in S3, the image enhancement approach includes:
[0023] Adaptive average enhancement adaptively adjusts the brightness of the image according to the grayscale distribution of the image. The adaptive average enhancement formula is expressed as:
[0024] I enhanced (x,y)=β(x,y)I(x,y)
[0025] Among them, I enhanced (x, y) represents the enhanced image, I(x, y) represents the original image, and β(x, y) represents the brightness adjustment coefficient.
[0026] Preferably, in S3, the image enhancement approach includes:
[0027] Adaptive contrast enhancement adaptively adjusts the contrast and brightness of the image according to the grayscale distribution of the image. The formula for adaptive contrast enhancement is expressed as:
[0028] I enhanced (x,y)=β(x,y)I(x,y)+α(x,y)(max(I(x,y))-min(I(x,y)))
[0029] Among them, I enhanced (x, y) represents the enhanced image, I(x, y) represents the original image, α(x, y) represents the contrast adjustment coefficient, and β(x, y) represents the brightness adjustment coefficient.
[0030] Preferably, the image enhancement approach in S3 further includes automatic color balancing for adjusting the spatial position relationship between color and brightness in the image, and realizing image brightness and color adjustment and contrast adjustment with local and nonlinear characteristics by performing adaptive filtering of local characteristics. The adjustment steps specifically include:
[0031] S31, perform color / spatial domain adjustment on the image, complete the color correction of the image, and obtain a spatial domain reconstructed image, which is expressed as:
[0032]
[0033] In the formula, Rc is the intermediate result, I c (p) is the brightness difference between two different points, d(p,j) represents the distance measurement function, r(*) is the brightness performance function, which is an odd function. This step can use the local image contrast. r(*) can amplify and enrich the difference, expand or compress the dynamic range according to the local content, and r(*) is expressed as:
[0034]
[0035] S32, dynamically expand the corrected image, process each color channel of the color input image separately, and the linear expansion formula is expressed as:
[0036] R(x)=round[127.5+w*R c (p)]
[0037] Where w represents the line segment [(0, m c ),(255,M c )], and we have: M c =min[R c (p)],M c =max[R c (p)];
[0038] S33, expand R(x) to [0,1] to obtain the enhanced channel, the formula is expressed as:
[0039]
[0040] Preferably, during calculation, the difference calculation with the pixel point information of the entire image is replaced by specifying the sampling number, so as to reduce the amount of calculation and improve efficiency.
[0041] Preferably, in S4, the image with blur and noise is restored by learning through a deep learning model, and the specific operation steps include:
[0042] S41, inputting the image with blur and noise factors as input data into the deep learning model;
[0043] S42, restore the original image through deep learning model learning, the restoration process formula is expressed as:
[0044] I recovered =f(I degraded )
[0045] Among them, I recovered represents the restored image, I degraded represents factors that affect image quality, such as blur and noise, and f(*) represents the deep learning model.
[0046] Preferably, in S5, the image generation is to generate a new image using a generative adversarial network, and the specific operation steps include:
[0047] S51, the original image is used as the input data of the generative adversarial network to generate a new image. The generation process formula is expressed as:
[0048] G(z)=I rend
[0049] Among them, G(z) represents the generated image, z represents random noise, and I rend represents the original image;
[0050] S52, comparing the generated image with the original image to determine whether the generated image is similar to the original image. The determination process is expressed as:
[0051] D(I real ,G(z))=1
[0052] Among them, D(I real ,G(z)) represents the result of judging whether the generated image is similar to the original image;
[0053] S53, by training the generative adversarial network, the generated image is made more similar to the original image. The training process formula is expressed as:
[0054]
[0055] Where V(D,G) represents the loss function of the generated adversarial network, P data (x) represents the probability distribution of the original image, P z (z) represents the probability distribution of random noise, and E represents the expected value.
[0056] Preferably, the average structural similarity and peak information volume are introduced as evaluation indicators to evaluate the enhanced image quality. The mathematical model formula is expressed as:
[0057] y=f(x;θ)
[0058] Among them, x represents the original image, y represents the enhanced image, f represents the convolutional neural network function, and θ represents the parameters of the convolutional neural network function.
[0059] Compared with the prior art, the present invention has the following beneficial effects:
[0060] The present invention relies on a deep learning network to sequentially process the image to be processed through steps such as image preprocessing, image enhancement, image restoration and image generation. On the premise of improving the training efficiency and performance of the original deep learning convolutional neural network, a series of adjustments are made to the brightness, contrast, saturation and color of the input image. While improving the image quality, factors affecting the image quality, such as blur and noise on the image surface, are also removed. The image is further restored through the deep learning model, and finally a new image close to reality is generated. Moreover, the deep learning convolutional neural network model can autonomously learn and iterate, and continuously reduce the image processing time through training, thereby improving the quality of processed images. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 This is a block diagram of the image enhancement method based on computer vision of the present invention. DETAILED DESCRIPTION
[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0063] Embodiment 1:
[0064] See also Figure 1 As shown, a computer vision-based image enhancement method specifically includes the following steps:
[0065] S1, obtain and input the image before processing;
[0066] S2, preprocessing the input image before processing to improve the model training efficiency and performance;
[0067] S3, performing enhancement processing on the pre-processed image to improve the image quality;
[0068] S4, processes the factors that affect image quality through a deep learning model and learns to restore the original image;
[0069] S5, using the generative adversarial network to generate new enhanced images.
[0070] In S2, the image preprocessing operation includes:
[0071] Scaling: Reduce the image to a smaller value by changing its width and height to reduce the amount of calculation;
[0072] Cropping: Crop a smaller area from the image by changing the width and height of the image as the input image;
[0073] Flip: Flip the input image horizontally and vertically to increase the generalization ability of the model;
[0074] Data augmentation: Generate new image samples through random rotation, translation, and distortion operations to increase the amount of training data for the model.
[0075] In S3, the image enhancement approach includes:
[0076] Adaptive historical contrast adjustment, according to the grayscale distribution of the image, adaptively adjusts the image contrast. The adaptive historical contrast adjustment formula is expressed as:
[0077] I enhanced (x,y)=I(x,y)+α(x,y)(max(I(x,y))-min(I(x,y)))
[0078] Among them, I enhanced (x, y) represents the enhanced image, I(x, y) represents the original image, and α(x, y) represents the contrast adjustment coefficient.
[0079] The image enhancement approach in S3 also includes automatic color balancing to adjust the spatial position relationship of color and brightness in the image, and realizes image brightness and color adjustment and contrast adjustment with local and nonlinear characteristics by performing adaptive filtering of local characteristics. The adjustment steps specifically include:
[0080] S31, perform color / spatial domain adjustment on the image, complete the color correction of the image, and obtain a spatial domain reconstructed image, which is expressed as:
[0081]
[0082] In the formula, Rc is the intermediate result, I c (p) is the brightness difference between two different points, d(p,j) represents the distance measurement function, r(*) is the brightness performance function, which is an odd function. This step can use the local image contrast. r(*) can amplify and enrich the difference, expand or compress the dynamic range according to the local content, and r(*) is expressed as:
[0083]
[0084] S32, dynamically expand the corrected image, process each color channel of the color input image separately, and the linear expansion formula is expressed as:
[0085] R(x)=round[127.5+w*R c (p)]
[0086] Where w represents the line segment [(0, m c ),(255,M c )], and we have: M c =min[R c (p)],M c =max[R c (p)];
[0087] S33, expand R(x) to [0,1] to obtain the enhanced channel, the formula is expressed as:
[0088]
[0089] During calculation, the specified sampling number is used to replace the pixel point information of the entire image for differential calculation, which reduces the amount of calculation and improves efficiency.
[0090] In S4, the image with blur and noise is restored by learning through the deep learning model, and the specific operation steps include:
[0091] S41, inputting the image with blur and noise factors as input data into the deep learning model;
[0092] S42, restore the original image through deep learning model learning, the restoration process formula is expressed as:
[0093] I recovered =f(I degraded )
[0094] Among them, I recovered represents the restored image, I degradedrepresents factors that affect image quality, such as blur and noise, and f(*) represents the deep learning model.
[0095] In S5, the image generation is to generate a new image using a generative adversarial network, and the specific operation steps include:
[0096] S51, the original image is used as the input data of the generative adversarial network to generate a new image. The generation process formula is expressed as:
[0097] G(z)=I rend
[0098] Among them, G(z) represents the generated image, z represents random noise, and I rend represents the original image;
[0099] S52, comparing the generated image with the original image to determine whether the generated image is similar to the original image. The determination process is expressed as:
[0100] D(I real ,G(z))=1
[0101] Among them, D(I real ,G(z)) represents the result of judging whether the generated image is similar to the original image;
[0102] S53, by training the generative adversarial network, the generated image is made more similar to the original image. The training process formula is expressed as:
[0103]
[0104] Where V(D,G) represents the loss function of the generated adversarial network, P data (x) represents the probability distribution of the original image, P z (z) represents the probability distribution of random noise, and E represents the expected value.
[0105] The average structural similarity and peak information volume are introduced as evaluation indicators to evaluate the quality of the enhanced image. The mathematical model formula is expressed as:
[0106] y=f(x;θ)
[0107] Among them, x represents the original image, y represents the enhanced image, f represents the convolutional neural network function, and θ represents the parameters of the convolutional neural network function.
[0108] Embodiment 2:
[0109] See also Figure 1 As shown, a computer vision-based image enhancement method specifically includes the following steps:
[0110] S1, obtain and input the image before processing;
[0111] S2, preprocessing the input image before processing to improve the model training efficiency and performance;
[0112] S3, performing enhancement processing on the pre-processed image to improve the image quality;
[0113] S4, processes the factors that affect image quality through a deep learning model and learns to restore the original image;
[0114] S5, using the generative adversarial network to generate new enhanced images.
[0115] In S2, the image preprocessing operation includes:
[0116] Scaling: Reduce the image to a smaller value by changing its width and height to reduce the amount of calculation;
[0117] Cropping: Crop a smaller area from the image by changing the width and height of the image as the input image;
[0118] Flip: Flip the input image horizontally and vertically to increase the generalization ability of the model;
[0119] Data augmentation: Generate new image samples through random rotation, translation, and distortion operations to increase the amount of training data for the model.
[0120] In S3, the image enhancement approach includes:
[0121] Adaptive historical contrast adjustment, according to the grayscale distribution of the image, adaptively adjusts the image contrast. The adaptive historical contrast adjustment formula is expressed as:
[0122] I enhanced (x,y)=I(x,y)+α(x,y)(max(I(x,y))-min(I(x,y)))
[0123] Among them, I enhanced (x, y) represents the enhanced image, I(x, y) represents the original image, and α(x, y) represents the contrast adjustment coefficient.
[0124] In S3, the image enhancement approach includes:
[0125] Adaptive average enhancement adaptively adjusts the brightness of the image according to the grayscale distribution of the image. The adaptive average enhancement formula is expressed as:
[0126] I enhanced (x,y)=β(x,y)I(x,y)
[0127] Among them, Ienhanced (x, y) represents the enhanced image, I(x, y) represents the original image, and β(x, y) represents the brightness adjustment coefficient.
[0128] The image enhancement approach in S3 also includes automatic color balancing to adjust the spatial position relationship of color and brightness in the image, and realizes image brightness and color adjustment and contrast adjustment with local and nonlinear characteristics by performing adaptive filtering of local characteristics. The adjustment steps specifically include:
[0129] S31, perform color / spatial domain adjustment on the image, complete the color correction of the image, and obtain a spatial domain reconstructed image, which is expressed as:
[0130]
[0131] In the formula, Rc is the intermediate result, I c (p) is the brightness difference between two different points, d(p,j) represents the distance measurement function, r(*) is the brightness performance function, which is an odd function. This step can use the local image contrast. r(*) can amplify and enrich the difference, expand or compress the dynamic range according to the local content, and r(*) is expressed as:
[0132]
[0133] S32, dynamically expand the corrected image, process each color channel of the color input image separately, and the linear expansion formula is expressed as:
[0134] R(x)=round[127.5+w*R c (p)]
[0135] Where w represents the line segment [(0, m c ),(255,M c )], and we have: M c =min[R c (p)],M c =max[R c (p)];
[0136] S33, expand R(x) to [0,1] to obtain the enhanced channel, the formula is expressed as:
[0137]
[0138] During calculation, the specified sampling number is used to replace the pixel point information of the entire image for differential calculation, which reduces the amount of calculation and improves efficiency.
[0139] In S4, the image with blur and noise is restored by learning through the deep learning model, and the specific operation steps include:
[0140] S41, inputting the image with blur and noise factors as input data into the deep learning model;
[0141] S42, restore the original image through deep learning model learning, the restoration process formula is expressed as:
[0142] I recovered =f(I degraded )
[0143] Among them, I recovered represents the restored image, I degraded represents factors that affect image quality, such as blur and noise, and f(*) represents the deep learning model.
[0144] In S5, the image generation is to generate a new image using a generative adversarial network, and the specific operation steps include:
[0145] S51, the original image is used as the input data of the generative adversarial network to generate a new image. The generation process formula is expressed as:
[0146] G(z)=I rend
[0147] Among them, G(z) represents the generated image, z represents random noise, and I rend represents the original image;
[0148] S52, comparing the generated image with the original image to determine whether the generated image is similar to the original image. The determination process is expressed as:
[0149] D(I real ,G(z))=1
[0150] Among them, D(I real ,G(z)) represents the result of judging whether the generated image is similar to the original image;
[0151] S53, by training the generative adversarial network, the generated image is made more similar to the original image. The training process formula is expressed as:
[0152]
[0153] Where V(D,G) represents the loss function of the generated adversarial network, P data (x) represents the probability distribution of the original image, P z (z) represents the probability distribution of random noise, and E represents the expected value.
[0154] The average structural similarity and peak information volume are introduced as evaluation indicators to evaluate the quality of the enhanced image. The mathematical model formula is expressed as:
[0155] y=f(x;θ)
[0156] Among them, x represents the original image, y represents the enhanced image, f represents the convolutional neural network function, and θ represents the parameters of the convolutional neural network function.
[0157] Embodiment three:
[0158] See also Figure 1 As shown, a computer vision-based image enhancement method specifically includes the following steps:
[0159] S1, obtain and input the image before processing;
[0160] S2, preprocessing the input image before processing to improve the model training efficiency and performance;
[0161] S3, performing enhancement processing on the pre-processed image to improve the image quality;
[0162] S4, processes the factors that affect image quality through a deep learning model and learns to restore the original image;
[0163] S5, using the generative adversarial network to generate new enhanced images.
[0164] In S2, the image preprocessing operation includes:
[0165] Scaling: Reduce the image to a smaller value by changing its width and height to reduce the amount of calculation;
[0166] Cropping: Crop a smaller area from the image by changing the width and height of the image as the input image;
[0167] Flip: Flip the input image horizontally and vertically to increase the generalization ability of the model;
[0168] Data augmentation: Generate new image samples through random rotation, translation, and distortion operations to increase the amount of training data for the model.
[0169] In S3, the image enhancement approach includes:
[0170] Adaptive historical contrast adjustment, according to the grayscale distribution of the image, adaptively adjusts the image contrast. The adaptive historical contrast adjustment formula is expressed as:
[0171] I enhanced (x,y)=I(x,y)+α(x,y)(max(I(x,y))-min(I(x,y)))
[0172] Among them, I enhanced(x, y) represents the enhanced image, I(x, y) represents the original image, and α(x, y) represents the contrast adjustment coefficient.
[0173] In S3, the image enhancement approach includes:
[0174] Adaptive average enhancement adaptively adjusts the brightness of the image according to the grayscale distribution of the image. The adaptive average enhancement formula is expressed as:
[0175] I enhanced (x,y)=β(x,y)I(x,y)
[0176] Among them, I enhanced (x, y) represents the enhanced image, I(x, y) represents the original image, and β(x, y) represents the brightness adjustment coefficient.
[0177] In S3, the image enhancement approach includes:
[0178] Adaptive contrast enhancement adaptively adjusts the contrast and brightness of the image according to the grayscale distribution of the image. The formula for adaptive contrast enhancement is expressed as:
[0179] I enhanced (x,y)=β(x,y)I(x,y)+α(x,y)(max(I(x,y))-min(I(x,y)))
[0180] Among them, I enhanced (x, y) represents the enhanced image, I(x, y) represents the original image, α(x, y) represents the contrast adjustment coefficient, and β(x, y) represents the brightness adjustment coefficient.
[0181] The image enhancement approach in S3 also includes automatic color balancing to adjust the spatial position relationship of color and brightness in the image, and realizes image brightness and color adjustment and contrast adjustment with local and nonlinear characteristics by performing adaptive filtering of local characteristics. The adjustment steps specifically include:
[0182] S31, perform color / spatial domain adjustment on the image, complete the color correction of the image, and obtain a spatial domain reconstructed image, which is expressed as:
[0183]
[0184] In the formula, Rc is the intermediate result, I c (p) is the brightness difference between two different points, d(p,j) represents the distance measurement function, r(*) is the brightness performance function, which is an odd function. This step can use the local image contrast. r(*) can amplify and enrich the difference, expand or compress the dynamic range according to the local content, and r(*) is expressed as:
[0185]
[0186] S32, dynamically expand the corrected image, process each color channel of the color input image separately, and the linear expansion formula is expressed as:
[0187] R(x)=round[127.5+w*R c (p)]
[0188] Where w represents the line segment [(0, m c ),(255,M c )], and we have: M c =min[R c (p)],M c =max[R c (p)];
[0189] S33, expand R(x) to [0,1] to obtain the enhanced channel, the formula is expressed as:
[0190]
[0191] During calculation, the specified sampling number is used to replace the pixel point information of the entire image for differential calculation, which reduces the amount of calculation and improves efficiency.
[0192] In S4, the image with blur and noise is restored by learning through the deep learning model, and the specific operation steps include:
[0193] S41, inputting the image with blur and noise factors as input data into the deep learning model;
[0194] S42, restore the original image through deep learning model learning, the restoration process formula is expressed as:
[0195] I recovered =f(I degraded )
[0196] Among them, I recovered represents the restored image, I degraded represents factors that affect image quality, such as blur and noise, and f(*) represents the deep learning model.
[0197] In S5, the image generation is to generate a new image using a generative adversarial network, and the specific operation steps include:
[0198] S51, the original image is used as the input data of the generative adversarial network to generate a new image. The generation process formula is expressed as:
[0199] G(z)=I rend
[0200] Among them, G(z) represents the generated image, z represents random noise, and I rend represents the original image;
[0201] S52, comparing the generated image with the original image to determine whether the generated image is similar to the original image. The determination process is expressed as:
[0202] D(I real ,G(z))=1
[0203] Among them, D(I real ,G(z)) represents the result of judging whether the generated image is similar to the original image;
[0204] S53, by training the generative adversarial network, the generated image is made more similar to the original image. The training process formula is expressed as:
[0205]
[0206] Where V(D,G) represents the loss function of the generated adversarial network, P data (x) represents the probability distribution of the original image, P z (z) represents the probability distribution of random noise, and E represents the expected value.
[0207] The average structural similarity and peak information volume are introduced as evaluation indicators to evaluate the quality of the enhanced image. The mathematical model formula is expressed as:
[0208] y=f(x;θ)
[0209] Among them, x represents the original image, y represents the enhanced image, f represents the convolutional neural network function, and θ represents the parameters of the convolutional neural network function.
[0210] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
Claims
1. A computer vision-based image enhancement method, characterized in that: The specific steps include: S1, obtain and input the image before processing; S2, preprocessing the input image before processing to improve the model training efficiency and performance; S3, performing enhancement processing on the pre-processed image to improve the image quality; S4, processes the factors that affect image quality through a deep learning model and learns to restore the original image; S5, using the generative adversarial network to generate new enhanced images.
2. The computer vision-based image enhancement method according to claim 1, characterized in that: In S2, the image preprocessing operation includes: Scaling: Reduce the image to a smaller value by changing its width and height to reduce the amount of calculation; Cropping: Crop a smaller area from the image by changing the width and height of the image as the input image; Flip: Flip the input image horizontally and vertically to increase the generalization ability of the model; Data augmentation: Generate new image samples through random rotation, translation, and distortion operations to increase the amount of training data for the model.
3. The computer vision-based image enhancement method according to claim 1, characterized in that: In S3, the image enhancement approach includes: Adaptive historical contrast adjustment, according to the grayscale distribution of the image, adaptively adjusts the image contrast. The adaptive historical contrast adjustment formula is expressed as: Yo enhanced (x,y)=I(x,y)+α(x,y)(max(I(x,y))-min(I(x,y))) Among them, I enhanced (x, y) represents the enhanced image, I(x, y) represents the original image, and α(x, y) represents the contrast adjustment coefficient.
4. The computer vision-based image enhancement method according to claim 3, characterized in that: In S3, the image enhancement approach includes: Adaptive average enhancement adaptively adjusts the brightness of the image according to the grayscale distribution of the image. The adaptive average enhancement formula is expressed as: I enhanced (x,y)=β(x,y)I(x,y) Among them, I enhanced (x, y) represents the enhanced image, I(x, y) represents the original image, and β(x, y) represents the brightness adjustment coefficient.
5. The computer vision-based image enhancement method according to claim 1, characterized in that: In S3, the image enhancement approach includes: Adaptive contrast enhancement adaptively adjusts the contrast and brightness of the image according to the grayscale distribution of the image. The formula for adaptive contrast enhancement is expressed as: Yo enhanced (x,y)=β(x,y)I(x,y)+α(x,y)(max(I(x,y))-min(I(x,y))) Among them, I enhanced (x, y) represents the enhanced image, I(x, y) represents the original image, α(x, y) represents the contrast adjustment coefficient, and β(x, y) represents the brightness adjustment coefficient.
6. The computer vision-based image enhancement method according to claim 1, characterized in that: The image enhancement approach in S3 also includes automatic color balancing to adjust the spatial position relationship of color and brightness in the image, and realizes image brightness and color adjustment and contrast adjustment with local and nonlinear characteristics by performing adaptive filtering of local characteristics. The adjustment steps specifically include: S31, perform color / spatial domain adjustment on the image, complete the color correction of the image, and obtain a spatial domain reconstructed image, which is expressed as: In the formula, Rc is the intermediate result, I c (p) is the brightness difference between two different points, d(p,j) represents the distance measurement function, r(*) is the brightness performance function, which is an odd function. This step can use the local image contrast. r(*) can amplify and enrich the difference, expand or compress the dynamic range according to the local content, and r(*) is expressed as: S32, dynamically expand the corrected image, process each color channel of the color input image separately, and the linear expansion formula is expressed as: R(x)=round[127.5+w*R c (p)] Where w represents the line segment [(0, m c ),(255,M c )], and we have: M c =min[R c (p)],M c =max[R c (p)]; S33, expand R(x) to [0,1] to obtain the enhanced channel, the formula is expressed as:
7. The computer vision-based image enhancement method according to claim 6, characterized in that: During calculation, the specified sampling number is used to replace the pixel point information of the entire image for differential calculation, which reduces the amount of calculation and improves efficiency.
8. The computer vision-based image enhancement method according to claim 1, characterized in that: In S4, the image with blur and noise is restored by learning through the deep learning model, and the specific operation steps include: S41, inputting the image with blur and noise factors as input data into the deep learning model; S42, restore the original image through deep learning model learning, the restoration process formula is expressed as: I recovered =f(I degraded ) Among them, I recovered represents the restored image, I degraded represents factors that affect image quality, such as blur and noise, and f(*) represents the deep learning model.
9. The computer vision-based image enhancement method according to claim 1, characterized in that: In S5, the image generation is to generate a new image using a generative adversarial network, and the specific operation steps include: S51, the original image is used as the input data of the generative adversarial network to generate a new image. The generation process formula is expressed as: G(z)=I rend Among them, G(z) represents the generated image, z represents random noise, and I rend represents the original image; S52, comparing the generated image with the original image to determine whether the generated image is similar to the original image. The determination process is expressed as: D(I real ,G(z))=1 Among them, D(I real ,G(z)) represents the result of judging whether the generated image is similar to the original image; S53, by training the generative adversarial network, the generated image is made more similar to the original image. The training process formula is expressed as: Where V(D,G) represents the loss function of the generated adversarial network, P data (x) represents the probability distribution of the original image, P z (z) represents the probability distribution of random noise, and E represents the expected value.
10. The computer vision-based image enhancement method according to claim 1, characterized in that: The average structural similarity and peak information volume are introduced as evaluation indicators to evaluate the quality of the enhanced image. The mathematical model formula is expressed as: y=f(x;θ) Among them, x represents the original image, y represents the enhanced image, f represents the convolutional neural network function, and θ represents the parameters of the convolutional neural network function.
