A video moving target detection method

By collecting and processing differential images of images with similar time in video surveillance, the problem of low performance of video surveillance equipment is solved, and efficient mobile object detection is achieved in the edge computing environment.

CN114170447BActive Publication Date: 2025-08-05BEIJING INST OF COMP TECH & APPL
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111456957.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-01
Publication Date
2025-08-05
Estimated Expiration
2041-12-01

AI Technical Summary

Technical Problem

Existing video surveillance equipment has low performance and is difficult to efficiently detect mobile targets. The existing methods have large computing volume or high resource requirements, which is not suitable for edge computing environments.

Method used

Two images with similar time in the video are collected, different images are calculated in blocks and binarized, and mobile blocks are selected and mobile targets are formed. Confirmed through adjacency blocks, and calculation and storage requirements are reduced.

Benefits of technology

It realizes efficient detection of mobile targets on video front-end devices with low performance, which is suitable for video surveillance edge computing, reducing computing and storage resource requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114170447B_ABST
    Figure CN114170447B_ABST
Patent Text Reader

Abstract

The present invention provides a video moving target detection method, a video moving target detection method, the detection method includes: capturing two images of similar time in the video, and dividing the images into blocks to obtain a first image and a second image, the acquisition time of the first image is earlier than the acquisition time of the second image; calculating the difference image between the first image and the second image, and binarizing the difference image; selecting a moving block on the second image; continuing to select moving blocks in the adjacent blocks of the moving block to form a moving target. It meets the moving target detection needs of video surveillance edge devices. The video moving target detection proposed by the present invention requires less computing and storage resources, is suitable for low-performance video front-end devices, and will play an important role in video surveillance edge computing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of video moving target detection, and in particular to a video moving target detection method. Background Art

[0002] In video surveillance, it is necessary to detect moving targets in the video, such as objects and people, and targets moving in the street, for further identification. Currently, many moving target detection methods have been proposed, mainly including:

[0003] (1) Inter-frame difference method. This method uses the differences between several images taken at similar times in the video to detect moving targets. This method is simple, but holes often appear in the target, and multiple images must be accumulated to obtain the complete target.

[0004] (2) Optical flow method. This method uses the movement of multiple points in the video between different frames to detect moving objects. This method requires a lot of computation and is not suitable for low-performance video acquisition and analysis equipment.

[0005] (3) Background modeling: This method builds a background model in the video and then uses the difference between the current image frame and the background model to separate the moving target. This method requires a lot of computation and is not suitable for low-performance video acquisition and analysis equipment.

[0006] (4) Neural network method. Using multiple images of the object to be identified, a neural network is trained, and then the trained neural network is used to separate the objects in the image. This method requires a large number of training images, a large amount of training time, and high-performance computing equipment. The equipment running the model also requires high performance.

[0007] With the development of edge computing in video surveillance, video acquisition devices also need to have video analysis and management capabilities. However, due to the need for energy conservation and emission reduction, the performance of edge devices cannot be too high. Therefore, a video moving object detection method with low computational complexity is urgently needed. Summary of the Invention

[0008] In view of the above problems, the present invention is proposed to provide a video moving object detection method that overcomes the above problems or at least partially solves the above problems.

[0009] According to one aspect of the present invention, a method for detecting a moving object in a video is provided, the method comprising:

[0010] Capturing two images that are close in time in a video, and dividing the images into blocks to obtain a first image and a second image, where the acquisition time of the first image is earlier than the acquisition time of the second image;

[0011] Calculating a difference image between the first image and the second image, and performing binarization processing on the difference image;

[0012] selecting a moving block on the second image;

[0013] Continue to select moving blocks from the adjacent blocks of the moving block to form a moving target.

[0014] Optionally, the first image and the second image have the same size, M rows and N columns, and are divided into small blocks of m rows and n columns, where m <M,n<N。

[0015] Optionally, calculating a difference image between the first image and the second image and binarizing the difference image specifically includes:

[0016] The pixel value of the difference image between the first image and the second image is the absolute value of the difference between the corresponding pixel values of the first image and the second image;

[0017] The size of the difference image is the same as that of the first image and the second image, and is divided into small blocks of m rows and n columns;

[0018] Calculate the mean and variance of the difference image, where the first threshold value T1 = mean + variance and the second threshold value T2 = mean - variance;

[0019] According to whether the pixel value in the difference image is greater than or equal to the first threshold T1, if yes, it becomes 0 and is marked as a non-difference pixel; otherwise, it becomes 1 and is marked as a difference pixel;

[0020] When the number of difference pixels contained in a block in the binarized difference image is greater than or equal to half of the number of pixels in the block, it is marked as a difference block.

