Foreground and background extraction method, device, computer equipment and storage medium

Through the combination method of filtering, clustering and differential search classification processing, the instability and complexity of background extraction before point cloud in the prior art is solved, fast and accurate background extraction is achieved, and real-time and reliability are improved.

CN115272421BActive Publication Date: 2025-08-26SHANGHAI SHUJI INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210761426.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-29
Publication Date
2025-08-26
Estimated Expiration
2042-06-29

AI Technical Summary

Technical Problem

The existing point cloud-based pre-background extraction method has low practicality, reliability and versatility, and the process is complicated, and the background modeling method is susceptible to noise interference and has poor stability.

Method used

The combination of filtering processing, clustering processing, background modeling and differential search classification processing is adopted to obtain point cloud data, filtering, clustering, background modeling and differential search classification are carried out to achieve accurate updates of prospects and backgrounds.

Benefits of technology

Fast, stable and accurate background extraction is achieved, avoiding the problem of background extraction instability caused by dynamic changes in objects in the scene, and improving real-time and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115272421B_ABST
    Figure CN115272421B_ABST
Patent Text Reader

Abstract

The present invention discloses a foreground and background extraction method, comprising: acquiring point cloud data; filtering the acquired point cloud data to obtain a point set within the foreground and background range that needs to be processed; clustering the point set; performing background modeling based on the clustered point set to obtain a background point cloud; acquiring newly input point cloud data, and performing differential search and classification processing on the acquired newly input point cloud data and the background point cloud; and updating the foreground and background based on the differential search and classification results. Also disclosed are an apparatus, a computer device, and a storage medium for implementing the above-mentioned foreground and background extraction method. The present invention combines a differential (real-time) mechanism, historical frame modeling (stability), and background update (reliability) to achieve relatively fast, stable, and accurate background extraction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer vision recognition, and in particular to a foreground and background extraction method, device, computer equipment and storage medium. Background Art

[0002] Foreground and background extraction, as a prerequisite for moving object analysis, has been widely studied in the field of computer vision. As researchers have shifted their focus from traditional static object analysis to dynamic object analysis in recent years, foreground and background extraction has also attracted increasing attention. The quality of foreground and background extraction plays a crucial role in subsequent processing, including moving object detection, tracking, target classification, and behavior understanding.

[0003] Foreground and background extraction is mainly used to distinguish objects in dynamic video content. The foreground generally refers to moving objects, which are the objects of interest, while the background generally refers to stationary objects or objects of no interest. Currently, there are few studies on background extraction based on point clouds, and specific point cloud segmentation is usually performed according to actual usage requirements. Common settings include filtering out points and lines in areas of no interest for regional segmentation, surface extraction and filtering, etc. There are also some methods that convert point clouds into depth maps, process them based on the depth maps, and extract the foreground and background. There are also some methods that combine RGB information for foreground and background extraction. However, these methods have problems such as low practicality, reliability, and versatility, and the process is relatively complicated.

[0004] Existing foreground and background extraction methods fall into two general categories: one that doesn't model the background, such as frame-by-frame differencing, and the other that models the background and updates it during runtime. The background extracted by the first type of method is relatively coarse and susceptible to noise, resulting in poor stability. The second type of method requires continuous background updates, but the background update mechanism itself is difficult to determine and therefore less reliable.

[0005] Therefore, the applicant has found a solution to the above-mentioned problem through beneficial exploration and research. The technical solution to be introduced below is produced in this context. Summary of the Invention

[0006] One of the technical problems to be solved by the present invention is to provide a point cloud-based foreground and background extraction method with improved real-time performance, stability and reliability in response to the deficiencies of the existing technology.

[0007] The second technical problem to be solved by the present invention is to provide a device for implementing the foreground-background extraction method.

[0008] The third technical problem to be solved by the present invention is to provide a computer device for implementing the foreground and background extraction method.

[0009] The fourth technical problem to be solved by the present invention is to provide a computer-readable storage medium for implementing the foreground-background extraction method.

[0010] A foreground and background extraction method as a first aspect of the present invention comprises:

[0011] Get point cloud data;

[0012] Filter the acquired point cloud data to obtain the point set within the background range that needs to be processed;

[0013] performing clustering processing on the point set;

[0014] Perform background modeling based on the clustered point set to obtain background point cloud;

