CN109447139B - Method and device for identifying scene point cloud of farm containing complete livestock - Google Patents
Method and device for identifying scene point cloud of farm containing complete livestock Download PDFInfo
- Publication number
- CN109447139B CN109447139B CN201811217052.9A CN201811217052A CN109447139B CN 109447139 B CN109447139 B CN 109447139B CN 201811217052 A CN201811217052 A CN 201811217052A CN 109447139 B CN109447139 B CN 109447139B
- Authority
- CN
- China
- Prior art keywords
- point cloud
- scene point
- frame
- identified
- farm
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 244000144972 livestock Species 0.000 title claims abstract description 96
- 238000000034 method Methods 0.000 title claims abstract description 60
- 238000001514 detection method Methods 0.000 claims abstract description 40
- 230000011218 segmentation Effects 0.000 claims description 31
- 238000000638 solvent extraction Methods 0.000 claims description 10
- 238000005070 sampling Methods 0.000 claims description 4
- 244000144977 poultry Species 0.000 abstract description 3
- 238000009395 breeding Methods 0.000 description 7
- 230000001488 breeding effect Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 230000006399 behavior Effects 0.000 description 5
- 241001465754 Metazoa Species 0.000 description 3
- 241000282887 Suidae Species 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000012163 sequencing technique Methods 0.000 description 2
- 241000255969 Pieris brassicae Species 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000013178 mathematical model Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/20—Scenes; Scene-specific elements in augmented reality scenes
Landscapes
- Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Bioinformatics & Computational Biology (AREA)
- General Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Multimedia (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Image Analysis (AREA)
Abstract
The embodiment of the invention provides a method and a device for identifying scene point clouds of a farm comprising complete livestock, wherein the method comprises the following steps: carrying out plane detection on each frame of the to-be-identified farm scene point cloud in the to-be-identified farm scene point cloud sequence, acquiring ground point clouds in each frame of the to-be-identified farm scene point cloud, and deleting the ground point clouds in each frame of the to-be-identified farm scene point cloud; clustering and dividing each frame of to-be-identified farm scene point cloud after the ground point cloud is deleted, and constructing a first enclosure box corresponding to each frame of to-be-identified farm scene point cloud according to the cluster with the largest number in each clustering and dividing result; and if the size of each first enclosure box is within a preset size range, acquiring that each frame of to-be-identified farm scene point cloud corresponding to each first enclosure box contains complete livestock. The embodiment of the invention automatically identifies the scene point cloud of the farm containing complete poultry, and has the advantages of simple method and high identification precision.
Description
Technical Field
The embodiment of the invention belongs to the technical field of agricultural informatization, and particularly relates to a method and a device for identifying scene point clouds of a farm containing complete livestock.
Background
When a laser beam irradiates the surface of an object, the reflected laser beam carries information such as direction, distance and the like. When a laser beam is scanned along a certain track, information of a reflected laser spot is recorded while scanning, and since scanning is fine, a large number of laser spots can be obtained, thereby forming a point cloud. In addition, the point cloud can be obtained in other manners.
In order to perform information perception and behavior detection on livestock, a multi-depth camera is required to acquire point cloud information of a breeding scene. And then, measuring the body size of the livestock and analyzing the behavior of the livestock based on the point cloud information of the breeding scene. However, since the depth camera can acquire a large amount of farm scene point clouds in a short time, some of the farm scene point clouds contain no livestock or contain incomplete livestock. If the subsequent scene understanding, especially the livestock body size measurement and behavior analysis, is performed by using the livestock scene point cloud containing no livestock or incomplete livestock, the effect of the scene understanding will be deviated. Therefore, it is necessary to identify a farm scene point cloud comprising complete livestock from a farm scene point cloud sequence.
At present, according to subjective judgment of people, the plant scene point cloud containing complete livestock is manually identified from a plant scene point cloud sequence, the artificial method is adopted for identification, time and labor are wasted, and careless omission easily occurs.
Disclosure of Invention
In order to overcome the problems of time and labor waste and high error probability of the conventional method for manually identifying the farm scene point cloud containing complete livestock or at least partially solve the problems, the embodiment of the invention provides a method and a device for identifying the farm scene point cloud containing complete livestock.
According to a first aspect of the embodiments of the present invention, there is provided a farm scene point cloud identification method including complete livestock, including:
carrying out plane detection on each frame of plant scene point cloud to be identified in the plant scene point cloud sequence to be identified, acquiring ground point cloud in each frame of plant scene point cloud to be identified, and deleting the ground point cloud in each frame of plant scene point cloud to be identified;
clustering and dividing each frame of to-be-identified farm scene point cloud after the ground point cloud is deleted, and constructing a first enclosure box corresponding to each frame of to-be-identified farm scene point cloud according to the cluster with the largest number of points in each clustering and dividing result;
if the first bounding boxes are within the preset size range, the situation that the frames of the farm scene point cloud to be identified corresponding to the first bounding boxes contain complete livestock is known
According to a second aspect of the embodiments of the present invention, there is provided a farm scene point cloud identification apparatus including complete livestock, including:
the system comprises a detection module, a recognition module and a recognition module, wherein the detection module is used for carrying out plane detection on each frame of to-be-recognized farm scene point cloud in a to-be-recognized farm scene point cloud sequence, acquiring ground point cloud in each frame of to-be-recognized farm scene point cloud, and deleting the ground point cloud in each frame of to-be-recognized farm scene point cloud;
the clustering module is used for clustering and dividing each frame of to-be-identified farm scene point cloud after the ground point cloud is deleted, and constructing a first enclosure box corresponding to each frame of to-be-identified farm scene point cloud according to the cluster with the largest number in each clustering and dividing result;
and the identification module is used for obtaining that each frame of to-be-identified farm scene point cloud corresponding to each first bounding box contains complete livestock when each first bounding box is within a preset size range.
According to a third aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein:
the memory stores program instructions executable by the processor to invoke the method for identifying farm scene point clouds including whole livestock provided by any one of the various possible implementations of the first aspect.
According to a fourth aspect of the embodiments of the present invention, there is also provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the method for identifying a farm scene point cloud including complete livestock provided in any one of the various possible implementations of the first aspect.
The embodiment of the invention provides a method and a device for identifying a farm scene point cloud containing complete livestock.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic overall flow chart of a method for identifying a farm scene point cloud including complete livestock according to an embodiment of the present invention;
fig. 2 is a schematic view of a frame of farm scene point cloud in the farm scene point cloud identification method including complete livestock according to the embodiment of the present invention;
fig. 3 is a schematic diagram of a frame of farm scene point cloud after ground point cloud is deleted in the farm scene point cloud identification method including complete livestock according to the embodiment of the present invention;
fig. 4 is a schematic diagram of maximum clustering in a frame of plant scene point clouds to be identified after ground point clouds are deleted in the plant scene point cloud identification method including complete livestock according to the embodiment of the invention;
fig. 5 is a schematic diagram of a bounding box of the maximum cluster in a frame of plant scene point cloud to be identified after ground point cloud is deleted in the plant scene point cloud identification method including complete livestock according to the embodiment of the present invention;
FIG. 6 is a schematic diagram illustrating an overall structure of a plant scene point cloud identification apparatus including complete livestock according to an embodiment of the present invention;
fig. 7 is a schematic view of an overall structure of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In an embodiment of the present invention, a method for identifying a farm scene point cloud including complete livestock is provided, and fig. 1 is a schematic flowchart of an overall method for identifying a farm scene point cloud including complete livestock according to an embodiment of the present invention, where the method includes: s101, carrying out plane detection on each frame of to-be-identified farm scene point cloud in a to-be-identified farm scene point cloud sequence, acquiring ground point cloud in each frame of to-be-identified farm scene point cloud, and deleting the ground point cloud in each frame of to-be-identified farm scene point cloud;
the point cloud sequence of the farm scene to be identified is a three-dimensional point cloud, and the point cloud sequence of the farm scene of the complete livestock needs to be identified comprises a plurality of frames of farm scene point clouds marked as Pall={piI ═ 0,1, …, N }, where P isallFor a sequence of point clouds of a farm scene to be identified, PiAnd N is the total frame number contained in the to-be-identified farm scene point cloud sequence. The scene point cloud of each frame of the farm to be identified may contain a complete familyThe livestock, which may include incomplete livestock, may not include livestock. And taking each frame of farm scene point cloud contained in the farm scene point cloud sequence to be identified as the farm scene point cloud to be identified. The to-be-identified farm scene point cloud sequence can be obtained and registered by a double-depth camera. Each frame of the farm scene point cloud to be identified comprises the ground and farm facilities. When a plurality of livestock are contained in each frame of the scene point cloud of the farm to be identified, occlusion may occur. Preferably, each frame of farm scene to be identified contains at most one livestock, as shown in fig. 2. Fig. 2 is a schematic view of a frame of farm scene point cloud in the farm scene point cloud identification method including complete livestock according to the embodiment of the present invention. Wherein, the black part in fig. 2 is the farm scene point cloud in the frame. The livestock in fig. 2 are pigs, and the present embodiment is not limited to the types of livestock. And carrying out plane detection on each frame of the plant scene point cloud to be identified in the plant scene point cloud sequence to be identified. The plane detection means that a plane in each frame of farm scene point cloud is detected, and the point cloud in the detected plane is used as ground point cloud. The present embodiment is not limited to the method of plane detection. And deleting the ground point clouds in the scene point clouds of the farm to be identified in each frame, as shown in fig. 3.
S102, performing cluster segmentation on each frame of farm scene point cloud to be identified after the ground point cloud is deleted, and constructing a first enclosure box corresponding to each frame of farm scene point cloud to be identified according to the cluster with the largest number of points in each cluster segmentation result;
the clustering segmentation refers to classifying adjacent point clouds in each frame of to-be-identified farm scene point cloud after the ground point cloud is deleted into a class, and the embodiment is not limited to the clustering segmentation method. And after the ground point clouds are deleted, clustering and dividing the frames of the to-be-identified farm scene point clouds to obtain a plurality of clustering and dividing results. For the cluster segmentation result of any frame, the clusters in the cluster segmentation result are sorted according to the number of the included points, and the cluster with the most number of points is found, as shown in fig. 4. And then, solving the bounding box of the cluster, and constructing a first bounding box according to the maximum cluster in each frame of to-be-identified farm scene point cloud after the ground point cloud is deleted, as shown in fig. 5. The first bounding box is constructed according to the maximum clustering in each frame of to-be-identified farm scene point cloud after the ground point cloud is deleted. Here, the maximum cluster is a cluster including the largest number of points.
S103, if the size of each first enclosure box is within a preset size range, it is known that each frame of farm scene point cloud to be identified contains complete livestock, and it is known that each frame of farm scene point cloud to be identified corresponding to each first enclosure box contains complete livestock.
Wherein the preset size range is a preset size range. And each frame of the farm scene point cloud to be identified corresponds to a first enclosure box, and the first enclosure box corresponding to each frame of the farm scene point cloud to be identified is compared with a preset size range, so that whether the first enclosure box corresponding to each frame of the farm scene point cloud to be identified is in the preset size range or not is judged. And if the first bounding box corresponding to each frame of the plant scene point cloud to be identified is within the preset size range, knowing that each frame of the plant scene point cloud to be identified contains complete livestock, and identifying each frame of the plant scene point cloud to be identified containing complete livestock from the plant scene point cloud sequence to be identified. The identified scene point clouds of the livestock to be identified, which contain the complete livestock, can be used for acquiring body size information and analyzing behaviors of subsequent livestock. And if the first bounding box corresponding to each frame of the farm scene point cloud to be identified is not in the preset size range, the incomplete livestock contained in each frame of the farm scene point cloud to be identified is known, and subsequent processing is not carried out.
The embodiment performs plane detection on each frame of to-be-identified farm scene point cloud in the to-be-identified farm scene point cloud sequence to obtain the ground in each frame of to-be-identified farm scene point cloud, deletes the ground point cloud in each frame of to-be-identified farm scene point cloud, performs clustering segmentation, constructs a bounding box according to the cluster with the largest number of points in each frame of clustering result, and if the bounding box size of each frame of to-be-identified farm scene point cloud is within a preset size range, learns that each frame of to-be-identified farm scene point cloud contains complete livestock, so that the farm scene point cloud containing complete poultry is automatically identified.
On the basis of the foregoing embodiment, in this embodiment, if the size of each first bounding box is within the preset size range, before the step of knowing that each frame of farm scene point cloud to be identified corresponding to each first bounding box includes complete livestock, the method further includes: carrying out plane detection on a pre-acquired plant scene point cloud sequence sample, acquiring ground point clouds in each frame of plant scene point cloud sample of the plant scene point cloud sequence sample, and deleting the ground point clouds in each frame of plant scene point cloud sample; wherein each frame of farm scene point cloud sample comprises complete livestock; clustering and dividing each frame of farm scene point cloud sample after the ground point cloud is deleted, and constructing a second enclosure box according to the clustering and dividing result of each frame of farm scene point cloud sample after the ground point cloud is deleted, wherein the clustering and dividing result contains the largest number of clusters; and acquiring the average size of all the second enclosure boxes, and determining a preset size range according to the average size.
Specifically, in order to obtain a more accurate preset size range, the embodiment selects N frames of farm scene point cloud samples including complete livestock, which may be manually selected. For example, N1500. The types and the ages of the livestock contained in the N frames of the livestock scene point cloud samples are consistent with the types and the ages of the livestock contained in the to-be-identified livestock scene point cloud sequence. For example, the livestock varieties in the N frames of the plant scene point cloud samples and the plant scene point cloud sequence to be identified are large white pigs, and the day ages of the pigs are more than 180 days. Carrying out plane detection on a plurality of frames of pre-acquired plant scene point cloud samples to acquire ground point cloud p in each frame of plant scene point cloud sampleplaneAnd deleting the ground point clouds in the scene point cloud samples of the cultivation farms of each frame. And performing clustering segmentation on the scene point cloud samples of each frame of the farm after the ground point cloud is deleted. In this embodiment, the method for performing plane detection on each frame of farm scene point cloud sample is the same as the method for performing plane detection on each frame of farm scene point cloud to be identified, and the method for performing plane detection on each frame of farm scene point cloud sample after deleting ground point cloud is the same as the method for performing cluster segmentation on each frame of farm scene point cloud to be identified after deleting ground point cloud. For deletionAnd sequencing the clustering segmentation results of the scene point cloud samples of the farms after the ground point cloud is deleted, and acquiring the clusters with the most points in the scene point cloud samples of the farms after the ground point cloud is deleted. And then, constructing a second enclosure box according to the cluster with the maximum point number in the cluster segmentation result of each frame of farm scene point cloud sample after the ground point cloud is deleted. The second bounding box is a bounding box constructed by clustering with the largest number of points in the clustering segmentation result of each frame of farm scene point cloud samples after the ground point cloud is deleted. The method of constructing the second bounding box in this embodiment is the same as that of the first bounding box. Taking the length, width and height of each second bounding box as a dimension characteristic vector V ═ l, w, h of each second bounding box]TAnd l is the length of each second surrounding box, w is the width of each second surrounding box, and h is the height of each second surrounding box. Obtaining the average size of the second bounding box, i.e. the average V of the N size eigenvectorsm=[lm,wm,hm]TWherein l ismIs the average of the lengths of all the second bounding boxes, wmIs the average of the widths of all the second bounding boxes, hmIs the average of the heights of all the second bounding boxes. The preset size range is determined according to the average size of all the second enclosure boxes, i.e., the average size of the whole livestock, and the present embodiment is not limited to the method of determining the preset size range according to the average size of the whole livestock.
The embodiment deletes ground point clouds to plant scene point cloud sample, the operation of clustering segmentation and constructing bounding box is the same with plant scene point cloud to be identified, and plant scene point cloud sample is the same with the age of day of the kind of domestic animal in the plant scene point cloud to be identified, thereby obtain the average size of complete domestic animal in each frame of plant scene point cloud to be identified, confirm the preset size scope according to the average size of complete domestic animal, thereby make the preset size scope of acquireing more accurate, the recognition result that acquires according to the preset size scope is also more accurate.
On the basis of the above embodiment, the preset size range is determined according to the average size in the present embodiment by the following formula:
Vm=[lm,wm,hm]T;
Vm1=[(1-α)*lm,(1-α)*wm,(1-α)*hm]T;
Vm2=[(1+α)*lm,(1+α)*wm,(1+α)*hm]T;
wherein, VmIs the average size, /)mIs the average length of all second bounding boxes, wmIs the average width of all second bounding boxes, hmIs the average height, V, of all second bounding boxesm1At the lower size limit of the predetermined size range, Vm2Is the upper limit of the size of the preset size range, (1-alpha) lmAt the lower end of the length of the predetermined size range, (1-alpha) × wmAt the lower limit of the width of the predetermined size range, (1-alpha) × hmAt the lower height of the predetermined size range, (1+ alpha) × lmAt the upper length limit of the preset size range, (1+ alpha) × wmIs the upper width limit of the preset size range, (1+ alpha) × hmAnd alpha is an adjusting parameter, which is the upper limit of the height of the preset size range.
Wherein the average size V according to all the second bounding boxesmCalculating the upper size limit V of the preset size rangem2And lower size limit Vm1. The predetermined size range includes a predetermined length range, a predetermined width range and a predetermined height range, the predetermined length range is ((1-alpha). multidot.l)m,(1+α)*lm) The predetermined width range is ((1-alpha) × w)m,(1+α)*wm) The predetermined height range is ((1-alpha) × hm,(1+α)*hm). Alpha is an adjusting parameter, for example, alpha is 0.1.
On the basis of the foregoing embodiment, in this embodiment, if the size of each first bounding box is within the preset size range, the step of knowing that each frame of farm scene point cloud to be identified corresponding to each first bounding box includes complete livestock specifically includes: if the length of each first enclosure box is located between the lower length limit and the upper length limit, the width of each first enclosure box is located between the lower width limit and the upper width limit, and the height of each first enclosure box is located between the lower height limit and the upper height limit, it is known that each frame of to-be-identified farm scene point cloud corresponding to each first enclosure box contains complete livestock.
Specifically, it is determined whether the size of each first bounding box is within a preset size range, that is, whether the size V of each first bounding box satisfies the condition Vm1<V<Vm2。Vm1<V<Vm2The length range ((1-alpha) l) of the length of each first enclosing box in the preset size rangem,(1+α)*lm) And each first enclosure box has a width in a width range ((1-alpha) × w) of preset size rangem,(1+α)*wm) And each first enclosure has a height within a predetermined range of dimensions ((1- α) × h)m,(1+α)*hm) And (4) the following steps. And if the first enclosure boxes are within the preset size range, the situation that the to-be-identified farm scene point cloud frame corresponding to each first enclosure box contains complete livestock is obtained.
On the basis of the foregoing embodiments, in this embodiment, the step of performing plane detection on each frame of the plant scene point cloud to be identified in the plant scene point cloud sequence to be identified specifically includes: and carrying out plane detection on each frame of the plant scene point cloud to be identified in the plant scene point cloud sequence to be identified based on a random sampling consistency method.
The Random Sample Consensus (RANSAC) method is a robust model fitting method, and can estimate parameters of a mathematical model in an iterative manner from a set of observation data sets including outliers. It is an uncertain algorithm, and can obtain reasonable result according to a certain probability. In the embodiment, a random sampling consistency method is used for plane detection, so that the ground in each frame of the scene point cloud of the farm to be identified is detected.
On the basis of the foregoing embodiments, the step of performing cluster segmentation on each frame of to-be-identified farm scene point cloud after deleting the ground point cloud in this embodiment specifically includes: and performing clustering segmentation on the scene point clouds of the farms to be identified after the ground point clouds are deleted by using a Euclidean distance-based clustering segmentation method.
Specifically, each frame after deleting ground point cloudAnd (4) performing KD Tree (K-Dimension Tree) structure division on the to-be-identified farm scene point cloud L. And setting an empty clustering array E and a point cloud queue Q. For each point L in LiE.g. L, connect point LiAnd adding the current point cloud queue Q. For any point l in QiE.g. Q, at search radius distance r<dthUnder the constraint of (b), wherein dthSearch for l using the data structure of the KD tree for the purpose of presetting the thresholdiNeighbor set of (L)ik,dthSet to 2. Wherein the distance is measured by Euclidean distance, and the distance is measured for any two points a (x) in three-dimensional space1,y1,z1) And b (x)2,y2,z2) Inter-euclidean distance d12The definition is as follows:
for each neighboring point lik∈LikCheck if this point has already been added to the point cloud queue Q, and if not, add to the queue Q. When any point l in the queue QiAfter all neighbors of (a) are added to Q, Q is added to the clustering array E, and Q is then emptied. When all points l are addressediAnd E, after traversing the L, ending the segmentation algorithm. Finish clustering segmentation on L, each LiAnd the corresponding cluster segmentation results are sequentially stored in the cluster array E. And taking the points in the same cluster array as a cluster.
On the basis of the above embodiments, the first bounding box and the second bounding box in the present embodiment are directional bounding boxes.
Specifically, the first Bounding Box and the second Bounding Box are directional Bounding boxes (OBBs), and local coordinate system axes used by the first Bounding Box and the second Bounding Box are corrected by using the ground normal vector information.
In another embodiment of the present invention, a farm scene point cloud identification device comprising complete livestock is provided, which is used for implementing the method in the foregoing embodiments. Therefore, the description and definition in the foregoing embodiments of the farm scene point cloud identification method including complete livestock may be used for understanding of each execution module in the embodiments of the present invention. Fig. 6 is a schematic diagram of an overall structure of a plant scene point cloud identification apparatus including complete livestock according to an embodiment of the present invention, the apparatus includes a detection module 601, a clustering module 602, and an identification module 603; wherein:
the detection module 601 is used for performing plane detection on each frame of to-be-identified plant scene point cloud in the to-be-identified plant scene point cloud sequence, acquiring ground point cloud in each frame of to-be-identified plant scene point cloud, and deleting the ground point cloud in each frame of to-be-identified plant scene point cloud;
the system comprises a to-be-identified breeding farm scene point cloud sequence, a to-be-identified breeding farm scene point cloud sequence and a recognition module, wherein the to-be-identified breeding farm scene point cloud sequence is a three-dimensional point cloud, is a point cloud sequence of a breeding farm scene and comprises multiple frames of breeding farm scene point clouds. Each frame of farm scene point cloud to be identified may contain complete livestock, may contain incomplete livestock, and may not contain any livestock. And taking each frame of farm scene point cloud contained in the farm scene point cloud sequence to be identified as the farm scene point cloud to be identified. The to-be-identified farm scene point cloud sequence can be obtained and registered by a double-depth camera. Each frame of the to-be-identified farm scene point cloud comprises the ground, farm facilities and livestock. When a plurality of livestock are contained in each frame of the scene point cloud of the farm to be identified, occlusion may occur. Preferably, each frame of farm scene to be identified comprises one livestock. The present embodiment is not limited to the kind of livestock. The detection module 601 performs plane detection on each frame of plant scene point cloud to be identified in the plant scene point cloud sequence to be identified. The plane detection means that a plane in each frame of farm scene point cloud is detected, and the point cloud in the detected plane is used as ground point cloud. The present embodiment is not limited to the method of plane detection. And deleting the ground point clouds in the scene point clouds of the farm to be identified in each frame.
The clustering module 602 is used for clustering and partitioning each frame of farm scene point cloud to be identified after the ground point cloud is deleted, and constructing a first enclosure box corresponding to each frame of farm scene point cloud to be identified according to the cluster with the largest number in each clustering and partitioning result;
the clustering segmentation refers to classifying adjacent pixels in each frame of to-be-identified farm scene point cloud after the ground point cloud is deleted into a class, and the embodiment is not limited to the clustering segmentation method. The clustering module 602 performs clustering segmentation on each frame of to-be-identified farm scene point cloud after the ground point cloud is deleted, and then obtains a plurality of clustering segmentation results. And for the cluster segmentation result of any frame, sequencing the clusters in the cluster segmentation result according to the number of contained points, finding the cluster with the most contained points, and solving the bounding box of the cluster.
The identification module 603 is configured to obtain that each frame of farm scene point cloud to be identified corresponding to each first enclosure box includes complete livestock when each first enclosure box is within a preset size range.
Wherein the preset size range is a preset size range. Each frame of farm scene point cloud to be identified corresponds to one first enclosure box, and the identification module 603 compares the first enclosure box corresponding to each frame of farm scene point cloud to be identified with a preset size range, so as to judge whether the first enclosure box corresponding to each frame of farm scene point cloud to be identified is in the preset size range. And if the first bounding box corresponding to each frame of the plant scene point cloud to be identified is within the preset size range, knowing that each frame of the plant scene point cloud to be identified contains complete livestock, and identifying each frame of the plant scene point cloud to be identified containing complete livestock from the plant scene point cloud sequence to be identified. The identified scene point clouds of the livestock to be identified, which contain the complete livestock, can be used for acquiring body size information and analyzing behaviors of subsequent livestock. And if the first bounding box corresponding to each frame of the farm scene point cloud to be identified is not in the preset size range, the incomplete livestock contained in each frame of the farm scene point cloud to be identified is known, and subsequent processing is not carried out.
In the embodiment, the ground in each frame of the to-be-identified plant scene point cloud is obtained by performing plane detection on each frame of the to-be-identified plant scene point cloud in the to-be-identified plant scene point cloud sequence, the ground point cloud in each frame of the to-be-identified plant scene point cloud is deleted and then is subjected to clustering segmentation, constructing a bounding box according to the clusters with the most points obtained by clustering and dividing in each frame of the scene point clouds of the farm to be identified, if the bounding box size of each frame of the scene point clouds of the farm to be identified is in a preset size range, knowing that each frame of the plant scene point cloud to be identified contains complete livestock, identifying each frame of the plant scene point cloud to be identified containing complete livestock from the plant scene point cloud sequence to be identified, therefore, the method for automatically identifying the scene point cloud of the farm containing complete poultry is simple, has good universality and flexibility and is high in identification precision.
On the basis of the above embodiment, the present embodiment further includes a determining module, where the determining module includes: the deleting submodule is used for carrying out plane detection on a pre-acquired plant scene point cloud sequence sample, acquiring ground point clouds in each frame of plant scene point cloud sample of the plant scene point cloud sequence sample, and deleting the ground point clouds in each frame of plant scene point cloud sample; wherein each frame of farm scene point cloud sample comprises complete livestock; the partitioning submodule is used for clustering and partitioning the frames of farm scene point cloud samples after the ground point cloud is deleted, and constructing a second enclosure box according to the clustering and partitioning result of the frames of farm scene point cloud samples after the ground point cloud is deleted, wherein the clustering and partitioning result contains the clustering with the largest number; and the determining submodule is used for acquiring the average size of all the second surrounding boxes and determining the preset size range according to the average size.
On the basis of the foregoing embodiment, the determining sub-module in this embodiment specifically determines the preset size range according to the average size by the following formula:
Vm=[lm,wm,hm]T;
Vm1=[(1-α)*lm,(1-α)*wm,(1-α)*hm]T;
Vm2=[(1+α)*lm,(1+α)*wm,(1+α)*hm]T;
wherein, VmIs the average size, /)mIs the average length of all second bounding boxes, wmIs the average width of all second bounding boxes, hmIs the average height, V, of all second bounding boxesm1At the lower size limit of the predetermined size range, Vm2Is the upper limit of the size of the preset size range, (1-alpha) lmAt the lower end of the length of the predetermined size range, (1-alpha) × wmAt the lower limit of the width of the predetermined size range, (1-alpha) × hmAt the lower height of the predetermined size range, (1+ alpha) × lmAt the upper length limit of the preset size range, (1+ alpha) × wmIs the upper width limit of the preset size range, (1+ alpha) × hmAnd alpha is an adjusting parameter, which is the upper limit of the height of the preset size range.
On the basis of the foregoing embodiment, the identification module in this embodiment is specifically configured to: when the length of each first enclosure box is between the lower limit of the length and the upper limit of the length, the width of each first enclosure box is between the lower limit of the width and the upper limit of the width, and the height of each first enclosure box is between the lower limit of the height and the upper limit of the height, the situation that each frame of to-be-identified farm scene point cloud corresponding to each first enclosure box contains complete livestock is obtained.
On the basis of the foregoing embodiments, the detection module in this embodiment is specifically configured to: and carrying out plane detection on each frame of the plant scene point cloud to be identified in the plant scene point cloud sequence to be identified based on a random sampling consistency method.
On the basis of the above embodiments, the clustering module in this embodiment is specifically configured to perform clustering segmentation on each frame of farm scene point cloud to be identified after deleting the ground point cloud by using a euclidean distance-based clustering segmentation method.
On the basis of the above embodiments, the first bounding box and the second bounding box in the present embodiment are directional bounding boxes.
This embodiment provides an electronic device, and fig. 7 is a schematic diagram of an overall structure of the electronic device according to the embodiment of the present invention, where the electronic device includes: at least one processor 701, at least one memory 702, and a bus 703; wherein,
the processor 701 and the memory 702 communicate with each other via a bus 703;
the memory 702 stores program instructions executable by the processor 701, and the processor calls the program instructions to perform the methods provided by the method embodiments, for example, the methods include: carrying out plane detection on each frame of the to-be-identified farm scene point cloud in the to-be-identified farm scene point cloud sequence, acquiring ground point clouds in each frame of the to-be-identified farm scene point cloud, and deleting the ground point clouds in each frame of the to-be-identified farm scene point cloud; clustering and dividing each frame of to-be-identified farm scene point cloud after the ground point cloud is deleted, and constructing a first enclosure box corresponding to each frame of to-be-identified farm scene point cloud according to the cluster with the largest number in each clustering and dividing result; and if the size of each first enclosure box is within the preset size range, acquiring that each frame of to-be-identified farm scene point cloud corresponding to each first enclosure box contains complete livestock.
The present embodiments provide a non-transitory computer-readable storage medium storing computer instructions that cause a computer to perform the methods provided by the above method embodiments, for example, including: carrying out plane detection on each frame of the to-be-identified farm scene point cloud in the to-be-identified farm scene point cloud sequence, acquiring ground point clouds in each frame of the to-be-identified farm scene point cloud, and deleting the ground point clouds in each frame of the to-be-identified farm scene point cloud; clustering and dividing each frame of to-be-identified farm scene point cloud after the ground point cloud is deleted, and constructing a first enclosure box corresponding to each frame of to-be-identified farm scene point cloud according to the cluster with the largest number in each clustering and dividing result; and if the size of each first enclosure box is within the preset size range, acquiring that each frame of to-be-identified farm scene point cloud corresponding to each first enclosure box contains complete livestock.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods of the various embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
Claims (9)
1. A method for identifying a point cloud of a farm scene containing complete livestock is characterized by comprising the following steps:
carrying out plane detection on each frame of plant scene point cloud to be identified in the plant scene point cloud sequence to be identified, acquiring ground point cloud in each frame of plant scene point cloud to be identified, and deleting the ground point cloud in each frame of plant scene point cloud to be identified;
clustering and dividing each frame of to-be-identified farm scene point cloud after the ground point cloud is deleted, and constructing a first enclosure box corresponding to each frame of to-be-identified farm scene point cloud according to the cluster with the largest number of points in each clustering and dividing result;
if the first bounding boxes are within the preset size range, the situation that the frames of the farm scene point clouds to be identified corresponding to the first bounding boxes contain complete livestock is known;
if each first bounding box is within a preset size range, the step of knowing that each frame of farm scene point cloud to be identified corresponding to each first bounding box contains complete livestock further comprises the following steps:
carrying out plane detection on a pre-acquired plant scene point cloud sequence sample, acquiring ground point clouds in each frame of plant scene point cloud sample of the plant scene point cloud sequence sample, and deleting the ground point clouds in each frame of plant scene point cloud sample; each frame of the farm scene point cloud sample comprises complete livestock;
clustering and dividing each frame of farm scene point cloud sample after the ground point cloud is deleted, and constructing a second enclosure box according to the clustering and dividing result of each frame of farm scene point cloud sample after the ground point cloud is deleted, wherein the clustering and dividing result contains the cluster with the largest number;
and acquiring the average size of all the second enclosure boxes, and determining the preset size range according to the average size.
2. The method of claim 1, wherein the preset size range is determined from the average size by the following formula:
Vm=[lm,wm,hm]T;
Vm1=[(1-α)*lm,(1-α)*wm,(1-α)*hm]T;
Vm2=[(1+α)*lm,(1+α)*wm,(1+α)*hm]T;
wherein, VmIs the average size, /)mFor all thatAverage length of the second enclosure, wmIs the average width of all the second enclosure boxes, hmFor the average height, V, of all said second bounding boxesm1At the lower size limit of the predetermined size range, Vm2Is the upper limit of the size of the preset size range, (1-alpha) lmAt the lower end of the length of the predetermined size range, (1-alpha) × wmAt the lower limit of the width of the predetermined size range, (1-alpha) × hmAt the lower height of the predetermined size range, (1+ alpha) × lmAt the upper length limit of the preset size range, (1+ alpha) × wmIs the upper width limit of the preset size range, (1+ alpha) × hmAnd alpha is an adjusting parameter, which is the upper limit of the height of the preset size range.
3. The method according to claim 2, wherein if each first bounding box is within a preset size range, the step of knowing that each frame of farm scene point cloud to be identified corresponding to each first bounding box contains complete livestock specifically comprises:
and if the length of each first bounding box is between the length lower limit and the length upper limit, the width of each first bounding box is between the width lower limit and the width upper limit, and the height of each first bounding box is between the height lower limit and the height upper limit, the situation that each frame of to-be-identified farm scene point cloud corresponding to each first bounding box contains complete livestock is known.
4. The method according to any one of claims 1 to 3, wherein the step of performing plane detection on each frame of the plant scene point cloud to be identified in the plant scene point cloud sequence to be identified specifically comprises:
and carrying out plane detection on each frame of the plant scene point cloud to be identified in the plant scene point cloud sequence to be identified based on a random sampling consistency method.
5. The method according to any one of claims 1 to 3, wherein the step of performing cluster segmentation on the to-be-identified farm scene point cloud of each frame after the ground point cloud is deleted specifically comprises the following steps:
and performing cluster segmentation on the scene point cloud of the farm to be identified of each frame after the ground point cloud is deleted by using a cluster segmentation method based on Euclidean distance.
6. The method of any of claims 2-3, wherein the first bounding box and the second bounding box are directional bounding boxes.
7. A farm scene point cloud identification device comprising complete livestock, comprising:
the system comprises a detection module, a recognition module and a recognition module, wherein the detection module is used for carrying out plane detection on each frame of to-be-recognized farm scene point cloud in a to-be-recognized farm scene point cloud sequence, acquiring ground point cloud in each frame of to-be-recognized farm scene point cloud, and deleting the ground point cloud in each frame of to-be-recognized farm scene point cloud;
the clustering module is used for clustering and dividing each frame of to-be-identified farm scene point cloud after the ground point cloud is deleted, and constructing a first enclosure box corresponding to each frame of to-be-identified farm scene point cloud according to the cluster with the largest number in each clustering and dividing result;
the identification module is used for acquiring that each frame of to-be-identified farm scene point cloud corresponding to each first enclosure box contains complete livestock when the size of each first enclosure box is within a preset size range;
wherein still include the confirming module, the confirming module includes:
the deleting submodule is used for carrying out plane detection on a pre-acquired plant scene point cloud sequence sample, acquiring ground point clouds in each frame of plant scene point cloud sample of the plant scene point cloud sequence sample, and deleting the ground point clouds in each frame of plant scene point cloud sample; wherein each frame of farm scene point cloud sample comprises complete livestock;
the partitioning submodule is used for clustering and partitioning the frames of farm scene point cloud samples after the ground point cloud is deleted, and constructing a second enclosure box according to the clustering and partitioning result of the frames of farm scene point cloud samples after the ground point cloud is deleted, wherein the clustering and partitioning result contains the clustering with the largest number;
and the determining submodule is used for acquiring the average size of all the second surrounding boxes and determining the preset size range according to the average size.
8. An electronic device, comprising:
at least one processor, at least one memory, and a bus; wherein,
the processor and the memory complete mutual communication through the bus;
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1 to 6.
9. A non-transitory computer-readable storage medium storing computer instructions that cause a computer to perform the method of any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811217052.9A CN109447139B (en) | 2018-10-18 | 2018-10-18 | Method and device for identifying scene point cloud of farm containing complete livestock |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811217052.9A CN109447139B (en) | 2018-10-18 | 2018-10-18 | Method and device for identifying scene point cloud of farm containing complete livestock |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109447139A CN109447139A (en) | 2019-03-08 |
CN109447139B true CN109447139B (en) | 2021-03-05 |
Family
ID=65546867
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811217052.9A Active CN109447139B (en) | 2018-10-18 | 2018-10-18 | Method and device for identifying scene point cloud of farm containing complete livestock |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109447139B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102226907A (en) * | 2011-05-24 | 2011-10-26 | 武汉嘉业恒科技有限公司 | License plate positioning method and apparatus based on multiple characteristics |
CN104616021A (en) * | 2014-12-24 | 2015-05-13 | 深圳市腾讯计算机系统有限公司 | Method and device for processing traffic sign symbols |
CN105362048A (en) * | 2015-10-15 | 2016-03-02 | 广东欧珀移动通信有限公司 | Mobile equipment and barrier information prompting method and device based on mobile equipment |
CN106709412A (en) * | 2015-11-17 | 2017-05-24 | 腾讯科技(深圳)有限公司 | Traffic sign detection method and apparatus |
CN107609520A (en) * | 2017-09-15 | 2018-01-19 | 四川大学 | Obstacle recognition method, device and electronic equipment |
CN108416804A (en) * | 2018-02-11 | 2018-08-17 | 深圳市优博讯科技股份有限公司 | Obtain method, apparatus, terminal device and the storage medium of target object volume |
CN108564602A (en) * | 2018-04-16 | 2018-09-21 | 北方工业大学 | Airplane detection method based on airport remote sensing image |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9396545B2 (en) * | 2010-06-10 | 2016-07-19 | Autodesk, Inc. | Segmentation of ground-based laser scanning points from urban environment |
CN102944174B (en) * | 2012-11-28 | 2015-06-17 | 北京矿冶研究总院 | Denoising and simplifying method and system for three-dimensional laser point cloud data |
-
2018
- 2018-10-18 CN CN201811217052.9A patent/CN109447139B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102226907A (en) * | 2011-05-24 | 2011-10-26 | 武汉嘉业恒科技有限公司 | License plate positioning method and apparatus based on multiple characteristics |
CN104616021A (en) * | 2014-12-24 | 2015-05-13 | 深圳市腾讯计算机系统有限公司 | Method and device for processing traffic sign symbols |
CN105362048A (en) * | 2015-10-15 | 2016-03-02 | 广东欧珀移动通信有限公司 | Mobile equipment and barrier information prompting method and device based on mobile equipment |
CN106709412A (en) * | 2015-11-17 | 2017-05-24 | 腾讯科技(深圳)有限公司 | Traffic sign detection method and apparatus |
CN107609520A (en) * | 2017-09-15 | 2018-01-19 | 四川大学 | Obstacle recognition method, device and electronic equipment |
CN108416804A (en) * | 2018-02-11 | 2018-08-17 | 深圳市优博讯科技股份有限公司 | Obtain method, apparatus, terminal device and the storage medium of target object volume |
CN108564602A (en) * | 2018-04-16 | 2018-09-21 | 北方工业大学 | Airplane detection method based on airport remote sensing image |
Also Published As
Publication number | Publication date |
---|---|
CN109447139A (en) | 2019-03-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11514644B2 (en) | Automated roof surface measurement from combined aerial LiDAR data and imagery | |
Mortensen et al. | Weight prediction of broiler chickens using 3D computer vision | |
US8787621B2 (en) | Methods and systems for determining and displaying animal metrics | |
CN109636779B (en) | Method, apparatus and storage medium for recognizing integrated ruler of poultry body | |
Elfiky et al. | Automation of dormant pruning in specialty crop production: An adaptive framework for automatic reconstruction and modeling of apple trees | |
Munoz-Benavent et al. | Automatic Bluefin Tuna sizing using a stereoscopic vision system | |
Xiang et al. | Field‐based robotic leaf angle detection and characterization of maize plants using stereo vision and deep convolutional neural networks | |
CN110969654A (en) | Corn high-throughput phenotype measurement method and device based on harvester and harvester | |
Xi et al. | Automating plot-level stem analysis from terrestrial laser scanning | |
Kwon et al. | Iterative offset-based method for reconstructing a mesh model from the point cloud of a pig | |
JP2019211364A (en) | Device and method for estimating weight of body of animal | |
CN106683105B (en) | Image segmentation method and image segmentation device | |
CN111932545A (en) | Image processing method, target counting method and related device thereof | |
Niknejad et al. | Phenotyping of architecture traits of loblolly pine trees using stereo machine vision and deep learning: Stem diameter, branch angle, and branch diameter | |
CN114511820A (en) | Goods shelf commodity detection method and device, computer equipment and storage medium | |
Liu et al. | Estimation of weight and body measurement model for pigs based on back point cloud data | |
CN115331064A (en) | Method and device for classifying point clouds of farm scene facing body size measurement | |
WO2023041904A1 (en) | Systems and methods for the automated monitoring of animal physiological conditions and for the prediction of animal phenotypes and health outcomes | |
CN113706512B (en) | Live pig weight measurement method based on deep learning and depth camera | |
CN109447139B (en) | Method and device for identifying scene point cloud of farm containing complete livestock | |
Qin et al. | Identification of body size characteristic points based on the Mask R-CNN and correlation with body weight in Ujumqin sheep | |
KR20230071813A (en) | Hanwoo(Korean beef) growth test data collection device and method therof | |
CN113888612A (en) | Animal point cloud multi-view real-time acquisition and 3D reconstruction method, device and system | |
CN111783648A (en) | Method and device for extracting guardrail in road point cloud | |
Tapia-Zapata et al. | A geometric modelling approach to estimate apple fruit size by means of LiDAR 3D point clouds |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |