Image processing methods

By performing stripe detection and feature processing on the image and calculating the target correction coefficient for each pixel, the problem of low image processing accuracy in the existing technology is solved and a more natural image transition effect is achieved.

CN118396995BActive Publication Date: 2024-10-18HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202410832286.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-10-18
Estimated Expiration
2044-06-26

AI Technical Summary

Technical Problem

When the existing technology handles image flicker caused by a mismatch between the working frequency of the light and the frame rate of the camera equipment, the image processing accuracy is low, the stripes in the same row cannot be completely eliminated, and the transition is unnatural.

Method used

By obtaining the image to be processed, stripe detection processing is performed to obtain light and dark intensity features, the target correction coefficient of each pixel is calculated, and the image is corrected based on these coefficients to ensure that the correction coefficient of each row is different to improve processing accuracy.

Benefits of technology

It effectively eliminates stripes in images, improves the accuracy of image processing and natural transition effects, and avoids the situation where stripes in the same row cannot be eliminated.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118396995B_ABST
    Figure CN118396995B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides an image processing method. The method includes: obtaining a first image to be processed, the first image includes at least one pixel; performing stripe detection processing on the first image to obtain a second image and a stripe enhancement feature, the second image is used to indicate the light and dark intensity of each pixel in the first image; processing the first image, the second image and the stripe enhancement feature to obtain a target correction coefficient corresponding to each pixel; performing correction processing on the first image according to the target correction coefficient corresponding to each pixel to obtain a target image. The accuracy of image processing is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of artificial intelligence technology, and in particular, to an image processing method. Background Art

[0002] During the shooting process of the camera device, if the operating frequency of the light does not match the frame rate set by the camera device, the captured image will have flicker, resulting in alternating light and dark stripes between each pixel row of the image captured by the camera.

[0003] In order to avoid flickering in images captured by a camera, the image can be processed after being captured to eliminate the light and dark stripes between each pixel row in the image. In the related art, image processing can be performed in the following manner: an image to be processed is acquired. A correction coefficient for each pixel row in the image is determined by a preset algorithm. The image is corrected using the correction coefficient for each pixel row to obtain a target image. In the above process, since the correction coefficient for each row is the same, if the light and dark intensities of the pixels in the same row are different, the stripes in the same row of the target image corrected by the same correction coefficient may not be completely eliminated, or the transition between the stripe row and the non-stripe row may be unnatural, resulting in low accuracy of image processing. Summary of the invention

[0004] The embodiment of the present application provides an image processing method to solve the problem of low accuracy in image processing.

[0005] In a first aspect, an embodiment of the present application provides an image processing method, comprising:

[0006] Acquire a first image to be processed, wherein the first image includes at least one pixel;

[0007] Performing stripe detection processing on the first image to obtain a second image and stripe enhancement features, wherein the second image is used to indicate the brightness and darkness intensity of each pixel in the first image;

[0008] Processing the first image, the second image and the fringe enhancement feature to obtain a target correction coefficient corresponding to each pixel;

[0009] The first image is corrected according to the target correction coefficient corresponding to each pixel to obtain a target image.

[0010] The image processing method provided by the embodiment of the present application obtains a first image to be processed, and the first image includes at least one pixel. The first image is subjected to stripe detection processing to obtain a second image and a stripe enhancement feature, and the second image is used to indicate the brightness and darkness intensity of each pixel in the first image. The first image, the second image and the stripe enhancement feature are processed to obtain a target correction coefficient corresponding to each pixel. According to the target correction coefficient corresponding to each pixel, the first image is corrected to obtain a target image. In the above process, the first image, the second image and the stripe enhancement feature can be processed to obtain a target correction coefficient corresponding to each pixel. And according to the target correction coefficient corresponding to each pixel, the first image is corrected to obtain a target image. It is avoided that the stripes in the same row in the target image corrected by the same correction coefficient may not be completely eliminated, or the transition between the stripe row and the non-stripe row is unnatural, thereby improving the accuracy of image processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present application;

[0012] Figure 2 A flowchart of an image processing method provided in an embodiment of the present application;

[0013] Figure 3 A schematic diagram of a process for obtaining a second image and fringe enhancement features provided in an embodiment of the present application;

[0014] Figure 4 A flowchart of another image processing method provided in an embodiment of the present application;

[0015] Figure 5 A schematic diagram of the processing process of the attention module provided in an embodiment of the present application;

[0016] Figure 6 A schematic diagram of the processing process of the attention layer provided in an embodiment of the present application;

[0017] Figure 7 A schematic diagram of a process for obtaining a target image provided in an embodiment of the present application;

[0018] Figure 8 A schematic diagram of an image processing process provided in an embodiment of the present application;

[0019] Fig. 9 A schematic diagram of the structure of an image processing device provided in an embodiment of the present application;

[0020] Fig.10 A schematic diagram of the structure of an image processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0022] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0023] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0024] For ease of understanding, below, combined Figure 1 , the application scenarios to which the embodiments of the present application are applicable are described.

[0025] Figure 1 This is a schematic diagram of an application scenario provided by the embodiment of this application. Figure 1 , including a first image 101 and a target image 102. After the camera device captures the first image 101, because the operating frequency of the light does not match the frame rate set by the camera device, the pixel rows of the first image 101 appear as light and dark stripes. The camera device can process the first image 101 to obtain the target image 102.

[0026] In the related art, image processing can be performed in the following manner: an image to be processed is obtained. A correction coefficient for each pixel row in the image is determined by a preset algorithm. The image is corrected by the correction coefficient for each pixel row to obtain a target image. In the above process, since the correction coefficient for each row is the same, if the light and dark intensities of the pixels in the same row are different, the stripes in the same row of the target image corrected by the same correction coefficient may not be completely eliminated, or the transition between the stripe row and the non-stripe row may be unnatural, resulting in low accuracy of image processing.

[0027] In an embodiment of the present application, a first image to be processed is obtained, and the first image includes at least one pixel. The first image is subjected to stripe detection processing to obtain a second image and a stripe enhancement feature, and the second image is used to indicate the brightness and darkness intensity of each pixel in the first image. The first image, the second image, and the stripe enhancement feature are processed to obtain a target correction coefficient corresponding to each pixel. According to the target correction coefficient corresponding to each pixel, the first image is corrected to obtain a target image. In the above process, the first image, the second image, and the stripe enhancement feature can be processed to obtain a target correction coefficient corresponding to each pixel. And according to the target correction coefficient corresponding to each pixel, the first image is corrected to obtain a target image. It is avoided that the stripes in the same row in the target image corrected by the same correction coefficient may not be completely eliminated, or the transition between the stripe row and the non-stripe row is unnatural, thereby improving the accuracy of image processing.

