Image edge detection method suitable for night low-illumination scene

By using variance and covariance-guided image processing methods in low-illumination scenes at night, combined with pre-filtering, channel processing and hard threshold filtering, the problem of serious noise interference is solved, and high-accuracy image edge detection is achieved.

CN119941772AInactive Publication Date: 2025-05-06RICE LONGXEN MICROELECTRONICS INC
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510421127.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-05-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In low-illumination scenarios at night, image edge detection is severely disturbed by noise, and the prior art is difficult to effectively solve this problem.

Method used

The image processing method based on variance and covariance is adopted, and the information of the three channels is fused to achieve edge detection through pre-filtering, channel processing, hard threshold filtering and gamma transformation.

Benefits of technology

It effectively reduces noise interference and improves the accuracy and efficiency of image edge detection in low-illumination scenes at night.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119941772A_ABST
    Figure CN119941772A_ABST
Patent Text Reader

Abstract

The invention discloses an image edge detection method suitable for a night low-illumination scene, and relates to the field of digital image processing, and the method comprises the following steps: carrying out the pre-filtering processing of a night low-illumination scene image obtained in advance, and obtaining an initial image; based on a variance calculation formula, obtaining an edge image guided by variance; based on a covariance calculation formula, obtaining an edge image guided by covariance; performing gamma transformation and hard threshold filtering processing on the edge image guided by the variance and the edge image guided by the covariance to obtain an enhanced edge image guided by the variance and an edge image guided by the covariance; and based on a fusion formula, fusing the enhanced edge image guided by the variance and the edge image guided by the covariance to obtain an actual edge image. According to the method, effective edge detection of the high-noise image is realized by adopting an overall thought of comprehensive calculation of three-channel local variance and covariance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of digital image processing, and in particular to an image edge detection method suitable for nighttime low-illuminance scenes. Background Art

[0002] Digital image processing is a method and technology that uses computers to remove noise, enhance, restore, segment, extract features, etc. to improve image quality. Edge detection is one of the basic inventions of image processing and computer vision. It aims to identify points in an image where the brightness changes significantly. It is not only a key means of image feature extraction, but also of great significance for image sharpening and clarity enhancement.

[0003] When collecting digital images in low-light scenes at night, there is generally obvious noise due to factors such as signal interference and insufficient light. Noise not only seriously affects the image quality, but also the brightness changes caused by it are mathematically difficult to distinguish from the changes at the edge, which greatly hinders edge detection.

[0004] There are two main types of edge detection methods. The deep learning method extracts edge features by training a convolutional neural network. The advantage is that the edge extraction is more accurate, but it consumes a lot of computing resources and is not applicable in resource-constrained scenarios. The traditional method uses edge detection operators to calculate edges based on the mathematical properties of image pixel values, including those based on first-order derivatives (such as Roberts, Sobel, and Prewitt operators), second-order derivatives (such as Laplacian operators), and Canny operators (optimization operators derived under specific constraints). However, traditional operators are sensitive to noise. Even if the image is blurred first, the noise will still cause significant interference to edge detection.

[0005] Nowadays, image processing plays an increasingly critical role in smart cars, surveillance and other fields. In these scenarios, there is often a need to collect images at night. The method of realizing edge detection with low consumption and high accuracy in low-light scenarios can meet the development needs of various fields.

[0006] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention

[0007] In view of the problems in the related art, the present invention proposes an image edge detection method suitable for nighttime low-illumination scenes to overcome the above-mentioned technical problems existing in the existing related art.

[0008] To this end, the specific technical solution adopted by the present invention is as follows:

[0009] According to one aspect of the present invention, a method for detecting image edges in low-light scenes at night is provided. The method for detecting image edges in low-light scenes at night comprises the following steps:

[0010] S1, performing pre-filtering processing on the pre-acquired nighttime low-illumination scene image to obtain an initial image;

[0011] S2, based on the variance calculation formula, channel processing is performed on the initial image to obtain an edge image guided by the variance;

[0012] S3, based on the covariance calculation formula, dual-channel processing and normalization processing are performed on the initial image to obtain an edge image guided by the covariance;

[0013] S4, performing hard threshold filtering on the edge image guided by the variance, and performing gamma transformation and hard threshold filtering on the edge image guided by the covariance, to obtain an enhanced edge image guided by the variance and an enhanced edge image guided by the covariance;

[0014] S5. Based on the fusion formula, the enhanced edge image guided by the variance and the edge image guided by the covariance are fused to obtain the actual edge image.

[0015] Optionally, based on the variance calculation formula, channel processing is performed on the initial image to obtain an edge image guided by the variance, including the following steps:

[0016] S21, selecting any pixel point in the initial image, and selecting a corresponding pixel block with the pixel point as the center;

[0017] S22, using a variance calculation formula, performing variance calculations on the pixel points according to the three color channels of R, G, and B, respectively, to obtain a local frequency estimation of the pixel points guided by the variance;

[0018] S23, using a variance calculation formula, performing variance calculations on the pixel block according to the three color channels of R, G, and B, respectively, to obtain a local frequency estimation of the pixel block guided by the variance;

[0019] S24, taking the quotient of the local frequency estimate of the pixel point and the mean of the local frequency estimates in the pixel block corresponding to the pixel point, to obtain an edge image guided by the variance.

[0020] Optionally, the variance calculation formula is expressed as:

[0021] ;

[0022] Where (i, j) represents the coordinates of the current center pixel point; I represents the selected pixel block; d represents the side length of pixel block I; D ijrepresents the local variance corresponding to the pixel point with coordinates (i, j); X mn represents the pixel value of the point with coordinates (m, n) in pixel block I; Represents the mean value of the pixel values ​​in the image block.

[0023] Optionally, based on the covariance calculation formula, performing dual-channel processing and normalization processing on the initial image to obtain an edge image guided by the covariance includes the following steps:

[0024] S31, selecting any pixel point in the initial image, and selecting a corresponding pixel block with the pixel point as the center;

[0025] S32, using the covariance calculation formula, respectively performing covariance calculations on the pixel points according to the three dual channels RG, GB, and BR to obtain a local frequency estimation of the pixel points guided by the covariance;

[0026] S33, normalizing the local frequency estimation of the pixel points guided by the covariance to obtain an edge image guided by the covariance.

[0027] Optionally, the covariance calculation formula is expressed as:

[0028] ;

[0029] Where (i, j) represents the coordinates of the current center pixel; I represents the selected pixel block; d represents the side length of pixel block I; cov ij (R, G) represents the RG dual-channel local covariance corresponding to the pixel point with coordinates (i, j); R mn Indicates the pixel value of the R channel corresponding to the pixel point with coordinates (m, n) in the selected pixel block I; G mn Indicates the pixel value of the G channel corresponding to the pixel point with coordinates (m, n) in the selected pixel block I; Represents the mean value of the pixel value of the R channel corresponding to the pixel point with coordinates (m, n) in the selected pixel block I; It represents the mean value of the pixel value of the G channel corresponding to the pixel point with coordinates (m, n) in the selected pixel block I.

[0030] Optionally, the normalized expression is:

[0031] ;

[0032] Where (i, j) represents the coordinates of the current center pixel; P ij Represents the correlation coefficient between the pixel block centered at the pixel point with coordinates (i, j) in the RG dual channels; cov ij(R, G) represents the local covariance of the RG dual channels corresponding to the pixel point with coordinates (i, j); D(R) represents the variance of the R channel corresponding to the pixel block centered on the pixel point with coordinates (i, j); D(G) represents the variance of the G channel corresponding to the pixel block centered on the pixel point with coordinates (i, j).

[0033] Optionally, performing hard threshold filtering on the variance-guided edge image, performing gamma transformation and hard threshold filtering on the covariance-guided edge image, and obtaining enhanced variance-guided edge image and covariance-guided edge image comprises the following steps:

[0034] S41, performing exponential transformation on all pixel points in the edge image guided by covariance to obtain an edge image guided by covariance with weak edges;

[0035] S42, sequentially performing hard threshold filtering processing on the edge image guided by the variance and the edge image guided by the covariance with weak edge appearance, to obtain an enhanced edge image guided by the variance and an enhanced edge image guided by the covariance.

[0036] Optionally, sequentially performing hard threshold filtering on the edge image guided by variance and the edge image guided by covariance with weak edge appearance includes:

[0037] For the edge image guided by variance, the threshold selected by hard threshold filtering is 0.5~0.9;

[0038] For the covariance-guided edge image with weak edge appearance, the hard threshold filtering selects an asymmetric threshold. For the data greater than 0 in the covariance-guided edge image, the threshold selected is 0.5~0.9, and for the data less than or equal to 0 in the covariance-guided edge image, the threshold selected is -0.4~-0.1.

[0039] Optionally, the expression of the fusion formula is:

[0040] ;

[0041] In the formula, e represents the fused edge image; α represents the weight parameter; e r represents the edge image guided by variance after the corresponding R channel is enhanced; e g represents the edge image guided by variance after the corresponding G channel is enhanced; e b represents the edge image guided by variance after the corresponding B channel is enhanced; e rg represents the covariance-guided edge image corresponding to the RG dual-channel enhancement; e gb represents the edge image guided by covariance after GB dual-channel enhancement; e brRepresents the covariance-guided edge image corresponding to the BR dual-channel enhancement.

