Image processing method and device and electronic equipment

By performing multiple filtering processing and point-to-point difference value processing according to the stripe type of the image, the problems of poor detail retention and noise diffusion during image denoising in the prior art are solved, and the effect of accurately removing stripe noise is achieved.

CN119067876APending Publication Date: 2024-12-03BEIJING LUSTER LIGHTTECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411169039.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

When removing stripe noise in an image, it is difficult to retain image details, and the removal effect is incomplete, which easily leads to blurred processing results and spread of stripes.

Method used

By determining that the unit image is a single pixel row or a single pixel column according to the stripe type of the image, multiple filtering templates are used to perform multiple filtering processing in different directions, the target stripe image is obtained, and the noise is removed through point-to-point difference value processing to ensure image details reserved.

Benefits of technology

It realizes the accurate removal of non-uniform fringes while retaining image details, avoiding blurring and noise diffusion of processing results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119067876A_ABST
    Figure CN119067876A_ABST
Patent Text Reader

Abstract

The invention discloses an image processing method and device and electronic equipment, and belongs to the technical field of image processing. The method comprises the following steps: determining each unit image in a to-be-processed image according to the stripe type of the to-be-processed first image; the unit image is a single pixel row or a single pixel column; determining a target image block taking each unit image as a center; according to the plurality of filtering templates, performing multiple times of filtering processing on each target image block in a plurality of filtering directions to obtain a target fringe image corresponding to the unit image; obtaining a second image according to the target stripe image corresponding to each unit image and the first image; and carrying out point-to-point difference processing on the pixel values of the pixel points in the first image and the second image to obtain a target image. According to the embodiment of the invention, stripe non-uniform noise in the first image is accurately removed while image details are reserved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of image processing technology, and in particular, relates to an image processing method, device and electronic device. Background Art

[0002] Affected by the readout circuit, exposure time, working environment, etc., the optical system is disturbed by noise from different sources during the imaging process, causing non-uniform noise in the image / video with row / column stripes as the main feature. In the related art, some solutions use a combination of Fourier transform and inverse Fourier transform algorithms to remove stripes in the image. However, due to the small contrast of stripe noise and the small pixel difference with the image itself, the solution does not retain the image details well; there are also some solutions that correct stripe noise by analyzing the grayscale similarity of adjacent row data. This solution cannot completely remove stripe noise and will cause the processing result image to be blurred, and there will be diffusion at the stripe removal position. Summary of the invention

[0003] The present application aims to solve at least one of the technical problems existing in the related art. To this end, the present application proposes an image processing method, device, electronic device, computer-readable storage medium and computer program product to accurately remove stripe non-uniform noise in a first image while retaining image details.

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

[0005] Determine each unit image in the image to be processed according to the stripe type of the first image to be processed; the unit image is a single pixel row or a single pixel column;

[0006] Determine a target image block centered on each unit image;

[0007] Perform multiple filtering processes on each target image block in multiple filtering directions according to multiple filtering templates to obtain a target stripe image corresponding to the unit image;

[0008] Obtaining a second image according to the target fringe image corresponding to each unit image and the first image;

[0009] The pixel values ​​of the pixels in the first image and the second image are subjected to point-to-point difference processing to obtain a target image.

[0010] According to the image processing method of the present application, each unit image in the image to be processed is determined according to the stripe type of the first image to be processed; the unit image is a single pixel row or a single pixel column; a target image block centered on each unit image is determined; each target image block is subjected to multiple filtering processes in multiple filtering directions according to multiple filtering templates to obtain a target stripe image corresponding to the unit image; a second image is obtained based on the target stripe image corresponding to each unit image and the first image, so as to accurately determine the stripes corresponding to each unit image, and then accurately determine the stripe image corresponding to the first image, and then perform point-to-point difference processing on the pixel values ​​of the pixel points in the first image and the second image to obtain the target image, so as to accurately remove the stripe non-uniform noise in the first image while retaining the image details.

[0011] According to an embodiment of the present application, a target image block is subjected to multiple filtering processes in multiple filtering directions according to multiple filtering templates to obtain a target stripe image corresponding to a unit image, including:

[0012] Filtering the target image block in a first direction based on a first filtering template to obtain a first smoothed image;

[0013] Filtering the first smoothed image in a second direction based on a second filtering template to obtain a second smoothed image; the first direction and the second direction intersect;

[0014] filtering the first smoothed image in the second direction based on the third filtering template to obtain a third smoothed image; the third filtering template and the second filtering template have the same template type, and the filtering kernel size of the third filtering template is larger than the filtering kernel size of the second filtering template;

[0015] Performing point-to-point difference processing on pixel values ​​of pixel points in the unit image and the third smoothed image to obtain a first fringe image;

