Moving target identification method and device based on video image, medium and equipment

Through the combination of background difference and inter-frame difference processing, the problem of low efficiency of moving target recognition in the existing technology is solved, and efficient and accurate moving target recognition in video images is achieved.

CN118570701APending Publication Date: 2024-08-30PINGAN YIQIANBAO E COMMERCE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410725471.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Existing moving target recognition methods require large amount of data calculation and slow calculation speed, resulting in low recognition efficiency.

Method used

By acquiring several frames of video images, performing background difference processing and inter-frame difference processing, and combining the background difference images and inter-frame difference images for overlay and union, accurate moving target recognition results can be obtained.

Benefits of technology

While reducing the amount of calculation, the accuracy and efficiency of recognition of moving targets are improved, and efficient moving target recognition is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570701A
    Figure CN118570701A
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and particularly discloses a moving target identification method and device based on a video image, a medium and equipment. The method comprises the following steps: acquiring a plurality of frames of video images to be subjected to moving target recognition; performing background difference processing based on the plurality of frames of video images to obtain a background difference image; on the basis of the plurality of video frame images, inter-frame difference processing is carried out on adjacent video frames, and a plurality of inter-frame difference images are obtained; and performing moving target identification based on the background difference image and each inter-frame difference image to obtain an identification result. According to the method and the device, the background difference image is obtained through background difference processing, so that the preliminary recognition result of the moving target object can be obtained, and when a plurality of inter-frame difference images are obtained subsequently, superposition can be performed based on the background difference image containing the preliminary recognition result and the inter-frame difference images to obtain the union set. Therefore, the target image containing the precise moving target object contour can be obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, medium and equipment for identifying a moving target based on a video image. Background Art

[0002] With the continuous development of Internet technology, various intelligent monitoring systems have emerged. By setting up intelligent monitoring systems, it is possible to track suspicious people, visually track objects in robot vision, and track illegal vehicles in traffic monitoring, etc.

[0003] However, the existing mobile target tracking / recognition methods have a large amount of data calculation and a slow calculation speed, which in turn causes the problem of low mobile target recognition efficiency. Summary of the invention

[0004] In view of this, the present invention provides a method, device, medium and equipment for identifying a moving target based on a video image, the main purpose of which is to solve the problem of low efficiency in current moving target identification.

[0005] To solve the above problems, the present application provides a method for identifying a moving target based on a video image, comprising:

[0006] Acquire several frames of video images for moving target recognition;

[0007] Based on the plurality of frames of video images, background difference processing is performed to obtain a background difference image;

[0008] Based on the plurality of video frame images, performing inter-frame difference processing on adjacent video frames to obtain a plurality of inter-frame difference images;

[0009] The moving target is recognized based on the background difference image and each of the inter-frame difference images to obtain a recognition result.

[0010] Optionally, performing background difference processing based on the plurality of frames of video images to obtain a background difference image specifically includes:

[0011] Background difference processing is performed based on the first n frames of video images in each of the video images to obtain a difference image; n is a natural number greater than or equal to 3.

[0012] Optionally, performing background difference processing based on the first n frames of video images in each of the video images to obtain a difference image specifically includes:

[0013] Performing mean calculation based on the first n frames of video images in each of the video images to obtain a background image;

[0014] Background difference processing is performed based on the first frame image of the first n frames of video images and the background image to obtain the background difference image.

[0015] Optionally, performing inter-frame difference processing based on the plurality of video frame images to obtain a plurality of inter-frame difference images specifically includes:

[0016] Based on the latter m frames of video images in each of the video images, inter-frame difference processing is performed on two adjacent frames of video images respectively to obtain m-1 inter-frame difference images.

[0017] Optionally, the performing moving target recognition based on the background difference image and each of the inter-frame difference images to obtain a recognition result specifically includes:

[0018] Based on the pixel value of each pixel point in each of the inter-frame difference images, a superposition and union calculation is performed to obtain a difference superposition image;

[0019] Based on the difference superposition image and the background difference image, a superposition process is performed to obtain a target image containing a moving target object, so as to obtain a recognition result of the moving target.

[0020] Optionally, the performing superposition processing based on the differential superposition image and the background differential image to obtain a target image containing a moving target object to obtain a recognition result of the moving target specifically includes:

[0021] Judging the pixel threshold of each pixel point in the background difference image based on a predetermined first pixel threshold value, and determining that the pixel point is a first target pixel point of the moving target object;