[0028] The method shown in the present application is described below through specific embodiments. It should be noted that the following embodiments can exist independently or in combination with each other, and the same or similar contents will not be described repeatedly in different embodiments.

[0029] Figure 2 This is a flowchart of an image processing method provided in an embodiment of the present application. Figure 2 , the method may include:

[0030] S201: Acquire a first image to be processed.

[0031] The execution subject of the embodiment of the present application may be an image processing device, or an image processing apparatus provided in the image processing device. The image processing apparatus may be implemented by software, or by a combination of software and hardware. The image processing device may be a camera device, a terminal device, etc. For example, the camera device may be a smart camera or a video camera. The terminal device may be a mobile phone, a tablet computer, a computer, etc.

[0032] The first image includes at least one pixel.

[0033] The first image to be processed may be obtained in the following manner: obtaining an initial image and a preset size; and scaling the initial image according to the preset size to obtain the first image.

[0034] The preset size can be set in advance and stored in the preset storage space of the image processing device. The preset size is smaller than the size of the initial image, so that the amount of calculation in the image processing process can be reduced. For example, the preset size can be 256*256, 384*384, 512*512, etc.

[0035] The initial image is taken by a camera in the image processing device, or is an image obtained from other devices. There is a stroboscopic phenomenon in the initial image. When the initial image is scaled to a preset size, the resolution of the first image is also adjusted to the resolution corresponding to the preset size.

[0036] For example, after the camera of the image processing device captures image A, the image processing device determines that there is a stroboscopic phenomenon in image A. The image processing device obtains a preset size of 256*256 in the preset storage space. The image processing device performs scaling processing on image A to obtain a first image A1. The size of the first image is 256*256.

[0037] S202: Perform stripe detection processing on the first image to obtain a second image and stripe enhancement features.

[0038] The second image is used to indicate the brightness and darkness intensity of each pixel in the first image.

[0039] The first image can be processed for stripe detection in the following manner to obtain a second image and stripe enhancement features: a stripe detection model is determined, the stripe detection model includes M encoding downsampling modules and M decoding upsampling modules, M is an integer greater than or equal to 1; the first image is convolved and downsampled M times by the M encoding downsampling modules to obtain the stripe strength feature corresponding to each pixel; the stripe strength feature corresponding to each pixel is convolved and upsampled M times by the M decoding upsampling modules to obtain the second image; and the feature image output by the Mth decoding upsampling module is determined to be the stripe enhancement feature.

[0040] The number M of coding downsampling modules and coding upsampling modules in the stripe detection model can be determined according to the size of the image output after the convolution downsampling process. After determining M, the number of channels of the image output by each module in the stripe detection model can be set. The height, width and number of channels of the intermediate feature image output by each coding downsampling module are proportional to the height, width and number of channels of the intermediate feature image output by the previous coding downsampling module. The number of channels output by the first coding downsampling module is greater than the number of channels of the first image. In this way, the strength and position information of the stripes in the first image can be extracted at different scale features, thereby improving the accuracy of the second image.

[0041] Next, combine Figure 3 , the process of obtaining the second image and the fringe enhancement features is explained. Figure 3 Schematic diagram of the process of obtaining the second image and the fringe enhancement feature provided in the embodiment of the present application. Figure 3 , including a stripe detection model 301. The stripe detection model 301 includes 4 coding downsampling modules and 4 coding upsampling modules. The coding downsampling module includes a convolution layer and a downsampling layer, the convolution layer is used to extract the image features of the input convolution layer, and the downsampling layer is used to downsample the image features output by the convolution layer to obtain image features of different scales. The image features at least include the stripe position, stripe information, the brightness and darkness intensity of each pixel in the image, etc. The coding upsampling module includes a convolution layer and an upsampling layer, the convolution layer is used to extract the image features of the input convolution layer, and the downsampling layer is used to upsample the image features output by the convolution layer to obtain image features of different scales. The downsampling layer and the upsampling layer can use nearest neighbor interpolation or bilinear interpolation for sampling.

[0042] A first image is obtained, and the height of the first image is h, the width is w, and the number of channels is a. Wherein, a can be 3. The first image is input into the stripe detection model 301, and the coding downsampling module 1 of the stripe detection model 301 performs convolution downsampling processing on the first image to obtain an intermediate feature image 1. The height of the intermediate feature image 1 is 0.5h, the width is 0.5w, and the number of channels is C. Wherein, C can be 32. The coding downsampling module 2 of the stripe detection model 301 performs convolution downsampling processing on the intermediate feature image 1 to obtain an intermediate feature image 2. The height of the intermediate feature image 2 is 0.25h, the width is 0.25w, and the number of channels is 2C. The coding downsampling module 3 of the stripe detection model 301 performs convolution downsampling processing on the intermediate feature image 2 to obtain an intermediate feature image 3. The height of the intermediate feature image 3 is 0.125h, the width is 0.125w, and the number of channels is 4C. The coding downsampling module 4 of the stripe detection model 301 performs convolution downsampling processing on the intermediate feature image 3 to obtain an intermediate feature image 4. The height of the intermediate feature image 4 is 0.0625h, the width is 0.0625w, and the number of channels is 8C.

[0043] The coding upsampling module 1 of the stripe detection model 301 performs convolution upsampling processing on the intermediate feature image 4 to obtain the intermediate feature image 5. The height of the intermediate feature image 5 is 0.125h, the width is 0.125w, and the number of channels is 4C. The coding upsampling module 2 of the stripe detection model 301 performs convolution upsampling processing on the intermediate feature image 5 to obtain the intermediate feature image 6. The height of the intermediate feature image 6 is 0.25h, the width is 0.25w, and the number of channels is 2C. The coding upsampling module 3 of the stripe detection model 301 performs convolution upsampling processing on the intermediate feature image 6 to obtain the intermediate feature image 7. The height of the intermediate feature image 7 is 0.5h, the width is 0.5w, and the number of channels is C. The coding upsampling module 4 of the stripe detection model 301 performs convolution upsampling processing on the intermediate feature image 7 to obtain the second image and the stripe enhancement feature. The height of the second image is h, the width is w, the number of channels is a, and the height of the image corresponding to the stripe enhancement feature is h, the width is w, and the number of channels is C.

