Scene detection method and device, electronic equipment and medium

By clustering and enveloping diagrams of point clouds in preset areas, we realize automatic identification and screening of areas corresponding to each physical object, solving the accuracy and ease of use of manual labeling in the prior art, and improving the detection Accuracy and efficiency.

CN119478646APending Publication Date: 2025-02-18ZHEJIANG UNIVIEW TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311015806.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-11
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In the existing target detection technology, it is necessary to manually calibrate the areas and shielded areas corresponding to each physical object, resulting in poor accuracy and ease of use.

Method used

By clustering point clouds in preset areas, target point cloud clusters are determined, and envelope maps and physical labels are determined based on these clusters, automatic area screening is achieved.

Benefits of technology

It improves the accuracy and efficiency of automatic region identification and automatic screening, and solves the problems of low efficiency and error-prone caused by manual labeling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119478646A_ABST
    Figure CN119478646A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a scene detection method and device, electronic equipment and a medium. The method comprises the following steps: clustering point clouds according to coordinates of the point clouds in a preset area to obtain a target point cloud cluster; for each target point cloud cluster, determining a closed graph containing the target point cloud cluster, and obtaining an envelope diagram corresponding to the target point cloud cluster; and determining a real object label corresponding to the envelope diagram, and screening the envelope diagram according to the real object label to obtain a target area conforming to a business scene. According to the scheme, the envelope diagrams corresponding to the real objects can be accurately determined through the point cloud, so that the envelope diagrams are closer to the actual real object range, and the target areas corresponding to the business scene are automatically screened by determining the real object labels corresponding to the envelope diagrams.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Technology Neighborhood

[0002] The present application relates to the field of target detection technology, and in particular to a scene detection method, device, electronic device and medium. Background Art

[0003] At present, target detection technology is increasingly widely used, such as radar target detection. Radar target detection can be used to detect vehicles in traffic, and can also be used for counting people, posture detection, and physical sign detection in indoor scenes.

[0004] In different target detection application scenarios, the areas to be detected may be different. For example, in the application scenario of people counting, the entire room area except for the table, cabinet and other areas can be removed as the area to be detected, while in the application scenario of vital sign detection, the bed can be used as the area to be detected. In the current solution, the area corresponding to each physical object, the selected area to be detected and the shielded area need to be manually calibrated, which has poor accuracy and ease of use. Summary of the invention

[0005] The present application provides a scene detection method, device, electronic device and medium to accurately determine the envelope diagram and physical label corresponding to each physical object, so as to facilitate automatic area screening according to business scenarios.

[0006] According to one aspect of the present application, a scene detection method is provided, the method comprising:

[0007] Cluster the point cloud according to the coordinates of the point cloud in the preset area to obtain the target point cloud cluster;

[0008] For each target point cloud cluster, determine a closed figure containing the target point cloud cluster, and obtain an envelope diagram corresponding to the target point cloud cluster;

[0009] The physical label corresponding to the envelope diagram is determined, so as to filter the envelope diagram according to the physical label to obtain a target area that meets the business scenario.

[0010] According to another aspect of the present application, a scene detection device is provided, the device comprising:

[0011] A target point cloud cluster determination module is used to cluster the point cloud according to the coordinates of the point cloud in the preset area to obtain a target point cloud cluster;

[0012] An envelope diagram determination module is used to determine, for each target point cloud cluster, a closed figure containing the target point cloud cluster, and obtain an envelope diagram corresponding to the target point cloud cluster;

[0013] The physical label determination module is used to determine the physical label corresponding to the envelope diagram, so as to filter the envelope diagram according to the physical label to obtain a target area that meets the business scenario.

[0014] According to another aspect of the present application, an electronic device is provided, the device comprising:

[0015] at least one processor; and

[0016] a memory communicatively connected to at least one processor; wherein,

[0017] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the scene detection method of any embodiment of the present application.

[0018] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the scene detection method of any embodiment of the present application when executed.

[0019] The technical solution of the embodiment of the present application clusters the point cloud according to the coordinates of the point cloud in the preset area to obtain the target point cloud cluster, so as to accurately identify the point cloud range corresponding to the physical object according to the point cloud. For each target point cloud cluster, determine the closed figure containing the target point cloud cluster, and obtain the envelope diagram corresponding to the target point cloud cluster, so as to accurately determine the area range corresponding to the physical object. Determine the physical object label corresponding to the envelope diagram, and filter the envelope diagram according to the physical object label to obtain the target area that meets the business scenario, so as to clarify the specific physical object corresponding to each area, and facilitate the subsequent screening of the areas that need to be detected according to the business scenario, solve the problem of low efficiency and easy errors caused by manual marking of physical areas and selection of areas to be detected, and improve the accuracy and efficiency of automatic area recognition and automatic screening.

[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0022] Figure 1is a flow chart of a scene detection method provided according to Embodiment 1 of the present application;

[0023] Figure 2 is a flow chart of a scene detection method provided according to Embodiment 2 of the present application;

[0024] Figure 3 is a flow chart of a scene detection method provided according to Embodiment 3 of the present application;

[0025] Figure 4 is a flow chart of a scene detection method provided according to Embodiment 4 of the present application;

[0026] Figure 5 This is a schematic diagram of an occlusion scene provided according to Embodiment 4 of the present application;