[0016] The first fringe image is corrected according to the second smoothed image to obtain a target fringe image.

[0017] According to an embodiment of the present application, correcting the first fringe image according to the second smoothed image includes:

[0018] setting at least one first window in the second smoothed image;

[0019] Determine a first gradient relationship between pixel values ​​of pixel points on the left side of the window center of the first window, and a second gradient relationship between pixel values ​​of pixel points on the right side;

[0020] When it is determined that the first gradient relationship and / or the second gradient relationship satisfies the target gradient relationship, setting a second window at the same position as the first window in the first fringe image;

[0021] In the first fringe image, the pixel values ​​of the left pixel points and / or the right pixel points of the window center of each second window are corrected to the target pixel values.

[0022] According to an embodiment of the present application, the target gradient relationship is an increasing relationship or a decreasing relationship; the target pixel value is 0.

[0023] According to one embodiment of the present application, before filtering the target image block in the first direction based on the first filtering template, the method further includes:

[0024] The first direction and the second direction are determined based on:

[0025] In the case where the unit image is determined to be a single pixel row, the first direction is determined to be a horizontal direction and the second direction is determined to be a vertical direction;

[0026] In the case where the unit image is determined to be a single pixel column, the first direction is determined to be a vertical direction, and the second direction is determined to be a horizontal direction.

[0027] According to an embodiment of the present application, obtaining a second image according to the target stripe image corresponding to each unit image and the first image includes:

[0028] Sequentially stitching the target fringe images corresponding to the unit images to obtain a third image;

[0029] Get the size of the first image;

[0030] According to the size of the first image, the third image is interpolated to obtain the second image.

[0031] According to an embodiment of the present application, determining each unit image in the image to be processed according to the stripe type of the first image to be processed includes:

[0032] When it is determined that the stripe type of the first image is a vertical stripe, determining the unit image is a single pixel row;

[0033] When it is determined that the stripe type of the first image is a horizontal stripe, the unit image is determined to be a single pixel column.

[0034] In a second aspect, the present application provides an image processing device, the device comprising:

[0035] A first processing module, used for determining each unit image in the image to be processed according to the stripe type of the first image to be processed; the unit image is a single pixel row or a single pixel column;

[0036] The second processing module determines a target image block centered on each unit image;

[0037] The third processing module performs multiple filtering processes on each target image block in multiple filtering directions according to multiple filtering templates to obtain a target stripe image corresponding to the unit image;

[0038] A fourth processing module, obtaining a second image according to the target stripe image corresponding to each unit image and the first image;

[0039] The fifth processing module performs point-to-point difference processing on the pixel values ​​of the pixels in the first image and the second image to obtain a target image.

[0040] According to the image processing device of the present application, each unit image in the image to be processed is determined according to the stripe type of the first image to be processed; the unit image is a single pixel row or a single pixel column; a target image block centered on each unit image is determined; each target image block is subjected to multiple filtering processes in multiple filtering directions according to multiple filtering templates to obtain a target stripe image corresponding to the unit image; a second image is obtained based on the target stripe image corresponding to each unit image and the first image, so as to accurately determine the stripes corresponding to each unit image, and then accurately determine the stripe image corresponding to the first image, and then perform point-to-point difference processing on the pixel values ​​of the pixel points in the first image and the second image to obtain the target image, so as to accurately remove the stripe non-uniform noise in the first image while retaining the image details.

[0041] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the image processing method as described in the first aspect above is implemented.

[0042] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the image processing method as described in the first aspect above.

[0043] In a fifth aspect, the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the image processing method as described in the first aspect.

[0044] In a sixth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the image processing method as described in the first aspect above.

[0045] The above one or more technical solutions in the embodiments of the present application have at least one of the following technical effects:

[0046] According to the stripe type of the first image to be processed, each unit image in the image to be processed is determined; the unit image is a single pixel row or a single pixel column; a target image block centered on each unit image is determined; each target image block is subjected to multiple filtering processes in multiple filtering directions according to multiple filtering templates to obtain a target stripe image corresponding to the unit image; according to the target stripe image corresponding to each unit image and the first image, a second image is obtained, so as to accurately determine the stripes corresponding to each unit image, and then accurately determine the stripe image corresponding to the first image.

[0047] Then, the pixel values ​​of the pixels in the first image and the second image are subjected to point-to-point difference processing to obtain the target image, thereby accurately removing the stripe non-uniform noise in the first image while retaining the image details.

[0048] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0050] Figure 1 This is one of the flowcharts of the image processing method provided in the embodiment of the present application;

[0051] Figure 2 This is the second flowchart of the image processing method provided in the embodiment of the present application;