[0044] The second image can represent the spatial position and intensity of the stripes. The spatial position is reflected in the white area in the second image corresponding to the dark stripes in the first image, and the black area of ​​the map corresponds to the normal area of ​​the first image. The value of the light and dark intensity of each pixel in the second image is 0~1. If the light and dark intensity of the pixel is 0, it can be determined that the pixel is in the non-dark stripe area. If the light and dark intensity of the pixel is not 0, it can be determined that the pixel is in the dark stripe area. The larger the value of the pixel, the greater the darkness of the pixel.

[0045] The stripe enhancement feature can reflect the position and intensity of the stripes in a higher dimension, and is subsequently used as the input of the attention module of the stripe removal model to guide the stripe removal model to focus on the dark stripe area.

[0046] S203: Process the first image, the second image and the fringe enhancement feature to obtain a target correction coefficient corresponding to each pixel.

[0047] The first image, the second image and the stripe enhancement feature can be processed in the following manner to obtain a target correction coefficient corresponding to each pixel: determine a stripe elimination model, the stripe elimination model includes at least one convolution downsampling module, at least one convolution upsampling module, and at least one attention module; process the first image, the second image and the stripe enhancement feature through at least one convolution downsampling module and at least one attention module to obtain at least one intermediate image; process at least one intermediate image and the stripe enhancement feature through at least one convolution upsampling module and at least one attention module to obtain a target correction coefficient corresponding to each pixel.

[0048] The multi-scale feature extraction can be achieved through the convolution downsampling module and the convolution upsampling module of the stripe elimination model, and then the attention module is used to guide the network to focus on the dark stripe area, and the neighborhood information of the dark stripes is used to eliminate the dark stripes, while maintaining a natural transition between the striped and non-stripe areas after elimination.

[0049] S204: Correct the first image according to the target correction coefficient corresponding to each pixel point to obtain a target image.

[0050] The first image can be corrected according to the target correction coefficient corresponding to each pixel point in the following manner to obtain a target image: an initial image corresponding to the first image is acquired; a scaling ratio between the first image and the initial image is determined; a scaling correction coefficient corresponding to each pixel point is determined according to the scaling ratio and the target correction coefficient corresponding to each pixel point; in the first image, a pixel value of each pixel point is determined; for any pixel point, the product of the pixel value of the pixel point and the scaling correction coefficient corresponding to the pixel point is determined as the target pixel value to obtain the target pixel value corresponding to each pixel point; and it is determined that the target image includes at least one pixel point and a target pixel value corresponding to each pixel point.

[0051] For example, the image processing device obtains the initial image corresponding to the first image as image A, and determines the scaling ratio between the first image and the initial image as ratio a. The image processing device determines the scaling correction coefficient corresponding to each pixel as correction coefficient 1 to correction coefficient K based on the scaling ratio and the target correction coefficient corresponding to each pixel. For pixel 1, the pixel value of pixel 1 in the initial image is determined to be x1. The product of the pixel value x1 of pixel 1 and the scaling correction coefficient 1 corresponding to the pixel is determined to be x11, and then the target pixel value of pixel 1 can be determined to be x11. Similarly, the target pixel value of each pixel in the initial image is obtained, thereby determining the target image. There is no light or dark stripe area in the target image.

[0052] The image processing method provided by the embodiment of the present application obtains a first image to be processed. The first image is subjected to stripe detection processing to obtain a second image and a stripe enhancement feature. The first image, the second image and the stripe enhancement feature are processed to obtain a target correction coefficient corresponding to each pixel. According to the target correction coefficient corresponding to each pixel, the first image is corrected to obtain a target image. In the above process, the first image, the second image and the stripe enhancement feature can be processed to obtain a target correction coefficient corresponding to each pixel. And according to the target correction coefficient corresponding to each pixel, the first image is corrected to obtain a target image. This avoids the situation where stripes in the same row in the target image corrected by the same correction coefficient may not be eliminated, thereby improving the accuracy of image processing.

[0053] Based on any of the above embodiments, Figure 4 , the detailed process of image processing is explained.

[0054] Figure 4 This is a flowchart of another image processing method provided in an embodiment of the present application. Figure 4 , the method comprising:

[0055] S401: Acquire a first image to be processed.

[0056] It should be noted that the execution process of S401 can refer to S201 and will not be repeated here.

[0057] S402: Perform stripe detection processing on the first image to obtain a second image and stripe enhancement features.

[0058] For example, the image processing device obtains the first image to be processed as image B. The image processing device performs stripe detection processing on image B through a stripe detection model to obtain a second image B1 and a stripe enhancement feature B.

[0059] S403: Determine a stripe elimination model.

[0060] The stripe removal model includes at least one convolution downsampling module, at least one convolution upsampling module, and at least one attention module.

[0061] S404: Perform splicing and fusion processing on the first image and the second image to obtain a third image.

[0062] The first image and the second image are spliced ​​and fused so that the first image and the second image are spliced ​​in the channel dimension to obtain a third image. The number of channels of the third image is the sum of the number of channels of the first image and the number of channels of the second image.

[0063] For example, assume that the height of the first image is h, the width is w, and the number of channels is 3. The height of the first image is h, the width is w, and the number of channels is 3. The first image and the second image are spliced ​​and fused to obtain a third image, where the height of the third image is h, the width is w, and the number of channels is 6.

[0064] S405 . Process the third image through a first convolution downsampling module to obtain a first fringe enhanced image.

[0065] The convolution downsampling module can perform convolution processing and downsampling processing on the third image, and the height, width and number of channels of the first fringe enhanced image can be determined according to the parameters of the first convolution downsampling module in the fringe elimination model.

[0066] The number of channels of the first fringe enhanced image is greater than the number of channels of the third image. In this way, convolution and feature extraction can be performed with high dimensions. For example, according to the above example, the height of the third image is determined to be h, the width is w, and the number of channels is 6. The third image is processed by the first convolution downsampling module to obtain the first fringe enhanced image. The height of the first fringe enhanced image can be 0.5h, the height can be 0.5w, and the number of channels can be 32.

[0067] S406. Process the first stripe-enhanced image and the stripe-enhanced features through a first attention module to obtain a first intermediate image.

[0068] S407. Initialize i to 2.

[0069] S408 , processing the i-1 th intermediate image through the i th convolution downsampling module to obtain the i th fringe enhanced image.

[0070] The i-1th intermediate image can be processed by the i-th convolution downsampling module to obtain the i-th stripe enhanced image in the following manner: the i-1th intermediate image is processed by the convolution layer of the i-th convolution downsampling to obtain the i-th stripe image; the i-th stripe image is downsampled by the downsampling layer of the i-th convolution downsampling to obtain the i-th stripe enhanced image.

