Methods, devices, terminals, storage media, and software products for detecting moving targets.
By preprocessing and chunking sparse transmission of images on the camera side, combined with image reconstruction and contour detection of the upper computer, the real-time problem of array cameras and upper computers when detecting small moving targets is solved, and efficient motion is achieved Object detection.
Patent Information
- Application Number
- CN202411139058.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-08-20
AI Technical Summary
The existing array cameras and upper computers have poor real-time performance when detecting small moving targets, mainly due to the low data transmission efficiency and the calculation-intensive object detection algorithm occupying a large amount of CPU resources, resulting in insufficient real-time performance of multi-objective detection.
The image is preprocessed on the camera side, converted into sparse images, and transmitted to the upper computer side by block sparse transmission method, for image reconstruction and screening, and target detection is achieved through threshold calculation and contour detection, reducing data transmission and sharing the burden Calculation load of the host computer.
It improves the real-time and accuracy of motion target detection, reduces the error detection rate and missed detection rate, and meets the high resolution and high frequency detection requirements for small motion targets.
Smart Images

Figure CN118657807B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of machine vision technology, and specifically relates to a method, device, terminal, storage medium and computer program product for detecting a moving target, and more particularly to a method, device, terminal, storage medium and computer program product for an array camera to detect small moving targets in real time and in all directions within a distance of hundreds of meters. Background Art
[0002] The moving target detection algorithm is an important technology in the field of machine vision, which is mainly used to identify and track moving targets in video or image sequences. The moving target detection algorithm is often used in monitoring, autonomous driving, and drone navigation. In related solutions, array cameras and host computers are used to detect small moving targets, but the real-time performance of the host computer for multi-target detection is poor.
[0003] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention
[0004] The object of the present invention is to provide a method, device, terminal, storage medium and computer program product for detecting a moving target, so as to solve the problem that, in a related scheme, when an array camera and a host computer are used to detect a small moving target, the real-time performance of the host computer for multi-target detection is poor, and the detection of small moving targets is achieved by preprocessing the collected image at the camera end and converting it into a sparse image, and transmitting it to the host computer end in a block sparse transmission manner, and performing threshold calculation on the image blocks at the receiving end at the host computer end, and then reconstructing and screening the image, so as to realize the detection of small moving targets with good real-time performance.
[0005] The present invention provides a method for detecting a moving target, comprising: an array camera is arranged at a camera end; the array camera is used to sample an image of a moving target to be detected in real time, which is recorded as a current image of the moving target to be detected; at the camera end, the current image of the moving target to be detected is preprocessed to obtain a preprocessed image of the moving target to be detected; at the camera end, the preprocessed image of the moving target to be detected is converted into two or more image blocks to obtain two or more image blocks of the moving target to be detected; and the two or more image blocks of the moving target to be detected are transmitted to a host computer end which has established a communication connection with the camera end in a block sparse transmission manner; at the host computer end, for the received two or more image blocks of the moving target to be detected, a threshold value of each image block in the two or more image blocks of the moving target to be detected is calculated, and then image reconstruction and screening are performed to obtain a detection result of the moving target to be detected, so as to realize the detection of the moving target to be detected; wherein the threshold value of each image block refers to the gray value threshold value of each image block.
[0006] In some embodiments, at the camera end, the current image of the moving target to be detected is preprocessed to obtain a preprocessed image of the moving target to be detected, including: at the camera end, performing inter-frame difference on two adjacent frames of the current image of the moving target to be detected to obtain a differential image of the two frames of the moving target to be detected; performing threshold segmentation processing on the differential image of the two frames of the moving target to be detected to obtain a threshold segmented image of the moving target to be detected as the preprocessed image of the moving target to be detected.
[0007] In some embodiments, performing threshold segmentation processing on the differential image of the two frames of images of the moving target to be detected to obtain the threshold segmented image of the moving target to be detected specifically includes: performing threshold segmentation processing on the differential image of the two frames of images of the moving target to be detected to obtain the threshold segmented image of the moving target to be detected using the following formula:
[0008] ;
[0009] in represents the threshold segmentation image of the moving target to be detected, The differential image of two frames of images representing the moving target to be detected, n represents the number of image frames, and T represents the threshold value of the pixel value of the image.
[0010] In some embodiments, at the camera end, the preprocessed image of the moving target to be detected is converted into two or more image blocks to obtain the two or more image blocks of the moving target to be detected, including: dividing the matrix according to a threshold value of a set size, converting the preprocessed image of the moving target to be detected into two or more image blocks, and storing the two or more image blocks in chronological order.
[0011] In some embodiments, at the host computer end, for the two or more image blocks of the moving target to be detected, after calculating the threshold of each image block in the two or more image blocks of the moving target to be detected, image reconstruction and screening are performed to obtain the detection result of the moving target to be detected, including: at the host computer end, receiving the two or more image blocks of the moving target to be detected in time sequence; at the host computer end, for the two or more image blocks of the moving target to be detected, calculating the threshold of each image block in time sequence to obtain the threshold calculation data of each image block; thereby, obtaining the threshold calculation data of all image blocks in the two or more image blocks of the moving target to be detected. Calculation data is recorded as the threshold calculation data of all image blocks of the moving target to be detected; at the host computer end, image reconstruction is performed according to the threshold calculation data of all image blocks of the moving target to be detected to obtain a reconstructed image of the moving target to be detected; at the host computer end, contour detection is performed on the reconstructed image of the moving target to be detected to obtain a contour detection result of the reconstructed image of the moving target to be detected; at the host computer end, according to preset contour attributes, a valid contour is screened from the contour detection result of the reconstructed image of the moving target to be detected, and the reconstructed image of the moving target to be detected corresponding to the valid contour is used as the detection result of the moving target to be detected.
[0012] In some implementations, calculating the threshold of each image block to obtain the threshold calculation data of each image block specifically includes: calculating the threshold of each image block according to the following formula to obtain the threshold calculation data of each image block: ; Where T is the threshold of each image block, For each image block The gray value of the position, k is a non-negative parameter, and s is the number of pixels in each image block.
[0013] In accordance with the above method, the present invention provides a moving target detection device, comprising: a camera end and a host computer end; at the camera end, an array camera is provided; an acquisition unit is used to use the array camera to sample the image of the moving target to be detected in real time, which is recorded as the current image of the moving target to be detected; at the camera end, a first control unit is used to pre-process the current image of the moving target to be detected to obtain a pre-processed image of the moving target to be detected; at the camera end, the first control unit is also used to convert the pre-processed image of the moving target to be detected into two or more image blocks to obtain a moving target to be detected. and transmitting the two or more image blocks of the moving target to be detected to a host computer end which has established a communication connection with the camera end in a block sparse transmission manner; at the host computer end, a second control unit is used to calculate the threshold of each image block in the two or more image blocks of the moving target to be detected for the received two or more image blocks of the moving target to be detected, and then reconstruct and screen the image to obtain the detection result of the moving target to be detected, so as to realize the detection of the moving target to be detected; wherein the threshold of each image block refers to the gray value threshold of each image block.
[0014] In some embodiments, at the camera end, a first control unit preprocesses the current image of the moving target to be detected to obtain a preprocessed image of the moving target to be detected, including: at the camera end, performing inter-frame difference on two adjacent frames of images in the current image of the moving target to be detected to obtain a differential image of the two frames of images of the moving target to be detected; at the camera end, performing threshold segmentation processing on the differential image of the two frames of images of the moving target to be detected to obtain a threshold segmented image of the moving target to be detected as the preprocessed image of the moving target to be detected.
[0015] In some embodiments, at the camera end, the first control unit performs threshold segmentation processing on the differential image of the two frames of the moving target to be detected to obtain the threshold segmentation image of the moving target to be detected, specifically including: at the camera end, using the following formula, performing threshold segmentation processing on the differential image of the two frames of the moving target to be detected to obtain the threshold segmentation image of the moving target to be detected:
[0016] ;
[0017] in represents the threshold segmentation image of the moving target to be detected, The differential image of two frames of images representing the moving target to be detected, n represents the number of image frames, and T represents the threshold value of the pixel value of the image.
[0018] In some embodiments, at the camera end, the first control unit converts the preprocessed image of the moving target to be detected into two or more image blocks to obtain the two or more image blocks of the moving target to be detected, including: at the camera end, according to the threshold segmentation matrix of a set size, converting the preprocessed image of the moving target to be detected into two or more image blocks, and storing the two or more image blocks in chronological order.
[0019] In some embodiments, at the host computer end, the second control unit, for the two or more image blocks of the moving target to be detected, calculates the threshold of each image block in the two or more image blocks of the moving target to be detected, and then performs image reconstruction and screening to obtain the detection result of the moving target to be detected, including: at the host computer end, receiving the two or more image blocks of the moving target to be detected in chronological order; at the host computer end, for the two or more image blocks of the moving target to be detected, calculating the threshold of each image block in chronological order to obtain the threshold calculation data of each image block; thereby, obtaining the threshold calculation data of all image blocks in the two or more image blocks of the moving target to be detected. Threshold calculation data is recorded as the threshold calculation data of all image blocks of the moving target to be detected; at the host computer end, image reconstruction is performed according to the threshold calculation data of all image blocks of the moving target to be detected to obtain a reconstructed image of the moving target to be detected; at the host computer end, contour detection is performed on the reconstructed image of the moving target to be detected to obtain a contour detection result of the reconstructed image of the moving target to be detected; according to preset contour attributes, a valid contour is screened from the contour detection result of the reconstructed image of the moving target to be detected, and the reconstructed image of the moving target to be detected corresponding to the valid contour is used as the detection image of the moving target to be detected at the host computer end.
[0020] In some implementations, at the host computer end, the second control unit calculates the threshold of each image block to obtain the threshold calculation data of each image block, specifically including: at the host computer end, calculating the threshold of each image block according to the following formula to obtain the threshold calculation data of each image block:
[0021] ;
[0022] Where T is the threshold of each image block, For each image block The gray value of the position, k is a non-negative parameter, and s is the number of pixels in each image block.
[0023] Matching the above device, the present invention further provides a terminal on the other hand, including: the above-mentioned moving target detection device.
[0024] In accordance with the above method, the present invention provides a storage medium on the other hand, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the steps of the above-mentioned method for detecting moving targets.
[0025] In accordance with the above method, the present invention further provides a computer program product, including a computer program, which implements the steps of the above-mentioned moving target detection method when executed by a processor.
[0026] Therefore, the scheme of the present invention is to set a camera end and a host computer end, and the camera end is provided with an array camera; at the camera end, the image of the small moving target within the set distance range is collected in real time in all directions to obtain the image of the small moving target; at the camera end, after performing inter-frame difference and threshold segmentation of the differential image on the collected image of the small moving target, a transmission method based on sparse image block threshold is adopted to transmit the image block after threshold segmentation to the host computer end; at the host computer end, the threshold of the received image block is calculated, the image is reconstructed based on the calculated threshold of the image block, the contour detection is performed on the reconstructed image, and the effective contour is screened out by the attributes such as the area of the contour to obtain the candidate target, so as to realize the detection of the small moving target; thus, by converting the collected image into a sparse image after preprocessing at the camera end, and transmitting it to the host computer end by adopting the block sparse transmission method, the image block of the receiving end is calculated at the host computer end, and the image is reconstructed and screened, so as to realize the detection of the small moving target with good real-time performance.
[0027] Other features and advantages of the present invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the present invention.
[0028] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A schematic diagram of a flow chart of an embodiment of a method for detecting a moving target of the present invention;
[0030] Figure 2 A schematic diagram of a flow chart of an embodiment of preprocessing the current image of the moving target to be detected in the method of the present invention;
[0031] Figure 3 A flow chart of an embodiment of the method of the present invention for calculating the threshold of each image block in the two or more image blocks of the moving target to be detected and then performing image reconstruction and screening;
[0032] Figure 4A schematic structural diagram of an embodiment of a moving target detection device of the present invention;
[0033] Figure 5 This is a flowchart of the camera-side preprocessing process;
[0034] Figure 6 Schematic diagram of the process for multi-frame tracking screening;
[0035] Figure 7 This is a flow chart of the host computer algorithm;
[0036] Figure 8 Screenshot of video 1;
[0037] Fig. 9 Screenshot of video 2.
[0038] In conjunction with the accompanying drawings, the reference numerals in the embodiments of the present invention are as follows:
[0039] 102 - acquisition unit; 104 - first control unit; 106 - second control unit. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0041] Considering that the algorithms for motion target detection mainly include background subtraction, frame difference method, optical flow method, feature matching method and deep learning-based methods, etc.
[0042] Among them, background subtraction is a method based on background modeling. It detects moving targets by comparing the difference between the current frame and the dynamically updated background model. Commonly used background subtraction methods include the Gaussian mixture model method. The effect of background subtraction depends largely on the accuracy of the background model. It is sensitive to background changes and needs to continuously update the background model to adapt to environmental changes. Lighting changes and background disturbances may also lead to false detections and missed detections. Although some background modeling methods can provide better background extraction effects, they are computationally intensive and slow.
[0043] The frame difference method detects moving targets by calculating the difference between consecutive frames. Common methods include the two-frame difference method and the three-frame difference method. The frame difference method is sensitive to environmental noise. When performing binarization processing, it is very important to choose a suitable threshold. If the threshold is not set properly, it will lead to over-detection or missed detection.
[0044] The optical flow method infers the motion of an object between two frames based on the change of pixel intensity in an image over time. It relies on two main assumptions: the constant brightness assumption and the temporal continuity assumption. Commonly used methods include the Lucas-Kanade method and the Farneback method. The two basic assumptions of the optical flow method are often difficult to meet simultaneously under real conditions. When the target is too fast or the illumination is uneven, the traditional optical flow method may not be able to accurately detect fast-moving targets. The calculation of the optical flow method involves complex mathematical models and a large amount of calculations. In particular, in the calculation of dense optical flow, it is necessary to process the displacement of each pixel in the image, which requires a high demand for computing resources and is difficult to meet real-time requirements. Although the computational cost of sparse optical flow is reduced, it only tracks certain specific subsets in the image and loses a lot of motion information.
[0045] Feature matching methods extract features such as edges, corners, and textures in images to detect moving targets. Feature matching methods usually involve complex algorithms, such as key point extraction, description, and matching. These steps require a lot of computing resources, especially when processing high-resolution images, and it is difficult to meet real-time requirements. If the algorithm does not have scale invariance and rotation invariance, then the algorithm may not be able to handle image scaling and rotation.
[0046] Deep learning-based methods use convolutional neural networks to extract features from images, and then detect and locate targets through classifiers or regressors. Deep learning-based methods require a lot of computing resources for training and reasoning. Although there are algorithms for real-time target detection, the reasoning speed of deep learning is still a challenge for fast-response applications.
[0047] Therefore, the main problem that the solution of the present invention needs to solve is the real-time problem of multi-target detection by the host computer. It is necessary to first solve the data transmission problem between the array camera and the host computer to achieve the real-time performance of multi-target detection by the host computer, as follows:
[0048] 1) Data transmission problem between array camera and host computer.
[0049] Array cameras have certain CPU processing capabilities, but they cannot independently complete target detection tasks. This requires the host computer to further analyze and process the data pre-processed by the camera. High-resolution array cameras collect a large amount of image data per second and perform pre-processing. Usually, the processed data is a binary image. In the case of limited ability of the camera to transmit data to the server, efficiently transmitting data to ensure that the host computer algorithm can achieve real-time target detection is a technical problem that needs to be solved by the solution of the present invention.
[0050] 2) Real-time problem of host computer target detection algorithm.
[0051] The target detection algorithm is a type of computationally intensive task that often requires a large amount of CPU resources. The sub-cameras of the array camera pre-process the collected image data and finally merge and transmit it to the host computer. After receiving the data, the host computer analyzes and processes the data in a timely manner to detect small moving targets. The host computer has to perform the task of analyzing and processing the image data of dozens of cameras. Designing a fast target detection algorithm to ensure real-time performance and target detection accuracy is a technical problem that the solution of the present invention needs to solve.
[0052] According to an embodiment of the present invention, a method for detecting a moving target is provided. Figure 1 The flowchart of an embodiment of the method of the present invention is shown in FIG. The moving target detection method may include: steps S110 to S140.
[0053] At step S110, an array camera is provided at the camera end; the array camera is used to sample the image of the moving target to be detected in real time, and the image is recorded as the current image of the moving target to be detected.
[0054] At step S120, at the camera end, the current image of the moving target to be detected is preprocessed to obtain a preprocessed image of the moving target to be detected.
[0055] In some implementations, in step S120, at the camera end, the current image of the moving target to be detected is preprocessed to obtain a preprocessed image of the moving target to be detected. For a specific process, see the following exemplary description.
[0056] Combine the following Figure 2 The flowchart of an embodiment of preprocessing the current image of the moving target to be detected in the method of the present invention further illustrates the specific process of preprocessing the current image of the moving target to be detected in step S120, including: steps S210 to S220.
[0057] Step S210, at the camera end, performing inter-frame difference on two adjacent frames of images in the current image of the moving target to be detected, to obtain a differential image of the two frames of images of the moving target to be detected.
[0058] Step S220 , performing threshold segmentation processing on the differential image of the two frames of images of the moving target to be detected, to obtain a threshold segmented image of the moving target to be detected as a preprocessed image of the moving target to be detected.
[0059] Preferably, in step S220, performing threshold segmentation processing on the differential image of the two frames of images of the moving target to be detected to obtain the threshold segmented image of the moving target to be detected specifically includes: performing threshold segmentation processing on the differential image of the two frames of images of the moving target to be detected to obtain the threshold segmented image of the moving target to be detected using the following formula:
[0060] ;
[0061] in represents the threshold segmentation image of the moving target to be detected, The differential image of two frames of images representing the moving target to be detected, n represents the number of image frames, and T represents the threshold value of the pixel value of the image.
[0062] Specifically, the solution of the present invention proposes a solution for an array camera to detect small moving targets in real time within a distance of hundreds of meters and in all directions, including: step 1, preprocessing on the camera side.
[0063] Camera-side preprocessing mainly includes real-time image acquisition, image frame difference, and threshold segmentation of differential images. The purpose of camera-side preprocessing is to undertake part of the image preprocessing tasks of the host computer, reduce the computing load of the host computer, reduce the amount of data transmission, and realize lossless compression transmission of images.
[0064] Figure 5 This is a flow chart of the camera-side preprocessing process. Figure 5 As shown in the figure, the camera-side preprocessing process includes:
[0065] Step 11: Use an array camera to collect images in real time to obtain real-time collected images.
[0066] Step 12: For the real-time captured images, the changes between two frames can be represented by a differential image. Suppose the nth frame image and the n-1th frame image in the video sequence are and , subtract the grayscale values of the pixels corresponding to the two frames of images, and take the absolute value to get the difference image :
[0067] (1).
[0068] The difference image between two frames In Location The value at The larger the value, the nth frame image and the n-1th frame image are at the position The greater the change.
[0069] Step 13: Difference image of two frames Perform threshold segmentation. Given a threshold T that satisfies , set the pixel values less than the threshold T to 0, and do not process the pixel values greater than the threshold T, and get the difference image of the two frames Threshold segmentation image :
[0070] (2).
[0071] The difference image between two frames Threshold segmentation image is a sparse matrix whose element values are mostly 0, so we can only use the values and positions of non-zero elements to form a ternary Transmitted to the host computer, thereby reducing the amount of data transmission.
[0072] At step S130, at the camera end, the preprocessed image of the moving target to be detected is converted into two or more image blocks to obtain two or more image blocks of the moving target to be detected; and the two or more image blocks of the moving target to be detected are transmitted to the upper computer end with which the communication connection with the camera end is established by adopting the block sparse transmission method. Among them, when the preprocessed image of the moving target to be detected is converted into two or more image blocks, the preprocessed image of the moving target to be detected is actually divided into many blocks; the basis for the number of blocks of the divided image includes: ensuring that the maximum value of the element position in each image block is less than 255, that is, the size of one byte. The size of the original image of the preprocessed image of the moving target to be detected, for example, the image resolution is 510x510, then the preprocessed image of the moving target to be detected can be divided into 4 blocks, and the image resolution of each image block after division is 255x255.
[0073] By adopting the block sparse transmission method, for example, if the number of non-zero elements in an image block with an image resolution of 100x100 is 10, then only the positions and grayscale values of 10 elements need to be transmitted, and the transmission amount is reduced to one thousandth of the original amount, which can greatly reduce the transmission amount and improve the transmission efficiency.
[0074] In some embodiments, in step S130, at the camera end, the preprocessed image of the moving target to be detected is converted into two or more image blocks to obtain the two or more image blocks of the moving target to be detected, including: dividing the matrix according to a threshold value of a set size, converting the preprocessed image of the moving target to be detected into two or more image blocks, and storing the two or more image blocks in time sequence, so as to sparsely transmit the two or more image blocks stored in blocks to the host computer end.
[0075] Specifically, the solution of the present invention proposes a solution for an array camera to detect small moving targets in real time within a distance of hundreds of meters and in all directions, and also includes: step 14, further considering the sizes of different images, resulting in non-zero element positions (x,
[0076] y) is too large, the byte usage increases, and the image is transmitted in sequential blocks. Let A be an M×N threshold segmentation matrix, and divide A into P blocks. Each block matrix number of rows and number of columns No more than .
[0077] (3).
[0078] Only block-based matrices are stored The positions of the non-zero elements of and the grayscale values at the corresponding positions are represented by a three-element array with subscripts . where x, y are in block matrices The position in , rather than the position in matrix A. Using block sparse transmission, the value of the transmitted data is less than or equal to , which can avoid transmitting integers that are too large and further reduce the transmission volume.
[0079] In the solution of the present invention, based on sparse images, the image is segmented by using a block threshold method, which reduces the amount of calculation caused by the single-pixel threshold and improves the detection time; at the same time, it avoids missed detection caused by the global threshold.
[0080] At step S140, the host computer calculates the threshold of each of the two or more image blocks of the moving target to be detected, and then reconstructs and screens the image to obtain the detection result of the moving target to be detected, thereby realizing the detection of the moving target to be detected; wherein the threshold of each image block refers to the gray value threshold of each image block. Specifically, the moving target to be detected is obtained through image reconstruction, and the moving target to be detected is screened based on the motion properties to obtain the final detection result.
[0081] In the scheme of the present invention, the task division processing scheme between the camera end and the host computer has high computing utilization; the block data transmission method reduces the data transmission volume and strengthens the real-time function of the algorithm. The block threshold method reduces the target missed detection rate caused by factors such as uneven lighting; the motion screening method reduces the false detection rate to a certain extent.
[0082] In some embodiments, in step S140, on the host computer side, for the two or more image blocks of the moving target to be detected, the threshold of each image block in the two or more image blocks of the moving target to be detected is calculated, and then image reconstruction and screening are performed to obtain the specific process of the detection result of the moving target to be detected. Please refer to the following exemplary description.
[0083] Combine the following Figure 3 The flowchart of an embodiment of the method of the present invention in which the threshold of each image block in more than two image blocks of the moving target to be detected is calculated and then image reconstruction and screening are performed, further illustrating the specific process of image reconstruction and screening in step S140 in which the threshold of each image block in more than two image blocks of the moving target to be detected is calculated, including: step S310 to step S350.
[0084] Step S310: receiving two or more image blocks of the moving target to be detected in chronological order at the host computer end.
[0085] Step S320, at the host computer end, for the two or more image blocks of the moving target to be detected, the threshold of each image block is calculated in chronological order to obtain the threshold calculation data of each image block; thereby, the threshold calculation data of all image blocks in the two or more image blocks of the moving target to be detected are obtained, which are recorded as the threshold calculation data of all image blocks of the moving target to be detected.
[0086] Preferably, calculating the threshold of each image block in step S320 to obtain the threshold calculation data of each image block specifically includes: calculating the threshold of each image block according to the following formula to obtain the threshold calculation data of each image block:
[0087] ;
[0088] Where T is the threshold of each image block, For each image block The gray value of the position, k is a non-negative parameter, and s is the number of pixels in each image block.
[0089] Step S330, at the host computer end, image reconstruction is performed based on the threshold value calculation data of all image blocks of the moving target to be detected to obtain a reconstructed image of the moving target to be detected.
[0090] Step S340: At the host computer, contour detection is performed on the reconstructed image of the moving target to be detected to obtain a contour detection result of the reconstructed image of the moving target to be detected.
[0091] In step S350, at the host computer end, according to preset contour attributes, effective contours are screened from the contour detection results of the reconstructed image of the moving target to be detected, and the reconstructed image of the moving target to be detected corresponding to the effective contour is used as the detection result of the moving target to be detected.
[0092] Specifically, the solution of the present invention proposes a solution for an array camera to detect small moving targets in real time in all directions within a distance of hundreds of meters, and also includes: step 2, a host computer algorithm. Figure 7 It is a flowchart of the host computer algorithm, such as Figure 7 As shown, the host computer algorithm includes:
[0093] Step 21: The host computer receives the data transmitted by the camera, calculates the threshold of each image block according to the sequence number, and sets the pixel value less than the threshold to 0. Let P be a grayscale image of a certain m×n block, and s is the number of pixels in the image. The threshold calculation formula for calculating the threshold T of each image block is as follows:
[0094] (4).
[0095] in, For each image block The gray value of the position, k is a non-negative parameter.
[0096] Step 22, reconstruct the data image after threshold segmentation. Image reconstruction is based on the transmitted image information (position, gray value), and for a zero matrix of the same size, the gray value is assigned to the element at the corresponding position, thereby completing the reconstruction. The purpose of reconstruction is to detect the contour of the image, and the contour that meets the conditions is regarded as the target, so as to achieve the purpose and function of target pre-detection.
[0097] Step 23: perform contour detection on the reconstructed image, select valid contours by contour area and other attributes, and obtain candidate targets. Candidate targets usually contain some false targets. Since the time interval between image capture is short, the target has a small amount of motion in adjacent frames, so the target in the current image should be in a neighborhood of the target position in the previous frame. By judging the neighborhood conditions of multiple frames of images, some false targets can be removed.
[0098] Targets moving in space usually have continuity and certain regularity, and can be simulated by certain mathematical models. Figure 6 Schematic diagram of the process of multi-frame tracking screening, such as Figure 6As shown in the figure, based on the detection result of the current frame, the Kalman filter is used to predict the position of the target in the next frame to obtain a set of predicted targets; the predicted target set and the candidate target set obtained by the next frame detection are globally matched based on the pixel distance of the target center to determine the detection target of the next frame, and the detection of moving targets in the video is completed by iteration.
[0099] Assume that the prediction target set is , the detection target set is , then the matching of the prediction target set and the detection target set should meet the basic matching conditions:
[0100] Condition 1: For any , with at most one Match, for any , with at most one match;
[0101] Condition 2: The sum of pixel distances of all matching pairs should be minimized to achieve the best pairing;
[0102] Condition 3: The pixel distance of the matching points does not exceed the given distance threshold.
[0103] Therefore, the above matching problem can be described by the following mathematical model: Given the loss matrix , m≤n, find the matrix , , the matrix X satisfies that there is only one 1 in each row and at most one 1 in each column, that is , ,and , ,make Minimum, that is, the following optimization problem:
[0104] (4);
[0105] (5);
[0106] (6);
[0107] (7).
[0108] in, represents an m×n real matrix; if , then it means and Matching; C is the distance loss matrix between the predicted target set and the next frame detection target set, and the matrix element value is:
[0109] (8).
[0110] The above problem is a classic assignment problem and can be solved using the Hungarian algorithm.
[0111] Kalman filtering obtains the predicted target set of the next frame, and combines the necessary conditions that should be met by matching to filter out false targets, thereby improving the detection effect. In the scheme of the present invention, Kalman filtering and the nearest neighbor principle are combined to filter the motion information of the pre-detection results to reduce the false detection rate.
[0112] The solution of the present invention is used to detect small moving targets, and the resulting image sequence resolution is 1920×1080, and the calculation rate can reach 900 frames per second, which meets the requirements of receiving multi-camera data and realizing real-time detection of multi-camera moving targets; different detection backgrounds can be processed, and the algorithm has a high recall rate.
[0113] Figure 8 Screenshot of video 1. Fig. 9 Screenshot of Video 2. The following is a display and analysis of some experiments and their results. For details, please refer to Figure 8 , Fig. 9 , and the data table is Table 1.
[0114] Table 1
[0115]
[0116] Where F represents the F-measure value. The precision of video 1 is 1301 / 1415=0.92, the recall is 1301 / 1600=0.81, and the F is 0.86. The precision of video 2 is 1264 / 1874=0.67, the recall is 1264 / 1300=0.97, and the F-measure is 0.80.
[0117] Experimental analysis:
[0118] The target in Video 1 is small, which increases the number of missed detections and thus the recall rate is relatively low; the background is relatively clean, with only the swaying tree trunk on the left causing interference, resulting in a higher accuracy rate.
[0119] In video 2, the target is slightly larger, the number of missed detections is lower, and the recall rate is higher. There are moving clouds and willow trees swaying in the wind in the background, which increases the false detection rate and reduces the accuracy. However, the prior information based on the position of the swaying tree can greatly reduce the false detection rate and thus improve the accuracy.
[0120] It should be noted that: Precision = positive samples judged as positive samples / (positive samples judged as positive samples + negative samples judged as positive samples). Recall = positive samples judged as positive samples / (positive samples judged as positive samples + positive samples judged as negative samples). F-measure = 2 / (Precision -1 +Recall-1 ).
[0121] The solution of the present invention can greatly reduce the amount of data transmitted by processing the collected image, converting it into a sparse image, and transmitting it to the host computer in a block sparse transmission mode, and can also take on some of the tasks of the host computer, so as to maximize the efficiency of the camera end. Thus, the problem of small detection target (area less than 200 pixels), long distance (nearly 1,000 meters), high real-time requirements (processing nearly 80 frames of 1920x1080 images per second), and limited data transmission volume is solved.
[0122] The technical solution of this embodiment is adopted, by setting a camera end and a host computer end, and an array camera is set on the camera end; at the camera end, the image of the small moving target within the set distance range is collected in real time in all directions to obtain the image of the small moving target; at the camera end, after performing inter-frame difference and threshold segmentation of the differential image on the collected image of the small moving target, a transmission method based on sparse image block threshold is adopted to transmit the image block after threshold segmentation to the host computer end; at the host computer end, the threshold of the received image block is calculated, and the image is reconstructed based on the calculated threshold of the image block, and the contour detection is performed on the reconstructed image, and the effective contour is screened out by the attributes such as the area of the contour to obtain the candidate target, so as to realize the detection of the small moving target; thus, by converting the collected image into a sparse image after preprocessing at the camera end, and transmitting it to the host computer end by adopting the block sparse transmission method, the image block of the receiving end is threshold calculated at the host computer end, and the image is reconstructed and screened, so as to realize the detection of the small moving target with good real-time performance.
[0123] According to an embodiment of the present invention, a moving target detection device corresponding to the moving target detection method is also provided. Figure 4 The schematic diagram of the structure of an embodiment of the device of the present invention is shown in FIG. The moving target detection device may include: an acquisition unit 102 , a first control unit 104 and a second control unit 106 .
[0124] The camera end is provided with an array camera; the acquisition unit 102 is used to use the array camera to sample the image of the moving target to be detected in real time, and record it as the current image of the moving target to be detected. The specific functions and processing of the camera end refer to step S110.
[0125] At the camera end, the first control unit 104 is used to pre-process the current image of the moving target to be detected to obtain a pre-processed image of the moving target to be detected. The specific functions and processing of the camera end are also referred to step S120.
[0126] In some implementations, at the camera end, the first control unit 104 preprocesses the current image of the moving target to be detected to obtain a preprocessed image of the moving target to be detected, including:
[0127] At the camera end, the first control unit 104 is further configured to perform inter-frame difference on two adjacent frames of images in the current image of the moving target to be detected, so as to obtain a differential image of the two frames of images of the moving target to be detected.
[0128] At the camera end, the first control unit 104 is specifically further used to perform threshold segmentation processing on the differential image of the two frames of the moving target to be detected, so as to obtain the threshold segmentation image of the moving target to be detected as a preprocessed image of the moving target to be detected.
[0129] Preferably, at the camera end, the first control unit 104 performs threshold segmentation processing on the differential image of the two frames of the moving target to be detected to obtain the threshold segmented image of the moving target to be detected, specifically including:
[0130] At the camera end, the first control unit 104 is further configured to perform threshold segmentation processing on the differential image of the two frames of the moving target to be detected by using the following formula to obtain a threshold segmentation image of the moving target to be detected:
[0131] ;
[0132] in represents the threshold segmentation image of the moving target to be detected, The differential image of two frames of images representing the moving target to be detected, n represents the number of image frames, and T represents the threshold value of the pixel value of the image.
[0133] Specifically, the solution of the present invention proposes a solution for an array camera to detect small moving targets in real time within a distance of hundreds of meters and in all directions, including: step 1, preprocessing on the camera side.
[0134] Camera-side preprocessing mainly includes real-time image acquisition, image frame difference, and threshold segmentation of differential images. The purpose of camera-side preprocessing is to undertake part of the image preprocessing tasks of the host computer, reduce the computing load of the host computer, reduce the amount of data transmission, and realize lossless compression transmission of images.
[0135] Figure 5 This is a flow chart of the camera-side preprocessing process. Figure 5 As shown in the figure, the camera-side preprocessing process includes:
[0136] Step 11: Use an array camera to collect images in real time to obtain real-time collected images.
[0137] Step 12: For the real-time captured images, the changes between two frames can be represented by a differential image. Suppose the nth frame image and the n-1th frame image in the video sequence are and , subtract the grayscale values of the pixels corresponding to the two frames of images, and take the absolute value to get the difference image :
[0138] (1).
[0139] The difference image between two frames In Location The value at The larger the value, the nth frame image and the n-1th frame image are at the position The greater the change.
[0140] Step 13: Difference image of two frames Perform threshold segmentation. Given a threshold T that satisfies , set the pixel values less than the threshold T to 0, and do not process the pixel values greater than the threshold T, and get the difference image of the two frames Threshold segmentation image :
[0141] (2).
[0142] The difference image between two frames Threshold segmentation image is a sparse matrix whose element values are mostly 0, so we can only use the values and positions of non-zero elements to form a ternary Transmitted to the host computer, thereby reducing the amount of data transmission.
[0143] At the camera end, the preprocessed image of the moving target to be detected is converted into two or more image blocks to obtain two or more image blocks of the moving target to be detected; and the two or more image blocks of the moving target to be detected are transmitted to the upper computer end which has established a communication connection with the camera end by using a block sparse transmission method. The specific functions and processing of the camera end are also shown in step S130.
[0144] In some embodiments, at the camera end, the first control unit 104 converts the preprocessed image of the moving target to be detected into two or more image blocks to obtain the two or more image blocks of the moving target to be detected, including: at the camera end, the first control unit 104 is specifically used to divide the matrix according to a threshold value of a set size, convert the preprocessed image of the moving target to be detected into two or more image blocks, and store the two or more image blocks in time sequence, so as to perform block-by-block sparse transmission of the two or more image blocks stored in blocks to the host computer end.
[0145] Specifically, the solution of the present invention proposes a solution for an array camera to detect small moving targets in real time within a distance of hundreds of meters and in all directions, and also includes: step 14, further considering the sizes of different images, resulting in non-zero element positions (x,
[0146] y) is too large, the byte usage increases, and the image is transmitted in sequential blocks. Let A be an M×N threshold segmentation matrix, and divide A into P blocks. Each block matrix number of rows and number of columns No more than .
[0147] (3).
[0148] Only block-based matrices are stored The positions of the non-zero elements of and the grayscale values at the corresponding positions are represented by a three-element array with subscripts . where x, y are in block matrices The position in , rather than the position in matrix A. Using block sparse transmission, the value of the transmitted data is less than or equal to , which can avoid transmitting integers that are too large and further reduce the transmission volume.
[0149] In the solution of the present invention, based on sparse images, the image is segmented by using a block threshold method, which reduces the amount of calculation caused by the single-pixel threshold and improves the detection time; at the same time, it avoids missed detection caused by the global threshold.
[0150] On the host computer side, the second control unit 106 is used to calculate the threshold of each image block in the two or more image blocks of the moving target to be detected, reconstruct and screen the image, obtain the detection result of the moving target to be detected, and realize the detection of the moving target to be detected; wherein the threshold of each image block refers to the gray value threshold of each image block. The specific functions and processing of the host computer side are also referred to step S140.
[0151] In the scheme of the present invention, the task division processing scheme between the camera end and the host computer has high computing utilization; the block data transmission method reduces the data transmission volume and strengthens the real-time function of the algorithm. The block threshold method reduces the target missed detection rate caused by factors such as uneven lighting; the motion screening method reduces the false detection rate to a certain extent.
[0152] In some implementations, at the host computer end, the second control unit 106 calculates the threshold of each image block in the two or more image blocks of the moving target to be detected, and then reconstructs and screens the image to obtain the detection result of the moving target to be detected, including:
[0153] At the host computer end, the second control unit 106 is further configured to receive, in chronological order, more than two image blocks of the moving target to be detected.
[0154] On the host computer side, the second control unit 106 is specifically further used to calculate the threshold of each image block in chronological order for the two or more image blocks of the moving target to be detected, and obtain the threshold calculation data of each image block; thereby, the threshold calculation data of all image blocks in the two or more image blocks of the moving target to be detected are obtained, which is recorded as the threshold calculation data of all image blocks of the moving target to be detected.
[0155] Preferably, at the host computer end, the second control unit 106 calculates the threshold of each image block to obtain the threshold calculation data of each image block, specifically including: the second control unit 106 is further used to calculate the threshold of each image block at the host computer end according to the following formula to obtain the threshold calculation data of each image block:
[0156] ;
[0157] Where T is the threshold of each image block, For each image block The gray value of the position, k is a non-negative parameter, and s is the number of pixels in each image block.
[0158] At the host computer end, the second control unit 106 is further configured to perform image reconstruction based on threshold value calculation data of all image blocks of the moving target to be detected, so as to obtain a reconstructed image of the moving target to be detected.
[0159] At the host computer end, the second control unit 106 is further configured to perform contour detection on the reconstructed image of the moving target to be detected, and obtain a contour detection result of the reconstructed image of the moving target to be detected.
[0160] On the host computer side, the second control unit 106 is specifically used to screen out valid contours from the contour detection results of the reconstructed image of the moving target to be detected according to preset contour attributes, and use the reconstructed image of the moving target to be detected corresponding to the valid contour as the detection image of the moving target to be detected on the host computer side.
[0161] Specifically, the solution of the present invention proposes a solution for an array camera to detect small moving targets in real time in all directions within a distance of hundreds of meters, and also includes: step 2, a host computer algorithm. Figure 7 It is a flowchart of the host computer algorithm, such as Figure 7 As shown, the host computer algorithm includes:
[0162] Step 21: The host computer receives the data transmitted by the camera, calculates the threshold of each image block according to the sequence number, and sets the pixel value less than the threshold to 0. Let P be a grayscale image of a certain m×n block, and s is the number of pixels in the image. The threshold calculation formula for calculating the threshold T of each image block is as follows:
[0163] (4).
[0164] in, For each image block The gray value of the position, k is a non-negative parameter.
[0165] Step 22, reconstruct the data image after threshold segmentation. Image reconstruction is based on the transmitted image information (position, gray value), and for a zero matrix of the same size, the gray value is assigned to the element at the corresponding position, thereby completing the reconstruction. The purpose of reconstruction is to detect the contour of the image, and the contour that meets the conditions is regarded as the target, so as to achieve the purpose and function of target pre-detection.
[0166] Step 23: perform contour detection on the reconstructed image, select valid contours by contour area and other attributes, and obtain candidate targets. Candidate targets usually contain some false targets. Since the time interval between image capture is short, the target has a small amount of motion in adjacent frames, so the target in the current image should be in a neighborhood of the target position in the previous frame. By judging the neighborhood conditions of multiple frames of images, some false targets can be removed.
[0167] Targets moving in space usually have continuity and certain regularity, and can be simulated by certain mathematical models. Figure 6 A flowchart for multi-frame tracking screening is shown in Figure 2. Figure 6As shown in the figure, based on the detection result of the current frame, the Kalman filter is used to predict the position of the target in the next frame to obtain a set of predicted targets; the predicted target set and the candidate target set obtained by the next frame detection are globally matched based on the pixel distance of the target center to determine the detection target of the next frame, and the detection of moving targets in the video is completed by iteration.
[0168] Assume that the prediction target set is , the detection target set is , then the matching of the prediction target set and the detection target set should meet the basic matching conditions:
[0169] Condition 1: For any , with at most one Match, for any , with at most one match;
[0170] Condition 2: The sum of pixel distances of all matching pairs should be minimized to achieve the best pairing;
[0171] Condition 3: The pixel distance of the matching points does not exceed the given distance threshold.
[0172] Therefore, the above matching problem can be described by the following mathematical model: Given the loss matrix , , find the matrix , , the matrix X satisfies that there is only one 1 in each row and at most one 1 in each column, that is , ,and , ,make Minimum, that is, the following optimization problem:
[0173] (4);
[0174] (5);
[0175] (6);
[0176] (7).
[0177] in, represents an m×n real matrix; if , then it means and Matching; C is the distance loss matrix between the predicted target set and the next frame detection target set, and the matrix element value is:
[0178] (8).
[0179] The above problem is a classic assignment problem and can be solved using the Hungarian algorithm.
[0180] Kalman filtering obtains the predicted target set of the next frame, and combines the necessary conditions that should be met by matching to filter out false targets, thereby improving the detection effect. In the scheme of the present invention, Kalman filtering and the nearest neighbor principle are combined to filter the motion information of the pre-detection results to reduce the false detection rate.
[0181] The solution of the present invention is used to detect small moving targets. The resulting image sequence resolution is 1920×1080, and the calculation rate can reach 900 frames / second, which meets the requirements of receiving multi-camera data and realizing real-time detection of multi-camera moving targets. The algorithm has a high recall rate when processing different detection backgrounds. Some experiments and their results are displayed and analyzed. For details, please refer to Figure 8 , Fig. 9 , and relevant descriptions of the data table, i.e. Table 1.
[0182] The solution of the present invention can greatly reduce the amount of data transmitted by processing the collected image, converting it into a sparse image, and transmitting it to the host computer in a block sparse transmission mode, and can also take on some of the tasks of the host computer, so as to maximize the efficiency of the camera end. Thus, the problem of small detection target (area less than 200 pixels), long distance (nearly 1,000 meters), high real-time requirements (processing nearly 80 frames of 1920x1080 images per second), and limited data transmission volume is solved.
[0183] Since the processing and functions implemented by the device of this embodiment basically correspond to the embodiments, principles and examples of the aforementioned method, for the details not fully described in this embodiment, please refer to the relevant descriptions in the aforementioned embodiments, and no further elaboration will be made here.
[0184] According to an embodiment of the present invention, a terminal corresponding to the moving target detection device is also provided. The terminal may include: the moving target detection device described above.
[0185] Since the processing and functions implemented by the terminal of this embodiment basically correspond to the embodiments, principles and examples of the aforementioned devices, for the details not fully described in this embodiment, please refer to the relevant descriptions in the aforementioned embodiments, and no further elaboration will be made here.
[0186] According to an embodiment of the present invention, a computer program product corresponding to a terminal is also provided, comprising a computer program, and when the computer program is executed by a processor, the steps of the moving target detection method described above are implemented.
[0187] Since the processing and functions implemented by the product of this embodiment basically correspond to the embodiments, principles and examples of the aforementioned terminal, for the details not fully described in this embodiment, please refer to the relevant descriptions in the aforementioned embodiments, and no further elaboration will be made here.
[0188] According to an embodiment of the present invention, a storage medium corresponding to the moving target detection method is also provided, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the steps of the moving target detection method described above.
[0189] Since the processing and functions implemented by the storage medium of this embodiment basically correspond to the embodiments, principles and examples of the aforementioned method, for the details not fully described in this embodiment, please refer to the relevant descriptions in the aforementioned embodiments, and no further elaboration will be made here.
[0190] In summary, it is easy for those skilled in the art to understand that, under the premise of no conflict, the above-mentioned advantageous methods can be freely combined and superimposed.
[0191] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention shall be included in the scope of the claims of the present invention.
Claims
1. A method for detecting a moving target, It is characterized in that include: On the camera side, an array camera is provided; Using the array camera, sampling the image of the moving target to be detected in real time, and recording it as the current image of the moving target to be detected; At the camera end, the current image of the moving target to be detected is preprocessed to obtain a preprocessed image of the moving target to be detected; wherein, at the camera end, the current image of the moving target to be detected is preprocessed to obtain a preprocessed image of the moving target to be detected, including: at the camera end, performing inter-frame difference on two adjacent frames of the current image of the moving target to be detected to obtain a differential image of the two frames of the moving target to be detected; performing threshold segmentation processing on the differential image of the two frames of the moving target to be detected to obtain a threshold segmented image of the moving target to be detected as the preprocessed image of the moving target to be detected; At the camera end, the preprocessed image of the moving target to be detected is converted into two or more image blocks to obtain two or more image blocks of the moving target to be detected; and the two or more image blocks of the moving target to be detected are transmitted to the upper computer end which has established a communication connection with the camera end in a block sparse transmission manner; On the host computer side, for the received two or more image blocks of the moving target to be detected, the threshold of each image block in the two or more image blocks of the moving target to be detected is calculated, and then image reconstruction and screening are performed to obtain the detection result of the moving target to be detected, thereby realizing the detection of the moving target to be detected; wherein the threshold of each image block refers to the grayscale value threshold of each image block.
2. The method for detecting a moving target according to claim 1, It is characterized in that Performing threshold segmentation processing on the difference image of the two frames of images of the moving target to be detected to obtain the threshold segmentation image of the moving target to be detected, specifically includes: The following formula is used to perform threshold segmentation processing on the difference image of the two frames of the moving target to be detected, so as to obtain the threshold segmentation image of the moving target to be detected: ; in represents the threshold segmentation image of the moving target to be detected, The differential image of two frames of images representing the moving target to be detected, n represents the number of image frames, and T represents the threshold value of the pixel value of the image.
3. The method for detecting a moving target according to claim 1, It is characterized in that At the camera end, converting the preprocessed image of the moving target to be detected into two or more image blocks to obtain the two or more image blocks of the moving target to be detected includes: The pre-processed image of the moving target to be detected is converted into two or more image blocks according to the threshold segmentation matrix of the set size, and the two or more image blocks are divided and stored in time sequence.
4. A method for detecting a moving target according to any one of claims 1 to 3, It is characterized in that On the host computer side, for the received two or more image blocks of the moving target to be detected, after calculating the threshold of each image block in the two or more image blocks of the moving target to be detected, image reconstruction and screening are performed to obtain the detection result of the moving target to be detected, including: At the host computer, receiving two or more image blocks of the moving object to be detected in time sequence; On the host computer side, for the two or more image blocks of the moving target to be detected, the threshold of each image block is calculated in time order to obtain the threshold calculation data of each image block; thereby, the threshold calculation data of all image blocks in the two or more image blocks of the moving target to be detected are obtained, which are recorded as the threshold calculation data of all image blocks of the moving target to be detected; On the host computer side, image reconstruction is performed according to threshold value calculation data of all image blocks of the moving target to be detected, so as to obtain a reconstructed image of the moving target to be detected; On the host computer side, contour detection is performed on the reconstructed image of the moving target to be detected to obtain a contour detection result of the reconstructed image of the moving target to be detected; On the host computer side, according to preset contour attributes, effective contours are screened from the contour detection results of the reconstructed image of the moving target to be detected, and the reconstructed image of the moving target to be detected corresponding to the effective contour is used as the detection result of the moving target to be detected.
5. The method for detecting a moving target according to claim 4, It is characterized in that Calculate the threshold of each image block to obtain the threshold calculation data of each image block, including: According to the following formula, the threshold of each image block is calculated to obtain the threshold calculation data of each image block: ; Where T is the threshold of each image block, is the gray value of the position (i, j) in each image block, k is a non-negative parameter, and s is the number of pixels in each image block.
6. A moving target detection device, It is characterized in that include: Camera side and host computer side; An array camera is provided at the camera end; An acquisition unit, used to use the array camera to sample the image of the moving target to be detected in real time, and record it as the current image of the moving target to be detected; At the camera end, a first control unit is used to preprocess the current image of the moving target to be detected to obtain a preprocessed image of the moving target to be detected; wherein, the first control unit, at the camera end, preprocesses the current image of the moving target to be detected to obtain a preprocessed image of the moving target to be detected, including: at the camera end, performing inter-frame difference on two adjacent frames of images in the current image of the moving target to be detected to obtain a differential image of the two frames of images of the moving target to be detected; performing threshold segmentation processing on the differential image of the two frames of images of the moving target to be detected to obtain a threshold segmented image of the moving target to be detected as the preprocessed image of the moving target to be detected; At the camera end, the first control unit is further used to convert the preprocessed image of the moving target to be detected into two or more image blocks to obtain two or more image blocks of the moving target to be detected; and transmit the two or more image blocks of the moving target to be detected to the upper computer end that has established a communication connection with the camera end in a block sparse transmission manner; On the host computer side, the second control unit is used to calculate the threshold of each image block in the two or more image blocks of the moving target to be detected, reconstruct and screen the image, obtain the detection result of the moving target to be detected, and realize the detection of the moving target to be detected; wherein the threshold of each image block refers to the grayscale value threshold of each image block.
7. A terminal, It is characterized in that include: The moving target detection device as claimed in claim 6.
8. A storage medium, It is characterized in that The storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the moving target detection method according to any one of claims 1 to 5.
9. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the moving target detection method described in any one of claims 1 to 5 are implemented.