[0015] Acquire newly input point cloud data, and perform differential search and classification processing on the acquired newly input point cloud data and the background point cloud; and

[0016] The foreground and background are updated according to the differential search classification results.

[0017] In a preferred embodiment of the present invention, filtering the acquired point cloud data to obtain a point set within the background range to be processed includes:

[0018] Set filtering conditions according to sampling requirements;

[0019] Performing filtering on the point cloud data using the filtering conditions; and

[0020] The filtered point cloud data is uniformly sampled to remove outliers and obtain a point set within the background range that needs to be processed.

[0021] In a preferred embodiment of the present invention, performing background modeling based on the clustered point set to obtain a background point cloud includes:

[0022] Sort the clustered point set according to the size of the z value;

[0023] Divide the sorted point set into K height segments according to the z value to divide the sorted point set into multiple sub-point sets;

[0024] The multiple sub-point sets after segmentation are used as seed point clusters of the background, and the number of points N in each seed point cluster is counted;

[0025] The binary K-means method is used to cluster the number N of points in each seed point cluster, so that the points in each seed point cluster form n point clusters and serve as the seed points of the seed point cluster. Then the input point cloud has a total of K*N*n background seed points;

[0026] Repeat the above operation until the number of frames T specified by background modeling is met, and the number of seed points can be obtained as T*K*N*n;

[0027] Classify all the obtained seed points that belong to the same height segment according to their coordinate positions, and remove outlier seed points. When the number of remaining seed points in a certain height segment is greater than a threshold, the set of remaining seed points in the height segment is used as the background seed point set; and

[0028] The background seed point set and the non-background point set are merged to obtain a background point cloud including the background point set and the non-background point set.

[0029] In a preferred embodiment of the present invention, performing differential search and classification processing on the acquired newly input point cloud data and the background point cloud includes:

[0030] Performing differential search processing on the newly input point cloud data and the background point cloud; and

[0031] The newly input point cloud data is classified according to the difference search processing result to classify the point cloud data into two categories, one is a point set that is repeated with the background point cloud, and the other is a newly appeared point set.

[0032] In a preferred embodiment of the present invention, the updating process of the foreground and background according to the differential search classification structure includes:

[0033] Each point in the point set that overlaps with the background point cloud is judged one by one. If a point is judged to be a background point, the background point is updated using the point; if a point is judged to be a foreground point, the foreground point is updated using the point; and

[0034] Each point in the newly appeared point set is judged one by one. If a point is judged to be a background point, it is used to update the background point. If a point is judged to be a foreground point, it is used to update the foreground point.

[0035] In a preferred embodiment of the present invention, the rule for determining the point set that is repeated with the background point cloud is as follows:

[0036] If a point in the point set that repeats with the background point cloud is the same as the background seed point of the background point cloud, the point is processed according to the z-value difference. If the difference value does not exceed the threshold, the background point is updated with the point. If the difference value exceeds the threshold, the point is recorded as a mark, and the number of times the point appears repeatedly and the difference value is greater than the threshold is recorded. If the number of consecutive times exceeds the preset number, the point is updated as the background point. Otherwise, the point is recorded as the foreground point and is used to update the foreground point.

[0037] If a point in the point set that repeats with the background point cloud does not repeat with the background seed point of the background point cloud, the point is processed according to the z-value difference. If the difference value does not exceed the threshold, the point is marked as a foreground point and the foreground point is updated with the point. If the difference value exceeds the threshold, it is recorded as a marked point, and the number of times the point appears repeatedly and the difference value is greater than the threshold is recorded. If the number of consecutive excesses is greater than the preset number, the background point is updated with the point. Otherwise, it is marked as a foreground point and the foreground point is updated with the point.

[0038] In a preferred embodiment of the present invention, the judgment rule for a newly appeared point set is as follows:

[0039] The points in the newly appeared point set are classified into the point set to which they belong according to the z distance, and the distance between the point and the seed point in the height segment is calculated. If it does not exceed the threshold, it is classified into the same type of point set; if it exceeds the threshold and the point class it belongs to is the background point class, the point is marked and the count is recorded. When the number of times it exceeds the preset number is greater than the preset number, the background point is updated with the point, otherwise the point is marked as the foreground point and the foreground point is updated with the point; if it exceeds the threshold and the point class it belongs to is not the background point class, the point is marked as the foreground point and the foreground point is updated with the point.