[0022] Judging the pixel threshold of each pixel point in the differential superposition image based on a predetermined second pixel threshold value, and determining that the pixel point is a second target pixel point of the moving target object;

[0023] Based on the pixel areas corresponding to the first target pixels in the background difference image and the pixel areas corresponding to the second target pixels in the difference superposition image, superposition processing is performed to obtain the target image containing the moving target object, so as to obtain the recognition result of the moving target.

[0024] To solve the above problems, the present application provides a mobile target recognition device based on video images, comprising:

[0025] An acquisition module is used to acquire a plurality of frames of video images to be used for moving target recognition;

[0026] A background difference module, used for performing background difference processing based on the plurality of frames of video images to obtain a background difference image;

[0027] An inter-frame difference module, used for performing inter-frame difference processing on adjacent video frames based on the plurality of video frame images to obtain a plurality of inter-frame difference images;

[0028] The recognition module is used to perform moving target recognition based on the background difference image and each of the inter-frame difference images to obtain a recognition result.

[0029] Optionally, the background difference module is specifically used for:

[0030] Background difference processing is performed based on the first n frames of video images in each of the video images to obtain a difference image; n is a natural number greater than or equal to 3.

[0031] To solve the above problems, the present application provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned methods for identifying moving targets based on video images are implemented.

[0032] To solve the above problems, the present application provides an electronic device, comprising at least a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program on the memory, it implements the steps of any of the above-mentioned methods for identifying mobile targets based on video images.

[0033] The method, device, medium and equipment for identifying moving targets based on video images in the present application first perform background difference processing based on several frames of video images to obtain a background difference image, thereby obtaining a preliminary recognition result of the moving target object. When several inter-frame difference images are subsequently obtained, the background difference image containing the preliminary recognition result and the inter-frame difference images can be superimposed and unioned to obtain a target image containing the precise contour of the moving target object, thereby being able to accurately identify the moving target object with a small amount of calculation, thereby improving the accuracy of the recognition result.

[0034] 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 according to 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 listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0036] Figure 1A flowchart of a method for identifying a moving target based on a video image according to an embodiment of the present application;

[0037] Figure 2 This is a flow chart of a method for identifying a moving target based on a video image according to another embodiment of the present application;

[0038] Figure 3 This is a flow chart of a method for identifying a moving target based on a video image according to another embodiment of the present application;

[0039] Figure 4 This is a structural block diagram of a device for identifying a moving target based on a video image according to another embodiment of the present application;

[0040] Figure 5 This is a structural block diagram of an electronic device according to another embodiment of the present application. DETAILED DESCRIPTION

[0041] Various aspects and features of the present application are described herein with reference to the accompanying drawings.

[0042] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.

[0043] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0044] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.

[0045] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art will be able to readily implement many other equivalent forms of the present application.

[0046] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.

[0047] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.

[0048] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.

[0049] The present application embodiment provides a method for identifying a moving target based on a video image. The method in the present application embodiment can be specifically applied to electronic devices such as servers and terminals. Take the method in the present application applied to a server as an example for explanation. Figure 1 As shown, the method in this embodiment includes the following steps:

[0050] Step S101, obtaining a plurality of frames of video images for moving target recognition;

[0051] In the specific implementation process of this step, video images within a period of time can be captured based on the monitoring device to obtain a number of video frame images.

[0052] Step S102, performing background difference processing based on the plurality of frames of video images to obtain a background difference image;

[0053] In the specific implementation process of this step, background difference processing can be performed based on the first n frames of video images in each of the video images to obtain a difference image; n is a natural number greater than or equal to 3. For example, background difference processing is performed based on the first 3 frames of video images to obtain a difference image; or, background difference processing is performed based on the first 5 frames of video images to obtain a difference image.

[0054] In the specific implementation process of this step, pixel average calculation can be performed based on the first n frames of images to obtain a background image, and then background difference processing is performed between the first frame of image and the background image to obtain a background difference image.

[0055] Step S103, based on the plurality of video frame images, performing inter-frame difference processing on adjacent video frames to obtain a plurality of inter-frame difference images;

[0056] In the specific implementation process of this step, more than three adjacent video frames can be subjected to inter-frame difference processing to obtain at least two inter-frame difference images. Specifically, other video frame images except for background difference can be subjected to inter-frame difference processing to obtain several inter-frame difference images.