[0027] Figure 6 is a structural schematic diagram of a scene detection device provided according to Embodiment 5 of the present application;

[0028] Figure 7 It is a structural schematic diagram of an electronic device provided according to Embodiment 6 of the present application. DETAILED DESCRIPTION

[0029] In order to enable people in the technical field to better understand the solution of this application, the technical solution in the embodiment of this application will be clearly and completely described below in conjunction with the drawings in the embodiment of this application. Obviously, the described embodiment is only a part of the embodiment of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of this application.

[0030] It should be noted that the terms "first", "second", "third", "fourth", "actual", "preset", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0031] Embodiment 1

[0032] Figure 1This is a flow chart of a scene detection method provided in the first embodiment of the present application. The embodiment of the present application can be applied to the case where various physical areas of an area are detected. Typically, it can be applied to the scene where the physical area is detected based on the point cloud detected by the radar and is screened based on the business scenario. The method can be executed by a scene detection device, which can be implemented in the form of hardware and / or software, and the scene detection device can be configured in an electronic device. Figure 1 As shown, the method includes:

[0033] S110 , clustering the point cloud according to the coordinates of the point cloud in the preset area to obtain a target point cloud cluster.

[0034] The preset area can be set according to actual business needs, and can be set to an indoor area or an outdoor area, for example, a living room area, a bedroom area, an office area, a park area, etc. The point cloud can be detected by a point cloud detection device, for example, by a radar. The radar can be a millimeter wave radar, for example, a 4D millimeter wave radar. If the point cloud detection device is a 4D millimeter wave radar, the point cloud information detected includes the distance between the point cloud detection device and the point cloud, the speed of the point cloud, the azimuth and the pitch angle, and the coordinates of the point cloud are three-dimensional coordinates.

[0035] In the embodiment of the present application, after the point cloud detection device detects the point cloud, the point cloud can be clustered according to the coordinates of the point cloud to obtain a target point cloud cluster to identify the physical object in the preset area. The embodiment of the present application can be applied to the identification of stationary objects to determine the fixed area where the stationary object is located, so the point cloud detected by the point cloud detection device can be subjected to dynamic clutter filtering processing to remove the point cloud corresponding to the dynamic target and retain the point cloud corresponding to the static target.

[0036] In the embodiment of the present application, the point cloud can be clustered according to a preset frequency, or when there is a business demand. The algorithm for clustering the point cloud is not limited. When the number of point clouds meets the requirements, the clustering algorithm can be determined according to the actual situation.

[0037] S120 . For each target point cloud cluster, determine a closed figure that includes the target point cloud cluster, and obtain an envelope diagram corresponding to the target point cloud cluster.

[0038] The closed figure containing the target point cloud cluster means that the target point cloud cluster is completely located within the closed figure. The shape of the closed figure is not limited, and can be a regular figure, such as a circle, rectangle, trapezoid, diamond, etc., or an irregular figure, such as a figure obtained by sequentially connecting the outermost point clouds of the target point cloud cluster.

[0039] For example, the closed figure with the smallest area among the closed figures containing the target point cloud cluster can be used as the envelope diagram corresponding to the target point cloud cluster to approximate the actual range of the physical object corresponding to the target point cloud cluster. The closed figure with the smallest area among the closed figures containing the target point cloud cluster can also be enlarged, and the enlarged closed figure that does not overlap with other closed figures can be used as the envelope diagram corresponding to the target point cloud cluster to adaptively expand the range corresponding to the physical object, thereby expanding the detection range.

[0040] S130: Determine a physical label corresponding to the envelope diagram, and filter the envelope diagram according to the physical label to obtain a target area that meets the business scenario.

[0041] Exemplarily, the physical label can be a label used to represent the characteristic information of the physical object, such as the name, number, type, material, etc. The specific form of the physical label can be determined according to the actual situation. For example, in the application scenario of vital sign detection, it is necessary to use the area of ​​biological activity such as bed and sofa as the area to be detected, then the envelope map can be annotated with specific names such as bed, sofa, chair, cabinet, etc. to automatically identify the area to be detected. In the application scenario of collision risk detection, it is necessary to use the hardware area as the area to be detected, then the envelope map can be annotated with labels representing the material such as soft area and hardware area.

[0042] In an embodiment of the present application, to determine the physical label corresponding to the envelope diagram, point cloud features of a preset physical object can be determined in advance, an association relationship between the point cloud features and the preset physical label can be established, the features of the target point cloud cluster corresponding to the envelope diagram can be compared with the point cloud features in the association relationship, and the preset physical label corresponding to the features of the target point cloud cluster can be determined as the physical label corresponding to the envelope diagram.

[0043] In the embodiment of the present application, determining the physical label corresponding to the envelope diagram includes:

[0044] Determine the physical object label corresponding to the average height of the point cloud of the target point cloud cluster corresponding to the envelope diagram according to the association relationship between the preset physical object label and the preset height of the preset physical object; or

[0045] According to the user's marking operation on the envelope diagram, a physical label of the envelope diagram is determined.

[0046] Among them, the preset physical object label can be a label of a known physical object, and the preset height can be the actual height of a known physical object. An association relationship between preset physical object labels of multiple known physical objects and preset heights of preset physical objects can be established in advance, including different types of physical objects and different preset heights. When using 4D millimeter wave radar for target detection, the 4D information of the point cloud can be detected to obtain the three-dimensional coordinates of the point cloud, and then the average height of the point cloud of the target point cloud cluster corresponding to the envelope diagram can be determined. The average height of the point cloud is matched with the preset height in the association relationship, and the preset physical object label corresponding to the successfully matched preset height is used as the physical object label corresponding to the envelope diagram, so as to clarify the physical object corresponding to the envelope diagram, which is convenient for subsequent screening according to business scenarios.

[0047] In an embodiment of the present application, the user can also annotate the envelope diagram, and determine the physical label of the envelope diagram based on the user's annotation, so as to facilitate the subsequent screening of envelope diagrams that meet specific business scenarios as target areas for detection based on the physical labels.

[0048] In subsequent applications, the envelope diagram can be automatically screened according to the physical label to obtain the envelope diagram that meets the business scenario as the target area. For example, in the physical sign detection business scenario, the area corresponding to the bed can be used as the target area for detection. In the crowd counting business scenario, the envelope diagram corresponding to the table, cabinet, etc. can be used as the shielding area to accurately determine the area to be detected for targeted detection and improve detection accuracy.

[0049] The technical solution of the embodiment of the present application clusters the point cloud according to the coordinates of the point cloud in the preset area to obtain the target point cloud cluster, so as to accurately identify the point cloud range corresponding to the physical object according to the point cloud. For each target point cloud cluster, determine the closed figure containing the target point cloud cluster, and obtain the envelope diagram corresponding to the target point cloud cluster, so as to accurately determine the area range corresponding to the physical object. Determine the physical object label corresponding to the envelope diagram, and filter the envelope diagram according to the physical object label to obtain the target area that meets the business scenario, so as to clarify the specific physical object corresponding to each area, and facilitate the subsequent screening of the areas that need to be detected according to the business scenario, solve the problem of low efficiency and easy errors caused by manual marking of physical areas and selection of areas to be detected, and improve the accuracy and efficiency of automatic area recognition and automatic screening.

[0050] Embodiment 2

[0051] Figure 2 This is a flow chart of a scene detection method provided in the second embodiment of the present application. The present embodiment is optimized based on the above embodiment. For solutions not described in detail in the present embodiment, please refer to the above embodiment. Figure 2 As shown, the method of the embodiment of the present application specifically includes the following steps:

[0052] S210, traversing the point cloud in the preset area, if the first neighborhood point cloud set of the currently traversed target point cloud meets the cluster formation condition, then establishing a target point cloud cluster including the target point cloud, and placing the undefined point cloud in the first neighborhood point cloud set in the candidate point cloud set; wherein the undefined point cloud is a point cloud that does not belong to any target point cloud cluster and is not a noise point.

[0053] The first neighborhood point cloud can be a point cloud within a preset range of the target point cloud. For example, the first neighborhood point cloud set U(a) of the target point cloud a(x, y, z), any point p(x ′ ,y ′ ,z ′ )satisfy: Where R is the horizontal distance threshold, which can be determined according to the actual situation, for example, according to the density of the point cloud, and H is the vertical distance threshold, which can be determined according to the penetration ability of electromagnetic waves on the surface of the physical object and the radar detection accuracy. The cluster formation condition can be a formation condition limited by quantity, for example, the number of point clouds is greater than a preset quantity threshold.

[0054] In an embodiment of the present application, the point cloud detected in the preset area is traversed, and the point cloud currently being traversed is taken as the target point cloud. It is determined whether the first neighborhood point cloud of the target point cloud satisfies the cluster formation condition. If so, a target point cloud cluster is established, and the target point cloud is placed in the target point cloud cluster. The undefined point cloud in the first neighborhood set that is not included in any target point cloud cluster and is not a noise point is placed in the candidate point cloud set. Since the target point cloud has been included in the target point cloud cluster, the target point cloud is not included in the candidate point cloud set. There may also be point clouds in the first neighborhood point cloud set that belong to other target point cloud clusters and are not included in the candidate point cloud set.

[0055] S220, traversing the candidate point cloud set, and determining whether to classify the candidate point cloud into the target point cloud cluster according to a second neighborhood point cloud set of the candidate point cloud in the candidate point cloud set and a cluster formation condition.

[0056] Among them, the formation conditions of the second neighborhood point cloud set are the same as the formation conditions of the first neighborhood point cloud set. Exemplarily, for the candidate point cloud in the candidate point cloud set, the second neighborhood point cloud set of the candidate point cloud can be further determined, and it can be determined whether the second neighborhood point cloud set meets the cluster formation conditions, and whether to classify the candidate point cloud into the target point cloud cluster is determined according to the judgment result. Through the above scheme, it is possible to continue searching for point clouds that can be included in the target point cloud cluster from point clouds that have not been included in any target point cloud cluster and are not noise points to expand the scope of the target point cloud cluster.

[0057] In an embodiment of the present application, determining whether to classify the candidate point cloud into the target point cloud cluster according to the second neighborhood point cloud set of the candidate point cloud in the candidate point cloud set and the cluster formation condition includes:

[0058] If the second neighborhood point cloud set meets the cluster formation condition, the candidate point cloud is classified into the target point cloud cluster;

[0059] The undefined point clouds in the second neighborhood point cloud set are classified into the candidate point cloud set.

[0060] Exemplarily, if the second neighborhood point cloud set meets the cluster formation condition, that is, the number of point clouds in the second neighborhood point cloud set is greater than the preset number threshold, that is, the candidate point cloud is judged to be located in an area with denser point clouds, then the candidate point cloud is classified into the target point cloud cluster. The undefined points in the second neighborhood point cloud set are added to the candidate point cloud set, and continue to participate in the traversal process of the candidate point cloud set. The above scheme not only considers the neighborhood of each point cloud, but also considers the neighborhood of each point cloud in the neighborhood, gradually searches for point clouds located in dense areas to form clusters, and improves the accuracy and rationality of clusters.

[0061] In the embodiment of the present application, the process of determining the noise point includes:

[0062] If the number of point clouds in the neighborhood point cloud set of the point cloud to be tested is less than a preset number threshold, the point cloud to be tested is regarded as a noise point;

[0063] Among them, if the point cloud to be measured is a target point cloud, the neighborhood point cloud set of the target point cloud is the first neighborhood point cloud set, and if the point cloud to be measured is a candidate point cloud, the neighborhood point cloud set of the candidate point cloud is the second neighborhood point cloud set.

[0064] The real physical surface should be detected by the point cloud detection device with a large number of point clouds, and the number of point clouds is relatively dense. If the number of point clouds in the neighborhood point cloud set of the point cloud to be tested is less than the preset number threshold, the point cloud to be tested is determined to be a noise point. Exemplarily, for the first neighborhood point cloud set of the target point cloud, if the number of point clouds in the first neighborhood point cloud set is less than the preset number threshold, it is determined that the point clouds in the neighborhood of the target point cloud are relatively sparse, and the target point cloud is regarded as a noise point. For the second neighborhood point cloud set of the candidate point cloud, if the number of point clouds in the second neighborhood point cloud set is less than the preset number threshold, it is determined that the point clouds in the neighborhood of the candidate point cloud are relatively sparse, and the candidate point cloud is regarded as a noise point.

[0065] S230 . For each target point cloud cluster, determine a closed figure that includes the target point cloud cluster, and obtain an envelope diagram corresponding to the target point cloud cluster.

[0066] S240: Determine the physical label corresponding to the envelope diagram, so as to filter the envelope diagram according to the physical label to obtain a target area that meets the business scenario.

[0067] The embodiment of the present application provides a scene detection method, which traverses the point cloud in a preset area. If the first neighborhood point cloud set of the currently traversed target point cloud meets the cluster formation condition, a target point cloud cluster containing the target point cloud is established, and the undefined point cloud in the first neighborhood point cloud set is placed in a candidate point cloud set; the candidate point cloud set is traversed, and according to the second neighborhood point cloud set of the candidate point cloud in the candidate point cloud set and the cluster formation condition, it is determined whether to classify the candidate point cloud into the target point cloud cluster. The above scheme can highly cluster the point cloud, taking into account both the constraints of the point cloud range by the neighborhood point cloud and the constraints of the point cloud number by the cluster formation condition, so as to more accurately cluster the point cloud and make the clustering result more in line with the real object. In addition, when the number of point clouds is insufficient, the clustering range can be expanded by gradually searching the neighborhood point clouds to achieve the establishment of the target point cloud cluster.

[0068] Embodiment 3

[0069] Figure 3 This is a flow chart of a scene detection method provided in the third embodiment of the present application. The present embodiment is optimized based on the above embodiment. For solutions not described in detail in the present embodiment, please refer to the above embodiment. Figure 3 As shown, the method of the embodiment of the present application specifically includes the following steps:

[0070] S310 , clustering the point cloud according to the coordinates of the point cloud in the preset area to obtain a target point cloud cluster.

[0071] S320 , based on at least two types of graphics, respectively determine the circumscribed graphics of the target point cloud cluster to obtain at least two closed graphics.

[0072] Among them, at least two graphic types can be graphic types such as rectangles, circles, triangles, trapezoids, and rhombuses. Based on at least two graphic types, the circumscribed graphics of the target point cloud cluster can be determined respectively, thereby obtaining at least two closed graphics. Exemplarily, if the graphic type is a circle, two points can be randomly selected from the target point cloud cluster as the diameter to obtain an initialized circle. Traverse the target point cloud in the target point cloud cluster to determine whether the point cloud is within the circle. If it is, continue to traverse. If not, use the point cloud as the first endpoint, and the point farthest from the first endpoint in the circle as the second endpoint. Use the line connecting the first endpoint and the second endpoint as the diameter to obtain a new circle. Continue to traverse until all point clouds in the target point cloud cluster are traversed and all are located inside the circle. The circumscribed circle obtained is a closed graphic containing the target point cloud cluster. If the graphic type is a rectangle, two points can be randomly selected from the target point cloud cluster as diagonals to obtain an initialized rectangle. Traverse the target point cloud in the target point cloud cluster to determine whether the point cloud is within the rectangle. If it is, continue traversing. If not, use the point cloud as the third endpoint, the point farthest from the third endpoint in the rectangle as the fourth endpoint, and use the line connecting the third and fourth endpoints as the diagonal to get a new rectangle. Continue traversing until all the point clouds in the target point cloud cluster are within the rectangle, and the resulting circumscribed rectangle is a closed figure containing the target point cloud cluster.

