Point cloud data extraction method, device, system, equipment and storage medium
Through the method of effective pixel point discrimination interval and feature perception area, the problems of stress response and low accuracy of point cloud data in manual measurement of beef cattle phenotypic parameters are solved, high-precision and low-reduction point cloud data extraction is achieved, and non-contact beef cattle body size measurement is supported, thereby improving the efficiency of breeding and fattening management.
Patent Information
- Application Number
- CN202210399022.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-15
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2042-04-15
AI Technical Summary
In the existing technology, the collection of phenotypic parameters such as body size and weight of beef cattle involves manual measurement, which causes stress response, resulting in decreased feed intake, reduced fattening efficiency and increased breeding costs. In addition, the existing point cloud data extraction method has low accuracy and poor applicability in complex environments.
By using a method based on the effective pixel point discrimination interval and feature perception area, the first point cloud data is screened out from the original point cloud data, the interference point cloud is eliminated, and the point cloud data of the target animal is obtained. Multi-perspective acquisition and filtering processing are combined with the feature perception area to determine the target judgment magnification and distinction threshold, and eliminate the interference of environmental noise.
It realizes high-precision, low-reduction point cloud data extraction in complex breeding environments, supports non-contact measurement of core phenotypic parameters of beef cattle such as body height, body width, body oblique length, chest circumference, abdominal circumference, and weight, reduces labor costs, and improves breeding and fattening management levels.
Smart Images