[0057] Step S104: performing moving target recognition based on the background difference image and each of the inter-frame difference images to obtain a recognition result.

[0058] In the specific implementation process of this step, the differential images between frames can be superimposed to obtain a differential superposition image containing a clear moving target, and then the differential superposition image is superimposed with the background differential image to obtain a target image containing a moving target object, so as to obtain a recognition result of the moving target.

[0059] In the present embodiment, a method for identifying moving targets based on video images is used. By first performing background difference processing based on several frames of video images to obtain a background difference image, a preliminary identification result of the moving target object can be obtained. Subsequently, when several inter-frame difference images are obtained, the background difference image containing the preliminary identification result and the inter-frame difference images can be superimposed and unioned to obtain a target image containing the precise contour of the moving target object. The moving target object can then be accurately identified with a small amount of computation, thereby improving the accuracy of the identification result.

[0060] Based on the above embodiment, another embodiment of the present application provides a method for identifying a moving target based on a video image, such as Figure 2 As shown, the following steps are included:

[0061] Step S201, obtaining a plurality of frames of video images for moving target recognition;

[0062] Step S202, performing background difference processing based on the first n frames of video images in each of the video images to obtain a difference image; n is a natural number greater than or equal to 3;

[0063] In the specific implementation process of this step, the background image can be obtained by performing mean calculation based on the first n frames of video images in each of the video images; then background difference processing can be performed based on the first frame of the first n frames of video images and the background image to obtain the background difference image. For example, the first three frames of video images can be averaged to obtain the background image, and then the first frame of image and the background image can be background-differentiated to obtain the background difference image. For another example, the pixel mean can be calculated for each pixel point in the first five frames of video images to obtain the background image, and then the first frame of image and the background image can be background-differentiated to obtain the background difference image.

[0064] Step S203, based on the last m frames of video images in each of the video images, perform frame difference processing on two adjacent frames of video images to obtain m-1 frame difference images; m is a natural number greater than or equal to 3;

[0065] In the specific implementation process of this step, two adjacent frames of images can be differentiated, and the images can be segmented according to the binarization threshold, thereby obtaining several frame binary images, that is, obtaining several frame binary type differential images. For example, the following 4th frame video image, 5th frame video image and 6th frame video image can be subjected to inter-frame differential processing, that is, the 4th frame video image and the 5th frame video image are subjected to inter-frame differential processing, and the 5th frame video image and the 6th frame video image are subjected to inter-frame differential processing, thereby obtaining two inter-frame differential images. Alternatively, the following 8th frame video image, 9th frame video image and 10th frame video image are subjected to inter-frame differential processing.

[0066] In this step, by using three or more consecutive video frames for differentiation, the image hole problem caused by two-frame differentiation can be avoided, which provides a guarantee for the subsequent accurate recognition of moving targets. In addition, by performing inter-frame differentiation processing on the last m frames of video images, the amount of data calculation can be reduced as much as possible while ensuring accurate recognition of moving targets, thereby improving the recognition efficiency of moving targets.

[0067] Step S204, performing a superposition and union calculation based on the pixel value of each pixel point in each of the inter-frame difference images to obtain a difference superposition image;

[0068] In the specific implementation process of this step, the binary type difference images can be superimposed and unioned to obtain the maximum range of the moving target, thereby avoiding the ghost phenomenon between the moving target frames and facilitating the complete target extraction.

[0069] Step S205 , performing superposition processing based on the differential superposition image and the background differential image to obtain a target image containing a moving target object, so as to obtain a recognition result of the moving target.

[0070] In this step, after the differential superposition image is obtained, the background differential image can be supplemented into the differential superposition image, thereby obtaining a target image containing a clear, moving target object.

[0071] In the specific implementation process, the pixel threshold of each pixel point in the background difference image can be judged based on the predetermined first pixel threshold value to determine whether the pixel point is the first target pixel point of the moving target object; that is, to determine whether each pixel point is the background or the moving target, the specific background and target judgment formula is as follows:

[0072]

[0073] Among them, D k (x, y) is the difference result; T is the predetermined pixel threshold. When the difference result is greater than or equal to the pixel threshold T, it can be judged as a target; when the difference result is less than the pixel threshold T, it can be judged as a background.

[0074] Then, the pixel threshold of each pixel point in the differential superposition image may be judged based on a predetermined second pixel threshold value to determine that the pixel point is a second target pixel point of the moving target object;