[0071] The height, width and number of channels of the fringe enhanced image obtained by each downsampling processing module can be determined according to the parameters of the corresponding convolution downsampling module in the fringe elimination model.

[0072] The height, width and number of channels of the i-th fringe enhanced image are proportional to the height, width and number of channels of the i-1-th fringe enhanced image.

[0073] For example, the stripe detection model includes multiple convolution downsampling modules. The dimensions of the image output by each convolution downsampling module can be specifically shown in Table 1:

[0074] Table 1

[0075]

[0076] It should be noted that the processing process of the first convolution downsampling module is the same as the processing process of the i-th convolution downsampling module.

[0077] S409: Process the i-th stripe-enhanced image and the stripe-enhanced features through the i-th attention module to obtain the i-th intermediate image.

[0078] The attention module includes at least one normalization layer, an attention layer, and a feed-forward network layer.

[0079] The i-th fringe enhanced image and the fringe enhanced feature can be processed by the i-th attention module in the following manner to obtain the i-th intermediate image: the i-th fringe enhanced image is processed by the first normalization layer to obtain a first normalized fringe enhanced image; the first normalized fringe enhanced image and the fringe enhanced feature are processed by the attention layer to obtain a first candidate enhanced image; the first candidate enhanced image and the i-th fringe enhanced image are superimposed to obtain a second candidate enhanced image; the second candidate enhanced image is processed by the second normalization layer to obtain a second normalized fringe enhanced image; the second normalized fringe enhanced image is processed by the feedforward network layer to obtain a third candidate enhanced image; the second candidate enhanced image and the third candidate enhanced image are superimposed to obtain the i-th intermediate image.

[0080] The height, width and number of channels of the i-th intermediate image are the same as the height, width and number of channels of the i-th fringe enhanced image.

[0081] Next, combine Figure 5 , the processing process of the attention module is explained. Figure 5 Schematic diagram of the processing process of the attention module provided in the embodiment of the present application. Figure 5 , including an attention module 501. The attention module 501 includes two normalization layers, an attention layer and a feedforward network layer. The stripe enhanced image is processed by the first normalization layer of the attention module 501 to obtain a first normalized stripe enhanced image. The first normalized stripe enhanced image and the stripe enhancement feature are processed by the attention layer of the attention module 501 to obtain a first selected enhanced image. The first selected enhanced image and the i-th stripe enhanced image are superimposed to obtain a second selected enhanced image. The second selected enhanced image is processed by the second normalization layer of the attention module 501 to obtain a second normalized stripe enhanced image. The second normalized stripe enhanced image is processed by the feedforward network layer of the attention module 501 to obtain a third selected enhanced image. The second selected enhanced image and the third selected enhanced image are superimposed to obtain an intermediate image.

[0082] The attention layer includes at least one convolution layer. The first normalized fringe enhanced image and the fringe enhanced feature can be processed by the attention layer in the following manner to obtain a first selected enhanced image: the first normalized fringe enhanced image is subjected to convolution dimensionality reduction processing by the first convolution layer to obtain a first reduced dimensionality image; the first normalized fringe enhanced image is subjected to convolution dimensionality reduction processing by the second convolution layer to obtain a second reduced dimensionality image; the first reduced dimensionality image and the second reduced dimensionality image are subjected to matrix multiplication processing to obtain an attention image, wherein the attention image includes at least one pixel point and the correlation relationship between each pixel point and other pixel points; the first normalized fringe enhanced image is processed by the third convolution layer to obtain a convolution image; the convolution image and the fringe enhanced feature are subjected to point-by-point multiplication processing to obtain an intermediate enhanced image; and the first selected enhanced image is determined according to the intermediate enhanced image and the attention image.

[0083] The first candidate enhanced image can be determined based on the intermediate enhanced image and the attention image in the following manner: perform dimensionality reduction processing on the intermediate enhanced image to obtain a third reduced dimensionality image; perform matrix multiplication processing on the third reduced dimensionality image and the attention map to obtain a fourth reduced dimensionality image; perform restoration processing on the fourth reduced dimensionality image to obtain the first candidate enhanced image.

[0084] The height, width and number of channels of the fringe enhancement feature are the same as the height, width and number of channels of the first normalized fringe enhancement image.

[0085] Next, combine Figure 6 , the processing of the attention layer is explained. Figure 6Schematic diagram of the attention layer processing process provided by the embodiment of the present application. Figure 6 , including an attention layer 601, and the attention layer 601 includes 3 convolution layers. The first normalized fringe enhanced image is input into the attention layer 601, and the height, width and number of channels of the first normalized fringe enhanced image are h, w and c. The first normalized fringe enhanced image is processed by convolution layer 1 to obtain image F1. The first normalized fringe enhanced image is processed by convolution layer 2 to obtain image F2. The first normalized fringe enhanced image is processed by convolution layer 3 to obtain convolution image V. The heights of images F1, F2 and V are all h, the widths are all w, and the number of channels is all c. Image F1 is subjected to dimensionality reduction processing to obtain a first dimensionality reduction image Q. The size of the first dimensionality reduction image Q is hw*c. Image F2 is subjected to dimensionality reduction processing to obtain a second dimensionality reduction image K. The size of the second dimensionality reduction image K is c*hw. The first dimensionality reduction image Q and the second dimensionality reduction image K are both two-dimensional images. The first dimensionality reduction image Q and the second dimensionality reduction image K are multiplied and normalized to obtain an attention map. The size of the attention map is hw*hw. The attention map represents the association between each pixel and the surrounding pixels in the first normalized fringe enhanced image.

[0086] The convolution image V and the stripe enhancement feature Fs are multiplied point by point to obtain an intermediate enhanced image. The intermediate enhanced image is subjected to dimensionality reduction processing to obtain a third dimensionality reduction image F3. The size of the third dimensionality reduction image F3 is hw*c. The third dimensionality reduction image F3 and the attention map are subjected to matrix multiplication processing to obtain a fourth dimensionality reduction image. The fourth dimensionality reduction image is restored to obtain a first candidate enhanced image. The height, width and number of channels of the first candidate enhanced image are the same as the height, width and number of channels of the first normalized fringe enhanced image.

[0087] By adjusting the convolution image through stripe enhancement features, the network can focus on the dark stripes. After further superposition and fusion of the attention map, the dark stripes are given more important weights and the ability to refer to the neighborhood information of the dark area. Finally, the image dimension output by the attention layer is restored to the dimension of the input image.

[0088] S410: Determine whether i is equal to N.

[0089] If so, execute S411.