[0052] Figure 3 is a scene schematic diagram of the image processing method provided in an embodiment of the present application;

[0053] Figure 4 is a structural schematic diagram of an image processing device provided in an embodiment of the present application;

[0054] Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0055] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0056] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0057] The image processing method, image processing device, electronic device and readable storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

[0058] The image processing method may be applied to a terminal, and may be specifically executed by hardware or software in the terminal.

[0059] The image processing method provided in the embodiment of the present application may be executed by an electronic device or a functional module or functional entity in the electronic device that can implement the image processing method. The electronic devices mentioned in the embodiment of the present application include but are not limited to mobile phones, tablet computers, computers, cameras, and wearable devices. The image processing method provided in the embodiment of the present application is described below using the electronic device as an example of the execution subject.

[0060] First, the relevant principles of the design of the embodiment of the present application are introduced:

[0061] Taking an image with vertical stripes as an example, the grayscale value of each pixel can be expressed as formula (1):

[0062] dg(i,j) f =d(i,j) f +sn(i,j) f +n(i,j) f (1)

[0063] Where, dg(i,j) in formula (1) f Represents the grayscale difference between the pixel at position (i, j) of the f-th frame image and its horizontally adjacent pixel; d(i, j) f sn(i,j) represents the grayscale difference caused by the details of the input image itself at the position (i,j) of the f-th frame image; f represents the grayscale difference caused by the vertical stripes at the position (i, j) of the f-th frame image, n(i, j) f Represents the grayscale difference caused by random noise at position (i, j) of the f-th frame image.

[0064] Since the amount of vertical lines in the same column of the image is relatively close, after the first filtering template performs the filtering operation, the difference in random noise can be ignored. It can be considered that the gray value at this point after filtering is the superposition of details and vertical line noise, see formula (2):

[0065]

[0066] Among them, m(j) in formula (2) f represents the gray value of the jth column on the fth frame, represents the average value of the details of the jth column on the fth frame, It represents the average value of vertical stripes in the jth column on the fth frame. When the grayscale values ​​of details in the same column are close, the difference between adjacent columns can be considered as the vertical stripe value.

[0067] At this time, the vertical stripes are represented as an additive noise, and the image I out (i,j) f It can be represented as the input image I in (i,j) f And the vertical grain amount of the corresponding point sn(i,j) f The difference is shown in formula (3):

[0068] I out (i,j) f =I in (i,j) f -sn(i,j) f (3)

[0069] Among them, I in formula (3) in (i,j) f Represents the pixel value of the pixel at position (i, j) in the input image, sn(i, j) f Indicates the vertical grain amount corresponding to the pixel at position (i, j); I out (i,j) f Represents the pixel value of the pixel at position i,j) after removing the vertical stripes.

[0070] like Figure 1 As shown, the image processing method includes: step 110, step 120, step 130, step 140 and step 150.

[0071] Step 110 : Determine each unit image in the image to be processed according to the stripe type of the first image to be processed; the unit image is a single pixel row or a single pixel column.

[0072] The first image I in the embodiment of the present application in It can be a single image, a video frame image, or a sub-image of an image, and there is no limitation on this.

[0073] The first image I to be processed in this embodiment of the present application in There is striped non-uniform noise, which may be at least one of horizontal stripes (abbreviated as "horizontal stripes") and vertical stripes (abbreviated as "vertical stripes"), that is, the stripe types include horizontal stripes and vertical stripes, and the first image includes at least one of horizontal stripes and vertical stripes.

[0074] Since the horizontal stripes in the same pixel row or the vertical stripes in the same pixel column are relatively close, a single pixel row can be used as a unit image when removing the horizontal stripes, and a single pixel column can be used as a unit image when removing the vertical stripes.

[0075] In this embodiment of the present application, the first image I is removed. in When the stripes are in Perform boundary expansion, expand m rows or m columns of pixels at each boundary according to requirements, and record the expanded image as I E ,Edge expansion strategies can use boundary replication expansion, boundary symmetric expansion, etc.

[0076] Each unit image can be determined from the first image based on the starting position, the ending position and the target step length. The starting position and the ending position can be set by the user, and the starting position can also be the first pixel row or the first pixel column of the default image. The target step length refers to the position difference between two adjacent unit images. The target step length is a positive integer not less than 1, usually any one of 1, 2 and 3.

[0077] Specifically, assuming that the resolution of the first image is N*M (N and M are both positive integers greater than 1), when the unit image is a single pixel row, the first pixel row can be the starting position, and the target step size is 1, then each unit image is the 0th pixel row, the 2nd pixel row, the 4th pixel row, ..., the nth pixel row, n<=N, and the distance between n and N is less than the target step size.