[0075]

[0076] Among them, R k (x,y) represents a difference image, R k+1 (x,y) represents another difference image; R k (x,y)∪R k+1 (x, y) represents the superposition and union of two binary difference images; F k (x, y) represents the difference stack image. k (x,y)=1 is the moving target; F k (x,y)=0 is the background.

[0077] Finally, based on the pixel areas corresponding to the first target pixels in the background difference image and the pixel areas corresponding to the second target pixels in the difference superposition image, the target image containing the moving target object is obtained to obtain the recognition result of the moving target. k (x,y) and F k (x,y) are superimposed to obtain the target image.

[0078] The method in this embodiment first performs background difference processing based on several frames of video images to obtain a background difference image, thereby obtaining a preliminary recognition result of the moving target object. Subsequently, when several inter-frame difference images are obtained, the background difference image containing the preliminary recognition result and the inter-frame difference images can be superimposed and unioned to obtain a target image containing the precise contour of the moving target object, thereby being able to accurately identify the moving target object with a small amount of calculation, thereby improving the accuracy of the recognition result.

[0079] On the basis of the above embodiments, this embodiment provides a method for identifying moving targets based on video images. In this embodiment, after obtaining the target image, the target image can also be processed by morphological operations to depict the moving target. Among them, the morphological operations include opening operations, closing operations, and convex hull operations of the region. The opening operation is an operation that first corrodes and then expands the binary image, which can filter out slightly moving targets. The closing operation is the inverse process of the opening operation, which can fill the holes in the binary target and connect the neighborhood. Among them, the operation principles of binary corrosion and expansion are respectively:

[0080]

[0081] Convex hull, also known as convex shell, refers to the set of minimum convex polygons formed by connecting all points in the vector space, where the straight line segment connecting any two points is included in the set A. The Graham scanning method is often used as the algorithm, and is mainly used to depict the contours of moving pedestrian targets.

[0082] In this embodiment, by using morphological operations to depict the outline of the moving object in the target image, the moving target can be displayed more clearly, thereby improving the tracking effect of the moving target.

[0083] Based on the above embodiments, taking the moving target as a pedestrian target as an example, the method in this application is described below in combination with a specific recognition process. Figure 3 As shown, the specific steps include:

[0084] Step 1: Read the video sequence images to obtain several frames of video images.

[0085] Step 2: Calculate the pixel average of the first three or five frames of the video sequence to obtain the background image b k (x, y), and the background image domain first frame video image f k (x, y) performs background difference processing to obtain the difference result D k (x,y).

[0086] Step 3: Based on the difference result D k (x,y) Preliminary extraction of pedestrian targets.

[0087] That is, based on the following formula, the difference result D k Each pixel in (x, y) is judged to determine whether it is a moving target pixel or a background pixel. The formula is as follows:

[0088]

[0089] Among them, D k(x, y) is the difference result; T is the predetermined pixel threshold. When the difference result is greater than or equal to the pixel threshold T, it can be judged as a target; when the difference result is less than the pixel threshold T, it can be judged as a background.

[0090] Step 4: Perform inter-frame difference processing to obtain several inter-frame difference images.

[0091] In this step, three frames of images can be read continuously. k-1 (x,y),f k (x,y),f k+1 (x, y), make a difference between two adjacent frames of images, and segment the images according to the binary threshold to obtain two binary images R k (x,y),R k+1 (x,y), the image result is either black or white.

[0092] Step 5: Superimpose the difference images between frames to obtain a difference superposition image to completely extract the pedestrian target.

[0093] In this step, the two binary images can be superimposed and the union can be obtained to obtain the maximum range of the pedestrian target, avoiding the ghosting phenomenon between the moving pedestrian frames and achieving complete target extraction. The union calculation method is:

[0094]

[0095] Where: F k (x,y)=1 represents a pedestrian image; F k (x, y) = 0 represents the background image.

[0096] Step 6: Superimpose the background difference image of the preliminary extracted pedestrian target and the complete extracted pedestrian target difference superposition image, and perform morphological operations.

[0097] Step 7: Describe the moving pedestrian based on the morphological operation results.

[0098] The method for identifying moving targets based on video images in this embodiment can realize the tracking / identification of moving pedestrians in a video sequence. After algorithm analysis and testing, it is found that the tracking of pedestrians is effective and reliable when the lighting effect is not significant.