[0090] If not, update i to i+1 and execute S408.

[0091] S411. Determine that at least one intermediate image includes N intermediate images.

[0092] S412. Process at least one intermediate image and stripe enhancement features through at least one convolution upsampling module and at least one attention module to obtain a target correction coefficient corresponding to each pixel.

[0093] At least one intermediate image and stripe enhancement feature can be processed by at least one convolution upsampling module and at least one attention module to obtain a target correction coefficient corresponding to each pixel point in the following manner: the Nth intermediate image and stripe enhancement feature are processed by the N+1th attention module to obtain a first feature enhanced image; the first feature enhanced image and the Nth intermediate image are superimposed to obtain a first fused image; the l-1th fused image and the stripe enhancement feature are processed by the N+1th attention module to obtain a lth feature enhanced image, where l is 2, 3, ..., N in sequence, and the l-1th fused image is obtained by superimposing the l-1th feature enhanced image and the Nl-1th intermediate image; the lth feature enhanced image is processed by the lth convolution upsampling module to obtain the lth stripe fused image; and the target correction coefficient corresponding to each pixel point is determined according to the Nth stripe fused image.

[0094] The height, width and number of channels of the l-1th feature enhanced image are the same as those of the Nl-1th intermediate image. The height, width and number of channels of the Nth stripe fusion image are the same as those of the first image.

[0095] The height, width and number of channels of the enhanced image obtained by each upsampling processing module can be determined according to the parameters of the corresponding convolution downsampling module in the stripe elimination model.

[0096] For example, according to Table 1 above, it can be determined that the stripe detection model includes three convolution upsampling modules. The dimensions of the image output by each convolution upsampling module can be specifically shown in Table 2:

[0097] Table 2

[0098]

[0099] The number of convolution upsampling modules and convolution downsampling modules is the same. In this way, after being processed by at least one convolution downsampling module, at least one attention module, and at least one convolution downsampling module, the height, width, and number of channels of the output Nth enhanced image are the same as the height, width, and number of channels of the first image. Therefore, the target correction coefficient corresponding to each pixel in the first image can be determined based on the Nth enhanced image.

[0100] It should be noted that the processing process of each attention module in the stripe detection model provided in the embodiment of the present application is the same and will not be repeated here.

[0101] S413: Perform correction processing on the first image according to the target correction coefficient corresponding to each pixel point to obtain a target image.

[0102] Next, combine Figure 7 , the process of obtaining the target image is explained. Figure 7 This is a schematic diagram of the process of obtaining the target image provided by the embodiment of the present application. Figure 7 , including a first image 701 and a target image 702. There is a dark stripe area in the first image 701. The stripe detection model and the stripe elimination model process the first image 701 to obtain a target correction coefficient corresponding to each pixel. According to the target correction coefficient corresponding to each pixel, the first image is corrected to obtain the target image 702. There is no dark stripe area in the target image 702, and the transition between the dark stripe elimination area and the non-dark stripe area after processing is natural.

[0103] Before performing image processing by using the fringe detection model and the fringe elimination model, the fringe detection model and the fringe elimination model need to be trained to determine parameters of the fringe detection model and the fringe elimination model.

[0104] Model training can be performed in the following manner: obtaining a training data set, the training data set including at least one sample image, a stripe detection image corresponding to each sample image, at least one standard correction coefficient corresponding to each sample image, and a standard image corresponding to each sample image; determining an initial model, the initial model including a stripe detection model and a stripe elimination model; performing a first iterative training on the initial model using the training data set to obtain a first intermediate model; performing an i+1th iterative training on the i-th intermediate model using the training data set to obtain an i+1th intermediate model, where i is successively 1, 2, 3, ..., until the i-th intermediate model converges, and determining the i-th intermediate model as a target model, the target model including the trained stripe detection model and the stripe elimination model.

[0105] The i+1th intermediate model can be obtained by performing the i+1th iterative training on the i-th intermediate model through the training data set in the following manner: the sample image in the training data set is processed by the i-th intermediate model to obtain a prediction result, the prediction result including a predicted stripe image corresponding to the sample image, at least one prediction correction coefficient, and a predicted image; a loss value is determined according to the stripe detection image corresponding to the sample image, at least one standard correction coefficient, the standard image, and the prediction result; and the model parameters of the i-th intermediate model are updated according to the loss value to obtain the i+1th intermediate model.

[0106] When the loss value is less than or equal to the preset loss value, it is determined that the intermediate model has converged.

[0107] The loss value can be determined by the following formula 1:

[0108]

[0109] in, is the loss value; is the first loss value corresponding to the stripe detection model; is the first weight corresponding to the first loss value; A second loss value corresponding to at least one preset correction coefficient; is the second weight corresponding to the second loss value; is the third loss value corresponding to the predicted image; is the third weight corresponding to the third loss value.

[0110] In order to ensure that the output of the stripe detection model during training has stripe intensity and position information, a loss function can be added to the end of the stripe detection model , whose label (GT) is the intensity of the added stripes when the data is degraded. When the data is degraded, only the light and dark intensity of the dark stripes will be added. When training the model, there is no need to train the stripe detection model and the stripe removal model separately. You only need to jointly train and optimize the parameters of the two network models according to the above formula 1.

[0111] The image processing method provided by the embodiment of the present application obtains a first image to be processed. The first image is subjected to stripe detection processing to obtain a second image and stripe enhancement features. A stripe elimination model is determined. The first image, the second image and the stripe enhancement features are processed by at least one convolution downsampling module and at least one attention module to obtain at least one intermediate image. The at least one intermediate image and the stripe enhancement features are processed by at least one convolution upsampling module and at least one attention module to obtain a target correction coefficient corresponding to each pixel. According to the target correction coefficient corresponding to each pixel, the first image is corrected to obtain a target image. In the above process, the second image and the stripe enhancement features can be pre-extracted by the stripe detection model to guide the subsequent stripe elimination model to focus on the dark stripe area. The stripe elimination model can focus on the dark stripes and refer to the neighborhood information of the dark stripes according to the second image and the stripe enhancement features through the attention module and the multi-scale convolution sampling processing, thereby removing the stripe area in the initial image, and making the transition of the stripe removal area to the non-dark stripe area natural. It avoids the situation that the stripes in the same row in the target image corrected by the same correction coefficient may not be eliminated, thereby improving the accuracy of image processing.

[0112] Based on any of the above embodiments, Figure 8 , the process of image processing is illustrated with examples.