[0078] Similarly, when the unit image is a single pixel column, the first pixel column can be the starting position, and the target step size is 1. Then each unit image is the 0th pixel column, the 2nd pixel column, the 4th pixel column, ..., the nth pixel column, m<=M, and the distance between m and M is less than the target step size.

[0079] Step 120: Determine a target image block centered on each unit image.

[0080] For each unit image in the embodiment of the present application, it is necessary to determine a target image block centered on the unit image. The target image block usually includes at least 3 pixel rows or at least 3 pixel columns, and the number of pixel rows and pixel columns in the target image block is usually an odd number.

[0081] Specifically, for a certain pixel row A, the target image block with the pixel row as the center includes 5 pixel rows, and the pixel row A as the center is the 3rd pixel row among the 5 pixel rows; for example, for a certain pixel row B, the target image block with the pixel row as the center includes 7 pixel rows, and the pixel row B as the center is the 4th pixel row among the 7 pixel rows.

[0082] Similarly, for a certain pixel column C, the target image block centered on the pixel column includes 5 pixel columns, and the pixel column C as the center is the third pixel column among the 5 pixel columns.

[0083] Step 130 , performing multiple filtering processes on each target image block in multiple filtering directions according to multiple filtering templates to obtain a target stripe image corresponding to the unit image.

[0084] The filtering direction in the embodiment of the present application includes a first direction and a second direction.

[0085] In some embodiments, before filtering the target image block in the first direction based on the first filtering template, the method further includes:

[0086] The first direction and the second direction are determined based on:

[0087] In the case where the unit image is determined to be a single pixel row, the first direction is determined to be a horizontal direction and the second direction is determined to be a vertical direction;

[0088] In the case where the unit image is determined to be a single pixel column, the first direction is determined to be a vertical direction, and the second direction is determined to be a horizontal direction.

[0089] In an embodiment of the present application, a target image block can be filtered once in a first direction by a first filtering template to obtain a first smoothed image, and then the first smoothed image can be filtered once by a second filtering template and a third filtering template respectively to obtain a second smoothed image and a third smoothed image, wherein the third filtering template and the second filtering template have the same template type, and a filtering kernel size of the third filtering template is larger than a filtering kernel size of the second filtering template.

[0090] The first filter template, the third filter template and the third filter template can select a Gaussian template, a mean template or a median template, without limitation.

[0091] After obtaining the third smoothed image, the embodiment of the present application performs point-to-point difference processing on the pixel values ​​of the pixel points in the unit image and the third smoothed image to obtain the first fringe image;

[0092] The first fringe image is corrected according to the second smoothed image to obtain the target fringe image. The detailed process is shown in the subsequent content.

[0093] Step 140: Obtain a second image according to the target fringe images corresponding to each unit image and the first image.

[0094] After obtaining the target stripe images corresponding to all unit images, the embodiment of the present application can splice the corresponding target stripe images in a certain direction. Specifically, when the unit images are pixel rows, the target stripe images corresponding to the respective unit images can be spliced ​​in the vertical direction to obtain a third image; when the unit images are pixel columns, the target stripe images corresponding to the respective unit images can be spliced ​​in the horizontal direction to obtain a third image.

[0095] Since when the unit images are pixel rows, the number of pixel rows of all unit images is less than the number of all pixel rows contained in the first image to be processed, or when the unit images are pixel columns, the number of pixel columns of all unit images is less than the number of all pixel columns contained in the first image to be processed, then it can be determined that the number of pixel rows or pixel columns contained in the third image is less than the number of pixel rows or pixel columns contained in the first image. Therefore, it is necessary to perform interpolation processing on the third image to obtain the second image. Specifically, the third image can be interpolated using a Gaussian interpolation algorithm, a cubic interpolation algorithm, etc. to obtain the second image. The second image and the first image have the same size (or resolution).

[0096] Step 150: Perform point-to-point difference processing on the pixel values ​​of the pixels in the first image and the second image to obtain a target image.

[0097] Since the third image is obtained by sequentially stitching the target stripe images, and the second image is obtained by interpolating the third image, that is, the second image belongs to a complete stripe image, then the pixel values ​​of the pixels in the first image and the second image can be processed point-to-point, that is, the difference between the pixel values ​​of the pixels at the same position in the first image and the second image is calculated.

[0098] The embodiment of the present application performs point-to-point difference processing on the pixel values ​​of the pixels in the first image and the second image to obtain the target image I out , the target image is the infrared image after suppressing the stripe non-uniformity.