[0099] Based on the above embodiment, another embodiment of the present application provides a mobile target recognition device based on video images, such as Figure 4 As shown, including:

[0100] The acquisition module 11 is used to acquire a plurality of frames of video images to be used for moving target recognition;

[0101] A background difference module 12 is used to perform background difference processing based on the plurality of frames of video images to obtain a background difference image;

[0102] An inter-frame difference module 13, configured to perform inter-frame difference processing on adjacent video frames based on the plurality of video frame images to obtain a plurality of inter-frame difference images;

[0103] The recognition module 14 is used to perform moving target recognition based on the background difference image and each of the inter-frame difference images to obtain a recognition result.

[0104] In the specific implementation process of this embodiment, the background difference module is specifically used to: perform background difference processing based on the first n frames of video images in each of the video images to obtain a difference image; n is a natural number greater than or equal to 3.

[0105] In the specific implementation process of this embodiment, the background difference module is specifically used to: perform mean calculation based on the first n frames of video images in each of the video images to obtain a background image; perform background difference processing based on the first frame image in the first n frames of video images and the background image to obtain the background difference image.

[0106] In the specific implementation process of this embodiment, the inter-frame difference module is specifically used to: based on the last m frames of video images in each of the video images, perform inter-frame difference processing on two adjacent frames of video images respectively to obtain m-1 inter-frame difference images.

[0107] In the specific implementation process of this embodiment, the recognition module is specifically used to: perform superposition and union calculation based on the pixel value of each pixel point in the inter-frame differential image to obtain a differential superposition image; perform superposition processing based on the differential superposition image and the background differential image to obtain a target image containing a moving target object, so as to obtain a recognition result of the mobile target.

[0108] In the specific implementation process of this embodiment, the recognition module is specifically used to: judge the pixel threshold of each pixel point in the background difference image based on a predetermined first pixel threshold, and determine that the pixel point is the first target pixel point of the moving target object; judge the pixel threshold of each pixel point in the differential overlay image based on a predetermined second pixel threshold, and determine that the pixel point is the second target pixel point of the moving target object; perform superposition processing based on the pixel area corresponding to each first target pixel point in the background difference image and the pixel area corresponding to each second target pixel point in the differential overlay image, to obtain the target image containing the moving target object, so as to obtain the recognition result of the mobile target.

[0109] The mobile target recognition device based on video images in this embodiment first performs background difference processing based on several frames of video images to obtain a background difference image, thereby obtaining a preliminary recognition result of the mobile target object. Subsequently, when several inter-frame difference images are obtained, the background difference image containing the preliminary recognition result and the inter-frame difference images can be superimposed and unioned to obtain a target image containing the precise contour of the mobile target object, thereby being able to accurately identify the mobile target object with a small amount of calculation, thereby improving the accuracy of the recognition result.

[0110] Another embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the following method steps are implemented:

[0111] Step 1: Obtain several frames of video images for moving target recognition;

[0112] Step 2: performing background difference processing based on the plurality of frames of video images to obtain a background difference image;

[0113] Step 3: Based on the plurality of video frame images, performing inter-frame difference processing on adjacent video frames to obtain a plurality of inter-frame difference images;

[0114] Step 4: Perform moving target recognition based on the background difference image and each of the inter-frame difference images to obtain a recognition result.

[0115] In the specific implementation process of this embodiment, the background difference processing is performed based on the plurality of frames of video images to obtain the background difference image, which specifically includes:

[0116] Background difference processing is performed based on the first n frames of video images in each of the video images to obtain a difference image; n is a natural number greater than or equal to 3.

[0117] In the specific implementation process of this embodiment, the background difference processing is performed based on the first n frames of video images in each of the video images to obtain the difference image, which specifically includes:

[0118] Performing mean calculation based on the first n frames of video images in each of the video images to obtain a background image;

[0119] Background difference processing is performed based on the first frame image of the first n frames of video images and the background image to obtain the background difference image.

[0120] In the specific implementation process of this embodiment, the inter-frame difference processing is performed based on the plurality of video frame images to obtain a plurality of inter-frame difference images, which specifically includes:

[0121] Based on the latter m frames of video images in each of the video images, inter-frame difference processing is performed on two adjacent frames of video images respectively to obtain m-1 inter-frame difference images.