[0040] As a second aspect of the present invention, a foreground background extraction device includes:

[0041] A point cloud data acquisition module, wherein the point cloud data module is used to acquire point cloud data;

[0042] A filtering processing module is used to filter the acquired point cloud data to obtain a point set within the background range that needs to be processed;

[0043] A clustering processing module, the clustering processing module is used to perform clustering processing on the point set;

[0044] A background modeling module, wherein the background modeling module is used to perform background modeling based on the point set after clustering processing to obtain a background point cloud;

[0045] A differential search and classification processing module, the differential search and classification processing module is used to obtain newly input point cloud data and perform differential search and classification processing on the obtained newly input point cloud data and the background point cloud; and

[0046] The foreground and background update processing module is used to update the foreground and background according to the difference search classification result.

[0047] As a third aspect of the present invention, a computer device for implementing the foreground-background extraction method includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0048] Get point cloud data;

[0049] Filter the acquired point cloud data to obtain the point set within the background range that needs to be processed;

[0050] performing clustering processing on the point set;

[0051] Perform background modeling based on the clustered point set to obtain background point cloud;

[0052] Acquire newly input point cloud data, and perform differential search and classification processing on the acquired newly input point cloud data and the background point cloud; and

[0053] The foreground and background are updated according to the differential search classification results.

[0054] As a fourth aspect of the present invention, a computer-readable storage medium for implementing the foreground-background extraction method has a computer program stored thereon. When the computer program is executed by a processor, the following steps are implemented:

[0055] Get point cloud data;

[0056] Filter the acquired point cloud data to obtain the point set within the background range that needs to be processed;

[0057] performing clustering processing on the point set;

[0058] Perform background modeling based on the clustered point set to obtain background point cloud;

[0059] Acquire newly input point cloud data, and perform differential search and classification processing on the acquired newly input point cloud data and the background point cloud; and

[0060] The foreground and background are updated according to the differential search classification results.

[0061] Due to the adoption of the above technical solution, the beneficial effect of the present invention is that the present invention combines the differential (real-time) mechanism, historical frame modeling (stability) and background update (reliability) to achieve relatively fast, stable and relatively accurate background extraction, and effectively avoids the problem of unstable background extraction caused by noise and frequent dynamic changes of objects in the scene, and achieves relatively fast and accurate background update. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. 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.

[0063] Figure 1 It is a schematic flow chart of the foreground-background extraction method of the present invention.

[0064] Figure 2 It is a structural schematic diagram of a device for implementing a foreground-background extraction method according to the present invention.

[0065] Figure 3 It is a diagram of the internal structure of the computer device of the present invention. DETAILED DESCRIPTION

[0066] In order to make the technical means, creative features, objectives and effects achieved by the present invention easier to understand, the present invention is further described below with reference to specific illustrations.

[0067] See also Figure 1 ,The figure shows a foreground and background extraction method, which includes the following steps:

[0068] Step S10: Acquire point cloud data. Point cloud data is generally acquired from devices that can acquire distance information, such as LiDAR, structured light cameras, TOF cameras, binocular cameras, etc.

[0069] Step S20: filtering the acquired point cloud data to obtain a point set within the background range to be processed.

[0070] Step S30: cluster the point set. The purpose of clustering is to cluster a series of discrete points into several categories according to certain rules, and select representative points from them. In this embodiment, the clustering process preferably adopts the binary K-means clustering algorithm.

[0071] Step S40 , performing background modeling based on the clustered point set to obtain a background point cloud.

[0072] Step S50 : acquiring newly input point cloud data, and performing differential search and classification processing on the acquired newly input point cloud data and the background point cloud.

[0073] Step S60: updating the foreground and background according to the difference search and classification result.

[0074] The present invention combines the difference (real-time) mechanism, historical frame modeling (stability) and background update (reliability) to achieve relatively fast, stable and accurate background extraction, effectively avoiding the problem of unstable background extraction caused by noise and frequent dynamic changes of objects in the scene, and achieving relatively fast and accurate background update.

[0075] In step S20, the acquired point cloud data is filtered to obtain a point set within the background range to be processed, including the following steps:

[0076] Step S21, setting filtering conditions according to sampling requirements;

[0077] Step S22, filtering the point cloud data using filtering conditions;

[0078] In step S23 , the filtered point cloud data is subjected to uniform sampling to remove outliers and obtain a point set within the background range to be processed.