[0099] The embodiment of the present application determines each unit image in the image to be processed according to the stripe type of the first image to be processed; the unit image is a single pixel row or a single pixel column; a target image block centered on each unit image is determined; each target image block is subjected to multiple filtering processes in multiple filtering directions according to multiple filtering templates to obtain a target stripe image corresponding to the unit image; a second image is obtained based on the target stripe image corresponding to each unit image and the first image, so as to accurately determine the stripes corresponding to each unit image, and then accurately determine the stripe image corresponding to the first image, and then perform point-to-point difference processing on the pixel values ​​of the pixel points in the first image and the second image to obtain the target image, so as to accurately remove the stripe non-uniform noise in the first image while retaining the image details.

[0100] In some embodiments, performing multiple filtering processes on the target image block in multiple filtering directions according to multiple filtering templates to obtain a target stripe image corresponding to the unit image includes:

[0101] Filtering the target image block in a first direction based on a first filtering template to obtain a first smoothed image;

[0102] Filtering the first smoothed image in a second direction based on a second filtering template to obtain a second smoothed image; the first direction and the second direction intersect;

[0103] filtering the first smoothed image in the second direction based on the third filtering template to obtain a third smoothed image; the third filtering template and the second filtering template have the same template type, and the filtering kernel size of the third filtering template is larger than the filtering kernel size of the second filtering template;

[0104] Performing point-to-point difference processing on pixel values ​​of pixel points in the unit image and the third smoothed image to obtain a first fringe image;

[0105] The first fringe image is corrected according to the second smoothed image to obtain a target fringe image.

[0106] Specifically, when the unit image is a pixel row, if the target image block centered on the unit image is a row and b columns, then the first direction is the horizontal direction, the filter kernel of the first filter template is a row and 1 column, and the target image block is filtered in the first direction based on the first filter template to obtain a first smoothed image, the first smoothed image is 1 row and b columns, and the first filter template is an optional Gaussian template, a mean template or a median template. Taking the mean template as an example, the first smoothed image I s1 The corresponding expression is formula (4):

[0107]

[0108] Wherein, i and j in formula (4) are the positions in the first direction and the second direction respectively, represents the sliding window corresponding to the template, and N represents the number of pixels contained in the window.

[0109] When the unit image is a pixel column, if the target image block centered on the unit image is c rows and d columns, then the first direction is a vertical direction, the filter kernel of the first filter template is 1 row and d columns, and the target image block is filtered in the first direction based on the first filter template to obtain a first smoothed image, which is c rows and 1 column. Similarly, the first filter template is an optional Gaussian template, a mean template or a median template.

[0110] After obtaining the first smoothed image, the first smoothed image needs to be further filtered in the second direction, and the second direction intersects with the first direction. Specifically, the second direction and the first direction are in a perpendicular relationship. The first smoothed image can be filtered in the second direction based on the second filtering template and the third filtering template to obtain the second smoothed image and the third smoothed image respectively.

[0111] The third filter template and the second filter template have the same template type, for example, both are Gaussian templates, and the filter kernel size of the third filter template is larger than the filter kernel size of the second filter template. In comparison, the third filter template can remove more image noise.

[0112] When the unit image is a pixel row, the second direction is a vertical direction, and the second filter template can be 1 row and k columns, where k is less than the number of columns of the target image block; the third filter template can be 1 row and f columns, where f is less than the number of columns of the target image block, and k is less than f.

[0113] When the unit image is a pixel column, the second direction is the horizontal direction, and the second filter template can be p rows and 1 column, where p is less than the number of rows of the target image block; the third filter template can be q rows and 1 column, where q is less than the number of rows of the target image block, and p is less than q.

[0114] After obtaining the third smoothed image, the embodiment of the present application performs point-to-point difference processing on the pixel values ​​of the pixel points in the unit image and the third smoothed image to obtain the first fringe image.

[0115] Specifically, the point-to-point difference processing can be performed using the following formula (5):

[0116] I stp1 (j) = I cur (j)-I s3 (j) (5),

[0117] Among them, I in formula (5) cur (j) represents the pixel at the jth position in the unit image, I s3(j) represents the pixel at the jth position in the unit image, I stpl (j) represents the difference between the pixel values ​​of the pixel point at the same position j in the third smoothed image and the unit image.

[0118] After obtaining the first fringe image, the embodiment of the present application corrects the first fringe image according to the second smoothed image to obtain the target fringe image.

[0119] In some embodiments, the first fringe image is corrected according to the unit image second smoothed image, including:

[0120] setting at least one first window in the second smoothed image;

[0121] Determine a first gradient relationship between pixel values ​​of pixel points on the left side of the window center of the first window, and a second gradient relationship between pixel values ​​of pixel points on the right side;

[0122] When it is determined that the first gradient relationship and / or the second gradient relationship satisfies the target gradient relationship, a second window having the same position as the first window is set in the first fringe image; the target gradient relationship is an increasing relationship or a decreasing relationship; and the target pixel value is 0.

