Weak and small target detection method and system and storage medium
The method enhances small target detection accuracy by fusing local contrast and directional derivatives, addressing issues of weak targets and complex backgrounds with improved feature extraction and segmentation.
Patent Information
- Application Number
- CN202411084273.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-08-08
AI Technical Summary
Existing infrared small target detection methods face challenges due to weak and small targets with insufficient shape and texture information, complex backgrounds, and noise points that resemble targets, leading to inaccurate detection and high false alarms.
A method involving local contrast and directional derivative feature fusion, using a three-layer model to enhance target features, and a discrete orthogonal polynomial to extract directional derivatives, followed by saliency map segmentation for accurate target localization.
Improves detection accuracy and reduces false alarms by highlighting target features through enhanced local contrast and directional derivative fusion, while maintaining low computational complexity and real-time performance.
Smart Images

Figure CN119152179A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of target detection, and more specifically, relates to a small target detection method, system and storage medium. Background Art
[0002] Infrared detection has been widely used in the field of non-cooperative target detection in the early days due to its long imaging distance, all-day operation, strong concealment and good resistance to electromagnetic interference. Infrared small target detection technology aims to make full use of the existing imaging system, combined with digital image processing technology, to detect and locate the target of interest in the image and give indication information.
[0003] In practical applications, weak target detection technology still faces some difficulties and bottlenecks. First, the target is weak and small, usually containing only a few or dozens of pixels, resulting in a lack of sufficient shape, edge and other detailed information of the target, making it impossible to design an effective feature extraction method based on features such as shape and texture; second, the image background is complex, with a lot of clutter and a low signal-to-clutter ratio, and the target is easily submerged by the complex background. In addition, isolated noise points are generated in the image, including oversaturated pixels, dead pixels and randomly located flickering pixels at fixed positions, which have similar characteristics to the target and are easily mistaken for the target during detection. The existing detection methods based on background estimation are not very accurate in detecting complex scenes or scenes with severe noise. Summary of the invention
[0004] In view of the above defects or improvement needs of the prior art, the present invention provides a small target detection method, system and storage medium, the purpose of which is to improve the accuracy of small target detection.
[0005] To achieve the above object, according to a first aspect of the present invention, a small target detection method is provided, comprising:
[0006] Calculate the local contrast CM based on the grayscale distribution of the image to be detected at the current scale;
[0007] A two-dimensional discrete orthogonal polynomial is used to fit the local grayscale distribution of the image to be detected; and partial derivatives of the fitted local grayscale distribution with respect to the rows and columns of the image to be detected are respectively obtained to obtain the directional derivatives of the image to be detected in the vertical direction and the horizontal direction, so as to calculate the directional derivative of the image to be detected at any angle;
[0008] Extract the features of each pixel of the image to be detected on the directional derivative of its corresponding angle, and after fusion, obtain the directional derivative feature GM of the image to be detected;
[0009] The local contrast CM and the directional derivative feature GM are fused to obtain a saliency map S of the image to be detected at the current scale. scale; And the salient maps at each scale are fused as the final salient map S;
[0010] The saliency map S is segmented to locate the position of the target in the image to be detected.
[0011] Furthermore, the local contrast CM of the image to be detected based on the grayscale distribution at the current scale is calculated, including:
[0012] Traverse each pixel of the image to be detected, and construct a target area with the current pixel of the image to be detected as the center; wherein the target area includes a target layer and a background layer B; the target layer is a square area with the current pixel of the image to be detected as the center and the current scale as the side length; the background layer B is K sub-areas that are equal to and adjacent to the target layer; and the target layer is composed of a target center layer C and a target attenuation layer A, wherein the target center layer C is an area with the current pixel as the center and a pixel size of 1×1, and the rest of the target layer is the target attenuation layer A;
[0013] Calculate the local contrast between the target attenuation layer A, the background layer B and the target center layer C;
[0014] Calculate the local contrast CM based on the grayscale distribution of the image to be detected at the current scale: CM = C AB ×(C CA +C CB ), where C AB Indicates the local contrast between the target attenuation layer A and the background layer B; C CA represents the local contrast between the target center layer C and the target attenuation layer A; C CB Represents the local contrast between the target center layer C and the background layer B.
[0015] Furthermore, the local contrast between the target attenuation layer A, the background layer B and the target center layer C is calculated, including:
[0016]
[0017] Among them, m A Represents the mean gray value of the target center layer C, m Bi represents the mean gray value of the i-th sub-region of the background layer B, m C Represents the mean gray value of the target center layer C; max(a,b) means taking the larger value of a and b, and min(a,b) means taking the smaller value of a and b.
[0018] Further, calculating the directional derivative of the image to be detected at any angle, wherein the arbitrary angle includes 0°, 45°, 90°, and 135°;
[0019] The features of each pixel of the image to be detected on the directional derivative of its corresponding angle are extracted and fused to obtain the directional derivative feature GM of the image to be detected, including:
[0020] According to each pixel point (r t , c t ) position, and divide the L1 and L2 sub-areas based on the directional derivative of the corresponding angle, and the division method is:
[0021] L1 (0°) ={(r,c)|-s≤rr t ≤s,-2s≤cc t ≤0}
[0022] L2 (0°) ={(r,c)|-s≤rr t ≤s,0≤cc t ≤2s}
[0023] L1 (45°) ={(r,c)|-2s≤rr t ≤0,-2s≤cc t ≤0}
[0024] L2 (45°) ={(r,c)|0≤rr t ≤2s,0≤cc t ≤2s}
[0025] L1 (90°) ={(r,c)|-2s≤rr t ≤0,-s≤cc t ≤s}
[0026] L2 (90°) ={(r,c)|0≤rr t ≤2s,-s≤cc t ≤s}
[0027] L1 (135°) ={(r,c)|-2s≤rr t ≤0,0≤cc t ≤2s}
[0028] L2 (135°) ={(r,c)|0≤rr t ≤2s,-2s≤cc t ≤0}
[0029] Among them, L1 (0°) and L2 (0°) 、L1 (45°) and L2 (45°) 、L1(90°) and L2 (90°) 、L1 (135°) and L2 (135°) They correspond to the L1 and L2 sub-regions divided on the directional derivatives of 0°, 45°, 90°, and 135° respectively; r and c are the rows and columns of the image to be detected respectively; l is the side length of the divided L1 and L2 regions, Indicates a round-down operation;
[0030] Calculate the characteristic GM of the L1 and L2 sub-regions divided by each derivative α :GM α =mean(L1-L2)×std(L1-L2); where GM α Represents each pixel of the image to be detected (r t , c t ) is the characteristic of the directional derivative at angle α, where α is 0°, 45°, 90°, and 135°. mean(*) indicates the mean value, and std(*) indicates the standard deviation.
[0031] For GM α After fusion, the directional derivative feature GM of the image to be detected is obtained.
[0032] Furthermore, a two-dimensional discrete orthogonal polynomial is used to fit the local grayscale distribution of the image to be detected, including:
[0033] Select a discrete symmetric set R, and based on the orthogonality of polynomials, obtain the two-dimensional discrete orthogonal polynomial P corresponding to the discrete symmetric set R i (r,c), i = 1, 2, ..., 2k; where k is the number of elements in the discrete symmetric set R, and r and c are the rows and columns of the image to be detected respectively;
[0034] Compute the coefficients k of each 2D discrete orthogonal polynomial i :
[0035]
[0036] Among them, W i is the weight matrix corresponding to the two-dimensional discrete orthogonal polynomial, I(r,c) represents the local grayscale distribution of the image to be detected;
[0037] Each two-dimensional discrete orthogonal polynomial P i (r,c) and its corresponding coefficient k i After multiplication and accumulation, the fitted local grayscale distribution is obtained.
[0038] Furthermore, the number of elements in the discrete symmetric set R is k=5, and the corresponding discrete symmetric set R is: R={-2,-1,0,1,2}.
[0039] Furthermore, the local contrast CM and the directional derivative feature GM are fused in the following manner:
[0040] S scale =GM×CM
[0041] Among them, S scale is the saliency map of the image to be detected at the current scale.
[0042] Furthermore, the saliency map S is segmented by using an adaptive threshold segmentation method, and the area with a value of 1 in the segmented saliency map is the position of the target in the image to be detected.
[0043] According to a second aspect of the present invention, there is provided a small target detection system, comprising a computer-readable storage medium and a processor;
[0044] The computer-readable storage medium is used to store executable instructions;
[0045] The processor is used to read the executable instructions stored in the computer-readable storage medium to execute the small target detection method described in any one of the first aspects.
[0046] According to a third aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the method for detecting small targets as described in any one of the first aspects is implemented.
[0047] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects:
[0048] (1) In addition to extracting the local contrast CM based on the grayscale distribution of the image to be detected at different scales, the small and weak target detection method of the present invention also mines the directional derivative feature GM of the image to be detected to enhance the local contrast of the image, and uses the obvious grayscale difference of the target in each direction, and then the obvious directional derivative difference, to calculate the directional derivative feature GM of the image to be detected, and fuses the local contrast CM with the directional derivative feature GM to enhance the local contrast. Therefore, segmentation based on the saliency map after the fusion of the local contrast CM and the directional derivative feature GM can improve the accuracy of small and weak target detection. At the same time, simulation experiments also prove that the method of the present invention has a higher accuracy and a lower false alarm rate.
[0049] (2) As a preferred embodiment, the present invention provides a local contrast CM calculation method based on grayscale distribution. Different from the traditional two-layer model, the present invention adopts a three-layer model to divide the target area corresponding to each pixel of the image to be detected into a background layer B, a target attenuation layer A and a target center layer C, that is, the target layer is further divided into a target attenuation layer A and a 1×1 target center layer C. By extracting the local contrast features of the 1×1 target center layer and participating in the subsequent target detection judgment, the existing two-layer model structure directly filters out the 1×1 area features, which may cause the loss of target features, and the detection accuracy can be further improved.
[0050] Moreover, considering that the difference between the target attenuation layer A and the background layer B plays an absolute role, when the fusion is performed based on the local contrast between regions to generate the final image local contrast CM, the designed fusion method can highlight the characteristic difference between the target attenuation layer A and the background layer B, thereby enhancing the local features of the target.
[0051] (3) As a preferred method, considering the difference between the target and the background, the real target generally conforms to a two-dimensional Gaussian distribution, while noise often does not have this distribution characteristic. Therefore, when calculating the local contrast between regions, not only the difference between the two regions but also the ratio between the two regions is considered, and then the difference and ratio between the regions are fused as the final image local contrast CM. In this way, the difference between the target and the background can be further highlighted, and the local features of the target can be further enhanced. At the same time, the regional grayscale mean is used to characterize the features of the corresponding region, which greatly reduces the complexity of the calculation.
[0052] (4) Furthermore, when extracting the features on each directional derivative, it is fully considered that the target to be detected should have obvious features in each directional derivative. The sub-region division method is designed to extract and merge the features of each directional derivative. The directional derivative features thus obtained can enhance the target while avoiding the influence of background structure noise with obvious directionality on detection.
[0053] (5) As a preference, the number of elements in the discrete symmetric set R is selected to be 5, which can balance computational complexity and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 Schematic diagram of a small target detection method in an embodiment of the present invention.
[0055] Figure 2 It is a schematic diagram of a three-layer model for dividing a target area in an embodiment of the present invention.
[0056] Figure 3 Visualization results of directional derivatives in four directions of an ideal infrared weak target.
[0057] Figure 4 This is the L1 and L2 division method corresponding to each directional derivative in the embodiment of the present invention.
[0058] Figure 5 3D distribution diagrams of local contrast CM, directional derivative features GM and saliency maps S corresponding to different images and corresponding segmentation results in the embodiment of the present invention. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0060] Example 1
[0061] like Figure 1 As shown, an embodiment of the present invention provides a small target detection method, which mainly includes:
[0062] S1, calculate the local contrast CM based on the grayscale distribution of the image to be detected at the current scale;
[0063] S2. Use discrete orthogonal polynomials to fit the local grayscale distribution of the image to be detected; and calculate partial derivatives of the fitted local grayscale distribution of the image to be detected with respect to the rows and columns of the image to be detected, respectively, to obtain directional derivatives of the image to be detected in the vertical direction and the horizontal direction; and calculate the directional derivative of the image to be detected at any angle based on the directional derivatives in the vertical direction and the horizontal direction;
[0064] S3, extracting the features of each pixel of the image to be detected at the directional derivative of its corresponding angle, and fusing them to obtain the directional derivative feature GM of the image to be detected;
[0065] S4. Fuse the local contrast CM and the directional derivative feature GM to obtain the saliency map S of the image to be detected at the current scale. scale ; and the saliency map S at each scale scale After fusion, it is used as the final saliency map S;
[0066] S5: Segment the final saliency map S to locate the target position.
[0067] It should be noted that, in the embodiments of the present invention, in order to facilitate the description of the specific implementation method or preferred implementation method of each step (for example, in order to facilitate the numbering of the steps in S1 as S1.1, S1.2, etc. below), a sequential description method such as S1-S5 is adopted, but in other embodiments, it is not necessary to be limited to such an execution order. For example, S2 and S3 can also be executed before S1.
[0068] As one implementation method, an existing local contrast algorithm can be used to calculate the local contrast CM of the image to be detected based on the grayscale distribution at the current scale. In an embodiment of the present invention, in order to improve the effect of target enhancement and reduce the calculation complexity, a specific calculation method for calculating the local contrast CM of the image to be detected based on the grayscale distribution at the current scale is provided, which mainly includes:
[0069] S1.1. By using a sliding window to traverse each pixel of the image to be detected, a target area is constructed with the current pixel of the image to be detected as the center; wherein the target area includes a target layer and a background layer B; a square area with the current pixel of the image to be detected as the center and the current scale as the side length is the target layer of the current target area, and the K sub-areas that are equal in size and adjacent to the target layer are the background layer of the current target area; and the target layer is composed of a target center layer C and a target attenuation layer A, the target center layer C is a region with a pixel size of 1×1 with the current pixel as the center, and the rest of the target layer is the target attenuation layer A. Figure 2 As shown, in the embodiment of the present invention, K is 8, that is, the background layer is divided into 8 sub-regions of the same size as the target layer, which are numbered 1 to 8 respectively.
[0070] S1.2. Calculate the local contrast between the target attenuation layer A, the background layer B and the target center layer C. In an embodiment of the present invention, a local contrast calculation method based on regional mean and ratio is provided, including:
[0071]
[0072] In formula (1), C represents the target center layer, I j Represents the grayscale value of each pixel in C, N C represents the number of pixels in C. In the embodiment of the present invention, N C =1,m C Indicates the mean gray value of the target center layer C. In the embodiment of the present invention, K is 8.
[0073] In formula (2), A represents the target center layer, I j Represents the grayscale value of each pixel in A, N A Represents the number of pixels in A. At the current scale s, N A=s 2 -N C , m A Represents the mean gray value of the target center layer C.
[0074] In formula (3), B i represents the i-th sub-region of the background layer, I j Indicates B i The gray value of each pixel in N Bi Indicates B i The number of pixels in, at the current scale s, N Bi =s 2 , m Bi Represents the mean grayscale value of the i-th sub-region of the background layer.
[0075] In formula (4), max(a, b) means taking the larger value of a and b, C CA Represents the local contrast between the target center layer C and the target attenuation layer A.
[0076] In formula (5), min(a, b) means taking the smaller value of a and b, C CB Represents the local contrast between the target center layer C and the background layer B.
[0077] In formula (6), C AB Indicates the local contrast between the target attenuation layer A and the background layer B.
[0078] S1.3. Calculate the local contrast CM of the image to be detected based on the grayscale distribution at the current scale. The calculation method is:
[0079] CM=C AB ×(C CA +C CB ) (7)
[0080] In formula (7), CM represents the local contrast of the image to be detected based on the grayscale distribution at the current scale.
[0081] The local contrast CM calculation method based on grayscale distribution provided in the embodiment of the present invention is different from the traditional two-layer model. In the embodiment of the present invention, a three-layer model is adopted to divide the target area corresponding to each pixel point of the image to be detected into a background layer B, a target attenuation layer A and a target center layer C, that is, the target layer is further divided into a target attenuation layer A and a 1×1 target center layer C. Considering that the image bad element is similar to the target pixel value, in order to avoid its interference with target detection, the traditional method directly filters out the 1×1 area feature, which may lose the target feature. In the embodiment of the present invention, by setting a 1×1 target center layer, performing subsequent feature extraction on it and participating in subsequent target detection judgment, the detection accuracy can be improved.
[0082] In the embodiment of the present invention, considering the difference between the target and the background, the real target generally conforms to a two-dimensional Gaussian distribution, while the noise often does not have this distribution characteristic. Therefore, when calculating the local contrast between the regions, not only the difference between the two regions but also the ratio between the two regions is considered, and then the difference and ratio between the regions are fused as the final image local contrast CM, so that the difference between the target and the background can be further highlighted. At the same time, the grayscale mean of the target attenuation layer A, the background layer B and the target center layer C is calculated by using the regional mean method to extract the features of the corresponding regions, which also greatly reduces the complexity of the calculation.
[0083] In addition, considering that the difference between the target attenuation layer A and the background layer B plays an absolute role, when the fusion is performed based on the local contrast between regions to generate the final image local contrast CM, the designed fusion method can highlight the characteristic difference between the target attenuation layer A and the background layer B, further enhancing the local features of the target.
[0084] S2 includes:
[0085] S2.1. Select a discrete symmetric set R and solve the discrete orthogonal polynomial by iterative calculation. The calculation rules are as follows:
[0086]
[0087] Where P n (r) and P k (r) represent n-order and k-order polynomials respectively, k is the number of elements in the discrete symmetric set R, n = 0, 1..., k-1. The discrete symmetric set R can be represented by In the embodiment of the present invention, in order to balance the computational complexity and accuracy, k=5 is selected, that is, the corresponding discrete symmetric set R={-2,-1,0,1,2}.
[0088] According to the calculation rule of formula (8), the orthogonal polynomial corresponding to the discrete symmetric set R can be obtained as:
[0089] P n (r) = {f(r 0 ),f(r 1 )...,f(r k-1 )} (9)
[0090] In the embodiment of the present invention, the orthogonal polynomial corresponding to the discrete symmetric set R={-2,-1,0,1,2} is:
[0091] P n (r) = {1,r,r 2 -2,r 3 -17 / 5r,r 4 -31 / 7r2 +72 / 35}
[0092] The one-dimensional discrete orthogonal polynomial is extended to two dimensions, and the corresponding discrete orthogonal polynomial is:
[0093] P n (r,c)={f(r m ,c n )|m=0,1...,k-1,n=0,1...,k-1} (10)
[0094] In the embodiment of the present invention, since there are only 5 terms in one dimension, the corresponding two-dimensional discrete orthogonal polynomial only takes 10 terms of lower degree, specifically:
[0095] P n (r,c)={1,r,c,r 2 -2,rc,c 2 -2,r 3 -17r / 5,(r 2 -2)c,r(c 2 -2),c 3 -17c / 5}
[0096] S2.2, according to the discrete orthogonal polynomials in the above formula (10), each polynomial is multiplied by the corresponding coefficient k i And the local grayscale distribution I(r,c) of the image to be detected can be fitted by accumulating, where (r,c) represent the row and column of the image to be detected, respectively. Specifically, it can be expressed as:
[0097]
[0098] In the formula, since the number of elements in the discrete symmetric set is k, after extending from one dimension to two dimensions, the number of polynomials is 2k, so the corresponding coefficient k i The number is 2k.
[0099] S2.3, according to the two-dimensional discrete orthogonal polynomial P i (r,c) construct the weight matrix W i , to calculate the coefficient k of each polynomial i , and its calculation rules are:
[0100]
[0101] In the formula, * represents the convolution operation.
[0102] Get the coefficient k of each polynomial i Then, according to formula (11), the local grayscale distribution of the image to be detected can be obtained by fitting with discrete orthogonal polynomials.
[0103] S2.4. Take the partial derivatives of the local grayscale distribution of the image to be detected fitted by discrete orthogonal polynomials with respect to the rows and columns (r, c) of the image, and obtain the directional derivative of the image to be detected in the vertical direction. and the directional derivative of the image to be detected in the horizontal direction In the embodiment of the present invention, combined with the selected discrete symmetry set, the partial derivative of the image with respect to the row and column (r, c) can be expressed as:
[0104]
[0105] It can be observed that there are only 6 polynomial coefficients involved in the formula, and the corresponding weight matrix is:
[0106]
[0107] W3=W2' (19)
[0108] W 10 =W7' (20)
[0109] W9=W8' (21)
[0110] Among them, W2', W7', and W8' correspond to the transposition of W2, W7, and W8 respectively.
[0111] S2.5. Calculate the directional derivative of the image to be detected at any angle based on the directional derivatives in the vertical and horizontal directions. The calculation formula is:
[0112]
[0113] Where α is an arbitrary angle, I' α represents the directional derivative of the image to be detected at an angle of α. In the embodiment of the present invention, the directional derivative of the image to be detected at {0°, 45°, 90°, 135°} is calculated. Figure 3 As shown in the figure, after the ideal infrared weak target is processed in the above steps, the directional derivatives of the four angles of 0°, 45°, 90°, and 135° are decomposed, including a two-dimensional grayscale visualization map and a three-dimensional distribution map; among them, Figure 3 The two pictures in the first row are the two-dimensional grayscale visualization and three-dimensional distribution diagrams of ideal infrared weak targets; the four pictures in the second row are the two-dimensional grayscale visualization diagrams of the directional derivatives at four angles of 0°, 45°, 90°, and 135°; the four pictures in the third row are the three-dimensional distribution diagrams of the directional derivatives at four angles of 0°, 45°, 90°, and 135°.
[0114] Specifically, in S3, in the embodiment of the present invention, a method for extracting each pixel point (r t , c t) on its corresponding directional derivatives, including:
[0115] S3.1, based on the directional derivatives of the image to be detected at 0°, 45°, 90°, and 135° obtained in S2, according to each pixel point (r t , c t ) position, divide the L1 and L2 sub-regions on the four directional derivatives, such as Figure 4 As shown, the division is:
[0116]
[0117] Among them, formula (23) represents the L1, L2 division rule of the 0° directional derivative, L1 (0°) and L2 (0°) represents the L1 and L2 sub-regions divided on the 0° directional derivative; Formula (24) represents the L1 and L2 division rules of the 45° directional derivative, L1 (45°) and L2 (45°) represents the L1 and L2 sub-regions divided on the 45° directional derivative; Formula (25) represents the L1 and L2 division rules of the 90° directional derivative, L1 (90°) and L2 (90°) represents the L1 and L2 sub-regions divided on the 90° directional derivative; Formula (26) represents the L1 and L2 division rule of the 135° directional derivative, L1 (135°) and L2 (135°) represents the L1 and L2 sub-regions divided on the 135° directional derivative; l is the side length of the divided L1 and L2 regions, where l is consistent with the current scale; Indicates a floor operation.
[0118] S3.2. Calculate the feature GM of the L1 and L2 sub-regions divided on each directional derivative α :
[0119] GM α =mean(L1-L2)×std(L1-L2) (28)
[0120] In the formula, GM α It represents the features of the L1, L2 sub-regions on the directional derivative at an angle α, that is, the component of the directional derivative feature GM of the image to be detected at an angle α. mean(*) represents the average value, and std(*) represents the standard deviation.
[0121] Based on the components of each angle, the directional derivative feature GM of the image to be detected is calculated by multiplication:
[0122] GM=ΠGM α (29)
[0123] In an embodiment of the present invention, when extracting features on each directional derivative, it is fully considered that the target to be detected should have obvious features in each directional derivative, and a sub-region division method is designed to extract and merge the features of each directional derivative. The directional derivative features thus obtained can enhance the target while avoiding the influence of background structure noise with obvious directionality on detection.
[0124] Specifically, S4 includes:
[0125] The local contrast CM and the directional derivative feature GM are fused to obtain the saliency map S of the image to be detected at the current scale. scale :
[0126] S scale =GM×CM (30)
[0127] As a preferred embodiment of the present invention, the maximum value fusion method is used to combine the saliency maps S at each scale. scale The saliency maps S at each scale are fused to obtain the final saliency map S. scale Recorded as The formula for fusion using the maximum value fusion method is:
[0128]
[0129] In the formula, Q represents the target scale set, t i represents each target scale, Indicates that at the target scale t i The saliency map under , max(*) represents the maximum value, and S represents the final generated saliency map.
[0130] Preferably, in S5, the final saliency map S is segmented by using an adaptive threshold segmentation method to locate the target position, which specifically includes:
[0131] According to the final saliency map S, the adaptive segmentation threshold T is obtained, and the calculation rule is:
[0132] T=μ+k'×σ (31)
[0133] In the formula, T represents the segmentation threshold, μ represents the mean value of the saliency map S, σ represents the standard deviation of the saliency map, and k' represents an empirical parameter. In the embodiment of the present invention, the value range is 3 to 14.
[0134] According to the segmentation threshold binarization saliency map S, the calculation rule is:
[0135]
[0136] Among them, the area with a saliency map value of 1 is the target location.
[0137] like Figure 5 As shown, the detection result diagrams on different images in the embodiment of the present invention are shown, from left to right, the infrared original image to be detected, CM, GM, S and the threshold segmentation diagram. It can be found that the present invention shows a higher accuracy and a lower false alarm rate for the problem of weak and small target detection under complex background. The present invention has excellent background suppression ability and target enhancement ability.
[0138] The small target detection method of the present invention, in addition to extracting the local contrast CM based on the grayscale distribution of the image to be detected at different scales, also mines the directional derivative feature GM of the image to be detected to enhance the local contrast of the image, utilizes the obvious grayscale difference of the target in each direction, and then the obvious directional derivative difference, to calculate the directional derivative feature GM of the image to be detected, fuses the local contrast CM with the directional derivative feature GM to enhance the local contrast, therefore, segmentation is performed based on the saliency map after the fusion of the local contrast CM and the directional derivative feature GM, which can improve the accuracy of small target detection. At the same time, simulation experiments also prove that the method of the present invention has a higher accuracy rate and a lower false alarm rate.
[0139] In addition, in view of the problems that existing principal component analysis-based methods often require continuous iterative calculations, have high algorithm calculation complexity and poor real-time performance, the method of the present invention, when performing local contrast calculations, uses a regional mean method to calculate the grayscale mean of the target attenuation layer A, the background layer B and the target center layer C to extract the features of the corresponding regions, and uses a discrete symmetric set of k=5, which can greatly reduce the complexity of the algorithm and has better real-time performance.
[0140] Compared with deep learning-based methods that often require a computing architecture that is adapted to them, the method of the present invention is more versatile.
[0141] In summary, the method of the present invention can effectively improve the detection rate of weak targets and reduce the false alarm rate within a lower computational complexity, thereby improving the real-time and accuracy of the calculation when there is a complex background in the image, such as a large number of clouds, and the image contains non-uniform components, such as blind pixels.
[0142] Example 2
[0143] An embodiment of the present invention provides a small target detection system, including a computer-readable storage medium and a processor;
[0144] Computer-readable storage media for storing executable instructions;
[0145] The processor is used to read the executable instructions stored in the computer-readable storage medium to execute the small target detection method in Example 1. For the related technical solutions, please refer to the corresponding description in Example 1, which will not be repeated here.
[0146] Example 3
[0147] The embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the small target detection method in Embodiment 1 is implemented. For the related technical solutions, please refer to the corresponding description in Embodiment 1, which will not be repeated here.
[0148] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for detecting small and weak targets. It is characterized in that include: Calculate the local contrast CM based on the grayscale distribution of the image to be detected at the current scale; A two-dimensional discrete orthogonal polynomial is used to fit the local grayscale distribution of the image to be detected; and partial derivatives of the fitted local grayscale distribution with respect to the rows and columns of the image to be detected are respectively obtained to obtain the directional derivatives of the image to be detected in the vertical direction and the horizontal direction, so as to calculate the directional derivative of the image to be detected at any angle; Extract the features of each pixel of the image to be detected on the directional derivative of its corresponding angle, and after fusion, obtain the directional derivative feature GM of the image to be detected; The local contrast CM and the directional derivative feature GM are fused to obtain a saliency map S of the image to be detected at the current scale. scale ; And the salient maps at each scale are fused as the final salient map S; The saliency map S is segmented to locate the position of the target in the image to be detected.
2. The small target detection method according to claim 1, It is characterized in that Calculate the local contrast CM based on the grayscale distribution of the image to be detected at the current scale, including: Traverse each pixel of the image to be detected, and construct a target area with the current pixel of the image to be detected as the center; wherein the target area includes a target layer and a background layer B; the target layer is a square area with the current pixel of the image to be detected as the center and the current scale as the side length; the background layer B is K sub-areas that are equal to and adjacent to the target layer; and the target layer is composed of a target center layer C and a target attenuation layer A, wherein the target center layer C is an area with the current pixel as the center and a pixel size of 1×1, and the rest of the target layer is the target attenuation layer A; Calculate the local contrast between the target attenuation layer A, the background layer B and the target center layer C; Calculate the local contrast CM based on the grayscale distribution of the image to be detected at the current scale: CM = C AB ×(C CA +C CB ), where C AB Indicates the local contrast between the target attenuation layer A and the background layer B; C CA represents the local contrast between the target center layer C and the target attenuation layer A; C CB Represents the local contrast between the target center layer C and the background layer B.
3. The small target detection method according to claim 2, It is characterized in that Calculate the local contrast between the target attenuation layer A, the background layer B and the target center layer C, including: Among them, m A Represents the mean gray value of the target center layer C, m Bi represents the mean gray value of the i-th sub-region of the background layer B, m C Represents the mean gray value of the target center layer C; max(a,b) means taking the larger value of a and b, and min(a,b) means taking the smaller value of a and b.
4. The small target detection method according to claim 1, It is characterized in that Calculate the directional derivative of the image to be detected at any angle, where the arbitrary angle includes 0°, 45°, 90°, and 135°; The features of each pixel of the image to be detected on the directional derivative of its corresponding angle are extracted and fused to obtain the directional derivative feature GM of the image to be detected, including: According to each pixel point (r t , c t ) position, and divide the L1 and L2 sub-areas based on the directional derivative of the corresponding angle, and the division method is: L1 (0°) ={(r,c)|-s≤r-r t ≤s,-2s≤c-c t ≤0} L2 (0°) ={(r,c)|-s≤r-r t ≤s,0≤c-c t ≤2s} L1 (45°) ={(r,c)|-2s≤r-r t ≤0,-2s≤c-c t ≤0} L2 (45°) ={(r,c)|0≤r-r t ≤2s,0≤c-c t ≤2s} L1 (90°) ={(r,c)|-2s≤r-r t ≤0,-s≤c-c t ≤s} L2 (90°) ={(r,c)|0≤r-r t ≤2s,-s≤c-c t ≤s} L1 (135°) ={(r,c)|-2s≤r-r t ≤0,0≤c-c t ≤2s} L2 (135°) ={(r,c)|0≤r-r t ≤2s,-2s≤c-c t ≤0} Among them, L1 (0°) and L2 (0°) 、L1 (45°) and L2 (45°) 、L1 (90°) and L2 (90°) 、L1 (135°) and L2 (135°) They correspond to the L1 and L2 sub-regions divided on the directional derivatives of 0°, 45°, 90°, and 135° respectively; r and c are the rows and columns of the image to be detected respectively; l is the side length of the divided L1 and L2 regions, Indicates a round-down operation; Calculate the characteristic GM of the L1 and L2 sub-regions divided by each derivative α :GM α =mean(L1-L2)×std(L1-L2); where GM α Represents each pixel of the image to be detected (r t , c t ) is the characteristic of the directional derivative at angle α, where α is 0°, 45°, 90°, and 135°. mean(*) indicates the mean value, and std(*) indicates the standard deviation. For GM α After fusion, the directional derivative feature GM of the image to be detected is obtained.
5. The small target detection method according to claim 1, It is characterized in that The local grayscale distribution of the image to be detected is fitted using a two-dimensional discrete orthogonal polynomial, including: Select a discrete symmetric set R, and based on the orthogonality of polynomials, obtain the two-dimensional discrete orthogonal polynomial P corresponding to the discrete symmetric set R i (r,c), i = 1, 2, ..., 2k; where k is the number of elements in the discrete symmetric set R, and r and c are the rows and columns of the image to be detected respectively; Compute the coefficients k of each 2D discrete orthogonal polynomial i : Among them, W i is the weight matrix corresponding to the two-dimensional discrete orthogonal polynomial, I(r,c) represents the local grayscale distribution of the image to be detected; Each two-dimensional discrete orthogonal polynomial P i (r,c) and its corresponding coefficient k i After multiplication and accumulation, the fitted local grayscale distribution is obtained.
6. The small target detection method according to claim 5, It is characterized in that The number of elements in the discrete symmetric set R is k=5, and the corresponding discrete symmetric set R is: R={-2,-1,0,1,2}.
7. The small target detection method according to claim 1, It is characterized in that The local contrast CM and the directional derivative feature GM are fused in the following manner: S scale =GM×CM Among them, S scale is the saliency map of the image to be detected at the current scale.
8. The small target detection method according to any one of claims 1 to 7, It is characterized in that The saliency map S is segmented by using an adaptive threshold segmentation method, and the area with a value of 1 in the segmented saliency map is the position of the target in the image to be detected.
9. A small target detection system, It is characterized in that comprising a computer readable storage medium and a processor; The computer-readable storage medium is used to store executable instructions; The processor is used to read the executable instructions stored in the computer-readable storage medium to execute the small target detection method according to any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the small target detection method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Infrared dim small target detection method of constructing entropy contrast ratios by utilizing directional derivatives
CN107194355A
A method for evaluating the quality of a tone mapped image
CN109191460A
Infrared weak and small target detection method and detection system
CN111861968A
Infrared weak and small target detection method and device based on local contrast
CN113888428A
Edge detection enhancement-based open ground and ground background small target detection method
CN115035350A
