A target detection method, device, equipment, and storage medium
By denoising and sampling point cloud data, candidate planes are generated, and the target plane is determined according to preset conditions, which solves the problem of misjudgment caused by noise in the three-dimensional imaging sensor and improves detection accuracy.
Patent Information
- Application Number
- CN201980100517.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-11-12
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2039-11-12
AI Technical Summary
In the plane detection process of 3D imaging sensors, when there is a lot of noise in the input point cloud data, a large number of invalid detections are prone to occur, leading to misjudgment of 3D objects.
By obtaining the point cloud data of the object to be detected, performing noise reduction processing and sampling, multiple candidate planes are generated, and the target plane is determined according to preset conditions for detection. Specific steps include denoising the point cloud data, dividing the sample data, generating candidate planes, determining the candidate plane through the intersection of the optical axis and the bounding box, and finally selecting the plane covering the most point cloud data as the target plane for detection.
It greatly reduces invalid point cloud data, improves the detection accuracy of the object to be detected, and reduces the misjudgment rate.
Smart Images

Figure CN114424240B
Abstract
Description
Technical Field
[0001] The present application relates to the field of plane detection technology, and is related to but not limited to a target detection method and device, equipment, and storage medium. Background Art
[0002] In the related art, in the process of realizing plane detection of three-dimensional imaging sensors, a large number of points outside the plane can be shielded to a certain extent. However, if there is a lot of noise in the input point cloud data, a large number of invalid detections are likely to occur, resulting in misjudgment of the three-dimensional object that is the detection target. Summary of the invention
[0003] In view of this, an exemplary embodiment of the present application provides a target detection method and apparatus, device, and storage medium to solve at least one problem existing in the related art.
[0004] The technical solution of an exemplary embodiment of the present application is implemented as follows:
[0005] An exemplary embodiment of the present application provides a target detection method, including:
[0006] Obtaining point cloud data of the object to be detected;
[0007] Based on the coordinate values of the point cloud data, generating a plurality of candidate planes;
[0008] Determining a target plane that meets a preset condition from the multiple candidate planes;
[0009] The object to be detected is detected according to the point cloud data covered by the target plane.
[0010] In the above method, generating a plurality of candidate planes based on the coordinate values of the point cloud data includes:
[0011] Performing noise reduction processing on the point cloud data to obtain noise-reduced data;
[0012] Sampling the noise reduction data according to preset sampling conditions to obtain sample data;
[0013] The multiple candidate planes are generated according to the coordinate values of the sample data.
[0014] In the above method, sampling the noise reduction data according to the preset sampling conditions to obtain sample data includes:
[0015] The noise reduction data is divided into a plurality of groups of sample data; wherein the number of data in each group of sample data is greater than or equal to a preset number.
[0016] In the above method, generating the multiple candidate planes according to the coordinate values of the sample data includes:
[0017] According to the coordinate value of each group of sample data in the multiple groups of sample data, a corresponding candidate plane is generated to obtain the multiple candidate planes.
[0018] In the above method, generating the multiple candidate planes according to the coordinate values of the sample data includes:
[0019] According to the coordinate value of each set of sample data in the multiple sets of sample data, candidate planes that meet the quantity threshold are generated.
[0020] In the above method, generating a corresponding candidate plane according to the coordinate value of each set of sample data in the multiple sets of sample data to obtain the multiple candidate planes includes:
[0021] Generate a corresponding sample plane according to the coordinate values of the i-th group of sample data; wherein i is an integer greater than or equal to 1;
[0022] determining a first coordinate value of an intersection point between an optical axis of the acquisition device and the sample plane;
[0023] If the first coordinate value satisfies a preset feasible domain condition, the sample plane is determined to be a candidate plane.
[0024] In the above method, generating a corresponding candidate plane according to the coordinate value of each set of sample data in the multiple sets of sample data to obtain the multiple candidate planes includes:
[0025] Encircle the point cloud data covered by multiple sample planes to obtain multiple bounding boxes that meet specific shapes;
[0026] Determine a second coordinate value of an intersection of the optical axis of the acquisition device and the central axis of each bounding box to obtain a second coordinate value set;
[0027] Selecting, from the second coordinate value set, a candidate bounding box corresponding to the second coordinate value that satisfies the preset feasible domain condition;
[0028] If the attribute information of the candidate bounding box meets the corresponding preset condition, the sample plane corresponding to the candidate bounding box is determined as the candidate plane.
[0029] In the above method, if the attribute information of the candidate bounding box satisfies the corresponding preset condition, determining the sample plane corresponding to the candidate bounding box as the candidate plane includes:
[0030] If the size of the candidate bounding box meets the size threshold, and / or the center point coordinates of the candidate bounding box are within a preset measurement range, and / or the second coordinate value is within the preset measurement range, the sample plane corresponding to the candidate bounding box is determined to be a candidate plane.
[0031] In the above method, determining a target plane that meets a preset condition from the multiple candidate planes includes:
[0032] Determine the number of points contained in a preset range of each candidate plane, and obtain multiple point value values;
[0033] The candidate plane corresponding to the maximum point value is determined as the target plane.
[0034] An exemplary embodiment of the present application provides a target detection device, the device comprising: a first acquisition module, a first generation module, a first determination module and a first detection module, wherein:
[0035] The first acquisition module is used to acquire point cloud data of the object to be detected;
[0036] The first generating module is used to generate a plurality of candidate planes based on the coordinate values of the point cloud data;
[0037] The first determination module is used to determine a target plane that meets a preset condition from the multiple candidate planes;
[0038] The first detection module is used to detect the object to be detected based on the point cloud data covered by the target plane.
[0039] In the above device, the first generating module includes:
[0040] A first denoising submodule, used to perform denoising processing on the point cloud data to obtain denoised data;
[0041] A first adopting submodule is used to sample the noise reduction data according to a preset sampling condition to obtain sample data;
[0042] The first generating submodule is used to generate the multiple candidate planes according to the coordinate values of the sample data.
[0043] In the above device, the first adoption submodule includes:
[0044] The first division unit is used to divide the noise reduction data into multiple groups of sample data; wherein the number of data in each group of sample data is greater than or equal to a preset number.
[0045] In the above device, the first generating module includes:
[0046] The first generating submodule is used to generate a corresponding candidate plane according to the coordinate value of each group of sample data in the multiple groups of sample data to obtain the multiple candidate planes.
[0047] In the above device, the first generating module includes:
[0048] The second generating submodule is used to generate candidate planes that meet the quantity threshold according to the coordinate value of each group of sample data in the multiple groups of sample data.
[0049] In the above device, the first generating submodule includes:
[0050] A first generating unit, configured to generate a corresponding sample plane according to the coordinate values of the i-th group of sample data; wherein i is an integer greater than or equal to 1;
[0051] A first determination unit, configured to determine a first coordinate value of an intersection point between an optical axis of the acquisition device and the sample plane;
[0052] The second determining unit is configured to determine that the sample plane is a candidate plane if the first coordinate value satisfies a preset feasible domain condition.
[0053] In the above device, the first generating submodule includes:
[0054] A first enclosing unit is used to enclose the point cloud data covered by the multiple sample planes to obtain multiple enclosing boxes that meet a specific shape;
[0055] A third determining unit is used to determine a second coordinate value of an intersection point between the optical axis of the acquisition device and the central axis of each bounding box to obtain a second coordinate value set;
[0056] A first selection unit, configured to select, from the second coordinate value set, a candidate bounding box corresponding to the second coordinate value that satisfies the preset feasible domain condition;
[0057] The fourth determining unit is configured to determine that the sample plane corresponding to the candidate bounding box is a candidate plane if the attribute information of the candidate bounding box meets a corresponding preset condition.
[0058] In the above device, the fourth determining unit includes:
[0059] The first determination subunit is used to determine that the sample plane corresponding to the candidate bounding box is a candidate plane if the size of the candidate bounding box meets the size threshold, and / or the coordinates of the center point of the candidate bounding box are within a preset measurement range, and / or the second coordinate value is within the preset measurement range.
[0060] In the above device, the first determining module includes:
[0061] A first sub-determination module is used to determine the number of points contained in a preset range of each candidate plane to obtain multiple point value values;
[0062] The second sub-determination module is used to determine the candidate plane corresponding to the maximum point value as the target plane.
[0063] An exemplary embodiment of the present application provides a target detection device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, the steps in the above target detection method are implemented.
[0064] An exemplary embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned target detection method are implemented.
[0065] An exemplary embodiment of the present application exemplarily provides a target detection method and apparatus, a device, and a storage medium, which generates multiple candidate planes by utilizing point cloud data of an object to be detected, and then selects a target plane from these multiple candidate planes; in this way, the object to be detected is detected based on the point cloud data covered by the target plane, which greatly reduces invalid point cloud data, thereby improving the accuracy of detecting the object to be detected. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 This is a schematic diagram of a target detection method implementation flow of an exemplary embodiment of the present application;
[0067] Figure 2 This is another implementation flow diagram of a target detection method according to an exemplary embodiment of the present application;
[0068] Figure 3 This is another implementation flow diagram of a target detection method according to an exemplary embodiment of the present application;
[0069] Figure 4 This is an application scenario diagram of a target detection method according to an exemplary embodiment of the present application;
[0070] Figure 5 This is another implementation flow diagram of a target detection method according to an exemplary embodiment of the present application;
[0071] Figure 6 This is another application scenario diagram of a target detection method according to an exemplary embodiment of the present application;
[0072] Figure 7 This is a schematic diagram of the composition structure of a target detection method device according to an exemplary embodiment of the present application;
[0073] Figure 8A schematic diagram of a device hardware entity of an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0074] The technical solution in an exemplary embodiment of the present application will be clearly and completely described below in conjunction with the accompanying drawings in an exemplary embodiment of the present application.
[0075] An exemplary embodiment of the present application proposes a target detection method, which is applied to a mobile device with a front camera or a rear camera function, and the mobile device can be implemented in various forms. For example, the mobile device described in an exemplary embodiment of the present application may include a mobile phone, a tablet computer, a palm computer, a personal digital assistant (PDA), etc. In addition, the function implemented by the method can be implemented by calling a program code by a processor in the mobile device, and of course the program code can be stored in a computer storage medium. It can be seen that the mobile device at least includes a processor and a storage medium.
[0076] Figure 1 FIG. 1 is a flow chart of a target detection method according to an exemplary embodiment of the present application. Figure 1 As shown, combined Figure 1 The following instructions are given:
[0077] Step S101, obtaining point cloud data of the object to be detected.
[0078] Here, the object to be detected may be any three-dimensional (3D) object, such as a table, a house or an animal, etc. The point cloud data may be understood as a large number of points collected from the object to be detected.
[0079] Step S102: generating a plurality of candidate planes based on the coordinate values of the point cloud data.
[0080] Here, first, the coordinate values of the point cloud data in the coordinate system corresponding to the acquisition device that acquires the point cloud data are determined, and then multiple candidate planes are generated based on the coordinate values. For example, if the acquisition device is a camera, the coordinate values of the point cloud data in the camera coordinate system are determined, and a candidate plane is generated each time based on the coordinate values of at least three points, thereby obtaining multiple candidate planes.
[0081] Step S103: determining a target plane that meets a preset condition from the multiple candidate planes.
[0082] Here, first, the number of points contained in the preset range of each candidate plane is determined to obtain multiple point value values; for example, the number of points less than 2 centimeters (cm) away from the candidate plane is determined to obtain the point value. Then, the candidate plane corresponding to the largest point value is determined as the target plane. From the multiple candidate planes, a plane with more covered point cloud data is selected as the target plane. For example, a plane with more covered point cloud data than a certain number is selected as the target plane, indicating that the target plane is a better plane among the multiple candidate planes.
[0083] Step S104: detecting the object to be detected according to the point cloud data covered by the target plane.
[0084] Here, the point cloud data covered by the target plane is determined, and then the plane of the object to be detected is detected based on the data to determine the properties of the object to be detected. For example, a 3D image of the object to be detected is generated based on the target point cloud data.
[0085] In an exemplary embodiment of the present application, multiple candidate planes are generated by utilizing the point cloud data of the object to be detected, and then a target plane is selected from these multiple candidate planes; in this way, a 3D image of the object to be detected is generated based on the point cloud data covered by the target plane, which greatly reduces invalid point cloud data, thereby reducing misjudgment of the object to be detected.
[0086] In an exemplary embodiment, in order to reduce the noise data in the point cloud data to improve the accuracy of detecting the object to be detected, the step S102 can be implemented by the following steps: Figure 2 As shown, Figure 2 This is another implementation flow diagram of a target detection method according to an exemplary embodiment of the present application, based on Figure 1 , and make the following instructions:
[0087] Step S201, performing noise reduction processing on the point cloud data to obtain noise-reduced data.
[0088] Here, step 201 may be to perform noise reduction through the characteristics of noise data, for example, first set a position range and remove points outside the position range; or, for each point, calculate the average distance between the point and nearby point clouds (for example, 30 points). If the average distance is greater than a certain distance threshold (for example, greater than 5 standard deviations), it can be judged as noise and the point can be removed.
[0089] Step S202: sampling the noise reduction data according to preset sampling conditions to obtain sample data.
[0090] Here, the noise reduction data is divided into multiple groups of sample data, wherein the number of data in each group of sample data is greater than or equal to a preset number. For example, the preset number is set to 3, and every three points in the noise reduction data are regarded as a group of sample data.
[0091] Step S203: generating the plurality of candidate planes according to the coordinate values of the sample data.
[0092] Here, the step S203 may be that the coordinate values of each set of sample data in the multiple sets of sample data are used to generate corresponding candidate planes to obtain the multiple candidate planes. For example, there are 10 sets of sample data in total, and corresponding candidate planes are generated based on the coordinate values of each set of sample data to obtain 10 candidate planes. Alternatively, candidate planes that meet a quantity threshold are generated based on the coordinate values of each set of sample data in the multiple sets of sample data. That is, when the number of candidate planes is equal to the quantity threshold, the generation of candidate planes is stopped.
[0093] The above process of obtaining candidate planes can be implemented in the following two ways:
[0094] Method 1: The first step is to generate a corresponding sample plane according to the coordinate values of the i-th group of sample data.
[0095] Here, i is an integer greater than or equal to 1. For example, the i-th group of sample data contains three points. According to the coordinate values of these three points, the parameters of the plane are determined, that is, a, b, c and d in the plane y=ax+by+cz+d. Based on the obtained parameters, the corresponding sample plane is generated.
[0096] The second step is to determine the first coordinate value of the intersection point between the optical axis of the acquisition device and the sample plane.
[0097] Here, for example, the acquisition device is a camera, and the intersection point between the optical axis of the camera and the sample plane is determined, and the coordinate value of the intersection point in the camera coordinate system, that is, the first coordinate value, is obtained.
[0098] In the third step, if the first coordinate value satisfies a preset feasible domain condition, the sample plane is determined to be a candidate plane.
[0099] Here, the preset feasible domain condition can be set according to the calibration parameters (e.g., field angle) of the acquisition device in the coordinate system of the acquisition device. For example, the acquisition device is a camera, and the thresholds of the calibration parameters in the x, y, and z directions are set to C, D, and 0 in the camera coordinate system; when the coordinates of the first coordinate value in the camera coordinate system are respectively greater than the thresholds of the corresponding calibration parameters, it is considered that the first coordinate value meets the preset feasible domain condition, indicating that the sample plane obtained based on the first coordinate value is feasible, that is, it is valid and can be used to detect the plane of the object to be detected.
[0100] Method 2: The first step is to enclose the point cloud data covered by multiple sample planes to obtain multiple bounding boxes that meet specific shapes.
[0101] Here, bounding box detection is performed on the point cloud data covered by multiple sample planes. The specific shape may be a rectangular parallelepiped or a cube.
[0102] The second step is to determine the second coordinate value of the intersection of the optical axis of the acquisition device and the central axis of each bounding box to obtain a second coordinate value set.
[0103] Here, if the acquisition device is a camera, and there are bounding boxes 10, the coordinate value of the intersection of the optical axis of the camera and the central axis of each bounding box in the camera coordinate system is determined, that is, the second coordinate value set is obtained.
[0104] The third step is to select, from the second coordinate value set, a candidate bounding box corresponding to the second coordinate value that meets the preset feasible domain condition.
[0105] Here, the second coordinate value that satisfies the preset feasible domain condition can be understood as that the coordinates of the second coordinate value in the camera coordinate system are respectively greater than the thresholds of the corresponding calibration parameters, indicating that the plane covered by the candidate bounding box corresponding to the second coordinate value is feasible.
[0106] In the fourth step, if the attribute information of the candidate bounding box meets the corresponding preset conditions, the sample plane corresponding to the candidate bounding box is determined as the candidate plane.
[0107] Here, if the size of the candidate bounding box meets the size threshold (for example, the front area of the candidate bounding box is greater than 0.1 square meters and the aspect ratio is less than 10), and / or the center point coordinates of the candidate bounding box are within a preset measurement range (for example, the center point coordinates of the candidate bounding box are within a set picture angle threshold and do not exceed the effective measurement range of the time-of-flight (TOF) sensor), and / or the second coordinate value is within the preset measurement range, the sample plane corresponding to the candidate bounding box is determined to be the candidate plane (for example, the second coordinate value is within the set picture angle threshold and does not exceed the effective measurement range of the TOF sensor).
[0108] In an exemplary embodiment of the present application, by performing feasible domain detection on the plane generated by point cloud data during plane detection of the object to be detected, the noise data in the point cloud data is reduced and the accuracy of detecting the object to be detected is greatly improved.
[0109] In the related technology, among 3D imaging sensors, TOF sensors have the characteristics of not being affected by changes in illumination and object textures. While meeting accuracy requirements, they can also reduce costs. Many applications can be realized by using TOF data to detect objects such as 3D planes. The Random Sample Consensus (RANSAC) algorithm is often used for 3D simple object detection. However, there is still a lot of noise in the raw data of the TOF sensor. When performing 3D point cloud measurement, a large number of noise points will appear. In this way, in the 3D imaging process of the object, a large number of points outside the plane can be shielded to a certain extent. However, if there is a lot of noise in the input point cloud data, a large number of invalid detections are likely to occur.
[0110] In order to solve the above problems, an exemplary embodiment of the present application provides a data processing method. For the specific case of plane detection, the prior knowledge that the target to be detected is a plane and the noise characteristics of TOF are used. On the basis of the RANSAC algorithm, feasible domain detection based on candidate plane-optical axis intersection detection is added, thereby greatly reducing misjudgment. The process is as follows: Figure 3 As shown, Figure 3 This is another implementation flow diagram of a target detection method according to an exemplary embodiment of the present application, Figure 3 The steps shown are explained below:
[0111] Step S301, obtaining point cloud data output by a TOF sensor.
[0112] For example, the TOF sensor data is initially filtered and transformed into three-dimensional coordinates under the camera coordinates to generate three-dimensional point cloud data.
[0113] Step S302: denoising the point cloud data according to the noise characteristics of the sensor.
[0114] Here, the noise characteristics include: a large number of points gathered near the camera (within 10 cm); and the credibility of distant point clouds (for example, more than 15 meters) is low. The denoising method includes: first setting a position range and removing points that fall outside the position range; or, for each point, calculating the average distance between the point and the nearby point clouds (for example, 30 points). If the average distance is greater than a certain distance threshold (for example, greater than 5 standard deviations), it can be judged as noise and the point is removed.
[0115] Step S303: randomly sample 3 points from the point cloud data as a set of sample data.
[0116] For example, 3 points are randomly sampled from point cloud data that has never been sampled, and the sampled points are classified as sampled.
[0117] Step S304, determining the sample plane according to the coordinate values of the three points obtained by sampling.
[0118] Here, for example, the spatial coordinates of the three points are x1, x2, and x3, and the expression of the candidate plane can be expressed as π(a, b, c, d), where:
[0119] Step S305, performing a feasible region detection on the sample plane, if the detection result does not meet the preset condition, returning to step S303.
[0120] Here, the feasible region detection of the sample plane includes the following two methods:
[0121] Method 1: Detect the intersection of the sample plane (P-P0)·n=0 and the camera optical axis p=dl+l0, where the intersection x p (x, y, z) is The process is as follows:
[0122] For the intersection point x p (x, y, z) is determined according to the set feasible domain conditions, for example: Among them, A and B are the angle thresholds in the x and y directions respectively, that is, the field angle is obtained by the calibration parameters of the camera.
[0123] If the intersection point x p If (x, y, z) satisfies all the above conditions, it is determined that the sample plane is feasible, that is, the judgment is successful, and the process goes to step S306. Otherwise, the judgment fails and the process returns to re-random sampling, that is, returns to step S303.
[0124] like Figure 4 As shown, in Figure 4 In (a), the sample plane corresponding to the dotted line 401 is a plane that does not meet the feasible domain conditions, and the sample plane corresponding to the dotted line 402 is a plane that meets the feasible domain conditions. Then, the points covered under the sample plane corresponding to the dotted line 402 can be used to generate the 3D imaging of the object to be detected. Ignore the points covered under the sample plane corresponding to the dotted line 401. Figure 4 In (b), the feasible domain detection of the sample plane includes two stages. Stage 411 determines the intersection of the sample plane and the camera optical axis. Then, it enters stage 412. Stage 412 determines whether the intersection satisfies the feasible domain conditions, and finally obtains the detection result, that is, judgment success 414 or judgment failure 413, wherein judgment success 414 indicates that the sample plane can be used as a candidate plane, and judgment failure 413 indicates that the sample plane cannot be used as a candidate plane. In this way, the feasible domain detection of each sample plane is realized, thereby obtaining a candidate plane that meets the feasible domain conditions.
[0125] Method 2: When detecting the feasible region, we add information such as the size and position of the axis-aligned bounding box of the target surface to further reduce the misjudgment of the object to be detected, such as Figure 5 As shown, the process is as follows:
[0126] Step S501 , filtering out point cloud data that can be covered by the sample plane to provide for subsequent bounding box detection.
[0127] Step S502: De-noise the point cloud data, thereby limiting the object to be detected to the center of the camera acquisition range.
[0128] Step S503: determine the 3D size of the bounding box and the axis direction of the central axis of the bounding box.
[0129] Step S504: if the second coordinate value of the intersection point between the optical axis of the camera and the central axis of the bounding box satisfies the preset feasible domain condition, the bounding box is determined to be a candidate bounding box.
[0130] Here, if the second coordinate value fails the detection, the process returns to step S501 and steps S501 to S504 are performed again.
[0131] Step S505 , determining whether the size of the candidate bounding box meets a size threshold.
[0132] Here, if the size of the candidate bounding box meets the size threshold, the process proceeds to step S506; otherwise, the process returns to step S501. For example, it is determined that the front area of the candidate bounding box is greater than 0.1 square meters and the aspect ratio is less than 10.
[0133] Step S506: determine whether the coordinates of the center point of the candidate bounding box are within a preset measurement range.
[0134] Here, if the center point coordinates of the candidate bounding box are within the preset measurement range, proceed to step S507; otherwise, return to step S501. For example, the center point coordinates of the candidate bounding box are within the set picture angle threshold and do not exceed the effective measurement range of the TOF sensor. Figure 6 As shown, by calculating the coordinates P (P x , P y , P z ) to make a threshold judgment, and limit the feasible region to the vicinity of the center of the picture. The condition for making a threshold judgment is Among them A x-max and A y-max , are the maximum feasible angle thresholds in the x and y directions respectively (for example: two-thirds of the horizontal and vertical angles of the camera); Z max is the maximum optical axis distance threshold (e.g. three quarters of the effective measurement range of TOF). Figure 6As shown, the effective measurement range of TOF sensor 603 is set between dotted lines 61 and 62, and the bounding box whose center point coordinates fall within this range is a valid bounding box, i.e., a candidate bounding box, otherwise it is an invalid bounding box. For example, the center point coordinates of bounding box 601 fall within the set picture angle threshold, indicating that the plane corresponding to bounding box 601 is valid and can be used in the detection process of the image to be detected; similarly, the center point coordinates of bounding box 602 do not fall within the set picture angle threshold, indicating that the plane corresponding to bounding box 602 is invalid (for example, it may contain more noise points) and cannot be used in the detection process of the image to be detected.
[0135] Step S507, determining whether the second coordinate value is within the preset measurement range.
[0136] Here, if the second coordinate value is within the preset measurement range, the judgment process ends and the sample plane corresponding to the bounding box is determined to be a candidate plane; otherwise, the process returns to step S501. For example, the second coordinate value falls within the set picture angle threshold and does not exceed the effective measurement range of the TOF sensor.
[0137] Step S306: Count the number of points contained in the point cloud within the coverage area of the candidate plane.
[0138] For example, count the points whose distance from the candidate plane is less than 2 cm.
[0139] Step S307: When the number of iterations reaches a threshold, the iteration is terminated to obtain multiple candidate planes.
[0140] Step S308: determine the candidate plane that covers the most point clouds as the target plane, and output it as the optimal parameter.
[0141] Step S309: detecting the object to be detected according to the point cloud data covered by the target plane.
[0142] In an exemplary embodiment of the present application, during the plane detection of the object to be detected, the prior knowledge that the object to be detected is a plane and the noise characteristics of TOF are utilized to add a feasible domain detection based on candidate plane-optical axis intersection detection, thereby greatly reducing the misjudgment of the object to be detected.
[0143] An exemplary embodiment of the present application provides a target detection method device, which includes various modules included and various units included in each module, and can be implemented by a processor in a computer device; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.
[0144] Figure 7 FIG. 1 is a schematic diagram of the structure of a target detection method device according to an exemplary embodiment of the present application. Figure 7 As shown, the device 70 includes: a first acquisition module 71, a first generation module 72, a first determination module 73 and a first detection module 74, wherein:
[0145] The first acquisition module 71 is used to acquire point cloud data of the object to be detected;
[0146] The first generating module 72 is used to generate a plurality of candidate planes based on the coordinate values of the point cloud data;
[0147] The first determination module 73 is used to determine a target plane that meets a preset condition from the multiple candidate planes;
[0148] The first detection module 74 is used to detect the object to be detected according to the point cloud data covered by the target plane.
[0149] In the above device, the first generating module 72 includes:
[0150] A first denoising submodule, used to perform denoising processing on the point cloud data to obtain denoised data;
[0151] A first adopting submodule is used to sample the noise reduction data according to a preset sampling condition to obtain sample data;
[0152] The first generating submodule is used to generate the multiple candidate planes according to the coordinate values of the sample data.
[0153] In the above device, the first adoption submodule includes:
[0154] The first division unit is used to divide the noise reduction data into multiple groups of sample data; wherein the number of data in each group of sample data is greater than or equal to a preset number.
[0155] In the above device, the first generating module 72 includes:
[0156] The first generating submodule is used to generate a corresponding candidate plane according to the coordinate value of each group of sample data in the multiple groups of sample data to obtain the multiple candidate planes.
[0157] In the above device, the first generating module 72 includes:
[0158] The second generating submodule is used to generate candidate planes that meet the quantity threshold according to the coordinate value of each group of sample data in the multiple groups of sample data.
[0159] In the above device, the first generating submodule includes:
[0160] A first generating unit, configured to generate a corresponding sample plane according to the coordinate values of the i-th group of sample data; wherein i is an integer greater than or equal to 1;
[0161] A first determination unit, configured to determine a first coordinate value of an intersection point between an optical axis of the acquisition device and the sample plane;
[0162] The second determining unit is configured to determine that the sample plane is a candidate plane if the first coordinate value satisfies a preset feasible domain condition.
[0163] In the above device, the first generating submodule includes:
[0164] A first enclosing unit is used to enclose the point cloud data covered by the multiple sample planes to obtain multiple enclosing boxes that meet a specific shape;
[0165] A third determining unit is used to determine a second coordinate value of an intersection point between the optical axis of the acquisition device and the central axis of each bounding box to obtain a second coordinate value set;
[0166] A first selection unit, configured to select, from the second coordinate value set, a candidate bounding box corresponding to the second coordinate value that satisfies the preset feasible domain condition;
[0167] The fourth determining unit is configured to determine that the sample plane corresponding to the candidate bounding box is a candidate plane if the attribute information of the candidate bounding box meets a corresponding preset condition.
[0168] In the above device, the fourth determining unit includes:
[0169] The first determination subunit is used to determine that the sample plane corresponding to the candidate bounding box is a candidate plane if the size of the candidate bounding box meets the size threshold, and / or the coordinates of the center point of the candidate bounding box are within a preset measurement range, and / or the second coordinate value is within the preset measurement range.
[0170] In the above device, the first determining module 73 includes:
[0171] A first sub-determination module is used to determine the number of points contained in a preset range of each candidate plane to obtain multiple point value values;
[0172] The second sub-determination module is used to determine the candidate plane corresponding to the maximum point value as the target plane.
[0173] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.
[0174] It should be noted that in an exemplary embodiment of the present application, if the above-mentioned target detection method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of an exemplary embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, an exemplary embodiment of the present application is not limited to any specific combination of hardware and software.
[0175] Figure 8 A schematic diagram of a device hardware entity of an exemplary embodiment of the present application is shown in FIG. Figure 8 As shown, an exemplary embodiment of the present application provides a device 800, including:
[0176] A processor 81 and a storage medium 82 storing executable instructions of the processor 81, wherein the storage medium 82 relies on the processor 81 to perform operations through a communication bus 83, and when the instructions are executed by the processor 81, the notification method described in the above embodiment 1 is executed.
[0177] It should be noted that in actual application, the various components in the device are coupled together through the communication bus 83. It is understandable that the communication bus 83 is used to realize the connection and communication between these components. In addition to the data bus, the communication bus 83 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Figure 8 Various buses are labeled as communication buses 83.
[0178] Here, it should be noted that the device is generally a mobile device with a front dual camera or a rear dual camera function, and the mobile device can be implemented in various forms. For example, the mobile device described in an exemplary embodiment of the present application may include a mobile phone, a tablet computer, a palm computer, a personal digital assistant (PDA), etc.
[0179] Correspondingly, an exemplary embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the target detection method provided in the above embodiment are implemented.
[0180] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0181] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the serial number of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of an exemplary embodiment of the present application. The serial number of the above-mentioned exemplary embodiment of the present application is only for description and does not represent the advantages and disadvantages of the embodiment.
[0182] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0183] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0184] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of an exemplary embodiment of the present application.
[0185] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0186] It can be understood by those skilled in the art that all or part of the steps of the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiment are executed; and the aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, read-only memory (ROM), magnetic disks or optical disks. Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of an exemplary embodiment of the present application can be essentially or partly embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling the device to execute all or part of the methods described in each embodiment of the present application. And the aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, magnetic disks or optical disks. The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0187] Industrial Applicability
[0188] The target detection method in the embodiment of the present application is applied to a device with a shooting function, including: acquiring point cloud data of an object to be detected; generating multiple candidate planes based on the coordinate values of the point cloud data; determining a target plane that meets preset conditions from the multiple candidate planes; and detecting the object to be detected based on the point cloud data covered by the target plane.
Claims
1. A target detection method, characterized in that: Applied to a device having a shooting function, the method comprises: Obtaining point cloud data of the object to be detected; Based on the coordinate values of the point cloud data, generating a plurality of candidate planes; Determining a target plane that meets a preset condition from the multiple candidate planes; Detecting the object to be detected according to the point cloud data covered by the target plane; Wherein, generating a plurality of candidate planes based on the coordinate values of the point cloud data includes: Performing noise reduction processing on the point cloud data to obtain noise-reduced data; Sampling the noise reduction data according to preset sampling conditions to obtain sample data; Generate the corresponding candidate plane according to the coordinate value of each group of the sample data in the multiple groups of the sample data to obtain the multiple candidate planes; The step of generating the corresponding candidate plane according to the coordinate values of each group of the sample data in the plurality of groups of the sample data to obtain the plurality of candidate planes includes: Generate a corresponding sample plane according to the coordinate values of the i-th group of sample data; wherein i is an integer greater than 1; determining a first coordinate value of an intersection point between an optical axis of an acquisition device and the sample plane; If the first coordinate value satisfies a preset feasible domain condition, the sample plane is determined to be the candidate plane.
2. The method according to claim 1, characterized in that The step of sampling the noise reduction data according to the preset sampling conditions to obtain sample data includes: The noise reduction data is divided into a plurality of groups of sample data; wherein the number of data in each group of sample data is greater than or equal to a preset number.
3. The method according to claim 1 or 2, characterized in that: The step of generating the plurality of candidate planes according to the coordinate values of the sample data comprises: According to the coordinate value of each set of sample data in the multiple sets of sample data, candidate planes that meet the quantity threshold are generated.
4. The method according to claim 1, characterized in that The step of determining a target plane that meets a preset condition from among the multiple candidate planes includes: Determine the number of points contained in a preset range of each candidate plane to obtain multiple point value values; The candidate plane corresponding to the maximum point value is determined as the target plane.
5. A target detection method, characterized in that: Applied to a device having a shooting function, the method comprises: Obtaining point cloud data of the object to be detected; Based on the coordinate values of the point cloud data, generating a plurality of candidate planes; Determining a target plane that meets a preset condition from the multiple candidate planes; Detecting the object to be detected according to the point cloud data covered by the target plane; Wherein, generating a plurality of candidate planes based on the coordinate values of the point cloud data includes: Performing noise reduction processing on the point cloud data to obtain noise-reduced data; Sampling the noise reduction data according to preset sampling conditions to obtain sample data; Generate the corresponding candidate plane according to the coordinate value of each group of the sample data in the multiple groups of the sample data to obtain the multiple candidate planes; The step of generating the corresponding candidate plane according to the coordinate values of each group of the sample data in the plurality of groups of the sample data to obtain the plurality of candidate planes includes: Generate a corresponding sample plane according to the coordinate values of the i-th group of sample data; wherein i is an integer greater than 1; Enclosing the point cloud data covered by the plurality of sample planes to obtain a plurality of bounding boxes satisfying a specific shape; Determine a second coordinate value of an intersection of an optical axis of the acquisition device and a central axis of each of the bounding boxes to obtain a second coordinate value set; Selecting, from the second coordinate value set, a candidate bounding box corresponding to the second coordinate value that satisfies a preset feasible domain condition; If the attribute information of the candidate bounding box meets the corresponding preset condition, the sample plane corresponding to the candidate bounding box is determined to be the candidate plane.
6. The method according to claim 5, characterized in that If the attribute information of the candidate bounding box satisfies a corresponding preset condition, determining that the sample plane corresponding to the candidate bounding box is the candidate plane includes: If the size of the candidate bounding box meets the size threshold, and / or the center point coordinates of the candidate bounding box are within a preset measurement range, and / or the second coordinate value is within the preset measurement range, the sample plane corresponding to the candidate bounding box is determined to be the candidate plane.
7. A target detection device, characterized in that: The device comprises: a first acquisition module, a first generation module, a first determination module and a first detection module, wherein: The first acquisition module is used to acquire point cloud data of the object to be detected; The first generating module is used to perform noise reduction processing on the point cloud data to obtain noise reduction data; sample the noise reduction data according to preset sampling conditions to obtain sample data; generate corresponding candidate planes according to the coordinate values of each group of sample data in the multiple groups of sample data to obtain multiple candidate planes; wherein, generating corresponding candidate planes according to the coordinate values of each group of sample data in the multiple groups of sample data to obtain multiple candidate planes includes: generating corresponding sample planes according to the coordinate values of the i-th group of sample data; wherein i is an integer greater than 1; determining a first coordinate value of an intersection point between an optical axis of an acquisition device and the sample plane; if the first coordinate value satisfies a preset feasible domain condition, determining the sample plane as the candidate plane; The first determination module is used to determine a target plane that meets a preset condition from the multiple candidate planes; The first detection module is used to detect the object to be detected based on the point cloud data covered by the target plane.
8. A target detection device, comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the program, the steps of the target detection 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 in the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Coordinate measurement system and method
CN104335067A
Point cloud-oriented lightweight polygon surface reconstruction method
CN108257213A
RAP-based three-dimensional scene reconstruction method
CN108288277A
Image processing device, image processing method, and vehicle
CN109196557A
3D modeling method based on point cloud data
CN109693387A