[0073] S330: Using the closed figure with the smallest area among the at least two closed figures as the envelope diagram corresponding to the target point cloud cluster.

[0074] Exemplarily, since the point clouds in the target point cloud cluster reflect points on the real object, the area with point clouds is the area of ​​the real object, and the area without point clouds is not the area of ​​the real object. At least two closed figures contain all the point clouds in the target point cloud cluster, and the fewer redundant areas in the closed figures, the more they can reflect the actual area of ​​the real object. Therefore, the areas of at least two closed figures are calculated, and the closed figure with the smallest area is used as the envelope diagram corresponding to the target point cloud cluster, so that the envelope diagram is closer to the range of the real object and reflects the actual area corresponding to each real object. Specifically, when calculating the area of ​​a closed figure, it can be calculated based on the coordinates of the point cloud in the target point cloud cluster contained in the closed figure.

[0075] S340: Determine the physical label corresponding to the envelope diagram, so as to filter the envelope diagram according to the physical label to obtain a target area that meets the business scenario.

[0076] An embodiment of the present application provides a scene detection method, which clusters point clouds according to the coordinates of point clouds in a preset area to obtain a target point cloud cluster. Based on at least two types of graphics, the circumscribed graphics of the target point cloud cluster are determined respectively to obtain at least two closed graphics. The closed figure with the smallest area among the at least two closed graphics is used as the envelope diagram corresponding to the target point cloud cluster. The physical object label corresponding to the envelope diagram is determined, and the envelope diagram is filtered according to the physical object label to obtain a target area that meets the business scenario. At least two closed graphics are obtained by determining the circumscribed graphics of the target point cloud, and the closed figure with the smallest area is used as the envelope diagram, so that the envelope diagram is more consistent with the actual range of the physical object, and the area corresponding to the physical object is restored, which facilitates the subsequent accurate screening of the area corresponding to the physical object according to the business scenario.

[0077] Embodiment 4

[0078] Figure 4 This is a flow chart of a scene detection method provided in the fourth embodiment of the present application. The present embodiment is optimized based on the above embodiment. For solutions not described in detail in the present embodiment, please refer to the above embodiment. Figure 4 As shown, the method of the embodiment of the present application specifically includes the following steps:

[0079] S410 , clustering the point cloud according to the coordinates of the point cloud in the preset area to obtain a target point cloud cluster.

[0080] S420 . For each target point cloud cluster, determine a closed figure that includes the target point cloud cluster, and obtain an envelope diagram corresponding to the target point cloud cluster.

[0081] S430: Determine an average height of the point cloud of the target point cloud cluster corresponding to the envelope diagram.

[0082] In the embodiment of the present application, the point cloud detection device may be a 4D millimeter wave radar, which detects and obtains the three-dimensional coordinates of the point cloud, including the position coordinates and height of the point cloud. For each target point cloud cluster, the average point cloud height of the target point cloud cluster may be calculated, that is, the heights of all point clouds in the target point cloud cluster are summed and then divided by the total number of point clouds.

[0083] S440: If the height difference between the average heights of the point clouds of the target point cloud clusters corresponding to at least two envelope diagrams is less than a preset height threshold, determine whether it is necessary to merge the at least two envelope diagrams.

[0084] The preset height threshold can be determined according to actual conditions, for example, a positive number close to zero can be taken. Exemplarily, if the height difference of the average height of the point cloud corresponding to at least two envelope diagrams is less than the preset height threshold, it is determined that the height difference of at least two envelope diagrams is not large, and they may belong to the same object, but are divided into two envelope diagrams due to detection errors, or are divided into two envelope diagrams due to being blocked by other objects. In this case, it can be further determined whether the two envelope diagrams belong to the same object, and then it can be determined whether the at least two envelope diagrams need to be merged.

[0085] In the embodiment of the present application, determining whether at least two envelope graphs need to be merged includes:

[0086] If at least two envelope diagrams have overlapping parts, the at least two envelope diagrams are merged;

[0087] Otherwise, determine whether to merge at least two envelope diagrams according to the three-dimensional coordinates of at least two envelope diagrams, the point cloud detection device and the reference envelope diagram; wherein the reference envelope diagram is an envelope diagram located between the at least two envelope diagrams and the point cloud detection device.

[0088] In the case where the average height of the point cloud corresponding to at least two envelope diagrams is less than a preset height threshold, if there is an overlap between at least two envelope diagrams, it is determined that a physical object may be divided into at least two envelope diagrams due to a detection error, so at least two envelope diagrams are merged to obtain a complete envelope diagram corresponding to a physical object. If there is no overlap between at least two envelope diagrams, it is determined whether the physical objects corresponding to at least two envelope diagrams are blocked by other physical objects based on at least two envelope diagrams, a point cloud detection device, and three-dimensional coordinates of a reference envelope diagram, and then it is determined whether the at least two envelope diagrams need to be merged, thereby improving the accuracy of physical object area detection.