[0079] The purpose of filtering the acquired point cloud data is to reduce the subsequent computational complexity and improve the reliability of the extracted background information.

[0080] In step S40, background modeling is performed based on the clustered point set to obtain a background point cloud, which includes the following steps:

[0081] Step S41, sorting the point set after clustering according to the size of the z value, where the z value refers to the value on the z axis in the three-dimensional coordinate system;

[0082] Step S42, dividing the sorted point set into K height segments according to the z value, so as to divide the sorted point set into multiple sub-point sets; wherein the height segments are determined by the actual scene;

[0083] Step S43, using the multiple sub-point sets after segmentation as seed point clusters of the background, and counting the number of points N in each seed point cluster;

[0084] Step S44: clustering the number N of points in each seed point cluster using the binary K-means method, so that the points in each seed point cluster form n point clusters, and serve as the seed points of the seed point cluster. Then, the input point cloud has a total of K*N*n background seed points.

[0085] Step S45, repeat the above operation until the frame number T specified by the background modeling is met, and the number of seed points can be obtained as T*K*N*n; the frame number T refers to the number of video frames, and T is determined based on empirical values.

[0086] Step S46: Classify the points in the same height segment among all the seed points obtained in step S45 according to their coordinate positions (xy positions), and remove the outlier seed points. When the number of remaining seed points in a certain height segment is greater than a threshold (determined based on an empirical value), the set of remaining seed points in the height segment is taken as the background seed point set, and the non-background point set is composed of the remaining points after removing the background seed points confirmed in step S46 from the seed point set in step S45.

[0087] Step S47 , merging the background seed point set and the non-background point set obtained in step S46 to obtain a background point cloud including the background point set and the non-background point set.

[0088] In step S50, the newly input point cloud data is subjected to differential search and classification processing with the background point cloud, including the following steps:

[0089] Step S51, performing a differential search process on the newly input point cloud data and the background point cloud;

[0090] In step S52 , the newly input point cloud data is classified according to the difference search processing result to classify the point cloud data into two categories: one is the point set that is repeated with the background point cloud, and the other is the newly appeared point set.

[0091] In step S60, the foreground and background are updated according to the differential search classification structure, including the following steps:

[0092] Step S61: Each point in the point set that overlaps with the background point cloud is judged one by one. If a point is judged to be a background point, the background point is updated with the point; if a point is judged to be a foreground point, the foreground point is updated with the point;

[0093] Step S62: judge each point in the newly appeared point set one by one. If a point is judged to be a background point, the background point is updated with the point; if a point is judged to be a foreground point, the foreground point is updated with the point.

[0094] In step S61, the judgment rule for the point set that overlaps with the background point cloud is as follows:

[0095] If a point in the point set that is repeated with the background point cloud is repeated with the background seed point of the background point cloud, the point is processed according to the z-value difference. If the difference value does not exceed the threshold, the point is used to update the background point. If the difference value exceeds the threshold, the point is recorded as a mark, and the number of times the point appears repeatedly and the difference value is greater than the threshold is recorded. If the number of consecutive exceedances is greater than the preset number, the point is updated as the background point. Otherwise, the point is recorded as the foreground point and used to update the foreground point.

[0096] If a point in the point set that is repeated with the background point cloud does not repeat the background seed point of the background point cloud, the point is processed according to the z-value difference. If the difference value does not exceed the threshold, the point is marked as a foreground point and used to update the foreground point. If the difference value exceeds the threshold, it is recorded as a marked point, and the number of times the point appears repeatedly and the difference value is greater than the threshold is recorded. If the number of consecutive exceeds is greater than the preset number, the point is used to update the background point. Otherwise, it is marked as a foreground point and used to update the foreground point.

[0097] In step S62, the judgment rule for the newly appeared point set is as follows:

[0098] The points in the newly appeared point set are classified into the point set to which they belong according to the z distance, and the distance between the point and the seed point in the height segment is calculated. If it does not exceed the threshold, it is classified into the same type of point set; if it exceeds the threshold and the point class it belongs to is the background point class, the point is marked and the count is recorded. When the number of times it exceeds the preset number is greater than the preset number, the background point is updated with the point, otherwise the point is marked as the foreground point and the foreground point is updated with the point; if it exceeds the threshold and the point class it belongs to is not the background point class, the point is marked as the foreground point and the foreground point is updated with the point.