[0021] Optionally, selecting a moving block on the second image specifically includes:

[0022] If the adjacent block of the marked block of the second image to the corresponding block in the difference image is a difference block, the marked block in the second image is marked as a candidate moving block;

[0023] Calculating a difference between a motion vector corresponding to the candidate moving block in the first image and a motion vector;

[0024] If the difference in motion vector between the marked blocks in the second image is less than or equal to the second threshold T2, the marked blocks are marked as moving blocks; otherwise, they are not marked.

[0025] Optionally, the step of continuing to select moving blocks from adjacent blocks of the moving block to form a moving target specifically includes:

[0026] If the marked block of the second image I2 is adjacent to the moving block, and the difference between the motion vector in the first image I1 and the motion vector of the moving block is within the range of ±1;

[0027] If the difference in the motion vector is less than or equal to the second threshold T2, the marked block is marked as a moving block, and all adjacent moving blocks constitute a moving target.

[0028] The present invention provides a video moving target detection method, a video moving target detection method, the detection method comprising: capturing two images of similar time in a video, and dividing the images into blocks to obtain a first image and a second image, wherein the acquisition time of the first image is earlier than the acquisition time of the second image; calculating a difference image between the first image and the second image, and binarizing the difference image; selecting a moving block on the second image; and continuing to select moving blocks from adjacent blocks of the moving block to form a moving target. The moving target detection requirements of the video surveillance edge device are met. The video moving target detection proposed by the present invention requires less computing and storage resources, is suitable for low-performance video front-end devices, and will play an important role in video surveillance edge computing.

[0029] 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, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0031] Figure 1 A flow chart of a video moving object detection method provided by an embodiment of the present invention;

[0032] Figure 2 A schematic diagram of the first image segmentation method of a video moving object detection method provided by an embodiment of the present invention;

[0033] Figure 3 A schematic diagram of the second image segmentation method of a video moving target detection method provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0034] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be fully conveyed to those skilled in the art.

[0035] In the description of the embodiments of the present invention, the terms "comprising", "having" and any variations thereof in the claims and the accompanying drawings are intended to cover non-exclusive inclusion. For example, a series of steps or units are included.

[0036] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.

[0037] As Figure 1 shown, Figure 1 is a flowchart of a video moving target detection method of the present invention. The detection method includes:

[0038] An image acquisition step. Two images with similar time in the video are acquired and the images are divided into blocks.

[0039] Specifically, when implemented, the two acquired images are the first image I1 and the second image I2 respectively. The acquisition time of the second image I2 is later, usually the time difference is about 200 milliseconds. The first image I1 and the second image I2 are of the same size, with M rows and N columns, and are divided into small blocks of m rows and n columns, where m < M and n < N. Usually, m = n = 8, or m = n = 16, which is basically consistent with the block size of video coding.

[0040] As Figure 2 shown, the image block division is performed on the entire image. The entire image is divided into p×q blocks. If the image size is M rows and N columns and is evenly divided into small blocks of m rows and n columns, then m = M / p and n = N / q. The coordinates of the upper left corner of the block (i,j) on the image are (i×m,j×n), where i = 0, 1,..., p - 1 and j = 0, 1,..., q - 1. p≥2 and q≥2. The number of blocks of the reference image and the image to be registered is the same, but the block sizes are different.

[0041] As Figure 3 shown, the image block division is performed inside the image. The inside of the image is divided into (p - 1)×(q - 1) blocks, and the coordinates of the upper left corner of the block (i,j) on the image are (i×m + m / 2,j×n + n / 2), where i = 0, 1,..., p - 2 and j = 0, 1,..., q - 2.

[0042] A differential image calculation step. Calculate the differential image of the two acquired images and binarize it.

[0043] Calculate the difference image step. The pixel value of the difference image I3 between the first image I1 and the second image I2 is the absolute value of the difference between the corresponding pixel values of the first image I1 and the second image I2. The size of the difference image I3 is the same as that of the first image I1 and the second image I2, and is also divided into small blocks with m rows and n columns.

[0044] In a specific implementation, the pixels of the first image I1, the second image I2 and the difference image I3 are I1(x,y), I2(x,y) and I3(x,y) respectively, and I3(x,y)=|I2(x,y)-I1(x,y)|.

[0045] Threshold calculation step: Calculate the mean and variance of the difference image I3, the first threshold T1 = mean + variance, and the second threshold T2 = mean - variance.

[0046] In a specific implementation, the average μ and variance σ of the pixel values in the difference image I3 are calculated, and a first threshold T1 = μ + σ and a second threshold T2 = max{3, μ - σ} are calculated to ensure that T2 ≥ 3.