[0123] In the first fringe image, the pixel values ​​of the left pixel points and / or the right pixel points of the window center of each second window are corrected to the target pixel values.

[0124] In the embodiment of the present application, the first window Ψ belongs to a preset sliding window, the center point of the second smoothed image in the window is denoted as s, and the pixel values ​​on the left and right sides of the window center are grayl and grayr respectively. If the gradient on the left side of the window center keeps increasing / decreasing, let grayl=0. Similarly, if the gradient on the right side of the window center keeps increasing / decreasing, let grayr=0.

[0125] In some embodiments, obtaining the second image according to the target stripe image corresponding to each unit image and the first image includes:

[0126] Sequentially stitching the target fringe images corresponding to the unit images to obtain a third image;

[0127] Get the size of the first image;

[0128] According to the size of the first image, the third image is interpolated to obtain the second image.

[0129] In the embodiment of the present application, for each unit image, a corresponding target stripe image can be obtained based on the above-mentioned method, and the target stripe images corresponding to the unit images are spliced ​​in sequence to obtain a third image. The number of pixel rows or pixel columns included in the third image is less than the number of pixel rows or pixel columns included in the first image. Therefore, it is necessary to interpolate the third image to obtain the second image. Specifically, the third image can be interpolated using a Gaussian interpolation algorithm, a cubic interpolation algorithm, etc. to obtain the second image. The second image and the first image have the same size (or resolution).

[0130] The third image may be interpolated according to the size of the first image to obtain the second image, so that the second image and the first image have the same size.

[0131] like Figure 2 As shown, the second flowchart of the image processing method provided in the embodiment of the present application includes the following steps 201 to 213:

[0132] Step 201, acquiring a first image;

[0133] Step 202, performing boundary extension on the first image;

[0134] Step 203, determining each unit image in the image to be processed according to the stripe type of the first image to be processed, where the unit image is a single pixel row or a single pixel column;

[0135] Step 204, determining a target image block centered on each unit image;

[0136] Step 205, for each target image block of the unit image, filtering the target image block in a first direction based on a first filtering template to obtain a first smoothed image;

[0137] Step 206, filtering the first smoothed image in a second direction based on a second filtering template to obtain a second smoothed image; the first direction and the second direction intersect;

[0138] Step 207, filtering the first smoothed image in the second direction based on the third filtering template to obtain a third smoothed image; the third filtering template and the second filtering template have the same template type, and the filtering kernel size of the third filtering template is larger than the filtering kernel size of the second filtering template;

[0139] Step 208, performing point-to-point difference processing on the pixel values ​​of the pixel points in the unit image and the third smoothed image to obtain a first fringe image;

[0140] Step 209, correcting the first fringe image according to the second smoothed image to obtain a target fringe image;

[0141] Step 210, sequentially stitching the target fringe images corresponding to the unit images to obtain a third image;

[0142] Step 211, interpolating the third image according to the size of the first image to obtain a second image;

[0143] Step 212: performing point-to-point difference processing on the pixel values ​​of the pixels in the first image and the second image to obtain a target image.

[0144] The detailed implementation process of the above steps 211 to 212 can be found in the above embodiments and will not be described again here.

[0145] like Figure 3 , which is a schematic diagram of a scenario of an image processing method provided by an embodiment of the present application. In this scenario, the first image to be processed includes vertical stripes, and the unit image of the first image is a pixel row, including pixel row 0, pixel row 2, pixel row 4, ..., and the following operations are performed for each pixel row:

[0146] A target image block centered on a pixel row is determined, wherein pixel row 0, pixel row 2, pixel row 4, ... correspond to target image blocks 1, image block 2, image block 3, ... respectively.

[0147] For any target image block, filtering the target image block in a horizontal direction based on a first filtering template to obtain a first smoothed image;

[0148] filtering the first smoothed image in a vertical direction based on a second filtering template to obtain a second smoothed image; the first direction and the second direction intersect;

[0149] filtering the first smoothed image in the second direction based on the third filtering template to obtain a third smoothed image; the third filtering template and the second filtering template have the same template type, and the filtering kernel size of the third filtering template is larger than the filtering kernel size of the second filtering template;

[0150] Performing point-to-point difference processing on pixel values ​​of pixel points in the unit image and the third smoothed image to obtain a first fringe image;

[0151] The first fringe image is corrected according to the second smoothed image to obtain a target fringe image.

[0152] The target stripe images corresponding to pixel row 0, pixel row 2, pixel row 4, ... are target stripe image 1, target stripe image 2, target stripe image 3, ... respectively.

[0153] splicing the target fringe images to obtain a third image;

[0154] performing interpolation processing on the third image to obtain a second image;