[0122] In the specific implementation process of this embodiment, the mobile target recognition based on the background difference image and each of the inter-frame difference images is performed to obtain the recognition result, which specifically includes:

[0123] Based on the pixel value of each pixel point in each of the inter-frame difference images, a superposition and union calculation is performed to obtain a difference superposition image;

[0124] Based on the difference superposition image and the background difference image, a superposition process is performed to obtain a target image containing a moving target object, so as to obtain a recognition result of the moving target.

[0125] In the specific implementation process of this embodiment, the superposition processing based on the differential superposition image and the background differential image is performed to obtain a target image containing a moving target object, so as to obtain a recognition result of the moving target, specifically including:

[0126] Judging the pixel threshold of each pixel point in the background difference image based on a predetermined first pixel threshold value, and determining that the pixel point is a first target pixel point of the moving target object;

[0127] Judging the pixel threshold of each pixel point in the differential superposition image based on a predetermined second pixel threshold value, and determining that the pixel point is a second target pixel point of the moving target object;

[0128] Based on the pixel areas corresponding to the first target pixels in the background difference image and the pixel areas corresponding to the second target pixels in the difference superposition image, superposition processing is performed to obtain the target image containing the moving target object, so as to obtain the recognition result of the moving target.

[0129] The storage medium in this embodiment first performs background difference processing based on several frames of video images to obtain a background difference image, thereby obtaining a preliminary recognition result of the moving target object. Subsequently, when several inter-frame difference images are obtained, the background difference image containing the preliminary recognition result and the inter-frame difference images can be superimposed and unioned to obtain a target image containing the precise contour of the moving target object, thereby being able to accurately identify the moving target object with a small amount of calculation, thereby improving the accuracy of the recognition result.

[0130] Another embodiment of the present application provides an electronic device, such as Figure 5 As shown, at least a memory 1 and a processor 2 are included, the memory 1 stores a computer program, and the processor 2 implements the following method steps when executing the computer program on the memory 1:

[0131] Step 1: Obtain several frames of video images for moving target recognition;

[0132] Step 2: performing background difference processing based on the plurality of frames of video images to obtain a background difference image;

[0133] Step 3: Based on the plurality of video frame images, inter-frame difference processing is performed between adjacent video frames to obtain a plurality of inter-frame difference images;

[0134] Step 4: Perform moving target recognition based on the background difference image and each of the inter-frame difference images to obtain a recognition result.

[0135] In the specific implementation process of this embodiment, the background difference processing is performed based on the plurality of frames of video images to obtain the background difference image, which specifically includes:

[0136] Background difference processing is performed based on the first n frames of video images in each of the video images to obtain a difference image; n is a natural number greater than or equal to 3.

[0137] In the specific implementation process of this embodiment, the background difference processing is performed based on the first n frames of video images in each of the video images to obtain the difference image, which specifically includes:

[0138] Performing mean calculation based on the first n frames of video images in each of the video images to obtain a background image;

[0139] Background difference processing is performed based on the first frame image of the first n frames of video images and the background image to obtain the background difference image.

[0140] In the specific implementation process of this embodiment, the inter-frame difference processing is performed based on the plurality of video frame images to obtain a plurality of inter-frame difference images, which specifically includes:

[0141] Based on the latter m frames of video images in each of the video images, inter-frame difference processing is performed on two adjacent frames of video images respectively to obtain m-1 inter-frame difference images.

[0142] In the specific implementation process of this embodiment, the mobile target recognition based on the background difference image and each of the inter-frame difference images is performed to obtain the recognition result, which specifically includes:

[0143] Based on the pixel value of each pixel point in each of the inter-frame difference images, a superposition and union calculation is performed to obtain a difference superposition image;

[0144] Based on the difference superposition image and the background difference image, a superposition process is performed to obtain a target image containing a moving target object, so as to obtain a recognition result of the moving target.

[0145] In the specific implementation process of this embodiment, the superposition processing based on the differential superposition image and the background differential image is performed to obtain a target image containing a moving target object, so as to obtain a recognition result of the moving target, specifically including:

[0146] Judging the pixel threshold of each pixel point in the background difference image based on a predetermined first pixel threshold value, and determining that the pixel point is a first target pixel point of the moving target object;

[0147] Judging the pixel threshold of each pixel point in the differential superposition image based on a predetermined second pixel threshold value, and determining that the pixel point is a second target pixel point of the moving target object;