[0099] See also Figure 2 The figure shows a foreground and background extraction device, which includes a point cloud data acquisition module 100, a filtering processing module 200, a clustering processing module 300, a background modeling module 400, a differential search and classification processing module 500, and a foreground and background update processing module 600.

[0100] The point cloud data acquisition module 100 is used to acquire point cloud data. The filtering processing module 200 is used to filter the acquired point cloud data to obtain a point set within the foreground and background range that needs to be processed. The clustering processing module 300 is used to cluster the point set. The background modeling module 400 is used to perform background modeling based on the clustered point set to obtain a background point cloud. The differential search and classification processing module 500 is used to acquire newly input point cloud data and perform differential search and classification processing on the acquired newly input point cloud data and the background point cloud. The foreground and background update processing module 600 is used to update the foreground and background based on the differential search and classification results.

[0101] Each module in the foreground-background extraction device of the present invention can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0102] The present invention also provides a computer device for implementing the foreground and background extraction method. The computer device can be a server, and its internal structure diagram can be as shown below: Figure 3 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store data such as user information, record information and files. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, it implements the above-mentioned foreground and background extraction method.

[0103] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the present technical solution, and does not constitute a limitation on the computer device to which the present technical solution is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0104] Specifically, the computer device of the present invention includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the following steps are implemented:

[0105] Step S10, obtaining point cloud data;

[0106] Step S20, filtering the acquired point cloud data to obtain a point set within the background range to be processed;

[0107] Step S30, clustering the point set;

[0108] Step S40, performing background modeling based on the clustered point set to obtain a background point cloud;

[0109] Step S50: acquiring newly input point cloud data, and performing differential search and classification processing on the acquired newly input point cloud data and the background point cloud;

[0110] Step S60: updating the foreground and background according to the difference search and classification result.

[0111] The present invention also provides a computer-readable storage medium for implementing the foreground-background extraction method, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0112] Step S10, obtaining point cloud data;

[0113] Step S20: Filter the acquired point cloud data to obtain a point set within the background range that needs to be processed.

[0114] Step S30, clustering the point set;

[0115] Step S40, performing background modeling based on the clustered point set to obtain a background point cloud;

[0116] Step S50: acquiring newly input point cloud data, and performing differential search and classification processing on the acquired newly input point cloud data and the background point cloud;

[0117] Step S60: updating the foreground and background according to the difference search and classification result.

[0118] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0119] The basic principles, main features, and advantages of the present invention are shown and described above. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are merely illustrative of the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and modifications are intended to fall within the scope of the present invention. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.

Claims

1. A foreground and background extraction method, characterized in that: include: Get point cloud data; Filter the acquired point cloud data to obtain the point set within the background range that needs to be processed; performing clustering processing on the point set; Perform background modeling based on the clustered point set to obtain background point cloud; Acquire newly input point cloud data, and perform differential search and classification processing on the acquired newly input point cloud data and the background point cloud; as well as Update the foreground and background according to the differential search and classification results; The background modeling is performed based on the clustered point set to obtain a background point cloud, including: Sort the clustered point set according to the size of the z value; Divide the sorted point set into K height segments according to the z value to divide the sorted point set into multiple sub-point sets; The multiple sub-point sets after segmentation are used as seed point clusters of the background, and the number of points N in each seed point cluster is counted; The binary K-means method is used to cluster the number N of points in each seed point cluster, so that the points in each seed point cluster form n point clusters and serve as the seed points of the seed point cluster. Then the input point cloud has a total of K*N*n background seed points; Repeat the above operation until the number of frames T specified by background modeling is met, and the number of seed points can be obtained as T*K*N*n; Classify all the obtained seed points that belong to the same height segment according to their coordinate positions, and remove outlier seed points. When the number of remaining seed points in a certain height segment is greater than a threshold, the set of remaining seed points in the height segment is used as the background seed point set; and The background seed point set and the non-background point set are merged to obtain a background point cloud including the background point set and the non-background point set.

2. The foreground background extraction method according to claim 1, wherein: The filtering process of the acquired point cloud data to obtain a point set within the background range to be processed includes: Set filtering conditions according to sampling requirements; Performing filtering on the point cloud data using the filtering conditions; and The filtered point cloud data is uniformly sampled to remove outliers and obtain a point set within the background range that needs to be processed.