[0155] The pixel values ​​of the pixels in the first image and the second image are subjected to point-to-point difference processing to obtain a target image.

[0156] The detailed implementation of the above process can be found in the above embodiments, which will not be described in detail here.

[0157] The image processing method provided in the embodiment of the present application can be executed by an image processing device. In the embodiment of the present application, an image processing device executing the image processing method is taken as an example to illustrate the image processing device provided in the embodiment of the present application.

[0158] The embodiment of the present application also provides an image processing device.

[0159] like Figure 4 As shown, the image processing device includes: a first processing module 410 , a second processing module 420 , a third processing module 430 , a fourth processing module 440 and a fifth processing module 450 .

[0160] The first processing module 410 is used to determine each unit image in the image to be processed according to the stripe type of the first image to be processed; the unit image is a single pixel row or a single pixel column;

[0161] The second processing module 420 determines a target image block centered on each unit image;

[0162] The third processing module 430 performs multiple filtering processes on each target image block in multiple filtering directions according to multiple filtering templates to obtain a target stripe image corresponding to the unit image;

[0163] A fourth processing module 440 obtains a second image according to the target fringe image corresponding to each unit image and the first image;

[0164] The fifth processing module 450 performs point-to-point difference processing on the pixel values ​​of the pixels in the first image and the second image to obtain a target image.

[0165] According to the image processing device of the present application, each unit image in the image to be processed is determined according to the stripe type of the first image to be processed; the unit image is a single pixel row or a single pixel column; a target image block centered on each unit image is determined; each target image block is subjected to multiple filtering processes in multiple filtering directions according to multiple filtering templates to obtain a target stripe image corresponding to the unit image; a second image is obtained based on the target stripe image corresponding to each unit image and the first image, so as to accurately determine the stripes corresponding to each unit image, and then accurately determine the stripe image corresponding to the first image, and then perform point-to-point difference processing on the pixel values ​​of the pixel points in the first image and the second image to obtain the target image, so as to accurately remove the stripe non-uniform noise in the first image while retaining the image details.

[0166] In some embodiments, the third processing module includes:

[0167] A first processing submodule, configured to filter the target image block in a first direction based on a first filtering template to obtain a first smoothed image;

[0168] A second processing submodule is used to filter the first smoothed image in a second direction based on a second filtering template to obtain a second smoothed image; the first direction and the second direction intersect;

[0169] A third processing submodule is used to filter the first smoothed image in a second direction based on a third filtering template to obtain a third smoothed image; the third filtering template and the second filtering template have the same template type, and the filtering kernel size of the third filtering template is larger than the filtering kernel size of the second filtering template;

[0170] A fourth processing submodule, used for performing point-to-point difference processing on pixel values ​​of pixel points in the unit image and the third smoothed image to obtain a first fringe image;

[0171] The fifth processing submodule is used to correct the first fringe image according to the second smoothed image to obtain a target fringe image.

[0172] In some embodiments, the fifth processing submodule is specifically configured to:

[0173] setting at least one first window in the second smoothed image;

[0174] Determine a first gradient relationship between pixel values ​​of pixel points on the left side of the window center of the first window, and a second gradient relationship between pixel values ​​of pixel points on the right side;

[0175] When it is determined that the first gradient relationship and / or the second gradient relationship satisfies the target gradient relationship, setting a second window at the same position as the first window in the first fringe image;

[0176] In the first fringe image, the pixel values ​​of the left pixel points and / or the right pixel points of the window center of each second window are corrected to the target pixel values.

[0177] According to an embodiment of the present application, the target gradient relationship is an increasing relationship or a decreasing relationship; the target pixel value is 0.

[0178] According to one embodiment of the present application, the image processing device further includes:

[0179] A sixth processing module is configured to determine the first direction and the second direction based on the following method:

[0180] In the case where the unit image is determined to be a single pixel row, the first direction is determined to be a horizontal direction and the second direction is determined to be a vertical direction;

[0181] In the case where the unit image is determined to be a single pixel column, the first direction is determined to be a vertical direction, and the second direction is determined to be a horizontal direction.

[0182] In some embodiments, the fourth processing module is specifically configured to:

[0183] Sequentially stitching the target fringe images corresponding to the unit images to obtain a third image;

[0184] Get the size of the first image;

[0185] According to the size of the first image, the third image is interpolated to obtain the second image.

[0186] In some embodiments, the first processing module is specifically configured to include:

[0187] When it is determined that the stripe type of the first image is a vertical stripe, determining the unit image is a single pixel row;

[0188] When it is determined that the stripe type of the first image is a horizontal stripe, the unit image is determined to be a single pixel column.