[0042] Optionally, the selection of the weight parameter is determined by the average value of the variance of the whole image;

[0043] The expression of the variance mean of the whole image is:

[0044] ;

[0045] In the formula, δ represents the variance mean of the whole image; P represents the coordinate set of the whole image, and N represents the number of pixels in each channel; Represents the variance of the R channel corresponding to the pixel with coordinates (i, j); Represents the variance of the G channel corresponding to the pixel with coordinates (i, j); Represents the variance of the B channel corresponding to the pixel with coordinates (i, j).

[0046] Compared with the prior art, the present invention has the following beneficial effects: in view of the edge detection requirements of high-noise images, taking into account the randomness of noise and the regularity of the edge positions of the RGB three-channels in actual scenes, as well as the statistical characteristics of noise reflected in variance and covariance, the present invention adopts the overall idea of ​​calculating the local variance and covariance of the three channels to achieve effective edge detection of high-noise images. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] 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 will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0048] Figure 1 The present invention is a flowchart of an image edge detection method suitable for nighttime low-light scenes according to an embodiment of the present invention. DETAILED DESCRIPTION

[0049] To further illustrate each embodiment, the present invention provides drawings, which are part of the disclosure of the present invention and are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in the field should be able to understand other possible implementations and advantages of the present invention. The components in the figures are not drawn to scale, and similar component symbols are generally used to represent similar components.

[0050] According to an embodiment of the present invention, a method for detecting image edges applicable to nighttime low-illumination scenes is provided.

[0051] The present invention is further described with reference to the accompanying drawings and specific embodiments. Figure 1 As shown, according to an embodiment of the present invention, an image edge detection method applicable to a nighttime low-illumination scene comprises the following steps:

[0052] S1. Pre-filtering a pre-acquired nighttime low-illumination scene image to obtain an initial image.

[0053] It should be explained that, considering that a small number of pixels deviate greatly from the true value due to problems with the acquisition equipment, abnormal noise points that appear with a small probability, etc., filtering is performed in advance to reduce their influence on the variance calculation. Bilateral filtering is generally selected here. Bilateral filtering is a commonly used noise reduction method that can better maintain the edge while reducing noise. In the present invention, bilateral filtering is only to reduce the influence of noise to a certain extent. In order to avoid blurred edges, weaker parameters need to be used. The spatial parameters of bilateral filtering generally take values ​​below 5, and the range parameters take values ​​below 10. Other edge-preserving filtering methods can also be used for processing as needed, such as guided filtering.

[0054] S2. Based on the variance calculation formula, the channel processing of the initial image is performed to obtain an edge image guided by the variance.

[0055] Preferably, based on the variance calculation formula, channel processing is performed on the initial image to obtain an edge image guided by the variance, comprising the following steps:

[0056] S21, selecting any pixel point in the initial image, and selecting a corresponding pixel block with the pixel point as the center;

[0057] S22, using a variance calculation formula, performing variance calculations on the pixel points according to the three color channels of R, G, and B, respectively, to obtain a local frequency estimation of the pixel points guided by the variance;

[0058] S23, using a variance calculation formula, performing variance calculations on the pixel block according to the three color channels of R, G, and B, respectively, to obtain a local frequency estimation of the pixel block guided by the variance;

[0059] S24, taking the quotient of the local frequency estimate of the pixel point and the mean of the local frequency estimates in the pixel block corresponding to the pixel point, to obtain an edge image guided by the variance.

[0060] Preferably, the variance calculation formula is expressed as:

[0061] ;

[0062] Where (i, j) represents the coordinates of the current center pixel point; I represents the selected pixel block; d represents the side length of pixel block I; D ijrepresents the local variance corresponding to the pixel point with coordinates (i, j); X mn represents the pixel value of the point with coordinates (m, n) in pixel block I; Represents the mean value of the pixel values ​​in the image block.

[0063] It should be explained that each pixel in the channel is traversed to obtain the local frequency estimate of the channel guided by the variance. ij The point stored at coordinates (i, j) obtains a variance-guided local frequency estimation image. After performing this operation on the three channels respectively, three variance-guided local frequency estimation images can be obtained.

[0064] Since the variance at the edge is higher than the variance of the surrounding pixels, for each variance-guided local frequency estimation image obtained, the local frequency estimation of each point is divided by the mean of the local frequency estimation in a pixel block centered at the point; three locally adaptive, variance-guided edge images are obtained, denoted as e r0 , e g0 , e b0 .