3. The foreground background extraction method according to claim 1, wherein: The step of performing differential search and classification processing on the newly input point cloud data and the background point cloud includes: Performing differential search processing on the newly input point cloud data and the background point cloud; and The newly input point cloud data is classified according to the difference search processing result to classify the point cloud data into two categories, one is a point set that is repeated with the background point cloud, and the other is a newly appeared point set.

4. The foreground background extraction method according to claim 1, wherein: The updating process of the foreground and background according to the differential search classification structure includes: Each point in the point set that overlaps with the background point cloud is judged one by one. If a point is judged to be a background point, the background point is updated using the point; if a point is judged to be a foreground point, the foreground point is updated using the point; and Each point in the newly appeared point set is judged one by one. If a point is judged to be a background point, it is used to update the background point. If a point is judged to be a foreground point, it is used to update the foreground point.

5. The foreground background extraction method according to claim 4, wherein: The rules for determining the point set that is repeated with the background point cloud are as follows: If a point in the point set that repeats with the background point cloud is the same as the background seed point of the background point cloud, the point is processed according to the z-value difference. If the difference value does not exceed the threshold, the background point is updated with the point. If the difference value exceeds the threshold, the point is recorded as a mark, and the number of times the point appears repeatedly and the difference value is greater than the threshold is recorded. If the number of consecutive times exceeds the preset number, the point is updated as the background point. Otherwise, the point is recorded as the foreground point and is used to update the foreground point. If a point in the point set that repeats with the background point cloud does not repeat with the background seed point of the background point cloud, the point is processed according to the z-value difference. If the difference value does not exceed the threshold, the point is marked as a foreground point and the foreground point is updated with the point. If the difference value exceeds the threshold, it is recorded as a marked point, and the number of times the point appears repeatedly and the difference value is greater than the threshold is recorded. If the number of consecutive excesses is greater than the preset number, the background point is updated with the point. Otherwise, it is marked as a foreground point and the foreground point is updated with the point.

6. The foreground background extraction method according to claim 4, wherein: The judgment rules for the newly appeared point set are as follows: The newly appeared points in the point set are classified into the point set to which they belong according to the z distance, and the distance between the point and the seed point in the height segment is calculated. If it does not exceed the threshold, it is classified into the same type of point set; if it exceeds the threshold and the point class belongs to the background point class, the point is marked and the count is recorded. If the number of times exceeds the preset number, the point is used to update the background point; otherwise, the point is marked as a foreground point and used to update the foreground point; If it exceeds the threshold and the point class it belongs to is not a background point class, the point is marked as a foreground point and is used to update the foreground point.

7. A foreground background extraction device, characterized in that: include: A point cloud data acquisition module, wherein the point cloud data acquisition module is used to acquire point cloud data; A filtering processing module is used to filter the acquired point cloud data to obtain a point set within the background range that needs to be processed; A clustering processing module, the clustering processing module is used to perform clustering processing on the point set; A background modeling module is used to perform background modeling based on the clustered point set to obtain a background point cloud; the background modeling module is used to sort the clustered point set according to the size of the z value; the sorted point set is divided into K height segments according to the z value, so as to divide the sorted point set into multiple sub-point sets; the multiple sub-point sets after segmentation are used as seed point clusters of the background, and the number of points N in each seed point cluster is counted; The binary K-means method is used to cluster the number N of points in each seed point cluster, so that the points in each seed point cluster form n point clusters and serve as the seed points of the seed point cluster. The input point cloud has a total of K*N*n background seed points; repeat the above operation until the number of frames T specified by the background modeling is met, and the number of seed points can be obtained as T*K*N*n; among all the obtained seed points, the points belonging to the same height segment are classified according to the coordinate position, and the outlier seed points are removed. When the number of remaining seed points in a certain height segment is greater than the threshold, the set of remaining seed points in the height segment is used as the background seed point set; Merging the background seed point set and the non-background point set to obtain a background point cloud including the background point set and the non-background point set; A differential search and classification processing module is used to obtain newly input point cloud data and perform differential search and classification processing on the newly input point cloud data and the background point cloud; as well as The foreground and background update processing module is used to update the foreground and background according to the difference search classification result.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the foreground and background extraction method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the foreground-background extraction method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Foreground detection method based on background model and frame difference

    CN106548488A

  • Moving object real-time detection algorithm based on three-dimensional laser point cloud

    CN107845095A