[0089] Specifically, the reference envelope diagram is traversed. If the average height of the point cloud corresponding to at least two envelope diagrams is less than the average height of the point cloud of the reference envelope diagram, a process of determining whether the at least two envelope diagrams need to be merged is performed according to at least two envelope diagrams, a point cloud detection device and the three-dimensional coordinates of the reference envelope diagram. Otherwise, the traversal process is continued. If the average height of the point cloud corresponding to at least two envelope diagrams is less than the average height of the point cloud of the reference envelope diagram, it is determined that the physical object corresponding to the reference envelope diagram may block the physical object corresponding to at least two envelope diagrams, and then further determines whether there is occlusion, that is, a process of determining whether the at least two envelope diagrams need to be merged is performed according to at least two envelope diagrams, a point cloud detection device and the three-dimensional coordinates of the reference envelope diagram. If the average height of the point cloud corresponding to at least two envelope diagrams is greater than or equal to the average height of the point cloud of the reference envelope diagram, it is determined that the physical object corresponding to the reference envelope diagram does not block the physical object corresponding to at least two envelope diagrams, and the next reference envelope diagram is traversed.

[0090] In an embodiment of the present application, determining whether to merge at least two envelope diagrams according to at least two envelope diagrams, a point cloud detection device, and three-dimensional coordinates of a reference envelope diagram includes:

[0091] For any two envelope diagrams of the at least two envelope diagrams, determining a midpoint of a line connecting the closest edge points, and determining a first distance between the midpoint and the point cloud detection device;

[0092] Determine a reference edge point in a reference envelope diagram through which a line connecting the midpoint and the point cloud detection device passes that is closest to the midpoint, and determine a second distance between the midpoint and the reference edge point;

[0093] Determine an average value of average heights of the point clouds of the two envelope diagrams, and determine a first height difference between the point cloud detection device and the average value;

[0094] Determine a second height difference between an average height of a point cloud of a target point cloud cluster corresponding to the reference envelope diagram and the average value;

[0095] Whether at least two envelope graphs need to be merged is determined according to the first distance, the second distance, the first height difference, and the second height difference.

[0096] For example, Figure 5 As shown, the two envelope diagrams are envelope Figure 1 and envelope Figure 2 , the reference envelope diagram is the envelope Figure 3 . Envelope Figure 1 and envelope Figure 2 The closest edge points are point A and point B, and the midpoint of the line connecting point A and point B is point C. The position point of the point cloud detection device is point R, and the line connecting point C and point R passes through the envelope. Figure 3, point C and envelope Figure 3 The closest edge point is point D. The first distance is the distance between point C and point R. CR , the second distance is the distance between point C and point D l CD . Averaging the average heights of the point clouds of the two envelope diagrams to obtain an average value, and calculating the difference between the point cloud detection device and the average value as the first height difference. Calculate the average height of the point cloud of the target point cloud cluster corresponding to the reference envelope diagram, and calculate the second height difference between the average height of the point cloud corresponding to the reference envelope diagram and the average value. It should be noted that the first height difference and the second height difference can take absolute values ​​for subsequent comparison. According to the first distance, the second distance, the first height difference and the second height difference, it is judged whether the physical objects corresponding to the two envelope diagrams are blocked by the physical objects corresponding to the reference envelope diagram, and then it is judged whether at least two envelope diagrams need to be merged.

[0097] If the reference envelope diagram is not included between the two envelope diagrams and the point cloud detection device, or if a reference envelope diagram exists but the line connecting the midpoint and the point cloud detection device does not intersect with the reference envelope diagram, it is determined that the two envelope diagrams are not blocked and there is no need to merge the two envelope diagrams.

[0098] In an embodiment of the present application, determining whether at least two envelope graphs need to be merged according to the first distance, the second distance, the first height difference, and the second height difference includes:

[0099] If the ratio of the second height difference to the first height difference is greater than or equal to the ratio of the second distance to the first distance, the two envelope diagrams are merged.

[0100] Exemplarily, assuming that the average height of the point cloud of the reference envelope diagram is h2, the average value of the average height of the point clouds of the two envelope diagrams is h1, and the height of the point cloud detection device is h, then the first height difference is h-h1, and the second height difference is h2-h1. If It is determined that the physical object corresponding to the reference envelope diagram is higher, which can cause occlusion to the physical objects corresponding to the two envelope diagrams and affect the detection result of the point cloud detection device. Therefore, the two envelope diagrams can be merged and processed to represent a physical object as a whole. The above scheme can accurately determine whether there is an occlusion that affects the detection of the point cloud detection device, resulting in a physical object being divided into two envelope diagrams, so that when there is occlusion, the two envelope diagrams are merged and processed to represent a physical object as a whole, accurately restore the actual area of ​​the physical object, and improve the accuracy of physical object detection.

[0101] S450: Determine the physical label corresponding to the envelope diagram, so as to filter the envelope diagram according to the physical label to obtain a target area that meets the business scenario.