[0189] The image processing device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0190] The image processing device in the embodiment of the present application may be a device having an operating system. The operating system may be a Microsoft (Windows) operating system, an Android (Android) operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0191] The image processing device provided in the embodiment of the present application can achieve Figures 1 to 3 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0192] In some embodiments, Figure 5 As shown, an embodiment of the present application also provides an electronic device 500, including a processor 501, a memory 502, and a computer program stored in the memory 502 and executable on the processor 501. When the program is executed by the processor 501, each process of the above-mentioned image processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0193] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0194] An embodiment of the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned image processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0195] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0196] An embodiment of the present application also provides a computer program product, including a computer program, which implements the above-mentioned image processing method when executed by a processor.

[0197] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0198] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned image processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0199] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0200] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0201] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0202] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

[0203] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" 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 application. In this specification, the schematic representation of the above terms does 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.

[0204] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.

Claims

1. An image processing method, characterized in that: include: Determining each unit image in the image to be processed according to the stripe type of the first image to be processed; The unit image is a single pixel row or a single pixel column; Determine a target image block centered on each of the unit images; Performing multiple filtering processes on each of the target image blocks in multiple filtering directions according to multiple filtering templates to obtain a target stripe image corresponding to the unit image; Obtaining a second image according to the target stripe images corresponding to each unit image and the first image; Performing point-to-point difference processing on pixel values ​​of pixel points in the first image and the second image to obtain a target image.

2. The image processing method according to claim 1, characterized in that: The step of performing multiple filtering processes on the target image block in multiple filtering directions according to multiple filtering templates to obtain the target stripe image corresponding to the unit image includes: Filtering the target image block in a first direction based on a first filtering template to obtain a first smoothed image; filtering the first smoothed image in a second direction based on a second filtering template to obtain a second smoothed image; the first direction and the second direction intersect; filtering the first smoothed image in the second direction based on a third filtering template to obtain a third smoothed image; the third filtering template and the second filtering template have the same template type, and a filtering kernel size of the third filtering template is larger than a filtering kernel size of the second filtering template; Performing point-to-point difference processing on pixel values ​​of pixel points in the unit image and the third smoothed image to obtain a first fringe image; The first fringe image is corrected according to the second smoothed image to obtain the target fringe image.

3. The image processing method according to claim 2, characterized in that: The correcting the first fringe image according to the second smoothed image comprises: setting at least one first window in the second smoothed image; Determine a first gradient relationship between pixel values ​​of pixel points on the left side of the window center of the first window, and a second gradient relationship between pixel values ​​of pixel points on the right side; When it is determined that the first gradient relationship and / or the second gradient relationship satisfies a target gradient relationship, setting a second window at the same position as the first window in the first fringe image; In the first fringe image, the pixel values ​​of the left pixel points and / or the right pixel points of the window center of each of the second windows are corrected to the target pixel values.

4. The image processing method according to claim 3, characterized in that: The target gradient relationship is an increasing relationship or a decreasing relationship; the target pixel value is 0.

5. The image processing method according to claim 2, characterized in that: Before filtering the target image block in the first direction based on the first filtering template, the method further includes: The first direction and the second direction are determined based on the following method: In the case where it is determined that the unit image is a single pixel row, determining that the first direction is a horizontal direction and the second direction is a vertical direction; In the case where the unit image is determined to be a single pixel column, the first direction is determined to be a vertical direction and the second direction is determined to be a horizontal direction.

6. The image processing method according to any one of claims 1 to 5, characterized in that: The step of obtaining a second image according to the target fringe images corresponding to each unit image and the first image comprises: Sequentially stitching the target fringe images corresponding to the unit images to obtain a third image; Get the size of the first image; The third image is interpolated according to the size of the first image to obtain the second image.

7. The image processing method according to any one of claims 1 to 5, characterized in that: The step of determining each unit image in the image to be processed according to the stripe type of the first image to be processed comprises: When it is determined that the stripe type of the first image is vertical stripes, determining that the unit image is a single pixel row; When it is determined that the stripe type of the first image is horizontal stripes, the unit image is determined to be a single pixel column.

8. An image processing device, characterized in that: include: A first processing module, used for determining each unit image in the first image to be processed according to the stripe type of the first image to be processed; The unit image is a single pixel row or a single pixel column; A second processing module determines a target image block centered on each of the unit images; A third processing module performs multiple filtering processes on each of the target image blocks in multiple filtering directions according to multiple filtering templates to obtain a target stripe image corresponding to the unit image; A fourth processing module, obtaining a second image according to the target stripe image corresponding to each unit image and the first image; The fifth processing module performs point-to-point difference processing on the pixel values ​​of the pixels in the first image and the second image to obtain a target image.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the image processing method according to any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the image processing method according to any one of claims 1 to 7 is implemented.