[0148] Based on the pixel areas corresponding to the first target pixels in the background difference image and the pixel areas corresponding to the second target pixels in the difference superposition image, superposition processing is performed to obtain the target image containing the moving target object, so as to obtain the recognition result of the moving target.

[0149] The electronic device in this embodiment first performs background difference processing based on several frames of video images to obtain a background difference image, thereby obtaining a preliminary recognition result of the moving target object. Subsequently, when several inter-frame difference images are obtained, the background difference image containing the preliminary recognition result and the inter-frame difference images can be superimposed and unioned to obtain a target image containing the precise contour of the moving target object, thereby being able to accurately identify the moving target object with a small amount of calculation, thereby improving the accuracy of the recognition result.

[0150] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.

Claims

1. A method for identifying a moving target based on a video image, characterized in that: include: Acquire several frames of video images for moving target recognition; Based on the plurality of frames of video images, background difference processing is performed to obtain a background difference image; Based on the plurality of video frame images, performing inter-frame difference processing on adjacent video frames to obtain a plurality of inter-frame difference images; The moving target is recognized based on the background difference image and each of the inter-frame difference images to obtain a recognition result.

2. The method according to claim 1, characterized in that: The performing background difference processing based on the plurality of frames of video images to obtain a background difference image specifically includes: Background difference processing is performed based on the first n frames of video images in each of the video images to obtain a difference image; n is a natural number greater than or equal to 3.

3. The method according to claim 2, characterized in that The performing background difference processing based on the first n frames of video images in each of the video images to obtain a difference image specifically includes: Performing mean calculation based on the first n frames of video images in each of the video images to obtain a background image; Background difference processing is performed based on the first frame image of the first n frames of video images and the background image to obtain the background difference image.

4. The method according to claim 1, characterized in that The performing inter-frame difference processing based on the plurality of video frame images to obtain a plurality of inter-frame difference images specifically includes: Based on the latter m frames of video images in each of the video images, inter-frame difference processing is performed on two adjacent frames of video images respectively to obtain m-1 inter-frame difference images.

5. The method according to claim 1, characterized in that The step of performing moving target recognition based on the background difference image and each of the inter-frame difference images to obtain a recognition result specifically includes: Based on the pixel value of each pixel point in each of the inter-frame difference images, a superposition and union calculation is performed to obtain a difference superposition image; Based on the difference superposition image and the background difference image, a superposition process is performed to obtain a target image containing a moving target object, so as to obtain a recognition result of the moving target.

6. The method according to claim 5, characterized in that The step of performing superposition processing based on the differential superposition image and the background differential image to obtain a target image containing a moving target object, so as to obtain a recognition result of the moving target, specifically includes: Judging the pixel threshold of each pixel point in the background difference image based on a predetermined first pixel threshold value, and determining that the pixel point is a first target pixel point of the moving target object; Judging the pixel threshold of each pixel point in the differential superposition image based on a predetermined second pixel threshold value, and determining that the pixel point is a second target pixel point of the moving target object; Based on the pixel areas corresponding to the first target pixels in the background difference image and the pixel areas corresponding to the second target pixels in the difference superposition image, superposition processing is performed to obtain the target image containing the moving target object, so as to obtain the recognition result of the moving target.

7. A mobile target recognition device based on video images, characterized in that: include: An acquisition module is used to acquire a plurality of frames of video images to be used for moving target recognition; A background difference module, used for performing background difference processing based on the plurality of frames of video images to obtain a background difference image; An inter-frame difference module, used for performing inter-frame difference processing on adjacent video frames based on the plurality of video frame images to obtain a plurality of inter-frame difference images; The recognition module is used to perform moving target recognition based on the background difference image and each of the inter-frame difference images to obtain a recognition result.

8. The device according to claim 7, characterized in that The background difference module is specifically used for: Background difference processing is performed based on the first n frames of video images in each of the video images to obtain a difference image; n is a natural number greater than or equal to 3.

9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for identifying a moving target based on a video image as described in any one of claims 1 to 6 are implemented.

10. An electronic device, characterized in that: The device at least comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method for identifying a moving target based on a video image as described in any one of claims 1 to 6 when executing the computer program on the memory.

Citation Information

Patent Citations

  • Object detection method based on segmentation background learning

    CN103679690A

  • Moving object rapid detection method based on video sequence

    CN106846359A

  • Natural gas conveying pipeline safety monitoring method and system and storage medium

    CN118038377A