[0102] An embodiment of the present application provides a scene detection method, which clusters point clouds according to the coordinates of point clouds in a preset area to obtain target point cloud clusters. For each target point cloud cluster, a closed figure containing the target point cloud cluster is determined to obtain an envelope diagram corresponding to the target point cloud cluster. The average height of the point cloud of the target point cloud cluster corresponding to the envelope diagram is determined. If the height difference between the average heights of the point clouds corresponding to at least two envelope diagrams is less than a preset height threshold, it is determined whether at least two envelope diagrams need to be merged. The above scheme can accurately detect and distinguish the situation in which a physical object is divided into two envelope diagrams, thereby avoiding a physical object being misdetected or blocked, resulting in it being divided into two envelope diagrams, affecting subsequent labeling and screening processes, and improving the accuracy of physical object area detection.

[0103] Embodiment 5

[0104] Figure 6 This is a schematic diagram of the structure of a scene detection device provided in Embodiment 5 of the present application. The device can execute the scene detection method provided in any embodiment of the present application and has the corresponding functional modules and beneficial effects of the execution method. Figure 6 As shown, the device comprises:

[0105] A target point cloud cluster determination module 510 is used to cluster the point cloud according to the coordinates of the point cloud in a preset area to obtain a target point cloud cluster;

[0106] An envelope diagram determination module 520 is used to determine, for each target point cloud cluster, a closed figure including the target point cloud cluster, and obtain an envelope diagram corresponding to the target point cloud cluster;

[0107] The physical label determination module 530 is used to determine the physical label corresponding to the envelope diagram, so as to filter the envelope diagram according to the physical label to obtain a target area that meets the business scenario.

[0108] In the embodiment of the present application, the target point cloud cluster determination module 510 includes:

[0109] A first traversal unit is used to traverse the point cloud in the preset area, and if the first neighborhood point cloud set of the currently traversed target point cloud meets the cluster formation condition, a target point cloud cluster including the target point cloud is established, and the undefined point cloud in the first neighborhood point cloud set is used as a candidate point cloud set; wherein the undefined point cloud is a point cloud that does not belong to any target point cloud cluster and does not belong to a noise point;

[0110] The second traversal unit is used to traverse the candidate point cloud set, and determine whether to classify the candidate point cloud into the target point cloud cluster according to a second neighborhood set of the candidate point cloud in the candidate point cloud set and a cluster formation condition.

[0111] In the embodiment of the present application, the second traversal unit includes:

[0112] A first classification subunit, configured to classify the candidate point cloud into the target point cloud cluster if the second neighborhood point cloud set satisfies a cluster formation condition;

[0113] The second inclusion subunit is used to include the undefined point cloud in the second neighborhood point cloud set into the candidate point cloud set.

[0114] In the embodiment of the present application, the device further includes:

[0115] A noise point determination module, configured to treat the point cloud to be tested as a noise point if the number of point clouds in the neighborhood point cloud set of the point cloud to be tested is less than a preset number threshold;

[0116] Among them, if the point cloud to be measured is a target point cloud, the neighborhood point cloud set of the target point cloud is the first neighborhood point cloud set, and if the point cloud to be measured is a candidate point cloud, the neighborhood point cloud set of the candidate point cloud is the second neighborhood point cloud set.

[0117] In the embodiment of the present application, the envelope diagram determination module 520 includes:

[0118] A closed figure determining unit, configured to determine, based on at least two figure types, circumscribed figures including the target point cloud cluster, respectively, to obtain at least two closed figures;

[0119] The area judgment unit is used to use the closed figure with the smallest area among the at least two closed figures as the envelope diagram corresponding to the target point cloud cluster.

[0120] In an embodiment of the present application, the method further includes:

[0121] A point cloud average height determination module, used to determine the point cloud average height of the target point cloud cluster corresponding to the envelope diagram;

[0122] The judgment module is used to determine whether it is necessary to merge the at least two envelope diagrams if the height difference between the average heights of the point clouds corresponding to the at least two envelope diagrams is less than a preset height threshold.

[0123] In the embodiment of the present application, the judgment module includes:

[0124] A merging unit, configured to merge the at least two envelope diagrams if there is an overlapping portion between the at least two envelope diagrams;

[0125] A merging judgment unit is used to determine whether at least two envelope diagrams need to be merged if there is no overlapping part between the at least two envelope diagrams, based on the at least two envelope diagrams, the point cloud detection device and the three-dimensional coordinates of the reference envelope diagram; wherein the reference envelope diagram is an envelope diagram located between the at least two envelope diagrams and the point cloud detection device.

[0126] In the embodiment of the present application, the merging judgment unit is specifically used to:

[0127] For any two envelope diagrams of the at least two envelope diagrams, determining a midpoint of a line connecting the closest edge points, and determining a first distance between the midpoint and the point cloud detection device;

[0128] Determine a reference edge point in a reference envelope diagram through which a line connecting the midpoint and the point cloud detection device passes that is closest to the midpoint, and determine a second distance between the midpoint and the reference edge point;

[0129] Determine an average value of average heights of the point clouds of the two envelope diagrams, and determine a first height difference between the point cloud detection device and the average value;

[0130] Determine a second height difference between an average height of a point cloud of a target point cloud cluster corresponding to the reference envelope diagram and the average value;

[0131] Whether at least two envelope graphs need to be merged is determined according to the first distance, the second distance, the first height difference, and the second height difference.

[0132] In the embodiment of the present application, the merging judgment unit is specifically used to:

[0133] If the ratio of the second height difference to the first height difference is greater than or equal to the ratio of the second distance to the first distance, the two envelope diagrams are merged.