[0113] Figure 8 This is a schematic diagram of the image processing process provided in the embodiment of the present application. Figure 8 , including a stripe detection model 801 and a stripe elimination model 802. The stripe detection model 801 and the stripe elimination model 802 are set in an image processing device. The image processing device can be a camera device, a terminal device, etc. For example, the camera device can be a smart camera or a video camera. The terminal device can be a mobile phone, a tablet computer, a computer, etc. The image processing device obtains an initial image and a preset size, and scales the initial image according to the preset size to obtain a first image. The height of the first image is h, the width is w, and the number of channels is 3. The image processing device determines the stripe detection model 801. And the first image is subjected to convolution downsampling and convolution upsampling by the stripe detection model 801 to obtain a second image. The second image is used to indicate the brightness and darkness intensity of each pixel in the first image. At the same time, the feature of the last convolution upsampling output is determined as a stripe enhancement feature. The height, width and number of channels of the second image are the same as those of the first image. The image corresponding to the stripe enhancement feature has a height of h, a width of w, and a number of channels of c. Among them, c can be 32.

[0114] The image processing device performs splicing and fusion processing on the first image and the second image to obtain a third image. The height of the third image is h, the width is w, and the number of channels is 6. The image processing device determines the stripe removal model 802, and the stripe removal model 802 includes 2 convolution downsampling modules, 2 convolution downsampling modules, and 5 attention modules. The image processing device processes the third image through the convolution downsampling module 1 of the stripe removal model 802 to obtain a first stripe enhanced image. The height of the first stripe enhanced image is 0.5h, the width is 0.5w, and the number of channels is 2c. The first stripe enhanced image and the stripe enhanced feature are processed by the attention module 1 of the stripe removal model 802 to obtain an intermediate image 1. The intermediate image 1 is processed by the convolution downsampling module 2 of the stripe removal model 802 to obtain a second stripe enhanced image. The height of the second stripe enhanced image is 0.25h, the width is 0.25w, and the number of channels is 4c. The second stripe enhanced image and the stripe enhanced feature are processed by the attention module 2 of the stripe removal model 802 to obtain an intermediate image 2. Determine at least one intermediate image including intermediate image 1 and intermediate image 2.

[0115] The attention module 3 of the stripe removal model 802 processes the intermediate image 2 and the stripe enhancement feature to obtain the feature enhancement image 1. The feature enhancement image 1 and the intermediate image 2 are superimposed to obtain the fused image 1. The height of the fused image 1 is 0.25h, the width is 0.25w, and the number of channels is 4c. The attention module 4 of the stripe removal model 802 processes the fused image 1 and the stripe enhancement feature to obtain the feature enhancement image 1. The convolution upsampling module 1 of the stripe removal model 802 processes the feature enhancement image 1 to obtain the stripe fused image 1. The height of the stripe fused image 2 is 0.5h, the width is 0.5w, and the number of channels is 2c. The stripe fused image 1 and the intermediate image 2 are superimposed to obtain the fused image 2. The attention module 5 of the stripe removal model 802 processes the fused image 2 and the stripe enhancement feature to obtain the feature enhancement image 2. The convolution upsampling module 2 of the stripe removal model 802 processes the feature enhancement image 2 to obtain the stripe fused image 2. The height of the stripe fused image 2 is h, the width is w, and the number of channels is c. The stripe removal model 802 determines the target correction coefficient corresponding to each pixel point according to the stripe fusion image 2. The image processing device performs correction processing on the first image according to the target correction coefficient corresponding to each pixel point to obtain a target image.

[0116] The image processing process provided by the embodiment of the present application obtains a first image to be processed. The first image is subjected to stripe detection processing to obtain a second image and stripe enhancement features. A stripe elimination model is determined. The first image, the second image and the stripe enhancement features are processed by at least one convolution downsampling module and at least one attention module to obtain at least one intermediate image. The at least one intermediate image and the stripe enhancement features are processed by at least one convolution upsampling module and at least one attention module to obtain a target correction coefficient corresponding to each pixel. According to the target correction coefficient corresponding to each pixel, the first image is corrected to obtain a target image. In the above process, the second image and the stripe enhancement features can be pre-extracted by the stripe detection model to guide the subsequent stripe elimination model to focus on the dark stripe area. The stripe elimination model can focus on the dark stripes and refer to the neighborhood information of the dark stripes according to the second image and the stripe enhancement features through the attention module and the multi-scale convolution sampling processing, thereby removing the stripe area in the initial image, and making the transition of the stripe removal area to the non-dark stripe area natural. It avoids the situation that the stripes in the same row in the target image corrected by the same correction coefficient may not be eliminated, thereby improving the accuracy of image processing.

[0117] Fig. 9 This is a schematic diagram of the structure of the image processing device provided in the embodiment of the present application. Fig. 9 , the image processing device 10 may include:

[0118] An acquisition module 11 is used to acquire a first image to be processed, wherein the first image includes at least one pixel point;

[0119] A first processing module 12 is used to perform fringe detection processing on the first image to obtain a second image and fringe enhancement features, wherein the second image is used to indicate the brightness and darkness intensity of each pixel in the first image;

[0120] A second processing module 13 is used to process the first image, the second image and the fringe enhancement feature to obtain a target correction coefficient corresponding to each pixel point;

[0121] The third processing module 14 is used to perform correction processing on the first image according to the target correction coefficient corresponding to each pixel point to obtain a target image.

[0122] In a possible implementation manner, the second processing module 13 is specifically used for:

[0123] Determining a streak removal model, wherein the streak removal model includes at least one convolution downsampling module, at least one convolution upsampling module, and at least one attention module;

[0124] Processing the first image, the second image, and the stripe enhancement feature through the at least one convolution downsampling module and the at least one attention module to obtain at least one intermediate image;

[0125] The at least one intermediate image and the stripe enhancement feature are processed by the at least one convolution upsampling module and the at least one attention module to obtain a target correction coefficient corresponding to each pixel.

[0126] In a possible implementation manner, the second processing module 13 is specifically used for:

[0127] Performing splicing and fusing processing on the first image and the second image to obtain a third image;

[0128] Processing the third image by a first convolution downsampling module to obtain a first fringe enhanced image;

[0129] Processing the first stripe-enhanced image and the stripe-enhanced features through a first attention module to obtain a first intermediate image;

[0130] Processing the (i-1)th intermediate image through the (i)th convolution downsampling module to obtain the (i)th fringe enhanced image;

[0131] Processing the i-th stripe enhanced image and the stripe enhanced feature through the i-th attention module to obtain the i-th intermediate image, where i is 2, 3, ..., N in sequence, and N is the number of the convolution downsampling modules;

