A method and device for detecting infrared weak and small targets based on local contrast
Through the infrared weak and small target detection method based on local contrast, using sliding window and saliency map difference operation, combined with cluster analysis, the problems of low detection efficiency and high false alarm rate in the existing technology are solved, and more efficient target detection and Noise suppression.
Patent Information
- Application Number
- CN202111141973.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-28
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-09-28
AI Technical Summary
Existing infrared weak and small target detection algorithms have low detection efficiency and high false alarm rate under complex backgrounds. In particular, they cannot effectively suppress noise with larger gray scale, which affects the detection performance.
A detection method based on local contrast is used to divide the image blocks by setting a sliding window, calculate the contrast of each pixel and generate a saliency map, combine the statistical 3σ criterion and adaptive threshold segmentation method, convert it into a binary image, and use density clustering The algorithm removes false targets and determines target location and size.
It improves the accuracy of infrared weak and small target detection, reduces the false alarm rate, effectively suppresses noise in complex backgrounds, and improves detection efficiency.
Smart Images

Figure CN113888428B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of target detection, and in particular relates to a method and a device for detecting infrared weak and small targets based on local contrast. Background Art
[0002] With the development of infrared imaging technology, infrared imaging processing systems have been widely used. As one of the key technologies, infrared target detection has developed rapidly in recent years. When a target is imaged at a long distance, if the target area is small, the intensity is weak, and the noise interference is large, the signal-to-noise ratio of the image will be low. Therefore, infrared weak target detection under complex background is a very challenging research topic. The purpose of detection is to eliminate false targets and retain real targets.
[0003] At present, infrared weak target detection algorithms can generally be divided into two categories: single-frame detection algorithms and multi-frame detection algorithms. The single-frame detection algorithm mainly uses the difference between the grayscale values corresponding to the target position and the background position in a single-frame image to enhance the target and suppress the background, extract suspicious targets, and then detect the real target. This method is time-consuming and has a high false alarm rate; single-frame detection algorithms include peak detection method, global threshold method, texture analysis method, morphological method, wavelet analysis method, etc. The multi-frame detection algorithm mainly uses the time-domain and spatial characteristics of target motion in sequence images and the continuity and consistency of target motion to realize the detection of weak targets. The multi-frame detection algorithm mainly includes difference method, multi-level hypothesis testing method, dynamic programming method, gray accumulation method and optical flow method.
[0004] In addition to the above methods, in recent years, human visual features have been introduced into infrared dim small target detection methods. These visual features mainly include contrast mechanism, multi-resolution representation, and scale adaptation process. The contrast mechanism mainly extracts the saliency map of the target image through the saliency measurement method, and then further confirms the target. Qi et al. proposed a detection method based on directional saliency. This method first calculates the second-order directional derivative of the image based on the facet model, and then separates the small target by Fourier transform and phase spectrum saliency detection. Chen et al. proposed a detection method based on target local contrast (LCM). This method detects small targets by finding the maximum contrast between the center and the local neighborhood at multiple different scales. The traditional LCM algorithm can enhance the image signal-to-noise ratio and improve the detection efficiency by calculating the local contrast. However, for images with complex backgrounds, the background suppression effect of the algorithm is not obvious. In addition, for some grayscale noises in the image, the algorithm also improves their contrast, which has a great impact on the detection performance, such as increasing the false alarm rate of detection. In addition, although repeated calculations at different scales can improve the image signal-to-noise ratio, the improvement effect is not obvious, and at the same time it greatly increases the time required for detection. Summary of the invention
[0005] In order to solve the above technical problems, the present invention proposes a method and device for infrared dim small target detection based on local contrast, which are used to solve the technical problems of low detection efficiency and high false alarm rate in the prior art.
[0006] According to a first aspect of the present invention, a method for detecting infrared small targets based on local contrast is provided, the method comprising the following steps:
[0007] Step S101: Set a sliding window of size n×n, where n is an odd number; traverse the image I(x, y) from left to right and from top to bottom using the sliding window to divide the image I(x, y) into Num non-overlapping image blocks I block , 1≤block≤Num, x is the pixel coordinate of the horizontal X direction of the image I(x,y), y is the pixel coordinate of the vertical Y direction of the image I(x,y), G(x,y) is the gray value of the image at the (x,y) coordinate; calculate each image block I block The mean of the image block is used as the response value m of the image block. num ;
[0008] Step S102: Calculate the contrast of each pixel in the image I(x, y), replace the gray value of each pixel in the image I(x, y) with the contrast, and obtain a contrast map C(x, y);
[0009] Step S103: Based on the contrast map C(x,y), obtain a saliency map S(x,y).
[0010] S(x,y)=C(x,y)-I(x,y);
[0011] Step S104: Obtain target detection threshold Th, Th = μ s +k×σ s ,
[0012] Among them, μ s is the mean of the saliency map S(x,y), σ s is the standard deviation of the saliency map S(x,y); k is the segmentation coefficient;
[0013] Step S105: Based on the target detection threshold Th, the saliency map S(x, y) is converted into a binary image B(x, y), and an original point set points is obtained from the binary image, where points = {(x i ,y i )|i=0,1,2,…,N-1}, the original point is a non-zero pixel in the binary image B(x,y), x iis the horizontal X-coordinate of the i-th original point in the original point set points, y i is the vertical Y coordinate of the i-th original point in the original point set points, and N is the number of original point set points;
[0014]
[0015] Step S106: performing cluster analysis on the original point set points, and obtaining the position and size of the target according to the clustering result.
[0016] According to a second aspect of the present invention, there is provided an infrared dim small target detection device based on local contrast, the device comprising:
[0017] Response value calculation module: configured to set a sliding window of size n×n, where n is an odd number; the sliding window traverses the image I(x,y) from left to right and from top to bottom, and divides the image I(x,y) into Num non-overlapping image blocks I block , 1≤block≤Num, x is the pixel coordinate of the horizontal X direction of the image I(x,y), y is the pixel coordinate of the vertical Y direction of the image I(x,y), G(x,y) is the gray value of the image at the (x,y) coordinate; calculate each image block I block The mean of the image block is used as the response value m of the image block. num ;
[0018] Contrast map acquisition module: configured to calculate the contrast of each pixel in the image I (x, y), replace the gray value of each pixel in the image I (x, y) with the contrast, and obtain a contrast map C (x, y);
[0019] A saliency map acquisition module: configured to acquire a saliency map S(x,y) based on the contrast map C(x,y),
[0020] S(x,y)=C(x,y)-I(x,y);
[0021] Detection threshold acquisition module: configured to obtain the target detection threshold Th, Th = μ s +k×σ s ,
[0022] Among them, μ s is the mean of the saliency map S(x,y), σ s is the standard deviation of the saliency map S(x,y); k is the segmentation coefficient;
[0023] Binary image acquisition module: configured to convert the saliency map S(x, y) into a binary image B(x, y) based on the target detection threshold Th, and obtain the original point set points from the binary image, points = {(x i ,y i )|i=0,1,2,…,N-1}, the original point is a non-zero pixel in the binary image B(x,y), x i is the horizontal X-coordinate of the i-th original point in the original point set points, y i is the vertical Y coordinate of the i-th original point in the original point set points, and N is the number of original point set points;
[0024]
[0025] Cluster analysis module: configured to perform cluster analysis on the original point set points, and obtain the position and size of the target according to the clustering results.
[0026] According to a third aspect of the present invention, there is provided an infrared dim small target detection system based on local contrast, comprising:
[0027] A processor, which is used to execute multiple instructions;
[0028] A memory for storing a plurality of instructions;
[0029] The plurality of instructions are used to be stored in the memory, and loaded and executed by the processor to implement the infrared dim small target detection method based on local contrast as described above.
[0030] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein a plurality of instructions are stored in the storage medium; the plurality of instructions are used for a processor to load and execute the infrared dim small target detection method based on local contrast as described above.
[0031] According to the above scheme of the present invention, in the case of fully considering the characteristics of infrared imaging, the characteristics of target contrast information and saliency map are combined and applied to infrared target detection. First, the original image is preprocessed using the contrast characteristics of the infrared target area and the surrounding background to enhance the target contrast and suppress background noise; then, all the pixels of the image are traversed by a sliding window, the image is divided into several small blocks, and each pixel in the image is replaced by the contrast between the central block and the domain block to obtain a contrast map; then, the saliency map of the target is obtained by differential calculation between the contrast map and the original image, and the small target is separated according to the statistical 3σ criterion and the adaptive threshold segmentation method, and the saliency map is converted into a binary image; finally, the target point set is extracted from the binary image, and a density clustering algorithm is used for clustering analysis, and false targets are removed according to the clustering results combined with the peak characteristics, and the position and size of the target are calculated, thereby completing the infrared target detection function and improving the accuracy of target detection.
[0032] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention and implement it according to the contents of the specification, the following is a detailed description of the preferred embodiments of the present invention in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention, and the present invention is described by providing the following accompanying drawings. In the accompanying drawings:
[0034] Figure 1 This is a flow chart of an infrared dim small target detection method based on local contrast according to an embodiment of the present invention;
[0035] Figure 2 A schematic diagram of a sliding window according to an embodiment of the present invention;
[0036] Figure 3 A contrast diagram of an embodiment of the present invention;
[0037] Figure 4 A schematic diagram of saliency according to an embodiment of the present invention;
[0038] Figure 5 A schematic diagram of a binary image according to an embodiment of the present invention;
[0039] Figure 6 A clustering schematic diagram of an embodiment of the present invention;
[0040] Figure 7 It is a schematic structural diagram of an infrared dim small target detection device based on local contrast according to an embodiment of the present invention. DETAILED DESCRIPTION
[0041] First combine Figure 1 The following describes a method flow for detecting small infrared targets based on local contrast according to an embodiment of the present invention. The method comprises the following steps:
[0042] Step S101: Set a sliding window of size n×n, where n is an odd number; traverse the image I(x, y) from left to right and from top to bottom using the sliding window to divide the image I(x, y) into Num non-overlapping image blocks I block , 1≤block≤Num, x is the pixel coordinate of the horizontal X direction of the image I(x,y), y is the pixel coordinate of the vertical Y direction of the image I(x,y), G(x,y) is the gray value of the image at the (x,y) coordinate; calculate each image block I block The mean of the image block is used as the response value m of the image block. num ;
[0043] Step S102: Calculate the contrast of each pixel in the image I(x, y), replace the gray value of each pixel in the image I(x, y) with the contrast, and obtain a contrast map C(x, y);
[0044] Step S103: Based on the contrast map C(x,y), obtain a saliency map S(x,y).
[0045] S(x,y)=C(x,y)-I(x,y);
[0046] Step S104: Obtain target detection threshold Th, Th = μ s +k×σ s ,
[0047] Among them, μ s is the mean of the saliency map S(x,y), σ s is the standard deviation of the saliency map S(x,y); k is the segmentation coefficient;
[0048] Step S105: Based on the target detection threshold Th, the saliency map S(x, y) is converted into a binary image B(x, y), and an original point set points is obtained from the binary image, where points = {(x i ,y i )|i=0,1,2,…,N-1}, the original point is a non-zero pixel in the binary image B(x,y), x i is the horizontal X-coordinate of the i-th original point in the original point set points, y i is the vertical Y coordinate of the i-th original point in the original point set points, and N is the number of original point set points;
[0049]
[0050] Step S106: performing cluster analysis on the original point set points, and obtaining the position and size of the target according to the clustering result.
[0051] Step S101: Calculate image block I block The mean of the image block is used as the response value m of the image block. num ,in:
[0052]
[0053] Where u is the horizontal pixel coordinate in the image I(x,y), v is the vertical pixel coordinate in the image I(x,y), I(u,v) is the grayscale value of the image I(x,y) at the coordinate (u,v), and u 0block is the image block I block The pixel coordinates of the center in the horizontal direction of the image I(x,y), v 0block is the image block I block The pixel coordinates of the center in the vertical direction of the image I(x,y);
[0054] In this embodiment, Figure 2 As shown, the size of the sliding window is 3×3. After the sliding window traverses the image, the image I(x,y) is divided into several image blocks, each of which contains 3×3 sub-blocks, and each sub-block corresponds to several pixels. There are no overlapping pixels between image blocks.
[0055] The step S102: calculating the contrast of each pixel in the image I(x, y), replacing the gray value of each pixel in the image I(x, y) with the contrast, and obtaining a contrast map C(x, y), where:
[0056] The contrast of each pixel in the original image is calculated by traversing the entire image.
[0057]
[0058] m centre is the mean of the central block, L n Indicates the maximum brightness of the central block, m Δ represents the mean of all neighborhood blocks; the central block is the image block at the center of all image blocks, and the domain block is the image block surrounding the central block.
[0059] In this embodiment, the contrast ratio diagram is as follows: Figure 3 After the sliding window traverses all the pixels in the image, each pixel in the image is replaced to obtain a contrast map, which is conducive to accurately detecting the target, improving the detection rate and reducing the false alarm rate.
[0060] The step S103: based on the contrast map C(x,y), obtaining a saliency map S(x,y),
[0061] S(x,y)=C(x,y)-I(x,y)
[0062] Significant pictures such as Figure 4 As shown, in this embodiment, the signal-to-noise ratio of the image can be further improved.
[0063] Step S104: Obtaining target detection threshold Th, Th = μ s +k×σ s ,
[0064] Among them, μ s is the mean of the saliency map S(x,y), σ s is the standard deviation of the significance map S(x,y); k is the segmentation coefficient, which is generally 3 to 5.
[0065] The step S105: based on the target detection threshold Th, the saliency map S(x, y) is converted into a binary image B(x, y), and an original point set points is obtained from the binary image, where points = {(x i ,y i )|i=0,1,2,…,N-1}, the original point is a non-zero pixel in the binary image B(x,y), x i is the horizontal X-coordinate of the i-th original point in the original point set points, y i is the vertical Y coordinate of the i-th original point in the original point set points, and N is the number of original point set points;
[0066]
[0067] The original point set points includes the coordinates of all non-zero pixels in the binary image B(x, y).
[0068] In this embodiment, the binary image is as follows Figure 5 shown.
[0069] The step S106: performing cluster analysis on the original point set points, and obtaining the position and size of the target according to the clustering result. The cluster analysis step includes:
[0070] Step S1061: traverse all points in the points set and calculate the neighborhood density of each point. The neighborhood range is n×n, denoted as density = {d s}, 1≤s≤pnum, where d sis the neighborhood density of the sth point in the points set, and pnum is the number of points in the points set;
[0071]
[0072] Among them, p and q are the horizontal and vertical coordinates of the pixel in the binary image B, respectively, and (p0, q0) is the coordinate of the sth point in the set points.
[0073] Step S1062: If the points in the points set are not empty, proceed to step S1063; otherwise, form a new cluster set L = {l t |t=0,1,2,…,L n -1}, where t is the tth cluster, L n is the number of clusters in the set L; l t is the classification result of the t-th cluster, and the process goes to step S1064;
[0074] Step S1063: taking the points in the points set as candidate points, arbitrarily selecting a candidate point, traversing all the points in the points set, calculating the Euclidean distance between each point in the points set and the selected candidate point, dividing the points with a distance less than a threshold into the same cluster, and assigning a category number; deleting the points corresponding to the same cluster from the points set; and proceeding to step S1062;
[0075] The clustering results are as follows Figure 6 shown.
[0076] Step S1064: traverse all clusters L, count all point sets of each cluster, calculate the horizontal X direction and vertical Y direction coordinates of each cluster respectively, so as to obtain the horizontal X direction size s of the target in each cluster tX and the vertical Y-direction dimension s tY ;
[0077]
[0078] Among them, X tmax is the maximum coordinate value in the horizontal X direction of the t-th cluster, X tmin is the minimum coordinate value in the horizontal X direction of the t-th cluster, Y tmax is the maximum coordinate value in the vertical Y direction of the t-th cluster, Y tmin is the minimum coordinate value in the vertical Y direction in the t-th cluster.
[0079] Step S1065: Calculate the center of each cluster, including:
[0080]
[0081]
[0082] Among them, x t0 is the horizontal X-direction center coordinate of the t-th cluster, y t0 is the coordinate of the center point of the t-th cluster in the vertical Y direction, density(s) is the density of the s-th point in the t-th cluster, L tx (s) is the horizontal X-direction coordinate of the s-th point in the t-th cluster, L ty (s) is the vertical Y coordinate of the s-th point in the t-th cluster.
[0083] The position and size of the target are obtained according to the clustering result, wherein: each cluster corresponds to one target. Each cluster is a separate target. If there is only one target in the image, then the clustering result has only one cluster; otherwise, the clustering result will have multiple clusters.
[0084] The embodiment of the present invention further provides an infrared dim small target detection device based on local contrast, such as Figure 7 As shown, the device comprises:
[0085] Response value calculation module: configured to set a sliding window of size n×n, where n is an odd number; the sliding window traverses the image I(x,y) from left to right and from top to bottom, and divides the image I(x,y) into Num non-overlapping image blocks I block , 1≤block≤Num, x is the pixel coordinate of the horizontal X direction of the image I(x,y), y is the pixel coordinate of the vertical Y direction of the image I(x,y), G(x,y) is the gray value of the image at the (x,y) coordinate; calculate each image block I block The mean of the image block is used as the response value m of the image block. num ;
[0086] Contrast map acquisition module: configured to calculate the contrast of each pixel in the image I (x, y), replace the gray value of each pixel in the image I (x, y) with the contrast, and obtain a contrast map C (x, y);
[0087] A saliency map acquisition module: configured to acquire a saliency map S(x,y) based on the contrast map C(x,y),
[0088] S(x,y)=C(x,y)-I(x,y);
[0089] Detection threshold acquisition module: configured to obtain the target detection threshold Th, Th = μ s +k×σ s ,
[0090] Among them, μs is the mean of the saliency map S(x,y), σ s is the standard deviation of the saliency map S(x,y); k is the segmentation coefficient;
[0091] Binary image acquisition module: configured to convert the saliency map S(x, y) into a binary image B(x, y) based on the target detection threshold Th, and obtain the original point set points from the binary image, points = {(x i ,y i )|i=0,1,2,…,N-1}, the original point is a non-zero pixel in the binary image B(x,y), x i is the horizontal X-coordinate of the i-th original point in the original point set points, y i is the vertical Y coordinate of the i-th original point in the original point set points, and N is the number of original point set points;
[0092]
[0093] Cluster analysis module: configured to perform cluster analysis on the original point set points, and obtain the position and size of the target according to the clustering results.
[0094] The embodiment of the present invention further provides an infrared dim small target detection system based on local contrast, comprising:
[0095] A processor, which is used to execute multiple instructions;
[0096] A memory for storing a plurality of instructions;
[0097] The plurality of instructions are used to be stored in the memory, and loaded and executed by the processor to implement the infrared dim small target detection method based on local contrast as described above.
[0098] The embodiment of the present invention further provides a computer-readable storage medium, wherein a plurality of instructions are stored in the storage medium; the plurality of instructions are used for a processor to load and execute the infrared dim small target detection method based on local contrast as described above.
[0099] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0100] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0101] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0102] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0103] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a physical server, or a network cloud server, etc., which needs to be installed with Windows or Windows Server operating system) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (RandomAccess Memory, RAM), disk or optical disk and other media that can store program codes.
[0104] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention still falls within the scope of the technical solution of the present invention.
Claims
1. A method for detecting infrared small targets based on local contrast, characterized in that: The method comprises the following steps: Step S101: Set a sliding window of size n×n, where n is an odd number; traverse the image I(x, y) from left to right and from top to bottom using the sliding window to divide the image I(x, y) into Num non-overlapping image blocks I block , 1≤block≤Num, x is the pixel coordinate of the horizontal X direction of the image I(x,y), y is the pixel coordinate of the vertical Y direction of the image I(x,y), G(x,y) is the gray value of the image at the (x,y) coordinate; calculate each image block I block The mean of the image block is used as the response value m of the image block. num ; Step S102: Calculate the contrast of each pixel in the image I(x, y), replace the gray value of each pixel in the image I(x, y) with the contrast, and obtain a contrast map C(x, y); Step S103: Based on the contrast map C(x,y), obtain a saliency map S(x,y). S(x,y)=C(x,y)-I(x,y); Step S104: Obtain target detection threshold Th, Th = μ s +k×σ s , Among them, μ s is the mean of the saliency map S(x,y), σ s is the standard deviation of the saliency map S(x,y); k is the segmentation coefficient; Step S105: Based on the target detection threshold Th, the saliency map S(x, y) is converted into a binary image B(x, y), and an original point set points is obtained from the binary image, where points = {(x i ,y i )|i=0,1,2,...,N-1}, the original point is a non-zero pixel in the binary image B(x,y), x i is the horizontal X-coordinate of the i-th original point in the original point set points, y i is the vertical Y coordinate of the i-th original point in the original point set points, and N is the number of original point set points; Step S106: performing cluster analysis on the original point set points, and obtaining the position and size of the target according to the clustering result; Step S104: Obtaining target detection threshold Th, Th = μ s +k×σ s , where μ s is the mean of the saliency map S(x,y), σ s is the standard deviation of the saliency map S(x,y); k is the segmentation coefficient, which ranges from 3 to 5; The step S106: performing cluster analysis on the original point set points, and obtaining the position and size of the target according to the clustering result. The cluster analysis step includes: Step S1061: traverse all points in the points set and calculate the neighborhood density of each point. The neighborhood range is n×n, denoted as density = {d s }, 1≤s≤pnum, where d s is the neighborhood density of the sth point in the points set, and pnum is the number of points in the points set; Where p and q are the horizontal and vertical coordinates of the pixel in the binary image B, respectively, and (p0, q0) is the coordinate of the sth point in the set points; Step S1062: If the points in the points set are not empty, proceed to step S1063; otherwise, form a new cluster set L = {l t |t=0,1,2,...,L n -1}, where t is the tth cluster, L n is the number of clusters in the set L; l t is the classification result of the t-th cluster, and the process goes to step S1064; Step S1063: taking the points in the points set as candidate points, arbitrarily selecting a candidate point, traversing all the points in the points set, calculating the Euclidean distance between each point in the points set and the selected candidate point, dividing the points with a distance less than a threshold into the same cluster, and assigning a category number; deleting the points corresponding to the same cluster from the points set; and proceeding to step S1062; Step S1064: traverse all clusters L, count all point sets of each cluster, calculate the horizontal X direction and vertical Y direction coordinates of each cluster respectively, so as to obtain the horizontal X direction size s of the target in each cluster tX and the vertical Y dimension s tY ; Among them, X tmax is the maximum coordinate value in the horizontal X direction of the t-th cluster, X tmin is the minimum coordinate value in the horizontal X direction of the t-th cluster, Y tmax is the maximum coordinate value in the vertical Y direction of the t-th cluster, Y tmin is the minimum coordinate value in the vertical Y direction in the t-th cluster; Step S1065: Calculate the center of each cluster, including: Among them, x t0 is the horizontal X-direction center coordinate of the t-th cluster, y t0 is the coordinate of the center point of the t-th cluster in the vertical Y direction, density(s) is the density of the s-th point in the t-th cluster, L tx (s) is the horizontal X-direction coordinate of the s-th point in the t-th cluster, L ty (s) is the vertical Y coordinate of the s-th point in the t-th cluster.
2. An infrared small target detection device based on local contrast, characterized in that: For implementing the infrared dim small target detection method based on local contrast as claimed in claim 1, the device comprises: Response value calculation module: configured to set a sliding window of size n×n, where n is an odd number; the sliding window traverses the image I(x,y) from left to right and from top to bottom, and divides the image I(x,y) into Num non-overlapping image blocks I block , 1≤block≤Num, x is the pixel coordinate of the horizontal X direction of the image I(x,y), y is the pixel coordinate of the vertical Y direction of the image I(x,y), G(x,y) is the gray value of the image at the (x,y) coordinate; calculate each image block I bl The mean of the image block is taken as the response value m of the image block. num ; Contrast map acquisition module: configured to calculate the contrast of each pixel in the image I (x, y), replace the gray value of each pixel in the image I (x, y) with the contrast, and obtain a contrast map C (x, y); A saliency map acquisition module: configured to acquire a saliency map S(x,y) based on the contrast map C(x,y), S(x,y)=C(x,y)-I(x,y); Detection threshold acquisition module: configured to obtain the target detection threshold Th, Th = μ s +k×σ s , Among them, μ s is the mean of the saliency map S(x,y), σ s is the standard deviation of the saliency map S(x,y); k is the segmentation coefficient; Binary image acquisition module: configured to convert the saliency map S(x, y) into a binary image B(x, y) based on the target detection threshold Th, and obtain the original point set points from the binary image, points = {(x i ,y i )|i=0,1,2,...,N-1}, the original point is a non-zero pixel in the binary image B(x,y), x i is the horizontal X-direction coordinate of the i-th original point in the original point set points, y i is the vertical Y coordinate of the i-th original point in the original point set points, and N is the number of original point set points; Cluster analysis module: configured to perform cluster analysis on the original point set points, and obtain the position and size of the target according to the clustering results.
3. A local contrast-based infrared dim small target detection system, wherein a plurality of instructions are stored in the system; the plurality of instructions are used by a processor to load and execute the local contrast-based infrared dim small target detection method as described in claim 1.
4. A computer-readable storage medium, wherein a plurality of instructions are stored in the storage medium; the plurality of instructions are used by a processor to load and execute the infrared dim small target detection method based on local contrast as described in claim 1.
Citation Information
Patent Citations
Infrared weak target detection method based on visual contrast mechanism
CN107392885A
Infrared weak and small target detection method under complex background
CN113111878A