[0065] Here, the statistical characteristics of noise are used. In areas with similar brightness, the noise level is similar. In flat areas of the image, the variance is mainly caused by noise. Due to the independent and identically distributed nature of noise, the variances are close for relatively large image blocks. In edge areas, due to the large changes in brightness, the local variance is higher than the variance caused by noise. By comparing with the surrounding variance, the edge area can be determined.

[0066] S3. Based on the covariance calculation formula, the initial image is subjected to dual-channel processing and normalization processing to obtain an edge image guided by the covariance.

[0067] Preferably, based on the covariance calculation formula, dual-channel processing and normalization processing are performed on the initial image to obtain an edge image guided by the covariance, including the following steps:

[0068] S31, selecting any pixel point in the initial image, and selecting a corresponding pixel block with the pixel point as the center;

[0069] S32, using the covariance calculation formula, respectively performing covariance calculations on the pixel points according to the three dual channels RG, GB, and BR to obtain a local frequency estimation of the pixel points guided by the covariance;

[0070] S33, normalizing the local frequency estimation of the pixel points guided by the covariance to obtain an edge image guided by the covariance.

[0071] Preferably, the covariance calculation formula is expressed as:

[0072] ;

[0073] Where (i, j) represents the coordinates of the current center pixel; I represents the selected pixel block; d represents the side length of pixel block I; cov ij (R, G) represents the RG dual-channel local covariance corresponding to the pixel point with coordinates (i, j); R mn Indicates the pixel value of the R channel corresponding to the pixel point with coordinates (m, n) in the selected pixel block I; G mn Indicates the pixel value of the G channel corresponding to the pixel point with coordinates (m, n) in the selected pixel block I; Represents the mean value of the pixel value of the R channel corresponding to the pixel point with coordinates (m, n) in the selected pixel block I; It represents the mean value of the pixel value of the G channel corresponding to the pixel point with coordinates (m, n) in the selected pixel block I.

[0074] Preferably, the normalization expression is:

[0075] ;

[0076] Where (i, j) represents the coordinates of the current center pixel; P ij Represents the correlation coefficient between the pixel block centered at the pixel point with coordinates (i, j) in the RG dual channels; cov ij (R, G) represents the local covariance of the RG dual channels corresponding to the pixel point with coordinates (i, j); D(R) represents the variance of the R channel corresponding to the pixel block centered on the pixel point with coordinates (i, j); D(G) represents the variance of the G channel corresponding to the pixel block centered on the pixel point with coordinates (i, j).

[0077] It should be explained that for each pixel in the image, the covariance of the pixel values ​​in a pixel block centered on the pixel in the two channels of the channel pair is calculated, and the covariance is used as the local frequency estimate guided by the covariance of the pixel; three images consisting of local frequency estimates are obtained.

[0078] Taking the RG channel as an example, the covariance formula is:

[0079] ;

[0080] Where (i, j) represents the coordinates of the current center pixel; I represents the selected pixel block; d represents the side length of pixel block I; cov ij (R, G) represents the RG dual-channel local covariance corresponding to the pixel point with coordinates (i, j); R mnIndicates the pixel value of the R channel corresponding to the pixel point with coordinates (m, n) in the selected pixel block I; G mn Indicates the pixel value of the G channel corresponding to the pixel point with coordinates (m, n) in the selected pixel block I; Represents the mean value of the pixel value of the R channel corresponding to the pixel point with coordinates (m, n) in the selected pixel block I; It represents the mean value of the pixel value of the G channel corresponding to the pixel point with coordinates (m, n) in the selected pixel block I.

[0081] Traverse each pixel in the channel to obtain the local frequency estimation guided by the covariance of the channel. After performing this operation on the three channels respectively, three local frequency estimation images guided by the covariance can be obtained.

[0082] The local frequency estimation is normalized for each covariance-guided local frequency estimation image to obtain three covariance-guided edge images.

[0083] The normalized expression is:

[0084] ;

[0085] Where (i, j) represents the coordinates of the current center pixel; P ij Represents the correlation coefficient between the pixel block centered at the pixel point with coordinates (i, j) in the RG dual channels; cov ij (R, G) represents the local covariance of the RG dual channels corresponding to the pixel point with coordinates (i, j); D(R) represents the variance of the R channel corresponding to the pixel block centered on the pixel point with coordinates (i, j); D(G) represents the variance of the G channel corresponding to the pixel block centered on the pixel point with coordinates (i, j).

[0086] P ij The point stored at coordinates (i, j) obtains a variance-guided local frequency estimation image. After performing this operation on the three channels RG, GB, and BR, three covariance-guided edge images can be obtained, denoted as e rg0 , e gb0 , e br0 .