[0132] Determining the at least one intermediate image includes N intermediate images.

[0133] In a possible implementation manner, the second processing module 13 is specifically used for:

[0134] Processing the i-1th intermediate image through the i-th convolutional downsampling convolutional layer to obtain an i-th stripe image;

[0135] The i-th fringe image is downsampled by the i-th convolution downsampling layer to obtain the i-th fringe enhanced image.

[0136] In a possible implementation manner, the second processing module 13 is specifically used for:

[0137] Processing the i-th fringe enhanced image through a first normalization layer to obtain a first normalized fringe enhanced image;

[0138] Processing the first normalized fringe enhanced image and the fringe enhanced features through the attention layer to obtain a first selected enhanced image;

[0139] Performing a superposition process on the first enhanced image to be selected and the i-th fringe enhanced image to obtain a second enhanced image to be selected;

[0140] Processing the second selected enhanced image through a second normalization layer to obtain a second normalized fringe enhanced image;

[0141] Processing the second normalized fringe enhanced image through the feedforward network layer to obtain a third enhanced image to be selected;

[0142] The second image to be enhanced and the third image to be enhanced are superimposed to obtain the i-th intermediate image.

[0143] In a possible implementation manner, the second processing module 13 is specifically used for:

[0144] Performing convolution dimensionality reduction processing on the first normalized fringe enhanced image through a first convolution layer to obtain a first reduced dimensionality image;

[0145] Performing convolution dimensionality reduction processing on the first normalized fringe enhanced image through a second convolution layer to obtain a second dimensionality reduced image;

[0146] Performing matrix multiplication processing on the first reduced-dimensionality image and the second reduced-dimensionality image to obtain an attention image, wherein the attention image includes at least one pixel point and an association relationship between each pixel point and other pixel points;

[0147] Processing the first normalized fringe enhanced image through a third convolutional layer to obtain a convolution image;

[0148] Performing point-by-point multiplication processing on the convolution image and the stripe enhancement feature to obtain an intermediate enhanced image;

[0149] The first to-be-selected enhanced image is determined according to the intermediate enhanced image and the attention image.

[0150] In a possible implementation manner, the second processing module 13 is specifically used for:

[0151] Performing dimensionality reduction processing on the intermediate enhanced image to obtain a third dimensionality reduced image;

[0152] Performing matrix multiplication processing on the third reduced dimensionality image and the attention map to obtain a fourth reduced dimensionality image;

[0153] The fourth dimension-reduced image is restored to obtain the first candidate enhanced image.

[0154] In a possible implementation manner, the second processing module 13 is specifically used for:

[0155] Processing the Nth intermediate image and the stripe enhanced features through an N+1th attention module to obtain a first feature enhanced image;

[0156] Superimposing the first feature-enhanced image and the Nth intermediate image to obtain the first fused image;

[0157] The l-1th fused image and the stripe enhanced feature are processed by the N+1th attention module to obtain the l-th feature enhanced image, where l is 2, 3, ..., N in sequence, and the l-1th fused image is obtained by superimposing the l-1th feature enhanced image and the Nl-1th intermediate image;

[0158] Processing the lth feature enhanced image through the lth convolution up-sampling module to obtain the lth stripe fused image;

[0159] According to the Nth fringe fusion image, the target correction coefficient corresponding to each pixel is determined.

[0160] In a possible implementation manner, the first processing module 12 is specifically used for:

[0161] Determine a stripe detection model, wherein the stripe detection model includes M encoding downsampling modules and M decoding upsampling modules, where M is an integer greater than or equal to 1;

[0162] Performing M convolution downsampling processes on the first image through the M encoding downsampling modules to obtain a stripe strength feature corresponding to each pixel point;

[0163] Performing M convolution upsampling processes on the stripe strength feature corresponding to each pixel point through the M decoding upsampling modules to obtain the second image;

[0164] Determine that the feature image output by the Mth decoding upsampling module is the stripe enhancement feature.

[0165] In a possible implementation manner, the third processing module 14 is specifically used for:

[0166] Acquire an initial image corresponding to the first image;

[0167] determining a scaling ratio between the first image and the initial image;

[0168] Determining a scaling correction coefficient corresponding to each pixel point according to the scaling ratio and a target correction coefficient corresponding to each pixel point;

[0169] In the first image, determining a pixel value of each pixel;

[0170] For any pixel point, the product of the pixel value of the pixel point and the scaling correction coefficient corresponding to the pixel point is determined as the target pixel value, so as to obtain the target pixel value corresponding to each pixel point;

[0171] It is determined that the target image includes the at least one pixel point and a target pixel value corresponding to each pixel point.

[0172] The image processing device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

[0173] Fig.10 This is a schematic diagram of the structure of the image processing device provided in the embodiment of the present application. Fig.10 The image processing device 20 may include: a memory 21 and a processor 22. Exemplarily, the memory 21 and the processor 22 are interconnected via a bus 23.

[0174] The memory 21 is used to store program instructions;

[0175] The processor 22 is used to execute the program instructions stored in the memory, so as to enable the image processing device 20 to execute the method shown in the above method embodiment.

[0176] The image processing device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

[0177] An embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the above method.

[0178] The embodiment of the present application may also provide a computer program product, including a computer program, which can implement the above method when executed by a processor.

[0179] All or part of the steps of the above-mentioned method embodiments can be completed by hardware related to program instructions. The above-mentioned program can be stored in a readable memory. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the above-mentioned memory (storage medium) includes: read-only memory (ROM), random access memory (RAM), flash memory, hard disk, solid state drive, magnetic tape, floppy disk, optical disc and any combination thereof.

[0180] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processing unit of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0181] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1A function specified in one or more boxes.

[0182] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0183] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

[0184] In the present application, the term "include" and its variations may refer to non-restrictive inclusion; the term "or" and its variations may refer to "and / or". The terms "first", "second", etc. in the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. In the present application, "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previously associated objects are in an "or" relationship.

Claims

1. An image processing method, characterized in that: include: Acquire a first image to be processed, wherein the first image includes at least one pixel; Performing stripe detection processing on the first image to obtain a second image and stripe enhancement features, wherein the second image is used to indicate the brightness and darkness intensity of each pixel in the first image; Processing the first image, the second image and the fringe enhancement feature to obtain a target correction coefficient corresponding to each pixel; The first image is corrected according to the target correction coefficient corresponding to each pixel to obtain a target image.

