Stripe noise simulation method and device, electronic equipment and storage medium
By analyzing the stripe noise characteristics in the image, building and splicing simulated stripe noise pixel units, the problem of stripe noise removal in the prior art and inaccurate data set simulation problems are solved, and efficient stripe noise simulation and image processing are achieved.
Patent Information
- Application Number
- CN202411627680.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-11-14
AI Technical Summary
The prior art is difficult to effectively remove stripe noise in images, especially when image enhancement and sharpening processing, which can easily damage other texture details, and the simulation form of existing data sets is single and not accurate enough.
By acquiring and analyzing the real stripe noise in the image to be processed, obtaining its length and pixel value range, building a simulated stripe noise pixel unit, and splicing it into a stripe noise simulation image, simulating complex and diverse stripe noise patterns.
Accurate simulation of stripe noise is achieved to avoid damage to other texture details, and a large number of stripe noise data sets can be used to simulate a near-real stripe noise pattern.
Smart Images

Figure CN119130854A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image processing, and in particular relates to a method, a device, an electronic device and a storage medium for simulating stripe noise. Background Art
[0002] In practical applications, images and videos are prone to artifacts after various processing, which deteriorates the visual experience. Artifacts in the form of stripes are a common and difficult type of noise. This noise is difficult to eliminate or suppress using conventional denoising methods. When conventional algorithms such as image enhancement and image sharpening are used to process images containing stripe noise, the stripes will also be magnified at the same time, seriously affecting the image quality. If the denoising is violently removed by increasing the denoising strength of conventional denoising algorithms, other texture details of the image and video will inevitably be damaged.
[0003] At present, the commonly used stripe noise removal methods mainly include: filtering-based methods, statistics-based methods and model optimization-based methods. In recent years, with the rapid development of deep learning technology, deep learning technology has been used more and more to remove stripe noise, and has achieved good results. However, deep learning methods also have their own defects. The technology has very strict requirements on data sets and loss functions. Using low-quality training sets to train network models will not achieve the expected results. There are problems such as simultaneous removal of texture details, which causes distortion of processed images. In practical applications, the stripe noise in images has rich forms. Different shooting conditions and different image contents will cause large differences in the forms of stripe noise in images. In the process of stripe removal, the more complex the stripe form, the more serious the information loss and degradation in the processing results. However, the data sets related to stripe noise still have problems such as single simulation form of stripes and insufficient simulation accuracy.
[0004] Therefore, it is very necessary to perform accurate morphological simulation of stripe noise, which can enable the algorithms we design, especially deep learning networks, to more accurately identify this stripe noise and process it in a targeted manner, thereby avoiding damage to other texture details as much as possible. Summary of the invention
[0005] Since the existing methods have the above problems, the embodiments of the present invention provide a method, device, electronic device and storage medium for simulating stripe noise.
[0006] Specifically, the embodiment of the present invention provides the following technical solutions:
[0007] In a first aspect, an example of the present invention provides a method for simulating stripe noise, comprising:
[0008] The real stripe noise in the image to be processed is collected and analyzed to obtain characteristic information of the real stripe noise, and then a simulated stripe noise pixel unit is constructed according to the characteristic information of the real stripe, and the simulated stripe noise pixel units are spliced to obtain a stripe noise simulated image.
[0009] The characteristic information of the real stripe noise includes: the length range of the real stripe noise and the pixel value range of the real stripe noise.
[0010] In a second aspect, an embodiment of the present invention provides a stripe noise simulation device, comprising:
[0011] The acquisition and analysis module is used to acquire and analyze the real stripe noise in the image to be processed to obtain characteristic information of the real stripe noise.
[0012] The characteristic information of the real stripe noise includes: the length range of the real stripe noise and the pixel value range of the real stripe noise.
[0013] The first construction module is used to construct a simulated stripe noise pixel unit according to the characteristic information of the real stripe.
[0014] The second building module is used to splice the simulated stripe noise pixel units to obtain a stripe noise simulated image.
[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored on and executable on the processor, wherein when the processor executes the computer program, the method for simulating striped noise as described in the first aspect is implemented.
[0016] In a fourth aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the stripe noise simulation method as described in the first aspect.
[0017] It can be seen from the above technical solutions that the stripe noise simulation method provided by the embodiment of the present invention simulates the real stripe noise form of the image to be processed, and solves the problems of the existing stripe noise-related data sets, such as the single simulation form and the imprecise simulation. In addition, the stripe noise simulation method provided by the embodiment of the present invention can simulate complex and diverse stripe noise forms that are close to the real one without collecting a large number of stripe noise data sets. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and ordinary technicians in this field can also obtain other drawings based on these drawings without paying creative work.
[0019] Figure 1 The present invention is a flowchart of a stripe noise simulation method provided by an embodiment of the present invention.
[0020] Figure 2 A schematic diagram of confirming the location of simulated stripe noise in the simulated stripe noise pixel unit memory provided by an embodiment of the present invention.
[0021] Figure 3 A schematic diagram of confirming the location of simulated stripe noise in the simulated stripe noise pixel unit memory provided by another embodiment of the present invention.
[0022] Figure 4 This is a striped noise simulation image constructed using an embodiment of the present invention.
[0023] Figure 5 A flowchart of a stripe noise simulation method provided by another embodiment of the present invention.
[0024] Figure 6 This is a new stripe noise simulation image constructed using an embodiment of the present invention.
[0025] Figure 7 A schematic diagram of a stripe noise simulation device provided by an embodiment of the present invention.
[0026] Figure 8 A schematic diagram of a stripe noise simulation device provided by another embodiment of the present invention.
[0027] Fig. 9 A structural diagram of an electronic device provided in one embodiment of the present invention. DETAILED DESCRIPTION
[0028] The specific implementation of the present invention is further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.
[0029] Figure 1 FIG. 4 is a flow chart showing a method for simulating stripe noise according to an embodiment of the present invention. Figure 1 As shown, the method for simulating stripe noise provided by the embodiment of the present invention specifically includes the following contents:
[0030] Step 1: collect and analyze real stripe noise in the image to be processed to obtain feature information of the real stripe noise.
[0031] The characteristic information of the real stripe noise includes: the length range of the real stripe noise and the pixel value range of the real stripe noise.
[0032] The length range of the real stripe noise is collected and analyzed, including:
[0033] The image to be processed is low-pass filtered to obtain a filtered image of the image to be processed.
[0034] A pixel difference is obtained according to the filtered image and the image to be processed.
[0035] The range of the pixel difference is obtained by statistics.
[0036] The distribution position of the real stripe noise in the image to be processed is located according to the range of the pixel difference, the length of the real stripe noise is calculated, and then the length range of the real stripe noise is statistically calculated.
[0037] In this step, it can be understood that the stripe noise has a characteristic of a more prominent visual effect. Compared with the background image, the stripe noise has an obvious jump in pixel value, so the length range of the stripe noise can be counted by the pixel value of the stripe noise. The embodiment of the present invention does not limit the pixel value format, and can be represented in YUV format or RGB format. When the YUV format is used, since the stripe noise usually exists in the Y channel, for the sake of simplicity of calculation, only the Y channel pixel value can be used.
[0038] The pixel value range of the real stripe noise is collected and analyzed, including:
[0039] The image to be processed is low-pass filtered to obtain a filtered image of the image to be processed.
[0040] A pixel difference is obtained according to the filtered image and the image to be processed.
[0041] The pixel value range of the real stripe noise in the image to be processed is counted according to the pixel difference.
[0042] A continuous and smooth curve is fitted according to the pixel value range of the real stripe noise in the image to be processed.
[0043] The value range of the pixel value variable in the continuous and smooth curve is the pixel value range of the real stripe noise.
[0044] The types of the continuous and smooth curves include: trigonometric function curves, Fourier curves, Bessel curves, and Legendre curves.
[0045] In this step, it should be noted that the embodiment of the present invention does not limit the pixel value format, and can be represented in YUV format or RGB format. When the YUV format is used, since stripe noise usually exists in the Y channel, for the sake of calculation simplicity, only the Y channel pixel value can be used.
[0046] Step 2: constructing a simulated stripe noise pixel unit according to the characteristic information of the real stripe.
[0047] Step 21, prepare 2N simulated stripe noise pixel unit memories.
[0048] In one embodiment, the stripe noise in the image to be processed includes horizontal stripe noise, then the horizontal length of the simulated stripe noise pixel unit memory is equal to the horizontal side length of the image to be processed, and the vertical length of the simulated stripe noise pixel unit memory is y i .
[0049] in, , h is the vertical length of the image to be processed, and N is a positive integer.
[0050] It should be noted that in this step, the embodiment of the present invention does not limit the specific vertical length of the simulated stripe noise pixel unit memory, and can be set according to actual needs. Based on experience, the embodiment of the present invention recommends setting the vertical length of the simulated stripe noise pixel unit memory to 1 or 2.
[0051] In another embodiment, the stripe noise in the image to be processed includes vertical stripe noise, then the vertical length of the simulated stripe noise pixel unit memory is equal to the vertical length of the image to be processed, and the horizontal length is x i。
[0052] in, , w is the horizontal length of the image to be processed, and N is a positive integer.
[0053] It should be noted that in this step, the embodiment of the present invention does not limit the specific horizontal length of the simulated stripe noise pixel unit memory, and can be set according to actual needs. Based on experience, the embodiment of the present invention recommends setting the horizontal length of the simulated stripe noise pixel unit memory to 1 or 2.
[0054] Step 22: determining the position of the simulated stripe noise in the simulated stripe noise pixel unit memory according to the length range of the real stripe noise.
[0055] Figure 2 FIG. 1 is a schematic diagram showing a method of determining the position of the simulated stripe noise in the simulated stripe noise pixel unit memory according to an embodiment of the present invention. Figure 2 As shown, in one embodiment, determining the position of the simulated stripe noise in the simulated stripe noise pixel unit memory according to the length range of the real stripe noise includes:
[0056] Randomly select the length of the simulated fringe noise to be constructed.
[0057] The position of the simulated stripe noise to be constructed in the simulated stripe noise pixel unit memory is randomly selected according to the length of the simulated stripe noise.
[0058] The length of the simulated stripe noise does not exceed the length range of the real stripe noise, and there is at least one pixel position between two simulated stripe noises.
[0059] Figure 3 FIG. 4 is a schematic diagram showing a method of determining the position of the simulated stripe noise in the simulated stripe noise pixel unit memory in another embodiment of the present invention. Figure 3 As shown, in another embodiment, the determining the position of the simulated stripe noise in the simulated stripe noise pixel unit memory according to the length range of the real stripe noise further includes:
[0060] The 2N simulated stripe noise pixel unit memories are divided into N groups of simulated stripe noise pixel unit memory pairs, each group of the simulated stripe noise pixel unit memory pairs includes a first simulated stripe noise pixel unit memory and a second simulated stripe noise pixel unit memory.
[0061] The simulated stripe noise pixel unit memory pairs of the i-th group are randomly divided into m groups along the long side direction. i segments, and the length of the jth segment is m ij。
[0062] Among them, m ij Do not exceed the length range of the real stripe noise.
[0063] In each group of the simulated stripe noise pixel unit memory pairs, select p in the odd-numbered segment in the first simulated stripe noise pixel unit memory. ij %m ij The length position is taken as the position of the simulated stripe noise, and q in the even segment is selected in the second simulated stripe noise pixel unit memory. ij %m ij The length position is taken as the position where the simulated stripe noise is located.
[0064] Among them, 0<p ij ≤ 100, 0<q ij ≤ 100.
[0065] Step 23, determining the pixel value of the simulated stripe noise in the simulated stripe noise pixel unit memory according to the pixel value range of the real stripe noise, and obtaining a simulated stripe noise pixel unit.
[0066] The step of determining the pixel value of the simulated stripe noise in the simulated stripe noise pixel unit memory according to the pixel value range of the real stripe noise comprises:
[0067] Continuous pixel values within the pixel value range of the real stripe noise are randomly selected to fill the pixel value at the position where the simulated stripe noise is located.
[0068] Furthermore, in order to be closer to the stripe noise characteristics of a real image, in addition to filling the pixel values at the position where the simulated stripe noise is located, the pixel values of the non-stripe noise position in the simulated stripe noise pixel unit may also be filled.
[0069] The method for determining the pixel value of the non-stripe noise position in the simulated stripe noise pixel unit is similar to the method for determining the pixel value of the stripe noise position in the simulated stripe noise pixel unit, including:
[0070] The pixel value range of the non-stripe noise area is collected and analyzed.
[0071] The image to be processed is low-pass filtered to obtain a filtered image of the image to be processed.
[0072] A pixel difference is obtained according to the filtered image and the image to be processed.
[0073] The pixel value range of the non-stripe noise area in the image to be processed is counted according to the pixel difference.
[0074] A continuous and smooth curve is fitted according to the pixel value range of the non-stripe noise area in the image to be processed.
[0075] The value range of the pixel value variable of the continuous and smooth curve is the pixel value range of the non-stripe noise area.
[0076] The types of the continuous and smooth curves include: trigonometric function curves, Fourier curves, Bessel curves, and Legendre curves.
[0077] Continuous pixel values within the non-stripe noise pixel value range are randomly selected to perform pixel value filling on the non-stripe noise position within the simulated stripe noise pixel unit.
[0078] In this step, it should be noted that the pixel values at the non-stripe noise position and the pixel values at the stripe noise position are opposite in sign.
[0079] Step 3: splicing the simulated stripe noise pixel units to obtain a stripe noise simulated image.
[0080] In one embodiment, the simulated stripe noise pixel units are in a horizontal direction, and then the simulated stripe noise pixel units are spliced to obtain a stripe noise simulated image, including:
[0081] The stripe noise pixel units are spliced along the vertical direction, and the parts larger than the vertical side length of the image to be processed are cut off to obtain the stripe noise simulation image.
[0082] The horizontal direction of the simulated stripe noise pixel unit means that the horizontal length of the simulated stripe noise pixel unit is equal to the horizontal side length of the image to be processed.
[0083] In another embodiment, the simulated stripe noise pixel units are in a vertical direction, and then the simulated stripe noise pixel units are spliced to obtain a stripe noise simulated image, including:
[0084] The stripe noise pixel units are spliced in the horizontal direction, and the parts larger than the horizontal side length of the image to be processed are cut off to obtain the stripe noise simulation image.
[0085] The simulated stripe noise pixel unit is in a vertical direction, which means that the vertical length of the simulated stripe noise pixel unit is equal to the vertical side length of the image to be processed.
[0086] Figure 4 FIG. 4 shows a striped noise simulation image constructed according to an embodiment of the present invention.
[0087] Furthermore, in order to simulate more complex stripe noise forms, after the simulated stripe noise pixel units are spliced to obtain a stripe noise simulation image, it also includes intercepting a target stripe noise area in the stripe noise simulation image to construct a new stripe noise simulation image. Figure 5 A flow chart of a stripe noise simulation method provided by another embodiment of the present invention is shown.
[0088] The method of intercepting a target stripe noise region in the stripe noise simulation image and constructing a new stripe noise simulation image includes:
[0089] Get the solid color background image.
[0090] The size of the pure color background image is consistent with the size of the image to be processed, and each pixel value is the same determined value.
[0091] It is understandable that the pure color background image is only used as a container for carrying the constructed stripe noise. In the embodiment of the present invention, there is no restriction on the specific pixel value of the pure color background image, which is set according to the actual situation. However, in order to improve the effect, it is recommended that the pixel value of the pure color background image be set to be close to the background pixel value of the area containing real stripe noise in the image to be processed in the actual scene.
[0092] One or more target stripe noise regions are intercepted from the M stripe noise simulation images.
[0093] It can be understood that in this step, there is no restriction on the value of M. The larger the value of M, the larger the sample size. However, there are also challenges to the computer's computing power. In practical applications, the value of M can be set based on the requirements for sample size and the computer's own computing power.
[0094] The pixel values of the target stripe noise area are superimposed with the pixel values of the pure color background image to obtain a new stripe noise simulation image.
[0095] Figure 6 A new stripe noise simulation image constructed according to another embodiment of the present invention is shown.
[0096] It should be noted that in this step, there is no restriction on the selection of the size and position of the target stripe noise region, and the selection can be made according to the actual stripe noise form and distribution of the image to be processed.
[0097] For example, if the real stripe noise of the image to be processed is horizontal stripes with denser and shorter stripes, then the target stripe noise region selected from the stripe noise simulation image is a region with horizontal stripes with denser and shorter stripe noise.
[0098] For another example, if the real stripe noise of the image to be processed is vertical stripes that are sparse and long, then the target stripe noise area selected from the stripe noise simulation image is an area with vertical stripes that are sparse and long.
[0099] For another example, if the real stripe noise of the image to be processed is a fusion of horizontal and vertical stripes, then a horizontal stripe noise area and a vertical stripe noise area are selected from the stripe noise simulation image, and then the horizontal stripe noise area and the vertical stripe noise area are layered, and the new horizontal and vertical fused stripe noise area is the target stripe noise area.
[0100] In this step, when multiple target stripe noise areas are superimposed on the pure color background image, the relative position relationship between any two target stripe noise areas may be non-intersection, adjacent, partially overlapping, or completely overlapping, and the embodiment of the present invention does not impose any limitation.
[0101] Figure 7 FIG. 4 is a schematic diagram showing a device for simulating stripe noise provided by an embodiment of the present invention. Figure 7 As shown, the stripe noise simulation device provided by the embodiment of the present invention specifically includes the following contents:
[0102] The acquisition and analysis module is used to acquire and analyze the real stripe noise in the image to be processed to obtain characteristic information of the real stripe noise.
[0103] The characteristic information of the real stripe noise includes: the length range of the real stripe noise and the pixel value range of the real stripe noise.
[0104] The length range of the real stripe noise is collected and analyzed, including:
[0105] The image to be processed is low-pass filtered to obtain a filtered image of the image to be processed.
[0106] A pixel difference is obtained according to the filtered image and the image to be processed.
[0107] The range of the pixel difference is obtained by statistics.
[0108] The distribution position of the real stripe noise in the image to be processed is located according to the range of the pixel difference, the length of the real stripe noise is calculated, and then the length range of the real stripe noise is statistically calculated.
[0109] In this step, it can be understood that the stripe noise has a characteristic of a more prominent visual effect. Compared with the background image, the stripe noise has an obvious jump in pixel value, so the length range of the stripe noise can be counted by the pixel value of the stripe noise. The embodiment of the present invention does not limit the pixel value format, and can be represented in YUV format or RGB format. When the YUV format is used, since the stripe noise usually exists in the Y channel, for the sake of simplicity of calculation, only the Y channel pixel value can be used.
[0110] The pixel value range of the real stripe noise is collected and analyzed, including:
[0111] The image to be processed is low-pass filtered to obtain a filtered image of the image to be processed.
[0112] A pixel difference is obtained according to the filtered image and the image to be processed.
[0113] The pixel value range of the real stripe noise in the image to be processed is counted according to the pixel difference.
[0114] A continuous and smooth curve is fitted according to the pixel value range of the real stripe noise in the image to be processed.
[0115] The value range of the pixel value variable in the continuous and smooth curve is the pixel value range of the real stripe noise.
[0116] The types of the continuous and smooth curves include: trigonometric function curves, Fourier curves, Bessel curves, and Legendre curves.
[0117] In this step, it should be noted that the embodiment of the present invention does not limit the pixel value format, and can be represented in YUV format or RGB format. When the YUV format is used, since stripe noise usually exists in the Y channel, for the sake of calculation simplicity, only the Y channel pixel value can be used.
[0118] The first construction module is used to construct a simulated stripe noise pixel unit according to the characteristic information of the real stripe.
[0119] The step of constructing a simulated stripe noise pixel unit according to the characteristic information of the real stripe comprises:
[0120] Prepare 2N simulated stripe noise pixel unit memories.
[0121] In one embodiment, the stripe noise in the image to be processed includes horizontal stripe noise, then the horizontal length of the simulated stripe noise pixel unit memory is equal to the horizontal side length of the image to be processed, and the vertical length of the simulated stripe noise pixel unit memory is y i .
[0122] in, , h is the vertical length of the image to be processed, and N is a positive integer.
[0123] It should be noted that in this step, the embodiment of the present invention does not limit the specific vertical length of the simulated stripe noise pixel unit memory, and can be set according to actual needs. Based on experience, the embodiment of the present invention recommends setting the vertical length of the simulated stripe noise pixel unit memory to 1 or 2.
[0124] In another embodiment, the stripe noise in the image to be processed includes vertical stripe noise, then the vertical length of the simulated stripe noise pixel unit memory is equal to the vertical length of the image to be processed, and the horizontal length is x i。
[0125] in, , w is the horizontal length of the image to be processed, and N is a positive integer.
[0126] It should be noted that in this step, the embodiment of the present invention does not limit the specific horizontal length of the simulated stripe noise pixel unit memory, and can be set according to actual needs. Based on experience, the embodiment of the present invention recommends setting the horizontal length of the simulated stripe noise pixel unit memory to 1 or 2.
[0127] The position of the simulated stripe noise in the simulated stripe noise pixel unit memory is determined according to the length range of the real stripe noise.
[0128] In one embodiment, determining the position of the simulated stripe noise in the simulated stripe noise pixel unit memory according to the length range of the real stripe noise includes:
[0129] Randomly select the length of the simulated fringe noise to be constructed.
[0130] The position of the simulated stripe noise to be constructed in the simulated stripe noise pixel unit memory is randomly selected according to the length of the simulated stripe noise.
[0131] The length of the simulated stripe noise does not exceed the length range of the real stripe noise, and there is at least one pixel position between two simulated stripe noises.
[0132] In another embodiment, the determining the position of the simulated stripe noise in the simulated stripe noise pixel unit memory according to the length range of the real stripe noise further includes.
[0133] The 2N simulated stripe noise pixel unit memories are divided into N groups of simulated stripe noise pixel unit memory pairs, each group of the simulated stripe noise pixel unit memory pairs includes a first simulated stripe noise pixel unit memory and a second simulated stripe noise pixel unit memory.
[0134] The simulated stripe noise pixel unit memory pairs of the i-th group are randomly divided into m groups along the long side direction. i segments, and the length of the jth segment is m ij。
[0135] Among them, m ij Do not exceed the length range of the real stripe noise.
[0136] In each group of the simulated stripe noise pixel unit memory pairs, select p in the odd-numbered segment in the first simulated stripe noise pixel unit memory. ij %m ij The length position is taken as the position of the simulated stripe noise, and q in the even segment is selected in the second simulated stripe noise pixel unit memory. ij %m ij The length position is taken as the position where the simulated stripe noise is located.
[0137] Among them, 0<p ij ≤ 100, 0<q ij ≤ 100.
[0138] The pixel value of the simulated stripe noise in the simulated stripe noise pixel unit memory is determined according to the pixel value range of the real stripe noise to obtain a simulated stripe noise pixel unit.
[0139] The step of determining the pixel value of the simulated stripe noise in the simulated stripe noise pixel unit memory according to the pixel value range of the real stripe noise comprises:
[0140] Continuous pixel values within the pixel value range of the real stripe noise are randomly selected to fill the pixel value at the position where the simulated stripe noise is located.
[0141] Furthermore, in order to be closer to the stripe noise characteristics of a real image, in addition to filling the pixel values at the position where the simulated stripe noise is located, the pixel values of the non-stripe noise position in the simulated stripe noise pixel unit may also be filled.
[0142] The method for determining the pixel value of the non-stripe noise position in the simulated stripe noise pixel unit is similar to the method for determining the pixel value of the stripe noise position in the simulated stripe noise pixel unit, including:
[0143] The pixel value range of the non-stripe noise area is collected and analyzed.
[0144] The image to be processed is low-pass filtered to obtain a filtered image of the image to be processed.
[0145] A pixel difference is obtained according to the filtered image and the image to be processed.
[0146] The pixel value range of the non-stripe noise area in the image to be processed is counted according to the pixel difference.
[0147] A continuous and smooth curve is fitted according to the pixel value range of the non-stripe noise area in the image to be processed.
[0148] The value range of the pixel value variable of the continuous and smooth curve is the pixel value range of the non-stripe noise area.
[0149] The types of the continuous and smooth curves include: trigonometric function curves, Fourier curves, Bessel curves, and Legendre curves.
[0150] Continuous pixel values within the non-stripe noise pixel value range are randomly selected to perform pixel value filling on the non-stripe noise position within the simulated stripe noise pixel unit.
[0151] In this step, it should be noted that the pixel values at the non-stripe noise position and the pixel values at the stripe noise position are opposite in sign.
[0152] The second building module is used to splice the simulated stripe noise pixel units to obtain a stripe noise simulated image.
[0153] In one embodiment, the simulated stripe noise pixel units are in a horizontal direction, and then the step of splicing the simulated stripe noise pixel units includes:
[0154] The stripe noise pixel units are spliced along the vertical direction, and the parts larger than the vertical side length of the image to be processed are cut off to obtain the stripe noise simulation image.
[0155] The horizontal direction of the simulated stripe noise pixel unit means that the horizontal length of the simulated stripe noise pixel unit is equal to the horizontal side length of the image to be processed.
[0156] In another embodiment, the simulated stripe noise pixel unit is in a vertical direction, and the step of splicing the simulated stripe noise pixel unit includes:
[0157] The stripe noise pixel units are spliced in the horizontal direction, and the parts larger than the horizontal side length of the image to be processed are cut off to obtain the stripe noise simulation image.
[0158] The simulated stripe noise pixel unit is in a vertical direction, which means that the vertical length of the simulated stripe noise pixel unit is equal to the vertical side length of the image to be processed.
[0159] Furthermore, in order to simulate more complex stripe noise forms, a third construction module is added after the second construction module, which is used to intercept a target stripe noise area in the stripe noise simulation image and construct a new stripe noise simulation image. Figure 8 A schematic structural diagram of a stripe noise simulation device provided by another embodiment of the present invention is shown.
[0160] The method of intercepting a target stripe noise region in the stripe noise simulation image and constructing a new stripe noise simulation image includes:
[0161] Get the solid color background image.
[0162] The size of the pure color background image is consistent with the size of the image to be processed, and each pixel value is the same determined value.
[0163] It is understandable that the pure color background image is only used as a container for carrying the constructed stripe noise. In the embodiment of the present invention, there is no restriction on the specific pixel value of the pure color background image, which is set according to the actual situation. However, in order to improve the effect, it is recommended that the pixel value of the pure color background image be set to be close to the background pixel value of the area containing real stripe noise in the image to be processed in the actual scene.
[0164] One or more target stripe noise regions are intercepted from the M stripe noise simulation images.
[0165] It can be understood that in this step, there is no restriction on the value of M. The larger the value of M, the larger the sample size. However, there are also challenges to the computer's computing power. In practical applications, the value of M can be set based on the requirements for sample size and the computer's own computing power.
[0166] The pixel values of the target stripe noise area are superimposed with the pixel values of the pure color background image to obtain a new stripe noise simulation image.
[0167] It should be noted that in this step, there is no restriction on the selection of the size and position of the target stripe noise region, and the selection can be made according to the actual stripe noise form and distribution of the image to be processed.
[0168] For example, if the real stripe noise of the image to be processed is horizontal stripes with denser and shorter stripes, then the target stripe noise region selected from the stripe noise simulation image is a region with horizontal stripes with denser and shorter stripe noise.
[0169] For another example, if the real stripe noise of the image to be processed is vertical stripes that are sparse and long, then the target stripe noise area selected from the stripe noise simulation image is an area with vertical stripes that are sparse and long.
[0170] For another example, if the real stripe noise of the image to be processed is a fusion of horizontal and vertical stripes, then a horizontal stripe noise area and a vertical stripe noise area are selected from the stripe noise simulation image, and then the horizontal stripe noise area and the vertical stripe noise area are layered, and the new horizontal and vertical fused stripe noise area is the target stripe noise area.
[0171] In this step, when multiple target stripe noise areas are superimposed on the pure color background image, the relative position relationship between any two target stripe noise areas may be non-intersection, adjacent, partially overlapping, or completely overlapping, and the embodiment of the present invention does not impose any limitation.
[0172] Based on the same inventive concept, another embodiment of the present invention provides an electronic device, such as Fig. 9As shown, the electronic device specifically includes the following contents: a processor 901 , a memory 902 , a communication interface 903 and a communication bus 904 .
[0173] The processor 901, memory 902, and communication interface 903 communicate with each other via the communication bus 904; the communication interface 903 is used to realize information transmission between various devices.
[0174] The processor 901 is used to call the computer program in the memory 902, and the processor implements all steps of the above-mentioned stripe noise simulation method when executing the computer program.
[0175] Based on the same inventive concept, another embodiment of the present invention provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, all steps of the above-mentioned stripe noise simulation method are implemented.
[0176] Furthermore, in the present invention, relational terms such as “first” and “second” are merely used to distinguish one specified data or operation from another specified data or operation, and do not necessarily require or imply any actual relationship or order between these data or operations.
[0177] In the description of this specification, the description with reference to the terms "one embodiment", "another embodiment", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples without contradiction.
[0178] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for simulating stripe noise, characterized in that: include: Collecting and analyzing real stripe noise in the image to be processed to obtain characteristic information of the real stripe noise, then constructing simulated stripe noise pixel units according to the characteristic information of the real stripes, and splicing the simulated stripe noise pixel units to obtain a stripe noise simulated image; The characteristic information of the real stripe noise includes: the length range of the real stripe noise and the pixel value range of the real stripe noise.
2. The method for simulating stripe noise according to claim 1, characterized in that: The step of constructing a simulated stripe noise pixel unit according to the characteristic information of the real stripe comprises: Prepare 2N simulated stripe noise pixel unit memories; The first side length of the simulated stripe noise pixel unit memory is greater than the second side length, the first side length is equal to the side length of the side in the same direction of the image to be processed, and the second side length is x i ; in, , l is the length of the side of the image to be processed that is in the same direction as the second side length, and N is a positive integer; Determine the position of the simulated stripe noise in the simulated stripe noise pixel unit memory according to the length range of the real stripe noise; The pixel value of the simulated stripe noise in the simulated stripe noise pixel unit memory is determined according to the pixel value range of the real stripe noise to obtain a simulated stripe noise pixel unit.
3. The method for simulating stripe noise according to claim 1, characterized in that: The length range of the real stripe noise is collected and analyzed, including: Performing low-pass filtering on the image to be processed to obtain a filtered image of the image to be processed; Obtaining a pixel difference value according to the filtered image and the image to be processed; Statistically obtaining the range of the pixel difference value; The distribution position of the real stripe noise in the image to be processed is located according to the range of the pixel difference, the length of the real stripe noise is calculated, and then the length range of the real stripe noise is statistically obtained.
4. The method for simulating stripe noise according to claim 1, characterized in that: The pixel value range of the real stripe noise is collected and analyzed, including: Performing low-pass filtering on the image to be processed to obtain a filtered image of the image to be processed; Obtaining a pixel difference value according to the filtered image and the image to be processed; Counting the pixel value range of the real stripe noise in the image to be processed according to the pixel difference; Fitting a continuous and smooth curve according to the pixel value range of the real stripe noise in the image to be processed; The value range of the pixel value variable in the continuous and smooth curve is the pixel value range of the real stripe noise; The types of the continuous and smooth curves include: trigonometric function curves, Fourier curves, Bessel curves, and Legendre curves.
5. The method for simulating stripe noise according to claim 2, characterized in that: The step of determining the position of the simulated stripe noise in the simulated stripe noise pixel unit memory according to the length range of the real stripe noise comprises: Randomly select the length of the simulated stripe noise to be constructed; Randomly selecting a position of the simulated stripe noise to be constructed in the simulated stripe noise pixel unit memory according to the length of the simulated stripe noise; The length of the simulated stripe noise does not exceed the length range of the real stripe noise, and there is at least one pixel position between two simulated stripe noises.
6. The method for simulating stripe noise according to claim 2, characterized in that: The step of determining the position of the simulated stripe noise in the simulated stripe noise pixel unit memory according to the length range of the real stripe noise also includes: Dividing the 2N simulated stripe noise pixel unit memories into N groups of simulated stripe noise pixel unit memory pairs, each group of the simulated stripe noise pixel unit memory pairs comprising a first simulated stripe noise pixel unit memory and a second simulated stripe noise pixel unit memory; The simulated stripe noise pixel unit memory pairs of the i-th group are randomly divided into m groups along the long side direction. i segments, and the length of the jth segment is m ij ; Among them, m ij Not exceeding the length range of the real stripe noise; In each group of the simulated stripe noise pixel unit memory pairs, select p in the odd-numbered segment in the first simulated stripe noise pixel unit memory. ij %m ij The length position is taken as the position of the simulated stripe noise, and q in the even segment is selected in the second simulated stripe noise pixel unit memory. ij %m ij The length position is taken as the position where the simulated stripe noise is located; Among them, 0<p ij ≤ 100, 0<q ij ≤ 100.
7. The method for simulating stripe noise according to claim 2, characterized in that: The step of determining the pixel value of the simulated stripe noise in the simulated stripe noise pixel unit memory according to the pixel value range of the real stripe noise to obtain the simulated stripe noise pixel unit comprises: Continuous pixel values within the pixel value range of the real stripe noise are randomly selected to fill the pixel value at the position where the simulated stripe noise is located.
8. The method for simulating stripe noise according to claim 1, characterized in that: The step of splicing the simulated stripe noise pixel units to obtain a stripe noise simulated image includes: Sequentially splicing the simulated stripe noise pixel units in the direction of the second side; Wherein, the second side is the short side of the simulated stripe noise pixel unit; The spliced image is cropped to remove the portion larger than the size of the image to be processed, to obtain a stripe noise simulation image.
9. The method for simulating stripe noise according to claim 1, characterized in that: After the simulated stripe noise pixel units are spliced to obtain a stripe noise simulation image, the method further includes intercepting a target stripe noise area in the stripe noise simulation image to construct a new stripe noise simulation image, including: Get a solid color background image; The size of the pure color background image is consistent with the size of the image to be processed, and each pixel value is the same determined value; intercepting one or more target stripe noise regions from the M stripe noise simulation images; The pixel values of the target stripe noise area are superimposed with the pixel values of the pure color background image to obtain a new stripe noise simulation image.
10. A stripe noise simulation device, characterized in that: include: An acquisition and analysis module is used to acquire and analyze the real stripe noise in the image to be processed to obtain characteristic information of the real stripe noise; The characteristic information of the real stripe noise includes: the length range of the real stripe noise and the pixel value range of the real stripe noise; A first construction module is used to construct a simulated stripe noise pixel unit according to the characteristic information of the real stripe; The second building module is used to splice the simulated stripe noise pixel units to obtain a stripe noise simulated image.
11. The stripe noise simulation device according to claim 10, characterized in that: The step of constructing a simulated stripe noise pixel unit according to the characteristic information of the real stripe comprises: Prepare 2N simulated stripe noise pixel unit memories; The first side length of the simulated stripe noise pixel unit memory is greater than the second side length, the first side length is equal to the side length of the side in the same direction of the image to be processed, and the second side length is x i ; in, , l is the length of the side of the image to be processed that is in the same direction as the second side length, and N is a positive integer; Determine the position of the simulated stripe noise in the simulated stripe noise pixel unit memory according to the length range of the real stripe noise; The pixel value of the simulated stripe noise in the simulated stripe noise pixel unit memory is determined according to the pixel value range of the real stripe noise to obtain a simulated stripe noise pixel unit.
12. The stripe noise simulation device according to claim 10, characterized in that: The length range of the real stripe noise is collected and analyzed, including: Performing low-pass filtering on the image to be processed to obtain a filtered image of the image to be processed; Obtaining a pixel difference value according to the filtered image and the image to be processed; Statistically obtaining the range of the pixel difference value; The distribution position of the real stripe noise in the image to be processed is located according to the range of the pixel difference, the length of the real stripe noise is calculated, and then the length range of the real stripe noise is statistically obtained.
13. The stripe noise simulation device according to claim 10, characterized in that: The pixel value range of the real stripe noise is collected and analyzed, including: Performing low-pass filtering on the image to be processed to obtain a filtered image of the image to be processed; Obtaining a pixel difference value according to the filtered image and the image to be processed; Counting the pixel value range of the real stripe noise in the image to be processed according to the pixel difference; Fitting a continuous and smooth curve according to the pixel value range of the real stripe noise in the image to be processed; The value range of the pixel value variable in the continuous and smooth curve is the pixel value range of the real stripe noise; The types of the continuous and smooth curves include: trigonometric function curves, Fourier curves, Bessel curves, and Legendre curves.
14. The stripe noise simulation device according to claim 11, characterized in that: The step of determining the position of the simulated stripe noise in the simulated stripe noise pixel unit memory according to the length range of the real stripe noise comprises: Randomly select the length of the simulated stripe noise to be constructed; Randomly selecting a position of the simulated stripe noise to be constructed in the simulated stripe noise pixel unit memory according to the length of the simulated stripe noise; The length of the simulated stripe noise does not exceed the length range of the real stripe noise, and there is at least one pixel position between two simulated stripe noises.
15. The stripe noise simulation device according to claim 11, characterized in that: The step of determining the position of the simulated stripe noise in the simulated stripe noise pixel unit memory according to the length range of the real stripe noise also includes: Dividing the 2N simulated stripe noise pixel unit memories into N groups of simulated stripe noise pixel unit memory pairs, each group of the simulated stripe noise pixel unit memory pairs comprising a first simulated stripe noise pixel unit memory and a second simulated stripe noise pixel unit memory; The simulated stripe noise pixel unit memory pairs of the i-th group are randomly divided into m groups along the long side direction. i segments, and the length of the jth segment is m ij ; Among them, m ij Not exceeding the length range of the real stripe noise; In each group of the simulated stripe noise pixel unit memory pairs, select p in the odd-numbered segment in the first simulated stripe noise pixel unit memory. ij %m ij The length position is taken as the position of the simulated stripe noise, and q in the even segment is selected in the second simulated stripe noise pixel unit memory. ij %m ij The length position is taken as the position where the simulated stripe noise is located; Among them, 0<p ij ≤ 100, 0<q ij ≤ 100.
16. The stripe noise simulation device according to claim 11, characterized in that: The step of determining the pixel value of the simulated stripe noise in the simulated stripe noise pixel unit memory according to the pixel value range of the real stripe noise to obtain the simulated stripe noise pixel unit comprises: Continuous pixel values within the pixel value range of the real stripe noise are randomly selected to fill the pixel value at the position where the simulated stripe noise is located.
17. The stripe noise simulation device according to claim 10, characterized in that: The step of splicing the simulated stripe noise pixel units to obtain a stripe noise simulated image includes: Sequentially splicing the simulated stripe noise pixel units in the direction of the second side; Wherein, the second side is the short side of the simulated stripe noise pixel unit; The spliced image is cropped to remove the portion larger than the size of the image to be processed, to obtain a stripe noise simulation image.
18. The stripe noise simulation device according to claim 10, characterized in that: A third construction module is added after the second construction module, which is used to intercept a target stripe noise area in the stripe noise simulation image and construct a new stripe noise simulation image, including: Get a solid color background image; The size of the pure color background image is consistent with the size of the image to be processed, and each pixel value is the same determined value; intercepting one or more target stripe noise regions from the M stripe noise simulation images; The pixel values of the target stripe noise area are superimposed with the pixel values of the pure color background image to obtain a new stripe noise simulation image.
19. 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 computer program, the method for simulating stripe noise according to any one of claims 1 to 9 is implemented.
20. 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 method for simulating stripe noise as claimed in any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Method for realizing random noise simulation in three-dimensional infrared scene by using masking technology
CN111833425A
Infrared video noise simulation method and device and infrared video denoising method and device
CN118628392A
Image processing apparatus, image noise detecting method, and computer-readable recording medium
US20120293843A1
Systems and methods for image processing
WO2024183318A1