[0087] The statistical characteristics of noise are also used here. For high-noise images, in smooth areas, image blocks at the same position in different channels have relatively small correlations due to the interference of noise and the close pixel values ​​between the pixels within the channels, so they have small covariances. In edge areas, due to the coordinated changes of different channels and the larger pixel value differences, the data show stronger correlations. Therefore, locations with larger absolute values ​​of covariance are more likely to be edge areas. The variance of the channel itself will affect the value of the covariance, so normalization is used to eliminate the influence of local noise levels and adaptively detect edges.

[0088] The size of the pixel block in step S2 and step S3 is generally 7*7 or 9*9. A larger image block is selected because the method for calculating variance and covariance is mainly based on statistical properties, and the result is more stable when the amount of data is larger. Using an image block that is too large will blur the effect of the edge.

[0089] S4. Perform hard threshold filtering on the edge image guided by the variance, and perform gamma transformation and hard threshold filtering on the edge image guided by the covariance, so as to obtain enhanced edge images guided by the variance and edge images guided by the covariance.

[0090] Preferably, performing hard threshold filtering on the edge image guided by variance, performing gamma transformation and hard threshold filtering on the edge image guided by covariance, and obtaining enhanced edge image guided by variance and edge image guided by covariance comprises the following steps:

[0091] S41, performing exponential transformation on all pixel points in the edge image guided by covariance to obtain an edge image guided by covariance with weak edges;

[0092] S42, sequentially performing hard threshold filtering processing on the edge image guided by the variance and the edge image guided by the covariance with weak edge appearance, to obtain an enhanced edge image guided by the variance and an enhanced edge image guided by the covariance.

[0093] Preferably, sequentially performing hard threshold filtering on the edge image guided by variance and the edge image guided by covariance with weak edge appearance comprises:

[0094] For the edge image guided by variance, the threshold selected by hard threshold filtering is 0.5~0.9;

[0095] For the covariance-guided edge image with weak edge appearance, the hard threshold filtering selects an asymmetric threshold. For the data greater than 0 in the covariance-guided edge image, the threshold selected is 0.5~0.9, and for the data less than or equal to 0 in the covariance-guided edge image, the threshold selected is -0.4~-0.1.

[0096] It should be noted that the γ transformation is to perform an exponential transformation I = I on all points in the image after normalizing the pixel values r , usually taking 0 < r < 1. This operation can reduce the gap between strong edges and weak edges, making the weak edges visible. The γ value can be determined according to the actual situation. If γ = 0.5, a standard deviation image is obtained.

[0097] Hard threshold filtering is to exclude the points with smaller values in the image. This can exclude the influence of some low-frequency noises. For the edge image guided by variance, the threshold selected for hard threshold filtering is generally 0.5 - 0.9, while for the edge image guided by covariance, an asymmetric threshold is selected. For the data greater than 0 in the image, the threshold selected is 0.5 - 0.9, and for the data less than 0, the threshold selected is -0.4 - -0.1 to obtain a more accurate edge map. The reason is that for some edges, the two channels have opposite change trends on both sides of the edge, thus showing a negative correlation relationship as a whole at the edge, but a positive correlation relationship in other regions. This results in the correlation coefficient of the negatively correlated edges being lower than that of the smooth regions, but not as close to 1 as the positive correlation relationship in terms of numerical relationship. The hard threshold filtering method using an asymmetric threshold can effectively obtain the edge information of this part. Denote the edge maps obtained through the above steps for e r0 , e g0 , e b0 and e rg0 , e gb0 , e br0 as e r , e g , e b and e rg , e gb , e br .

[0098] S5. Based on the fusion formula, fuse the enhanced edge image guided by variance and the edge image guided by covariance to obtain the actual edge image.

[0099] Preferably, the expression of the fusion formula is:

[0100] ;

[0101] In the formula, e represents the fused edge image; α represents the weight parameter; e r represents the edge image guided by variance enhanced corresponding to the R channel; e g represents the edge image guided by variance enhanced corresponding to the G channel; e b represents the edge image guided by variance enhanced corresponding to the B channel; e rg represents the edge image guided by covariance enhanced corresponding to the RG dual channels; e gbrepresents the edge image guided by covariance after GB dual-channel enhancement; e br Represents the covariance-guided edge image corresponding to the BR dual-channel enhancement.

[0102] Preferably, the selection of the weight parameter is determined by the average value of the variance of the whole image;

[0103] The expression of the variance mean of the whole image is:

[0104] ;

[0105] In the formula, δ represents the variance mean of the whole image; P represents the coordinate set of the whole image, and N represents the number of pixels in each channel; Represents the variance of the R channel corresponding to the pixel with coordinates (i, j); Represents the variance of the G channel corresponding to the pixel with coordinates (i, j); Represents the variance of the B channel corresponding to the pixel with coordinates (i, j).