2. The method according to claim 1, characterized in that: Processing the first image, the second image, and the fringe enhancement feature to obtain a target correction coefficient corresponding to each pixel point includes: Determining a streak removal model, wherein the streak removal model includes at least one convolution downsampling module, at least one convolution upsampling module, and at least one attention module; Processing the first image, the second image, and the stripe enhancement feature through the at least one convolution downsampling module and the at least one attention module to obtain at least one intermediate image; The at least one intermediate image and the stripe enhancement feature are processed by the at least one convolution upsampling module and the at least one attention module to obtain a target correction coefficient corresponding to each pixel.

3. The method according to claim 2, characterized in that Processing the first image, the second image, and the stripe enhancement feature by the at least one convolution downsampling module and the at least one attention module to obtain at least one intermediate image, comprising: Performing splicing and fusing processing on the first image and the second image to obtain a third image; Processing the third image by a first convolution downsampling module to obtain a first fringe enhanced image; Processing the first stripe-enhanced image and the stripe-enhanced features through a first attention module to obtain a first intermediate image; Processing the (i-1)th intermediate image through the (i)th convolution downsampling module to obtain the (i)th fringe enhanced image; Processing the i-th stripe enhanced image and the stripe enhanced feature through the i-th attention module to obtain the i-th intermediate image, where i is 2, 3, ..., N in sequence, and N is the number of the convolution downsampling modules; Determining the at least one intermediate image includes the N intermediate images.

4. The method according to claim 3, characterized in that The convolution downsampling module includes a convolution layer and a downsampling layer; the i-1th intermediate image is processed by the i-th convolution downsampling module to obtain the i-th fringe enhanced image, including: Processing the i-1th intermediate image through the i-th convolutional downsampling convolutional layer to obtain an i-th stripe image; The i-th fringe image is downsampled by the i-th convolution downsampling layer to obtain the i-th fringe enhanced image.

5. The method according to claim 3 or 4, characterized in that: The attention module includes at least one normalization layer, an attention layer and a feedforward network layer; the i-th fringe enhanced image and the fringe enhanced feature are processed by the i-th attention module to obtain the i-th intermediate image, including: Processing the i-th fringe enhanced image through a first normalization layer to obtain a first normalized fringe enhanced image; Processing the first normalized fringe enhanced image and the fringe enhanced features through the attention layer to obtain a first selected enhanced image; Performing a superposition process on the first enhanced image to be selected and the i-th fringe enhanced image to obtain a second enhanced image to be selected; Processing the second selected enhanced image through a second normalization layer to obtain a second normalized fringe enhanced image; Processing the second normalized fringe enhanced image through the feedforward network layer to obtain a third enhanced image to be selected; The second image to be enhanced and the third image to be enhanced are superimposed to obtain the i-th intermediate image.

6. The method according to claim 5, characterized in that The attention layer includes at least one convolution layer; the first normalized fringe enhanced image and the fringe enhanced feature are processed by the attention layer to obtain a first selected enhanced image, including: Performing convolution dimensionality reduction processing on the first normalized fringe enhanced image through a first convolution layer to obtain a first reduced dimensionality image; Performing convolution dimensionality reduction processing on the first normalized fringe enhanced image through a second convolution layer to obtain a second dimensionality reduced image; Performing matrix multiplication processing on the first reduced-dimensionality image and the second reduced-dimensionality image to obtain an attention image, wherein the attention image includes at least one pixel point and an association relationship between each pixel point and other pixel points; Processing the first normalized fringe enhanced image through a third convolution layer to obtain a convolution image; Performing point-by-point multiplication processing on the convolution image and the stripe enhancement feature to obtain an intermediate enhanced image; The first to-be-selected enhanced image is determined according to the intermediate enhanced image and the attention image.

7. The method according to claim 6, characterized in that Determining the first to-be-selected enhanced image according to the intermediate enhanced image and the attention image includes: Performing dimensionality reduction processing on the intermediate enhanced image to obtain a third dimensionality reduced image; Performing matrix multiplication processing on the third dimensionality reduction image and the attention map to obtain a fourth dimensionality reduction image; The fourth dimension-reduced image is restored to obtain the first candidate enhanced image.

8. The method according to claim 2, characterized in that: Processing the at least one intermediate image and the stripe enhancement feature by the at least one convolution upsampling module and the at least one attention module to obtain a target correction coefficient corresponding to each pixel point includes: Processing the Nth intermediate image and the stripe enhanced features through an N+1th attention module to obtain a first feature enhanced image; Superimposing the first feature-enhanced image and the Nth intermediate image to obtain the first fused image; The l-1th fused image and the stripe enhanced feature are processed by the N+1th attention module to obtain the l-1th feature enhanced image, where l is 2, 3, ..., N in sequence, and the l-1th fused image is obtained by superimposing the l-1th feature enhanced image and the Nl-1th intermediate image; Processing the lth feature enhanced image through the lth convolution up-sampling module to obtain the lth stripe fused image; According to the Nth fringe fusion image, the target correction coefficient corresponding to each pixel is determined.

9. The method according to any one of claims 1 to 4, characterized in that: Performing stripe detection processing on the first image to obtain a second image and stripe enhancement features includes: Determine a stripe detection model, wherein the stripe detection model includes M encoding downsampling modules and M decoding upsampling modules, where M is an integer greater than or equal to 1; Performing M convolution downsampling processes on the first image through the M encoding downsampling modules to obtain a stripe strength feature corresponding to each pixel point; Performing M convolution upsampling processes on the stripe strength feature corresponding to each pixel point through the M decoding upsampling modules to obtain the second image; Determine that the feature image output by the Mth decoding upsampling module is the stripe enhancement feature.

10. The method according to any one of claims 1 to 4, characterized in that: The first image is corrected according to the target correction coefficient corresponding to each pixel point to obtain a target image, including: Acquire an initial image corresponding to the first image; determining a scaling ratio between the first image and the initial image; Determining a scaling correction coefficient corresponding to each pixel point according to the scaling ratio and a target correction coefficient corresponding to each pixel point; In the first image, determining a pixel value of each pixel; For any pixel point, the product of the pixel value of the pixel point and the scaling correction coefficient corresponding to the pixel point is determined as the target pixel value, so as to obtain the target pixel value corresponding to each pixel point; It is determined that the target image includes the at least one pixel point and a target pixel value corresponding to each pixel point.

Citation Information

Patent Citations

  • Image shadow removing method

    CN115100070A

  • Correction method of interference fringes and under-screen system

    CN115131216A

  • Image processing method and device and terminal equipment

    CN117455785A

  • Image processing method and device and terminal equipment

    CN117575891A

  • Image processing method and device, storage medium and electronic equipment

    CN118175274A