[0134] In the embodiment of the present application, the physical label determination module 530 includes:

[0135] an associating and corresponding unit, for determining the physical object label corresponding to the average height of the point cloud of the target point cloud cluster corresponding to the envelope diagram according to the associative relationship between the preset physical object label and the preset height of the preset physical object; or,

[0136] The labeling unit is used to determine the physical label of the envelope diagram according to the labeling operation of the user on the envelope diagram.

[0137] A scene detection device provided in an embodiment of the present application can execute a scene detection method provided in any embodiment of the present application, and has functional modules and beneficial effects corresponding to the execution method.

[0138] Embodiment 6

[0139] Figure 7A schematic diagram of an electronic device 10 that can be used to implement an embodiment of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0140] like Figure 7 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0141] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0142] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a scene detection method.

[0143] In some embodiments, the scene detection method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the scene detection method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the scene detection method in any other appropriate manner (e.g., by means of firmware).

[0144] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0145] The computer programs for implementing the methods of the present application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable scene detection device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0146] In the context of the present application, a computer readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device or equipment. A computer readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer readable storage medium may be a machine readable signal medium. A more specific example of a machine readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0147] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0148] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0149] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0150] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the information expected by the technical solution of this application can be achieved, and this document is not limited here.

[0151] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A scene detection method, characterized in that: The method comprises: Cluster the point cloud according to the coordinates of the point cloud in the preset area to obtain the target point cloud cluster; For each target point cloud cluster, determine a closed figure containing the target point cloud cluster, and obtain an envelope diagram corresponding to the target point cloud cluster; The physical label corresponding to the envelope diagram is determined, so as to filter the envelope diagram according to the physical label to obtain a target area that meets the business scenario.

2. The method according to claim 1, characterized in that Cluster the point cloud according to the coordinates of the point cloud in the preset area to obtain the target point cloud cluster, including: Traversing the point clouds in the preset area, if the first neighborhood point cloud set of the currently traversed target point cloud meets the cluster formation condition, then establishing a target point cloud cluster including the target point cloud, and placing the undefined point clouds in the first neighborhood point cloud set into the candidate point cloud set; wherein the undefined point clouds are point clouds that do not belong to any target point cloud cluster and are not noise points; The candidate point cloud set is traversed, and according to a second neighborhood point cloud set of the candidate point cloud in the candidate point cloud set and a cluster forming condition, it is determined whether to classify the candidate point cloud into the target point cloud cluster.

3. The method according to claim 2, characterized in that The process of determining the noise point includes: If the number of point clouds in the neighborhood point cloud set of the point cloud to be tested is less than a preset number threshold, the point cloud to be tested is regarded as a noise point; Among them, if the point cloud to be measured is a target point cloud, the neighborhood point cloud set of the target point cloud is the first neighborhood point cloud set, and if the point cloud to be measured is a candidate point cloud, the neighborhood point cloud set of the candidate point cloud is the second neighborhood point cloud set.

4. The method according to claim 1, characterized in that Determine the closed figure containing the target point cloud cluster, and obtain the envelope diagram corresponding to the target point cloud cluster, including: Based on at least two types of graphics, respectively determine the circumscribed graphics of the target point cloud cluster to obtain at least two closed graphics; The closed figure with the smallest area among at least two closed figures is used as the envelope diagram corresponding to the target point cloud cluster.

5. The method according to claim 1, characterized in that After determining a closed figure including the target point cloud cluster and obtaining an envelope diagram corresponding to the target point cloud cluster, the method further includes: Determine the average height of the point cloud of the target point cloud cluster corresponding to the envelope diagram; If the height difference between the average heights of the point clouds corresponding to at least two envelope diagrams is less than a preset height threshold, it is determined whether the at least two envelope diagrams need to be merged.

6. The method according to claim 5, characterized in that Determine whether at least two envelope diagrams need to be merged, including: If at least two envelope diagrams have overlapping parts, the at least two envelope diagrams are merged; Otherwise, determine whether to merge at least two envelope diagrams according to the three-dimensional coordinates of at least two envelope diagrams, the point cloud detection device and the reference envelope diagram; wherein the reference envelope diagram is an envelope diagram located between the at least two envelope diagrams and the point cloud detection device.

7. The method according to claim 1, characterized in that Determining the physical object label corresponding to the envelope diagram includes: Determine the physical object label corresponding to the average height of the point cloud of the target point cloud cluster corresponding to the envelope diagram according to the association relationship between the preset physical object label and the preset height of the preset physical object; or According to the user's marking operation on the envelope diagram, a physical label of the envelope diagram is determined.

8. A scene detection device, characterized in that: The device comprises: A target point cloud cluster determination module is used to cluster the point cloud according to the coordinates of the point cloud in the preset area to obtain a target point cloud cluster; An envelope diagram determination module is used to determine, for each target point cloud cluster, a closed figure containing the target point cloud cluster, and obtain an envelope diagram corresponding to the target point cloud cluster; The physical label determination module is used to determine the physical label corresponding to the envelope diagram, so as to filter the envelope diagram according to the physical label to obtain a target area that meets the business scenario.

9. An electronic device, characterized in that: The device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the scene detection method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the scene detection method according to any one of claims 1 to 7 when executed.