[0047] Calculate the binarized image step. Depending on whether the pixel value in the difference image I3 is greater than or equal to the threshold T1, it becomes 0 and is marked as a non-difference pixel, or becomes 1 and is marked as a difference pixel.

[0048] If the pixel I3(x,y) in the difference image I3 is greater than or equal to T1, the pixel I3(x,y) in the difference image I3 is modified to I3(x,y)=1 and is called a difference pixel. Otherwise, the pixel I3(x,y) is modified to I3(x,y)=0 and is called a non-difference pixel.

[0049] Calculate the difference block step: After binarization, a block in the difference image I3 is marked as a difference block if the number of difference pixels contained in the block is greater than or equal to half of the number of pixels in the block.

[0050] Select the Move Block step. Select Move Block on an image acquired later in time.

[0051] In the step of selecting a candidate moving block, if a block of the second image I2 that is acquired later has a difference block adjacent to the corresponding block in the difference image I3, then the block in the second image I2 is marked as a candidate moving block.

[0052] In a specific implementation, if one of the eight adjacent blocks above, below, left, right, upper left, lower left, upper right, and lower right of the corresponding block in the difference image I3 of a block of the second image I2 is a difference block, then this block in the image I2 is marked as a candidate moving block.

[0053] Select a moving block. Calculate the difference between the motion vector and the motion vector of the candidate moving block in the first image I1. If the difference in the motion vector of this block in the second image I2 is less than or equal to the second threshold T2, mark it as a moving block; otherwise, do not mark it.

[0054] During specific implementation, the motion vector may be calculated using a video image coding method, and the absolute value of the motion vector does not exceed the size of the image block.

[0055] The step of detecting a moving target is to select moving blocks from the adjacent blocks of the selected moving block to form a moving target.

[0056] In a specific implementation, if a block in the second image I2, which was acquired later, is adjacent to a moving block, and the difference between its motion vector in the first image I1 and the motion vector of the moving block is within the range of ±1, and the difference in motion vector is less than or equal to the second threshold T2, then this block is also marked as a moving block. All adjacent moving blocks constitute a moving target.

[0057] Beneficial Effect: Meeting the requirements of moving target detection for video surveillance edge devices. The video moving target detection proposed by this invention requires less computing and storage resources, is suitable for lower-performance video front-end devices, and will play an important role in video surveillance edge computing.

[0058] The above specific implementation methods further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A video moving target detection method, characterized in that: The detection method comprises: Capturing two images that are close in time in a video, and dividing the images into blocks to obtain a first image and a second image, where the acquisition time of the first image is earlier than the acquisition time of the second image; Calculating a difference image between the first image and the second image, and performing binarization processing on the difference image; The pixel value of the difference image between the first image and the second image is the absolute value of the difference between the corresponding pixel values of the first image and the second image; The size of the difference image is the same as that of the first image and the second image, and is divided into small blocks of m rows and n columns; Calculate the mean and variance of the difference image, where the first threshold value T1 = mean + variance and the second threshold value T2 = mean - variance; According to whether the pixel value in the difference image is greater than or equal to the first threshold T1, if yes, it becomes 0 and is marked as a non-difference pixel; otherwise, it becomes 1 and is marked as a difference pixel; When the number of difference pixels contained in a block in the binarized difference image is greater than or equal to half of the number of pixels in the block, it is marked as a difference block; If the adjacent block of the marked block of the second image to the corresponding block in the difference image is a difference block, the marked block in the second image is marked as a candidate moving block; Calculating a difference between a motion vector corresponding to the candidate moving block in the first image and a motion vector; If the difference in motion vector of the marked block in the second image is less than or equal to the second threshold T2, it is marked as a moving block, otherwise it is not marked; Continue to select moving blocks from the adjacent blocks of the moving block to form a moving target.

2. A video moving target detection method according to claim 1, characterized in that: The first image and the second image have the same size, M rows and N columns, and are divided into small blocks of m rows and n columns, where m <M,n<N。 3. A video moving target detection method according to claim 1, characterized in that: The step of continuing to select a moving block from the adjacent blocks of the moving block to form a moving target specifically includes: If the marked block of the second image I2 is adjacent to the moving block, and the difference between the motion vector in the first image I1 and the motion vector of the moving block is within the range of ±1; If the difference in the motion vector is less than or equal to the second threshold T2, the marked block is marked as a moving block, and all adjacent moving blocks constitute a moving target.

Citation Information

Patent Citations

  • Highway tunnel fire detecting method based on smog early-stage motion features

    CN103150549A

  • Aerial video moving object detection method based on motion information and regional characteristic

    CN107330922A