[0106] It needs to be explained that the expression of the fusion formula is:

[0107] ;

[0108] In the formula, e represents the fused edge image; α represents the weight parameter; e r represents the edge image guided by variance after the corresponding R channel is enhanced; e g represents the edge image guided by variance after the corresponding G channel is enhanced; e b represents the edge image guided by variance after the corresponding B channel is enhanced; e rg represents the covariance-guided edge image corresponding to the RG dual-channel enhancement; e gb represents the edge image guided by covariance after GB dual-channel enhancement; e br It represents the edge image guided by covariance after the corresponding BR dual-channel enhancement. The practical meaning of the fusion formula is to combine the images guided by variance and covariance, and reflect the edge strength of the corresponding position through the coordinated changes between channels.

[0109] Using variance as the basis for estimation, and taking advantage of the fact that the channels change synergistically at the actual edge, when at the edge, the pixel values ​​change synergistically, and the local variances of each channel are large, so the product is large. The variance increase caused by noise usually only occurs in one channel, so the product is small. This can eliminate the interference of noise on edge detection. Covariance is used as the basis for estimation. Since covariance itself can reflect the channel coordination characteristics, it is directly added. The role of square is to make it homogeneous with the variance term. According to statistical principles, when the noise level is high, the variance caused by the edge is susceptible to noise interference, while covariance is not easily sensitive to noise interference with large deviations due to data proximity. Therefore, covariance should be used as the main basis for judgment. When the noise level is low, variance detection is more accurate, and covariance is susceptible to noise interference with large deviations. Therefore, variance should be used as the main basis for judgment.

[0110] Based on this feature, 0<α<1 is introduced as a weight parameter to determine the weights of the variance term and covariance term according to the noise level. The selection can generally be determined by the average variance of the whole image. When the noise level is high, the α value is small, and the covariance is the main basis for determination. When the noise level is low, the α value is large, and the variance is the main basis for determination. The local variance mean δ of the image with pixel values ​​normalized to [0,1] can be used as the basis. The expression of the variance mean of the whole image is:

[0111] ;

[0112] In the formula, δ represents the variance mean of the whole image; P represents the coordinate set of the whole image, and N represents the number of pixels in each channel; Represents the variance of the R channel corresponding to the pixel with coordinates (i, j); Represents the variance of the G channel corresponding to the pixel with coordinates (i, j); It represents the variance of the B channel corresponding to the pixel with coordinates (i, j). The practical meaning of the formula is that considering that the variance can reflect the noise level of the image, the local variance of all pixels in the image is averaged to reflect the noise level of the channel, and the three channels are averaged to reflect the overall noise level of the whole image. As shown in Table 1, a reference form of the relationship between the variance δ and α is shown.

[0113] Table 1 Reference for the values ​​of variance δ and α

[0114]

[0115] Step S5 aims to make full use of the correlation between channels and the statistical characteristics of noise. Considering the randomness of noise, the probability that three channels at the same position have high noise values ​​at the same time is much lower than the probability that a single channel has high noise values. For edge positions, the three channels usually change in coordination. Therefore, using this property, three edge images guided by variance and three edge images guided by covariance are fused through a suitable quantitative relationship to obtain an edge image that basically excludes noise.

[0116] In the present invention, additional steps can be used to further enhance the effect. Before image fusion in step S4, non-maximum suppression can be performed on the edge images obtained in step S2 and step S3 to obtain a more accurate edge map, or isolated point suppression can be performed using a Gaussian counting filter and a Gaussian hard threshold filter; or, after the fusion operation in step S4 is completed, the above operations can be performed on the fused edge image.

[0117] Among them, non-maximum suppression is an existing method in edge detection, which can exclude points that do not take maximum values ​​in the neighborhood and obtain finer edges. The reason for non-maximum suppression is that although the preprocessing in step S1 can effectively filter noise, after pre-filtering, the edge obtained by the variance method will be widened, and a finer edge image can be obtained after processing with non-maximum suppression.

[0118] Isolated point suppression is a newly proposed method in the present invention. Its principle is based on the image sampling principle that isolated single-pixel edge points cannot be collected and completely restored, so the edge of the image will not be an isolated point, so all isolated edge points detected in the image can be identified as noise points. Therefore, the present invention adopts a counting filter method to detect the number of edge points within a certain range, and then filter according to a certain threshold. In this way, the spatial relationship with the surrounding edge points and the edge strength can be comprehensively considered. Specifically, a Gaussian counting filter is used, that is, the image is first Gaussian filtered, and then the points with lower values ​​are removed by hard thresholding, that is, after filtering with a Gaussian filter kernel with a larger variance such as σ>3, the points with smaller results are filtered with a hard threshold to obtain a more accurate edge map that eliminates the influence of noise.