Figure CN114898100B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to a point cloud data extraction method, device, system, equipment and storage medium. Background Art
[0002] The collection of phenotypic parameters, such as body size and weight, is a crucial step in beef cattle breeding and production. However, manual collection can cause severe stress in cattle, impacting production and preventing the effective collection of phenotypic parameters on a large scale, hindering the management of beef cattle breeding and production. Currently, manual measurement of beef cattle's body phenotypic data (including length, width, chest circumference, abdominal circumference, and weight) is the mainstream testing method. However, manual measurement can cause severe stress reactions, leading to decreased feed intake, reduced fattening efficiency, and increased breeding costs.
[0003] To address the difficulty of manually collecting phenotypic data for beef cattle, non-contact body measurement methods have been proposed. Cattle weight, body dimensions, and other data can be collected using images or point cloud data. Existing methods collect single-view images of beef cattle and use them for body measurement, but camera distortion requires complex calibration. Alternatively, dual-view depth cameras are used to collect cattle point clouds, and deep learning models are applied to dairy cow image processing to extract body parts and features. However, due to limitations in the methods and principles, the accuracy of the point clouds needs to be improved. Alternatively, algorithms for collecting and measuring pig point clouds using mirror reconstruction based on single-view 3D cameras have been proposed, but this method has certain requirements for the pig's posture. Alternatively, 3D cameras are used to obtain 3D data of cows from the side and back and used to predict their weight. However, this method is easily affected by the clutter of actual farming environments. These studies still face challenges in filtering out noise caused by railing interference, poor applicability in real-world farming environments, and low 3D reconstruction accuracy.
[0004] However, at present, there is no technical solution for extracting point cloud data with high accuracy and high restoration for calculating the body size and estimating the weight of beef cattle. Specifically, there is no point cloud data extraction method, device, system, equipment and storage medium. Summary of the Invention
[0005] The present invention provides a point cloud data extraction method, comprising:
[0006] Based on the effective pixel point discrimination interval, the first point cloud data is filtered out from the original point cloud data;
[0007] Based on the characteristic perception area, removing the interference point cloud from the first point cloud data to obtain second point cloud data;
[0008] extracting the second point cloud data to obtain point cloud data of the target animal;
[0009] The effective pixel point discrimination interval is determined based on the target judgment magnification, and the target judgment magnification is determined based on the target residual point cloud ratio and the target error point cloud ratio; the target residual point cloud ratio and the target error point cloud ratio are determined based on the screening of multiple groups of filtered sample point clouds.
[0010] According to the point cloud data extraction method provided by the present invention, before filtering out the first point cloud data from the original point cloud data based on the effective pixel point discrimination interval, the method further includes:
[0011] Processing multiple groups of pre-filtered sample point clouds based on different filter intensities to obtain each group of post-filtered sample point clouds;
[0012] Based on each set of filtered sample point clouds, the proportion of residual defect point clouds and the proportion of error point clouds corresponding to each set of filtered sample point clouds are obtained;
[0013] Filter the weighted average of the residual defect cloud ratio and the error point cloud ratio of each group to determine the target residual defect cloud ratio and the target error point cloud ratio;
[0014] The target judgment magnification is determined based on the number of target sample point clouds corresponding to the target residual point cloud ratio and the target error point cloud ratio;
[0015] The number of target sample point clouds includes the total number of pixel points in the point cloud before filtering and the total number of pixel points in the point cloud after filtering;
[0016] During the filtering process, the residual point cloud is a set of pixel points formed by erroneous filtering, and the error point cloud is a set of pixel points formed by erroneous retention.
[0017] According to the point cloud data extraction method provided by the present invention, the first point cloud data is screened out from the original point cloud data based on the effective pixel point discrimination interval, including:
[0018] Traverse each pixel in all original point cloud data, obtain the average distance from each pixel to all points in the neighborhood, and calculate the average neighborhood distance of all points;
[0019] Determine the standard deviation of all neighborhood distances;
[0020] Determine a valid pixel point discrimination interval based on the average value, the standard deviation, and the judgment magnification, wherein the valid pixel point discrimination interval includes an upper limit of a judgment threshold and a lower limit of a judgment threshold;
[0021] When the average distance from any pixel point to all points in the neighborhood is greater than the upper limit of the judgment threshold or less than the lower limit of the judgment threshold, the pixel point is removed to obtain the first point cloud data.
[0022] According to the point cloud data extraction method provided by the present invention, removing the interference point cloud from the first point cloud data based on the feature perception area to obtain the second point cloud data includes:
[0023] Determine all feature perception areas, each of the feature perception areas being a fixed area determined with each pixel in the first point cloud data as a centroid;
[0024] Obtain the number of all pixels in each feature perception area to determine all pixels to be eliminated using a discrimination threshold;
[0025] Eliminate all pixels to be eliminated from the first point cloud to obtain the second point cloud data;
[0026] The pixels to be eliminated are pixels corresponding to the feature perception area in which the number of all pixels is less than the discrimination threshold.
[0027] According to the point cloud data extraction method provided by the present invention, obtaining the number of all pixels in each feature perception area to determine all pixels to be eliminated using a distinction threshold includes:
[0028] Obtain a sample point cloud of the target animal to determine all distractor pixels and all target animal pixels;
[0029] Determine all interference perception areas to obtain the number of interference pixels in each interference perception area, each of the interference perception areas being a fixed area determined with the interference pixel as the centroid;
[0030] Determine all target animal perception areas to obtain the number of target animal pixels within each target animal perception area, wherein each target animal perception area is a fixed area determined with the target animal pixel as the centroid;
[0031] A discrimination threshold is determined based on the number of pixels of the interference object and the number of pixels of the target animal.
[0032] According to the point cloud data extraction method provided by the present invention, before filtering out the first point cloud data from the original point cloud data based on the effective pixel point discrimination interval, the method further includes:
[0033] Collect three-dimensional point cloud data of the target animal from a bird's-eye view;
[0034] Collect left-view 3D point cloud data of the target animal;
[0035] Collect the right-view 3D point cloud data of the target animal;
[0036] Original point cloud data is determined based on the top-view 3D point cloud data, the left-view 3D point cloud data, and the right-view 3D point cloud data.
[0037] According to the point cloud data extraction method provided by the present invention, before filtering out the first point cloud data from the original point cloud data based on the effective pixel point discrimination interval, the method further includes:
[0038] The original point cloud data is processed based on a straight-through filtering principle and / or an octree principle to obtain first point cloud data.
[0039] According to the point cloud data extraction method provided by the present invention, before removing the interference point cloud from the first point cloud data based on the feature perception area to obtain the second point cloud data, the method further includes:
[0040] Processing the first point cloud data based on a random sampling consensus algorithm to obtain pixel points of a ground plane point cloud;
[0041] Pixels of the ground plane point cloud are removed to obtain second point cloud data.
[0042] The present invention also provides a point cloud data extraction device, which adopts the point cloud data extraction method, comprising:
[0043] Acquisition device: based on the effective pixel point discrimination interval, screens out the first point cloud data from the original point cloud data;
[0044] The processing device removes the interference point cloud from the first point cloud data based on the characteristic sensing area to obtain second point cloud data;
[0045] Extraction device: extracts the second point cloud data to obtain point cloud data of the target animal.
[0046] The present invention also provides a point cloud data extraction system, which adopts the point cloud data extraction method, including:
[0047] A first bracket and a second bracket are respectively provided on both sides of the target animal passage;
[0048] a third bracket fixedly mounted on top of the first bracket and the second bracket;
[0049] A first depth camera fixedly mounted on the side of the first bracket is used to obtain left-view three-dimensional point cloud data of the target animal;
[0050] A second depth camera fixed on the side of the second bracket is used to obtain right-view three-dimensional point cloud data of the target animal;
[0051] A third depth camera fixed to the side of the third bracket is used to obtain top-down three-dimensional point cloud data of the target animal;
[0052] A radio frequency identification trigger fixed on the side of the third bracket is used to identify the radio frequency tag of the target animal;
[0053] A beam grating sensor fixedly mounted on the first bracket side and / or the second bracket side is used to identify and trigger the acquisition operation of the target animal;
[0054] An industrial computer fixedly mounted on the first bracket side and / or the second bracket side and / or the third bracket side, configured to control the first depth camera, the second depth camera and the third depth camera to simultaneously capture the target animal when the radio frequency identification trigger and the beam grating sensor are triggered;
[0055] a first railing disposed on the first bracket near the target animal passage;
[0056] a second railing disposed on the second bracket near the target animal passage;
[0057] The guide channel formed by the first railing and the second railing forces the target animal to pass through the radio frequency identification trigger and the beam grating sensor.
[0058] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned point cloud data extraction method when executing the program.
[0059] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the above-mentioned point cloud data extraction method when executed by a processor.
[0060] The present invention discloses a point cloud data extraction method. Based on the effective pixel point discrimination interval, first point cloud data is screened from the original point cloud data; based on the characteristic perception area, the interference point cloud is eliminated from the first point cloud data to obtain second point cloud data; and the second point cloud data is extracted to obtain point cloud data of the target animal. The present invention can determine the judgment magnification that is suitable for the current environment in combination with the actual breeding environment, thereby achieving more accurate point cloud data extraction. The present invention uses the characteristic perception area to eliminate the interference of interference objects on the point cloud data extraction, so that the extracted data has high accuracy and strong reproducibility. It can be applied to various complex breeding environments and provides important methodological support for the non-contact measurement of core phenotypic parameters such as height, width, oblique length, chest circumference, abdominal circumference, and weight of beef cattle. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0062] Figure 1 This is one of the flow charts of a point cloud data extraction method provided by the present invention;
[0063] Figure 2 This is the second flow chart of a point cloud data extraction method provided by the present invention;
[0064] Figure 3 is a schematic diagram of a process for screening first point cloud data provided by the present invention;
[0065] Figure 4 is a schematic diagram of the process of obtaining second point cloud data provided by the present invention;
[0066] Figure 5 is a schematic diagram of a flow chart for determining a discrimination threshold value provided by the present invention;
[0067] Figure 6 This is the third flow chart of a point cloud data extraction method provided by the present invention;
[0068] Figure 7 This is a fourth flow chart of a point cloud data extraction method provided by the present invention;
[0069] Figure 8 Schematic diagram of a curve showing the influence of the judgment magnification on the filtering result provided by the present invention;
[0070] Figure 9 Schematic diagram of the curve of noise point and non-noise point recognition rate statistics provided by the present invention;
[0071] Figure 10 It is a structural schematic diagram of a point cloud data extraction device provided by the present invention;
[0072] Figure 11 It is a structural schematic diagram of a point cloud data extraction system provided by the present invention;
[0073] Figure 12 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0074] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0075] Demand for beef consumption is increasing annually, creating enormous market potential. To overcome the pressures of beef supply and rising feed and management costs, large-scale beef cattle farming is a development trend in the beef cattle industry. In large-scale beef cattle farming and breeding, the measurement of key phenotypic data is fundamental to breeding decisions, crucial data for performance measurement in genetic breeding, and crucial for the assessment of heritability and genetic value.
[0076] The present invention can provide a large amount of standardized three-dimensional quantitative phenotypic data for beef cattle breeding and fattening. The present invention can realize multi-angle instantaneous acquisition of beef cattle point clouds at the moment when beef cattle freely pass through the walkway, and realize three-dimensional reconstruction and analysis of beef cattle point clouds through point cloud preprocessing and target extraction. The present invention can realize the automatic acquisition and three-dimensional reconstruction of multi-angle beef cattle point cloud data without human intervention, and automatically extract the point cloud of the target beef cattle therefrom. The beef cattle point cloud collected by the present invention can restore the body size and shape of the beef cattle, and realize the measurement of various body size parameters of the beef cattle in the three-dimensional point cloud, providing important method support for the non-contact measurement of core phenotypic parameters such as body height, body width, body oblique length, chest circumference, abdominal circumference, weight, etc. of beef cattle, which is of great significance to the standardized management of beef cattle breeding and fattening in my country.
[0077] Figure 1 This is one of the flow charts of a point cloud data extraction method provided by the present invention. The target animal of the present invention is beef cattle. However, the present invention is not limited to measuring body size parameters of beef cattle, which will not be described in detail here.
[0078] The present invention provides a point cloud data extraction method, comprising:
[0079] Based on the effective pixel point discrimination interval, the first point cloud data is filtered out from the original point cloud data;
[0080] Based on the characteristic perception area, removing the interference point cloud from the first point cloud data to obtain second point cloud data;
[0081] extracting the second point cloud data to obtain point cloud data of the target animal;
[0082] The effective pixel point discrimination interval is determined based on the target judgment magnification, and the target judgment magnification is determined based on the target residual point cloud ratio and the target error point cloud ratio; the target residual point cloud ratio and the target error point cloud ratio are determined based on the screening of multiple groups of filtered sample point clouds.
[0083] In step S101, the original point cloud data is three-dimensional point cloud data obtained by multi-perspective acquisition of the target animal and multi-perspective fusion. The target judgment magnification is an optimal parameter determined according to different breeding environments and different acquisition environments. A large number of multiple rounds of sample point cloud data can be obtained through sample acquisition tests to determine the clarity of different filtered data under different filtering intensities, and then determine the optimal judgment magnification based on the filtering intensity corresponding to the most accurate and clearest data. The present invention eliminates most noise points in the original point cloud data based on statistical outlier filtering.
[0084] The effective pixel point discrimination interval is determined based on the target judgment magnification and the statistical outlier parameters. Therefore, the key to step S101 of the present invention is to determine the target judgment magnification, and the determination of the target judgment magnification is based on the target residual defect cloud ratio and the target error point cloud ratio. The target residual defect cloud ratio and the target error point cloud ratio are the optimal group of samples with the least residual defect cloud ratio and the least error point cloud ratio determined after collecting multiple groups of samples, that is, they need to be determined by screening multiple groups of filtered sample point clouds.
[0085] In step S102, the feature perception area is used to eliminate the interference of the interference point cloud. Those skilled in the art understand that in order to ensure that the target animal can enter the collection point in sequence without going back, it is necessary to set up a channel at the collection point and a railing to ensure the target animal's forward direction. In the actual shooting process, it is necessary to collect point cloud data from the left, right and top of the target animal, and then fuse the three-dimensional point cloud data. Therefore, it is inevitable that noise points of interference objects will be left in the three-dimensional point cloud data when collecting from both sides. The interference object is preferably an interference railing. The present invention aims to eliminate such noise interference, thereby making the extracted data more accurate and the restoration higher.
[0086] In a preferred embodiment, the width direction of the beef cattle is assumed to be the X-axis, the length direction is the Y-axis, and the height direction is the Z-axis. The main interference of the present invention comes from the railings of the farm. The railings have a specific distribution feature, that is, they are approximately parallel to the Y-axis. In view of this situation, a feature perception area of a specific proportion is selected for point cloud interference filtering. Preferably, the feature perception area is preferably a three-dimensional rectangular fixed area, and the size of the feature perception area is 200mm*30mm*400mm.
[0087] Optionally, before processing the first point cloud data based on the feature perception area to obtain the second point cloud data, the method further includes:
[0088] The original point cloud data is processed based on a straight-through filtering principle and / or an octree principle to obtain first point cloud data.
[0089] In addition to using the judgment magnification to process the original point cloud data to obtain the first point cloud data, the present application can also perform spatial filtering on the original point cloud data. Due to the complex acquisition environment and the large number of obstructions, there are a large number of irrelevant data points in the collected original point cloud data. In order to make the original point cloud data effective and accurate, the original point cloud data is first spatially filtered. Based on the spatial distribution characteristics of the environmental noise points in the original point cloud data, a straight-through filter of the original point cloud data is first defined in the three coordinate dimensions of X, Y, and Z to obtain the area of interest in the beef cattle point cloud channel. After straight-through filtering, a large number of irrelevant noise points are effectively filtered out. However, due to the influence of factors such as channel railings, environmental dust, and the ground, noise still exists in the point cloud data after straight-through filtering, affecting the quality of the beef cattle point cloud.
[0090] Then, the original point cloud data is processed based on the target determination magnification in step S101 to obtain first point cloud data to further filter out noise points.
[0091] Finally, the first point cloud data determined in step S101 is uniformly thinned. In such an embodiment, the first point cloud data is synthesized from data collected by depth cameras with different viewing angles. The point cloud density is relatively large, resulting in data redundancy, which affects subsequent calculations. The present invention uniformly thins the first point cloud data through an octree. A three-dimensional voxel grid is established based on the octree principle through the first point cloud data. In each small three-dimensional cube, the voxel is represented by the center of gravity of all points in the voxel, and other points are deleted at the same time to achieve uniform thinning of the point cloud. The first point cloud data after uniform thinning will be used for noise filtering in the subsequent feature perception area, which will not be elaborated here.
[0092] The point cloud coordinates collected by this method correspond to real-world distances. To test the numerical accuracy of the reconstructed point cloud of beef cattle, we selected body height as a representative quantitative value to investigate the degree to which the point cloud reproduces the actual cattle. Appropriate measurement points were selected from the collected point clouds of multiple beef cattle to measure their body height parameters. This was then compared with direct body height measurements using a tape measure. The results are shown in the table below. The point cloud measurements are average values in cm.
[0093]
[0094]
[0095] The table above shows that the error between the point cloud collected by this method and the true distance of beef cattle is 0.6%, demonstrating very high fidelity and accuracy, providing reliable high-dimensional data for non-contact body measurement of beef cattle. Using this method, various body measurement parameters of beef cattle, such as length and height, can be measured simply by manually selecting and marking points in the collected point cloud, significantly reducing labor costs.
[0096] The present invention discloses a point cloud data extraction method, which filters out first point cloud data from original point cloud data based on the effective pixel point discrimination interval; eliminates interference point clouds from the first point cloud data based on the feature perception area to obtain second point cloud data; extracts the second point cloud data to obtain point cloud data of a target animal; the present invention can determine a judgment magnification suitable for the current environment in combination with the actual breeding environment, thereby achieving more accurate point cloud data extraction. The present invention adopts the feature perception area to eliminate the interference of interference objects on the point cloud data extraction, so that the extracted data has high accuracy and strong restorability, and can be applied to various complex breeding environments, providing important method support for the non-contact measurement of core phenotypic parameters such as height, width, oblique length, chest circumference, abdominal circumference, and weight of beef cattle.
[0097] Figure 2 This is a second flow chart of a point cloud data extraction method provided by the present invention, which further includes:
[0098] Processing multiple groups of pre-filtered sample point clouds based on different filter intensities to obtain each group of post-filtered sample point clouds;
[0099] Based on each set of filtered sample point clouds, the proportion of residual defect point clouds and the proportion of error point clouds corresponding to each set of filtered sample point clouds are obtained;
[0100] Filter the weighted average of the residual defect cloud ratio and the error point cloud ratio of each group to determine the target residual defect cloud ratio and the target error point cloud ratio;
[0101] The target judgment magnification is determined based on the number of target sample point clouds corresponding to the target residual point cloud ratio and the target error point cloud ratio;
[0102] The number of target sample point clouds includes the total number of pixel points in the point cloud before filtering and the total number of pixel points in the point cloud after filtering;
[0103] During the filtering process, the residual point cloud is a set of pixel points formed by erroneous filtering, and the error point cloud is a set of pixel points formed by erroneous retention.
[0104] In step S201, Figure 8 , Figure 8It is a curve diagram of the influence of the judgment magnification on the filtering result provided by the present invention. Under different filtering intensities, multiple sample point cloud data of the target animal also have great differences. The sample point cloud data includes the total number of point cloud points before filtering and the total number of point cloud points after filtering. That is, as the filtering intensity increases, the judgment magnification will gradually increase, and then the filtering result will also increase. The filtering result is the ratio of the total number of point cloud points before filtering to the total number of point cloud points after filtering.
[0105] That is, the present invention processes each group of pre-filtered sample point clouds based on different filtering intensities, and then determines the post-filtered sample point clouds under different filtering intensities.
[0106] In step S202, different filtered sample point clouds may have some defects due to the filtering process. For example, during the filtering process, the residual point cloud is a set of pixels formed by erroneous filtering. In such an embodiment, the ratio of the number of residual point cloud pixels in the filtered sample point cloud to the total number of pixels in the filtered sample point cloud is determined, and the ratio of the number of erroneous point cloud pixels in the filtered sample point cloud to the total number of pixels in the filtered sample point cloud is determined, and then the ratio of residual point cloud and erroneous point cloud corresponding to each group of filtered sample point clouds is determined.
[0107] In steps S203 and S204, those skilled in the art will understand that the present invention will sample point cloud data under different filtering intensities. The sampling results show that when the judgment magnification value is smaller, more points will be filtered out, so that the point cloud of non-beef cattle and the point cloud of beef cattle are better separated, solving the problem of point cloud data redundancy.
[0108] like Figure 8 As shown in the figure, as the judgment magnification increases, the filtering intensity gradually increases. When the judgment magnification is 1.2 or higher, there is still a lot of adhesion and noise between the beef cattle and the fence point cloud, which does not meet the requirements of subsequent processing. When the judgment magnification is 0.2, 0.4 or 0.8, environmental interference is significantly filtered out and the point clouds of the beef cattle and the fence are effectively separated. However, when the judgment magnification is 0.2 or 0.4, the sample point cloud data is significantly incomplete, which significantly interferes with the extraction of the sample point cloud data.
[0109] In order to further quantify the impact of the judgment magnification on the filtering effect, this paper experiments on multiple sets of different sample point cloud data to obtain the filtering effect under different judgment magnifications. The filtering effect is evaluated by the remaining point cloud ratio K, which is defined as:
[0110]
[0111] In formula (1), Nr is the total number of point cloud points before filtering, and Na is the total number of point cloud points after filtering. As the judgment magnification changes, the distribution of the remaining point cloud ratio K is as follows: Figure 8 As shown. When the judgment magnification is reduced to 1.2, the slope of the K value begins to decrease significantly. In order to study the effect of the judgment magnification on the final extraction results, we selected the judgment magnification of 0.2, 0.4, 0.6, 0.8, 1.0, and 1.2, and repeated the entire beef cattle point cloud extraction process. The results are shown in the following table:
[0112] Judgment magnification Number of residual clouds The proportion of residual and missing clouds Number of error point clouds The proportion of error point clouds 1.2 2 1.80% 9 8.10% 1 3 2.70% 7 6.31% 0.8 3 2.70% 6 5.41% 0.6 7 6.31% 5 4.50% 0.4 16 14.41% 2 1.80% 0.2 39 35.14% 0 0
[0113] As shown in the above table, as the judgment magnification decreases, the number of erroneous extractions is significantly reduced. However, because the intensity of the filtering is excessively enhanced, the number of residual point clouds obtained by the final processing increases significantly. Therefore, in a preferred embodiment shown in the present invention, the target judgment magnification can be determined based on the weighted average of the proportion of residual point clouds and the proportion of erroneous point clouds in each group, that is, the judgment magnification corresponding to the minimum value of the weighted average is used as the target judgment magnification. Preferably, as shown in the above table, the selection of the judgment magnification should still be maintained at around 0.8.
[0114] In a preferred variation, when the integrity of the target point cloud extraction is not required to be high, such as focusing only on the body parts of the beef cattle and ignoring the head, the judgment magnification can be appropriately lowered to reduce errors in the beef cattle point cloud extraction.
[0115] Figure 3 : is a schematic diagram of a process for screening out first point cloud data provided by the present invention, wherein the first point cloud data is screened out from the original point cloud data based on the effective pixel point discrimination interval, including:
[0116] Traverse each pixel in all original point cloud data, obtain the average distance from each pixel to all points in the neighborhood, and calculate the average neighborhood distance of all points;
[0117] Determine the standard deviation of all neighborhood distances;
[0118] Determine a valid pixel point discrimination interval based on the average value, the standard deviation, and the judgment magnification, wherein the valid pixel point discrimination interval includes an upper limit of a judgment threshold and a lower limit of a judgment threshold;
[0119] When the average distance from any pixel point to all points in the neighborhood is greater than the upper limit of the judgment threshold or less than the lower limit of the judgment threshold, the pixel point is removed to obtain the first point cloud data.
[0120] In step S1011, in order to eliminate the influence of noise, filtering is performed based on the Gaussian distribution characteristics by statistical distribution. In a preferred embodiment, the pixel coordinates of the target animal in the original point cloud data are: Gi(x i ,y i ,z i), and the coordinates of any point in its neighborhood are: Fn(x n ,y n ,z n ), then the average distance from any pixel to all points in the neighborhood is:
[0121]
[0122] The neighborhood is preferably the 50 nearest points around the pixel point, and the average distance from the point to all points in the neighborhood is:
[0123]
[0124] Based on formula (3), we traverse each pixel in all the original point cloud data and obtain the average distance from each pixel to all points in the neighborhood to calculate the average neighborhood distance of all points:
[0125]
[0126] Among them, M is the average distance of all neighborhoods, d i is the distance to the neighborhood corresponding to any pixel point.
[0127] In step S1012, based on formula (5), the standard deviation of all neighborhood distances determined based on the average value can be determined by the following formula:
[0128]
[0129] Among them, Q is the standard deviation of all neighborhood distances, M is the average of all neighborhood distances, and d i is the distance to the neighborhood corresponding to any pixel point.
[0130] In step S1013, the effective pixel point determination interval includes an upper limit of a determination threshold and a lower limit of a determination threshold. The upper limit of the determination threshold is determined based on the following formula:
[0131] H=M+Q·R (6)
[0132] The lower limit of the judgment threshold is determined based on the following formula:
[0133] L=MQ·R (7)
[0134] In formula (6) and formula (7), M is the average value of all neighborhood distances, Q is the standard deviation of all neighborhood distances, and R is the judgment magnification.
[0135] In step S1014, when the average distance from any pixel point to all points in the neighborhood is greater than the upper limit of the judgment threshold or less than the lower limit of the judgment threshold, the any pixel point is eliminated to obtain the first point cloud data. When the mean distance value of any pixel point is between the upper limit of the judgment threshold and the lower limit of the judgment threshold, the any pixel point is retained; otherwise, it is regarded as an outlier and filtered out. In a preferred embodiment, the judgment magnification in formula (6) and formula (7) of the present invention can be set to 0.8.
[0136] Figure 4 : is a schematic diagram of a process for obtaining second point cloud data provided by the present invention, wherein the process of removing interference point clouds from the first point cloud data based on the feature perception area to obtain the second point cloud data includes:
[0137] Determine all feature perception areas, each of the feature perception areas being a fixed area determined with each pixel in the first point cloud data as a centroid;
[0138] Obtain the number of all pixels in each feature perception area to determine all pixels to be eliminated using a discrimination threshold;
[0139] Eliminate all pixels to be eliminated from the first point cloud to obtain the second point cloud data;
[0140] The pixels to be eliminated are pixels corresponding to the feature perception area in which the number of all pixels is less than the discrimination threshold.
[0141] By adaptively selecting the target judgment magnification factor, most interference can be separated from the target animal's point cloud, allowing Euclidean distance clustering to extract interference point clouds far from the cattle, marking them for deletion. However, the method in step S101 cannot effectively filter out interference objects that are in close proximity to the cattle. In the collected cattle point cloud, the main source of interference points that cannot be filtered out due to close contact with the cattle's body is some passage railings.
[0142] In step S1021, the length direction of the feature perception area has the property of being perpendicular to the length direction of the interference object. Since the image processed by the present invention is a three-dimensional image, when the feature perception area needs to eliminate the interference of the interference object, the orientation of the feature perception area needs to be set, and the pixel point has the property of the centroid of the feature perception area. That is, when judging whether a certain pixel point is a pixel point to be eliminated, it is necessary to make a comprehensive judgment based on the number of noise points in the feature perception area corresponding to the pixel point as the centroid. Therefore, in this step S1021, in addition to judging all the feature perception areas corresponding to each pixel point, it is also necessary to determine the distribution orientation of these feature perception areas.
[0143] In step S1022, all pixels in the first point cloud data are traversed. When the number of pixels in the feature perception area of a certain pixel is not higher than the discrimination threshold, the pixel is filtered out as a noise point; otherwise, the pixel is retained.
[0144] Then, in step S1023, all pixels to be removed are removed from the first point cloud to obtain the second point cloud data. Based on the above steps S1021 to S1023, the noise interference in the beef cattle point cloud is effectively filtered out, and the beef cattle point cloud without noise will not be affected by the filtering. While effectively filtering out the interference, the present invention has little impact on the beef cattle point cloud itself, so as to filter out the noise caused by the part of the channel railing that the beef cattle's body is tightly attached, so that the accuracy and restoration of the point cloud data extracted by the present invention are improved.
[0145] Figure 5 : is a flow chart of determining a discrimination threshold provided by the present invention, wherein obtaining the number of all pixels in each feature perception area to determine all pixels to be eliminated using the discrimination threshold includes:
[0146] Obtain a sample point cloud of the target animal to determine all distractor pixels and all target animal pixels;
[0147] Determine all interference perception areas to obtain the number of interference pixels in each interference perception area, each of the interference perception areas being a fixed area determined with the interference pixel as the centroid;
[0148] Determine all target animal perception areas to obtain the number of target animal pixels within each target animal perception area, wherein each target animal perception area is a fixed area determined with the target animal pixel as the centroid;
[0149] A discrimination threshold is determined based on the number of pixels of the interference object and the number of pixels of the target animal.
[0150] In the beef cattle point cloud containing interference pixel points in the present invention, a feature perception area is constructed with each point as the centroid in turn. Those skilled in the art will understand that the number of effective pixel points in the feature perception area corresponding to the interference pixel point is less than the number of effective pixel points in the feature perception area corresponding to the target animal pixel point.
[0151] In step S10221, in order to determine the relationship between the interference pixel points and the target animal pixel points, in a preferred embodiment, the present invention extracts 14,688 pixels belonging to the beef cattle point cloud and 1,955 pixels belonging to the interference noise points based on the point cloud data containing the interference pixel points.
[0152] In step S10222, the number of first pixels in the interferer perception area is determined based on the interferer pixels. In such an embodiment, all interferer pixels are traversed, and the number of first pixels in the interferer perception area corresponding to each interferer pixel is determined.
[0153] In step S10223, the number of second pixel points in the target animal perception area is determined based on the target animal pixel point. In such an embodiment, all target animal pixel points are traversed, and the number of second pixel points in the target animal perception area corresponding to each target animal pixel point is determined.
[0154] In step S10224, Figure 9 The curve diagram of the noise and non-noise recognition rate statistics provided by the present invention is a schematic diagram. The noise is the interference object, and the non-noise is the target animal. It shows the change in recognition accuracy. The number of first pixels in the noise perception area of the noise pixel is concentrated between 1 and 20, while the number of second pixels in the non-noise (cow body) perception area is mainly distributed between 30 and 110. Based on this rule, when the distinction threshold is selected as 21, the noise and non-noise can be effectively distinguished. At this time, the distribution of non-noise and noise can be combined with the following table:
[0155]
[0156] Figure 6 This is a third flow chart of a point cloud data extraction method provided by the present invention, which further includes:
[0157] Collect three-dimensional point cloud data of the target animal from a bird's-eye view;
[0158] Collect left-view 3D point cloud data of the target animal;
[0159] Collect the right-view 3D point cloud data of the target animal;
[0160] Original point cloud data is determined based on the top-view 3D point cloud data, the left-view 3D point cloud data, and the right-view 3D point cloud data.
[0161] In step S301, step S302 and step S303, the present invention is based on the initial data collected by the device as a depth image in RGBD format. In order to convert the depth image into three-dimensional point cloud data, the focal length parameters f1 and f2 inside the depth camera are first read, and all the pixels P in the depth image are read, which are recorded as
[0162] P(a,b,D) (8)
[0163] In formula (8), a is the horizontal coordinate of pixel point P; b is the vertical coordinate of pixel point P; D is the depth value of pixel point P. The three coordinate axes of the three-dimensional point cloud are named X, Y and Z, and all points in the depth image are calculated using formula (9):
[0164]
[0165] In formula (9), a is the horizontal coordinate of pixel point P; b is the vertical coordinate of pixel point P; D is the depth value of pixel point P, and f1 and f2 are the internal focal length parameters of the depth camera. The specific coordinates of the point in the 3D point cloud coordinates are obtained. The point cloud coordinates correspond to the real distance and the unit is mm. The point set [x, y, z] obtained by processing formula (9) constitutes the collected point cloud data. The acquisition device will collect point cloud data from three perspectives: top view, left view, and right view.
[0166] In step S304, in order to fuse the overhead 3D point cloud data, the left-view 3D point cloud data, and the right-view 3D point cloud data, the point clouds can be rotated and translated. Specifically, based on the coordinate system of the overhead point cloud, the left and right point clouds are transformed through a matrix. The angle of rotation and the translation distance of the point cloud are determined by the positional relationship between the left and right acquisition devices. After the left-view 3D point cloud data and the right-view 3D point cloud data are converted through the rotation matrix T, they are merged with the overhead 3D point cloud data.
[0167] Specifically, the point cloud data collected by the acquisition device from three perspectives has different 3D coordinate systems. To fuse the point clouds, the point clouds are rotated and translated. Based on the coordinate system of the top-down point cloud, the left and right point clouds are transformed using a matrix.
[0168] The left-view 3D point cloud data and the right-view 3D point cloud data are converted by the rotation matrix and then merged with the top-view 3D point cloud data to form the original point cloud data.
[0169] The present invention can instantly realize the collection of beef cattle point clouds and effectively reconstruct beef cattle in three dimensions, which is of great significance for the measurement of beef cattle phenotypic data. The present invention effectively collects three-dimensional data of beef cattle, fundamentally solves the problem of distortion in the image, and simplifies the operation of distance calibration, providing higher-dimensional data for non-contact body measurement of beef cattle with higher restoration.
[0170] Figure 7 This is a fourth flow chart of a point cloud data extraction method provided by the present invention, which further includes:
[0171] Processing the first point cloud data based on a random sampling consensus algorithm to obtain pixel points of a ground plane point cloud;
[0172] Pixels of the ground plane point cloud are removed to obtain second point cloud data.
[0173] In step S401, the filtered and downsampled point cloud includes both the beef cattle point cloud and objects such as the ground point cloud and the railing point cloud. This embodiment aims to eliminate interference from the ground plane. The random sample consensus (RANSAC) algorithm can effectively fit and identify different geometric shapes, and this algorithm is used to identify the ground plane point cloud. After examining the geometric relationships between all points, several planes that meet the morphological requirements are obtained, thereby obtaining all points belonging to the ground plane. Three points are randomly selected from the beef cattle point cloud as a tuple G. A plane P is determined from the tuple G. All points in the point cloud with a distance to plane P less than 20 are added to plane P. If the Z coordinate span of the plane point cloud exceeds 600, three points are randomly selected again as a tuple G. The ground point cloud extraction ends when the number of iterations reaches N or the number of points reaches 2000. Otherwise, the above steps are repeated.
[0174] The method for determining the number of iterations N of the algorithm process is shown in formula (10):
[0175]
[0176] P=1-(1-L k ) N (11)
[0177] In formula (10), L is the average proportion of points on the ground of the cowshed in all points, and its preferred value is 0.25; k is the number of points in the point cloud that need to be identified as planes.
[0178] In step S402, based on the maximum plane Pmax determined in step S401 as the ground point cloud, the ground point cloud is identified and filtered out to obtain second point cloud data.
[0179] Those skilled in the art will understand that after the interference of the ground plane is filtered out, there are still other environmental point cloud interferences, such as side railings, etc. Because there are certain density differences and distance differences between the interference part and the point cloud, the present invention can also use a density-based clustering algorithm (DBSCAN, Density-Based Spatial Clustering of Applications with Noise) for noise filtering. Specifically, a three-dimensional high-dimensional index tree data structure (k-dimensional) is constructed for all points in the point cloud to divide the point cloud into several point cloud clusters for clustering. During the point cloud clustering process, the clustering domain distance coefficient is set to 67, and the lower limit of the number of cluster points is set to 40. After the extraction is completed, the point cloud cluster with the largest number of points is retained, which is the final target point cloud.
[0180] Regarding the impact of sunlight and dust pile point cloud data extraction, the farm had large collection gaps (missing rate exceeded 70%) during the actual original point cloud collection, which could not be processed and were marked as invalid point clouds for discarding. These invalid point clouds were caused by strong sunlight and high concentrations of dust. Due to the limitations of equipment hardware conditions, in scenes with strong sunlight and dense dust, the diameter of the railings in the beef cattle channel can be reduced. In order to ensure the applicability of the channel, the number of railings can be increased, the thickness of soil accumulation in the beef cattle channel can be reduced, and measures such as regular watering in dust-dense areas can significantly reduce the occurrence of collection failures and improve collection accuracy. In addition, installing a sunshade when the sun is directly shining can also ensure the integrity of the beef cattle point cloud collection.
[0181] Figure 10 : is a structural diagram of a point cloud data extraction device provided by the present invention. The point cloud data extraction device of the present invention adopts the point cloud data extraction method described above, comprising:
[0182] Acquisition device 1: based on the effective pixel point discrimination interval, screens out the first point cloud data from the original point cloud data;
[0183] Processing device 2: based on the characteristic sensing area, removes the interference point cloud from the first point cloud data to obtain second point cloud data;
[0184] Extraction device 3: extracts the second point cloud data to obtain point cloud data of the target animal.
[0185] The working principle of the acquisition device 1 can refer to the aforementioned step S101, the working principle of the processing device 2 can refer to the aforementioned step S102, and the working principle of the extraction device 3 can refer to the aforementioned step S103, which will not be repeated here.
[0186] The present invention discloses a point cloud data extraction method. Based on the effective pixel point discrimination interval, first point cloud data is screened from the original point cloud data; based on the characteristic perception area, the interference point cloud is eliminated from the first point cloud data to obtain second point cloud data; and the second point cloud data is extracted to obtain point cloud data of the target animal. The present invention can determine the judgment magnification that is suitable for the current environment in combination with the actual breeding environment, thereby achieving more accurate point cloud data extraction. The present invention uses the characteristic perception area to eliminate the interference of interference objects on the point cloud data extraction, so that the extracted data has high accuracy and strong reproducibility. It can be applied to various complex breeding environments and provides important methodological support for the non-contact measurement of core phenotypic parameters such as height, width, oblique length, chest circumference, abdominal circumference, and weight of beef cattle.
[0187] Figure 11 : is a structural diagram of a point cloud data extraction system provided by the present invention, comprising:
[0188] A first bracket and a second bracket are respectively provided on both sides of the target animal passage 5;
[0189] a third bracket fixedly mounted on top of the first bracket and the second bracket;
[0190] A first depth camera 21 fixed to the side of the first bracket is used to obtain left-view three-dimensional point cloud data of the target animal;
[0191] A second depth camera 22 fixed to the side of the second bracket is used to obtain right-view three-dimensional point cloud data of the target animal;
[0192] A third depth camera 23 fixed to the side of the third bracket is used to obtain top-down three-dimensional point cloud data of the target animal;
[0193] A radio frequency identification trigger 1 fixed to the side of the third bracket is used to identify the radio frequency tag of the target animal;
[0194] A beam grating sensor 6 fixedly mounted on the first bracket side and / or the second bracket side, for identifying and triggering the acquisition operation of the target animal;
[0195] An industrial computer 3 fixedly mounted on the first bracket side and / or the second bracket side and / or the third bracket side is used to control the first depth camera, the second depth camera and the third depth camera to simultaneously capture the target animal when the radio frequency identification trigger and the beam grating sensor are triggered;
[0196] a first railing disposed on the first bracket near the target animal passage;
[0197] a second railing disposed on the second bracket near the target animal passage;
[0198] The guide channel formed by the first railing and the second railing forces the target animal to pass through the radio frequency identification trigger and the beam grating sensor.
[0199] The present invention also discloses a point cloud data extraction system consisting of a depth camera, a beamforming grating trigger, and a radio frequency identification trigger. The system boasts a 91.89% acquisition success rate, with the acquired point cloud coordinate system corresponding to the true distance and a body size reconstruction error of 0.6% compared to the true value. Furthermore, to enable non-contact, instantaneous, and automated acquisition of beef cattle point clouds, the present invention provides a beef cattle point cloud acquisition system. This system can be installed in a conventional cattle passageway, automatically triggering and acquiring multi-angle 3D data as the cattle pass through.
[0200] The point cloud data extraction system primarily consists of a depth camera, an RFID trigger, a beamforming grating sensor, an industrial computer, a cattle channel, and a support base (4), forming a gantry-like design. Three depth cameras are deployed, one at the top crossbar, the left support, and the midpoint of the right support. The top depth camera is located at the center of the top crossbar. The depth camera is used to collect raw depth image data, while the reader and beamforming grating sensor identify the passage of cattle and trigger synchronous acquisition signals. The industrial computer is responsible for communication, control, and data processing between all devices.
[0201] In order to complete multi-angle 3D data collection of beef cattle in their natural state and reduce the possibility of stress reactions in beef cattle during the collection process, after testing and experiments in the beef cattle breeding farm, the key parameters of the equipment were determined as shown in the following table:
[0202] Parameter Category Parameter content Parameter Category Parameter content Height of brackets on both sides 2300mm RFID trigger sensing distance 1900mm Measuring the span of the support 2290mm Number of incident grating spots 4 Depth camera viewing angle width 120°×120° Optical grating point spacing 10cm Depth camera ranging accuracy 1.7mm Industrial computer memory capacity 8GB Industrial computer processor version I5-7500 Railing width 750cm
[0203] The above parameters ensure that cattle can pass through the device smoothly without turning around or retreating. At the same time, it ensures that the device can be effectively triggered and point cloud data can be collected every time the cattle reach the bottom of the device.
[0204] Since beef cattle pass through at high speeds and with large changes in posture, it is necessary to plan and design the real-time performance of the equipment’s triggering logic and the three depth camera acquisition algorithms.
[0205] This device utilizes a dual-logic sequence trigger structure, driving three depth cameras via synchronous signals. This ensures effective triggering of acquisitions when a cattle passes by, preventing unnecessary multiple acquisitions of the same cattle at the same time. When a cattle passes directly under the device, the grating sensor is triggered. The trigger signal reaches the industrial computer, driving the RFID reader to read the cattle's ear tag ID. When a valid ear tag is read, the device simultaneously sends acquisition commands to the three depth cameras, achieving instantaneous depth image acquisition.
[0206] Optionally, if the same beef cattle stays in the collection area, it will cause unnecessary multiple collections. For this, judgment logic is added to trigger the depth camera collection operation only when the beef cattle numbers are different in two consecutive triggering operations.
[0207] This invention installs an automatic triggering and collection device for beef cattle point clouds on a cattle transfer passage on a farm. It automatically collects data as cattle pass through. Before data collection begins, the cattle are fitted with custom UHF radio frequency identification tags on their right ears. In operation, cattle are driven into the transfer passage, which ensures they can move forward naturally and unrestrained, preventing them from turning around or turning back within the passage.
[0208] The depth image acquisition equipment is installed in the middle of the transfer tunnel, avoiding contact with the cattle and preventing them from interfering with their movement. Cattle are remotely guided into the transfer tunnel, approximately 60 meters from the entrance. During this period, staff do not interfere with the cattle, allowing them to move naturally. When a cattle reaches the bottom of the depth image acquisition equipment, a triggering algorithm automatically captures multi-view depth images.
[0209] Compared with previous studies, the method of the present invention does not require the animal to remain still during the measurement process, point cloud triggering and acquisition do not require manual control, and the equipment acquisition perspective is fixed. A new lightweight processing algorithm is proposed for beef cattle point cloud extraction, making the application of beef cattle three-dimensional point cloud acquisition in actual production possible.
[0210] The present invention discloses a point cloud data extraction system, which realizes instantaneous non-contact acquisition of beef cattle point clouds through a dual triggering structure of infrared grating and radio frequency identification. It can realize automatic acquisition of point clouds in the natural state of beef cattle, and provide reliable basic data for three-dimensional reconstruction of beef cattle.
[0211] The present invention develops a beef cattle point cloud processing algorithm, which can extract and separate beef cattle target point clouds from complex environments, and realize three-dimensional reconstruction and restoration of beef cattle body shapes. During the filtering process, a 200mm*30mm*400mm feature perception area is introduced based on the environmental characteristics of beef cattle farms to filter out interference such as railings. The filtering efficiency is 93.3%, which can filter out noise points while maintaining the integrity of the beef cattle point cloud.
[0212] After testing, the system has a complete success rate of 91.89% in collecting complete data of beef cattle. Taking body height as an example, the body size accuracy error is 0.6%. It can initially replace manual on-site measurement work, realize non-contact measurement of beef cattle phenotypic data, and provide important data support for beef cattle breeding evaluation and refined farm management.
[0213] Figure 12is a schematic diagram of the structure of an electronic device provided by the present invention, which may include: a processor 510, a communications interface 520, a memory 530, and a communications bus 540, wherein the processor 510, the communications interface 520, and the memory 530 communicate with each other via the communications bus 540. The processor 510 may call the logic instructions in the memory 530 to execute a point cloud data extraction method, which includes: filtering out first point cloud data from the original point cloud data based on the effective pixel point discrimination interval; removing interference point clouds from the first point cloud data based on the feature perception area to obtain second point cloud data; and extracting the second point cloud data to obtain point cloud data of the target animal.
[0214] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0215] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute a point cloud data extraction method provided by the above methods, which includes: based on the effective pixel point discrimination interval, filtering out first point cloud data from the original point cloud data; based on the feature perception area, removing the interference point cloud from the first point cloud data to obtain second point cloud data; extracting the second point cloud data to obtain point cloud data of the target animal.
[0216] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the point cloud data extraction method provided by the above methods. The method includes: based on the effective pixel point discrimination interval, filtering out the first point cloud data from the original point cloud data; based on the feature perception area, removing the interference point cloud from the first point cloud data to obtain the second point cloud data; extracting the second point cloud data to obtain the point cloud data of the target animal.
[0217] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0218] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.
[0219] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A point cloud data extraction method, characterized in that: include: Collect three-dimensional point cloud data of the target animal from a bird's-eye view; Collect left-view 3D point cloud data of the target animal; Collect the right-view 3D point cloud data of the target animal; Performing point cloud fusion on the top-view 3D point cloud data, the left-view 3D point cloud data, and the right-view 3D point cloud data to obtain original point cloud data; Filtering first point cloud data from the original point cloud data based on a valid pixel discrimination interval determined by statistical outlier filtering; Based on the characteristic perception area, removing the interference point cloud from the first point cloud data to obtain second point cloud data; extracting the second point cloud data to obtain point cloud data of the target animal; The effective pixel point discrimination interval is determined based on the target judgment magnification, and the target judgment magnification is determined based on the target residual point cloud ratio and the target error point cloud ratio; the target residual point cloud ratio and the target error point cloud ratio are determined based on screening of multiple groups of filtered sample point clouds; The step of removing the interference point cloud from the first point cloud data based on the feature perception area to obtain the second point cloud data includes: Determine all feature perception areas, each of the feature perception areas being a fixed area determined with each pixel in the first point cloud data as a centroid; Obtain the number of all pixels in each feature perception area to determine all pixels to be eliminated using a discrimination threshold; Eliminate all pixels to be eliminated from the first point cloud to obtain the second point cloud data; The pixels to be eliminated are pixels corresponding to the feature perception area in which the number of all pixels is less than the discrimination threshold.
2. The point cloud data extraction method according to claim 1, characterized in that: Before filtering out the first point cloud data from the original point cloud data based on the valid pixel point discrimination interval, the following steps are also included: Processing multiple groups of pre-filtered sample point clouds based on different filter intensities to obtain each group of post-filtered sample point clouds; Based on each set of filtered sample point clouds, the proportion of residual defect point clouds and the proportion of error point clouds corresponding to each set of filtered sample point clouds are obtained; Filter the weighted average of the residual defect cloud ratio and the error point cloud ratio of each group to determine the target residual defect cloud ratio and the target error point cloud ratio; The target judgment magnification is determined based on the number of target sample point clouds corresponding to the target residual point cloud ratio and the target error point cloud ratio; The number of target sample point clouds includes the total number of pixel points in the point cloud before filtering and the total number of pixel points in the point cloud after filtering; During the filtering process, the residual point cloud is a set of pixel points formed by erroneous filtering, and the error point cloud is a set of pixel points formed by erroneous retention.
3. The point cloud data extraction method according to claim 1, characterized in that: The step of filtering out first point cloud data from the original point cloud data based on the valid pixel point discrimination interval includes: Traverse each pixel in all original point cloud data, obtain the average distance from each pixel to all points in the neighborhood, and calculate the average neighborhood distance of all points; Determine the standard deviation of all neighborhood distances; Determine a valid pixel point discrimination interval based on the average value, the standard deviation, and the judgment magnification, wherein the valid pixel point discrimination interval includes an upper limit of a judgment threshold and a lower limit of a judgment threshold; When the average distance from any pixel point to all points in the neighborhood is greater than the upper limit of the judgment threshold or less than the lower limit of the judgment threshold, the pixel point is removed to obtain the first point cloud data.
4. The point cloud data extraction method according to claim 1, characterized in that: The step of obtaining the number of all pixels in each feature perception area to determine all pixels to be eliminated using a discrimination threshold includes: Obtain a sample point cloud of the target animal to determine all distractor pixels and all target animal pixels; Determine all interference perception areas to obtain the number of interference pixels in each interference perception area, each of the interference perception areas being a fixed area determined with the interference pixel as the centroid; Determine all target animal perception areas to obtain the number of target animal pixels within each target animal perception area, wherein each target animal perception area is a fixed area determined with the target animal pixel as the centroid; A discrimination threshold is determined based on the number of pixels of the interference object and the number of pixels of the target animal.
5. The point cloud data extraction method according to claim 1, characterized in that: Before filtering out the first point cloud data from the original point cloud data based on the valid pixel point discrimination interval, the following steps are also included: The original point cloud data is processed based on a straight-through filtering principle and / or an octree principle to obtain first point cloud data.
6. The point cloud data extraction method according to claim 1, characterized in that: Before removing the interference point cloud from the first point cloud data based on the feature perception area to obtain the second point cloud data, the method further includes: Processing the first point cloud data based on a random sampling consensus algorithm to obtain pixel points of a ground plane point cloud; Pixels of the ground plane point cloud are removed to obtain second point cloud data.
7. A point cloud data extraction device, which adopts the point cloud data extraction method according to any one of claims 1 to 6, characterized in that: include: Acquisition device: based on the effective pixel point discrimination interval, screens out the first point cloud data from the original point cloud data; The processing device removes the interference point cloud from the first point cloud data based on the characteristic sensing area to obtain second point cloud data; Extraction device: extracts the second point cloud data to obtain point cloud data of the target animal.
8. A point cloud data extraction system, which adopts the point cloud data extraction method according to any one of claims 1 to 6, characterized in that: include: A first bracket and a second bracket are respectively provided on both sides of the target animal passage; a third bracket fixedly mounted on top of the first bracket and the second bracket; A first depth camera fixedly mounted on the side of the first bracket is used to obtain left-view three-dimensional point cloud data of the target animal; A second depth camera fixed on the side of the second bracket is used to obtain right-view three-dimensional point cloud data of the target animal; A third depth camera fixed to the side of the third bracket is used to obtain top-down three-dimensional point cloud data of the target animal; A radio frequency identification trigger fixed on the side of the third bracket is used to identify the radio frequency tag of the target animal; A beam grating sensor fixedly mounted on the first bracket side and / or the second bracket side is used to identify and trigger the acquisition operation of the target animal; An industrial computer fixedly mounted on the first bracket side and / or the second bracket side and / or the third bracket side, configured to control the first depth camera, the second depth camera and the third depth camera to simultaneously capture the target animal when the radio frequency identification trigger and the beam grating sensor are triggered; a first railing disposed on the first bracket near the target animal passage; a second railing disposed on the second bracket near the target animal passage; The guide channel formed by the first railing and the second railing forces the target animal to pass through the radio frequency identification trigger and the beam grating sensor.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the point cloud data extraction method according to any one of claims 1 to 6 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the point cloud data extraction method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Class-D welding seam information obtaining method and device and computer storage medium
CN113298949A
Animal point cloud multi-view real-time acquisition and 3D reconstruction method, device and system
CN113888612A