[0119] In summary, with the help of the above technical solution of the present invention, for the edge detection requirements of high-noise images, taking into account the randomness of noise and the regularity of the edge positions of the actual scene in the RGB three-channel, as well as its statistical characteristics reflected in the variance and covariance, the present invention adopts the overall idea of ​​calculating the local variance and covariance of the three channels and comprehensively calculating them, so as to achieve effective edge detection, which has the following specific advantages:

[0120] 1. Channel selection advantages:

[0121] The traditional method uses multiple Y channels for single-channel edge detection, which is easily disturbed for images with many noise points and does not fully utilize the three-channel information. The present invention uses the three-channel coordinated changes of image information in the edge area, while the noise points are random and do not have the characteristics of coordinated changes. The RGB domain three-channel coordinated edge detection is used to replace the traditional YUV domain Y channel single-channel detection, effectively reducing the impact of noise points.

[0122] 2. Variance-based edge detection:

[0123] Traditional edge detection methods are generally based on the rate of change of pixel values. This method is not easy to comprehensively utilize the information of the three channels and is easily interfered by noise. For high-noise images, the variance of the image blocks in the smooth area is mainly caused by noise, and the randomness of the noise makes the variance more stable in the local area when selecting larger image blocks; while the image blocks in the edge area have a larger variance due to the sharp change in brightness, so the change in variance can reflect the edge characteristics of the image. By using the statistical property of variance, the present invention makes more full use of pixel information and reduces the interference of noise through more data.

[0124] 3. Covariance-based edge features:

[0125] In smooth areas, due to the interference of noise, the difference in pixel values ​​between pixels with similar positions is mainly caused by noise, and the correlation between channels is relatively small, so there is a smaller covariance; in edge areas, due to the coordinated changes of different channels, the pixel values ​​between channels show stronger correlation; therefore, the location with a larger absolute value of the covariance is more likely to be an edge area. Using covariance for channel collaborative edge detection and combining it with variance-based edge detection can obtain a more accurate edge detection effect.

[0126] Although the present invention has been disclosed as above with preferred embodiments, the embodiments are merely examples for the convenience of description and are not intended to limit the present invention. Those skilled in the art may make several changes and modifications without departing from the spirit and scope of the present invention. The scope of protection claimed by the present invention shall be based on the claims.

Claims

1. An image edge detection method suitable for nighttime low-light scenes, characterized in that: The method comprises the following steps: S1, performing pre-filtering processing on the pre-acquired nighttime low-illumination scene image to obtain an initial image; S2, based on the variance calculation formula, channel processing is performed on the initial image to obtain an edge image guided by the variance; S3, based on the covariance calculation formula, dual-channel processing and normalization processing are performed on the initial image to obtain an edge image guided by the covariance; S4, performing hard threshold filtering on the edge image guided by the variance, and performing gamma transformation and hard threshold filtering on the edge image guided by the covariance, to obtain an enhanced edge image guided by the variance and an enhanced edge image guided by the covariance; S5. Based on the fusion formula, the enhanced edge image guided by the variance and the edge image guided by the covariance are fused to obtain the actual edge image.

2. The image edge detection method applicable to nighttime low-light scenes according to claim 1, characterized in that: The method of performing channel processing on the initial image based on the variance calculation formula to obtain an edge image guided by the variance comprises the following steps: S21, selecting any pixel point in the initial image, and selecting a corresponding pixel block with the pixel point as the center; S22, using a variance calculation formula, performing variance calculations on the pixel points according to the three color channels of R, G, and B, respectively, to obtain a local frequency estimation of the pixel points guided by the variance; S23, using a variance calculation formula, performing variance calculations on the pixel block according to the three color channels of R, G, and B, respectively, to obtain a local frequency estimation of the pixel block guided by the variance; S24, taking the quotient of the local frequency estimate of the pixel point and the mean of the local frequency estimates in the pixel block corresponding to the pixel point, to obtain an edge image guided by the variance.

3. The image edge detection method applicable to nighttime low-light scenes according to claim 2, characterized in that: The variance calculation formula is expressed as: ; Where (i, j) represents the coordinates of the current center pixel point; I represents the selected pixel block; d represents the side length of pixel block I; D ij represents the local variance corresponding to the pixel point with coordinates (i, j); X mn represents the pixel value of the point with coordinates (m, n) in pixel block I; Represents the mean value of the pixel values ​​in the image block.

4. The image edge detection method applicable to nighttime low-light scenes according to claim 1, characterized in that: The method of performing dual-channel processing and normalization processing on the initial image based on the covariance calculation formula to obtain an edge image guided by the covariance includes the following steps: S31, selecting any pixel point in the initial image, and selecting a corresponding pixel block with the pixel point as the center; S32, using the covariance calculation formula, respectively performing covariance calculations on the pixel points according to the three dual channels RG, GB, and BR to obtain a local frequency estimation of the pixel points guided by the covariance; S33, normalizing the local frequency estimation of the pixel points guided by the covariance to obtain an edge image guided by the covariance.

5. The image edge detection method applicable to nighttime low-light scenes according to claim 4, characterized in that: The covariance calculation formula is expressed as: ; Where (i, j) represents the coordinates of the current center pixel; I represents the selected pixel block; d represents the side length of pixel block I; cov ij (R, G) represents the RG dual-channel local covariance corresponding to the pixel point with coordinates (i, j); R mn Indicates the pixel value of the R channel corresponding to the pixel point with coordinates (m, n) in the selected pixel block I; G mn Indicates the pixel value of the G channel corresponding to the pixel point with coordinates (m, n) in the selected pixel block I; Represents the mean value of the pixel value of the R channel corresponding to the pixel point with coordinates (m, n) in the selected pixel block I; It represents the mean value of the pixel value of the G channel corresponding to the pixel point with coordinates (m, n) in the selected pixel block I.

6. The image edge detection method applicable to nighttime low-light scenes according to claim 4, characterized in that: The expression of the normalization process is: ; Where (i, j) represents the coordinates of the current center pixel; P ij Represents the correlation coefficient between the pixel block centered at the pixel point with coordinates (i, j) in the RG dual channels; cov ij (R, G) represents the local covariance of the RG dual channels corresponding to the pixel point with coordinates (i, j); D(R) represents the variance of the R channel corresponding to the pixel block centered on the pixel point with coordinates (i, j); D(G) represents the variance of the G channel corresponding to the pixel block centered on the pixel point with coordinates (i, j).

7. The image edge detection method applicable to nighttime low-light scenes according to claim 1, characterized in that: The method of performing hard threshold filtering on the edge image guided by variance and performing gamma transformation and hard threshold filtering on the edge image guided by covariance to obtain enhanced edge image guided by variance and edge image guided by covariance comprises the following steps: S41, performing exponential transformation on all pixel points in the edge image guided by covariance to obtain an edge image guided by covariance with weak edges; S42, sequentially performing hard threshold filtering processing on the edge image guided by the variance and the edge image guided by the covariance with weak edge appearance, to obtain an enhanced edge image guided by the variance and an enhanced edge image guided by the covariance.

8. The image edge detection method applicable to nighttime low-light scenes according to claim 7, characterized in that: The step of sequentially performing hard threshold filtering on the edge image guided by variance and the edge image guided by covariance with weak edge appearance comprises: For the edge image guided by variance, the threshold selected by hard threshold filtering is 0.5~0.9; For the covariance-guided edge image with weak edge appearance, the hard threshold filtering selects an asymmetric threshold. For the data greater than 0 in the covariance-guided edge image, the threshold selected is 0.5~0.9, and for the data less than or equal to 0 in the covariance-guided edge image, the threshold selected is -0.4~-0.

1.

9. The image edge detection method applicable to nighttime low-light scenes according to claim 1, characterized in that: The expression of the fusion formula is: ; In the formula, e represents the fused edge image; α represents the weight parameter; e r represents the edge image guided by variance after the corresponding R channel is enhanced; e g represents the edge image guided by variance after the corresponding G channel is enhanced; e b represents the edge image guided by variance after the corresponding B channel is enhanced; e rg represents the covariance-guided edge image corresponding to the RG dual-channel enhancement; e gb represents the edge image guided by covariance after GB dual-channel enhancement; e br Represents the covariance-guided edge image corresponding to the BR dual-channel enhancement.

10. The image edge detection method applicable to nighttime low-light scenes according to claim 9, characterized in that: The selection of the weight parameter is determined by the average value of the variance of the whole image; The expression of the variance mean value of the whole image is: ; In the formula, δ represents the variance mean of the whole image; P represents the coordinate set of the whole image, and N represents the number of pixels in each channel; Represents the variance of the R channel corresponding to the pixel with coordinates (i, j); Represents the variance of the G channel corresponding to the pixel with coordinates (i, j); Represents the variance of the B channel corresponding to the pixel with coordinates (i, j).

Citation Information

Patent Citations

  • Image enhancement and feature extraction method for automatic welding

    CN115147448A

  • High-noise image edge detection method

    CN115641279A

  • Self-supervised double-domain double-path single-pixel imaging method

    CN118823377A

  • Method of target feature extraction based on millimeter-wave radar echo

    US20220155432A1