CN111915732A - Image generation method and system - Google Patents

Image generation method and system Download PDF

Info

Publication number
CN111915732A
CN111915732A CN202010517305.5A CN202010517305A CN111915732A CN 111915732 A CN111915732 A CN 111915732A CN 202010517305 A CN202010517305 A CN 202010517305A CN 111915732 A CN111915732 A CN 111915732A
Authority
CN
China
Prior art keywords
point cloud
point
cloud data
data
points
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.)
Withdrawn
Application number
CN202010517305.5A
Other languages
Chinese (zh)
Inventor
吕淑静
金卫平
吕岳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Xinba Automation Technology Co ltd
Original Assignee
Shanghai Xinba Automation Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai Xinba Automation Technology Co ltd filed Critical Shanghai Xinba Automation Technology Co ltd
Priority to CN202010517305.5A priority Critical patent/CN111915732A/en
Publication of CN111915732A publication Critical patent/CN111915732A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/05Geographic models

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Computer Graphics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Remote Sensing (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses an image generation method and system, wherein the method comprises the following steps: acquiring an object image, and extracting object structure characteristic parameters on the image; processing the characteristic parameters to obtain point cloud data of the object surface; preprocessing the point cloud data to generate a point cloud template; and acquiring information of the point cloud template, wherein the information comprises point cloud pairs and point cloud normals. The method and the system disclosed by the invention not only can efficiently and accurately generate the point cloud image, but also can obviously reduce the manufacturing cost of the point cloud image and have stronger practicability.

Description

Image generation method and system
Technical Field
The invention relates to the field of intelligent manufacturing, in particular to an application of an image generation method and an image generation system in the field of machine vision.
Background
With the progress of science and technology and the development of society, the requirements on industrial production are gradually improved, the traditional manufacturing industry cannot adapt to the requirements of social development, and the manufacturing industry needs to transform and upgrade to intelligent manufacturing. In this wave of intelligent manufacturing transformation, the mechanical arm grabbing technology based on machine vision has wide application requirements.
In machine vision, namely intelligent manufacturing, a machine is used for replacing human eyes, namely, image acquisition equipment is used for acquiring information, a computer is used for processing the information, the position of an object is determined, and finally the machine vision is used for a mechanical arm to perform operations such as grabbing, measuring and processing on the object. The placement of the objects may be ordered or unordered depending on the actual production situation. Under the condition that the mechanical arm snatchs in disorder, the locating position of object is mixed and disorderly, complex situations such as slope, overlap can take place. Therefore, the point cloud image is used for object registration, and the position and posture information of the object is obtained to be a key part in the disordered grabbing of the mechanical arm.
Before the object is registered, a point cloud image containing only a single object is required as a template image, and a scene point cloud image containing a plurality of objects and shot in an actual production scene is required. The source of the template image can be converted by a CAD file, or a single object can be scanned by a 3D camera and processed to be used as the template image. In some production environments, however, either of these situations cannot be achieved, or the cost of implementation is high.
Therefore, how to generate a point cloud image efficiently and accurately and reduce the manufacturing cost of the image is a problem to be solved urgently in the application field based on machine vision in the current intelligent manufacturing field.
Disclosure of Invention
In order to solve the problems, the invention discloses an image generation method and an image generation system, which can not only efficiently and accurately generate a point cloud image, but also obviously reduce the manufacturing cost of the point cloud image and have stronger practicability.
The invention discloses an image generation method, which is characterized by comprising the following steps of: acquiring an object image, and extracting object structure characteristic parameters on the image; processing the characteristic parameters to obtain point cloud data of the object surface; preprocessing the point cloud data to generate a point cloud template; and acquiring information of the point cloud template, wherein the information comprises point cloud pairs and point cloud normals.
Preferably, the obtaining of the point cloud data of the object surface comprises obtaining plane point cloud data and edge point cloud data respectively; preprocessing the point cloud data comprises respectively preprocessing the plane point cloud data and the edge point cloud data; the method also comprises the step of combining the plane point cloud data and the edge point cloud data before the point cloud template is generated.
Preferably, the preprocessing the point cloud data specifically includes the following steps: carrying out down-sampling processing on the point cloud data, and reducing the number of points in the point cloud data while keeping the structural features of an object represented by the point cloud data; and carrying out smoothing treatment on the point cloud data.
Preferably, the down-sampling process includes the following steps: obtaining a minimum cuboid space containing all points in the point cloud image, and the minimum cuboid space is called as a minimum bounding box; dividing the minimum bounding box into a plurality of small grids to ensure that all points in the point cloud are contained in the grids; deleting the small grid containing no dots; obtaining the mass center of the rest small grids; and deleting all points in the point cloud, and adding the point cloud with the centroid of the small grid as a new point.
Preferably, the step of acquiring the point cloud normal includes the following steps: randomly selecting a point in the point cloud as a starting point for calculating a point cloud normal; searching adjacent points near the starting point, and linearly fitting a tangent plane to obtain a normal vector of a certain point in the curved surface where the point is located; determining the direction of a point cloud curved surface normal vector; and taking the adjacent point of which the normal vector is already calculated by the starting point as the current point, repeating the steps, and calculating the normal vector of the adjacent point of the current point. Until the normal vectors of all the points in the point cloud are calculated.
Preferably, the searching for the adjacent point is obtained by adopting a Kd-Tree structure, and specifically comprises the following steps: constructing a Kd-Tree structure, and dividing dimension and score; storing the point cloud with a Kd-Tree structure; the point cloud pair is looked up in the Kd-Tree.
Preferably, the smoothing processing on the point cloud data is smoothing by adopting a moving least square method, wherein the least square method comprises a fitting function consisting of a coefficient vector alpha (x) and a base function PT(x) The fitting function satisfies the following formula:
f(x)=α(x)PT(x)
the invention also discloses an image generation system, which is characterized by at least comprising a point cloud generation module, a down-sampling module, a point cloud optimization module and a point cloud information processing module, wherein: a point cloud construction module: the system comprises a data acquisition module, a data processing module and a data processing module, wherein the data acquisition module is used for acquiring input object structure parameters and a curved surface equation or a line equation; a down-sampling module: the point cloud data processing device is used for carrying out down-sampling processing on the point cloud data, keeping the structural features of objects represented by the point cloud data and reducing the number of points in the point cloud data; a point cloud optimization module: the system is used for smoothing the point cloud to obtain more optimized point cloud data; the point cloud information processing module: the method is used for acquiring information of all points in the point cloud, including information of a normal line, adjacent points and the like.
The invention also discloses an electronic device, which is characterized in that the system comprises a processor and a memory, wherein the memory is used for storing the executable program; the processor is configured to execute the executable program to implement the method of any of claims 1-7.
In order that the invention may be more clearly and fully understood, specific embodiments thereof are described in detail below with reference to the accompanying drawings.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments will be briefly introduced below. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 shows a flow diagram of an image generation method.
Figure 2 shows a schematic flow diagram of a method of pre-processing.
Fig. 3 shows a schematic diagram of a downsampling process flow.
Fig. 4 shows a schematic flow diagram of a method of acquiring a point cloud normal.
FIG. 5 shows a schematic flow chart for neighboring point acquisition using a Kd-Tree structure.
Fig. 6 shows a schematic configuration of an image generation system.
Fig. 7 shows a schematic diagram of an embodiment for extracting characteristic parameters of a brake disc.
Fig. 8 shows a schematic diagram of an embodiment of acquiring brake disc point cloud data.
Detailed Description
In actual production, if a CAD design drawing directly used as a point cloud template is not available, or a point cloud image of an object is not available, a registration template point cloud image of the object needs to be generated by a program. The following flow diagram of the invention takes an actual production project as an example to illustrate how to generate the point cloud.
Referring to fig. 1, fig. 1 shows a schematic flow chart of an image generation method, which specifically includes the following steps:
s10, the processing flow is started.
S11, acquiring an object image, and extracting object structure characteristic parameters on the image;
taking a factory to produce hundreds of types of brake discs as an example, the brake discs are similar in shape but different in size.
For convenient grabbing, two point clouds of the front side and the back side need to be generated for one brake disc. Figure 7(a) is a cross-sectional view of the brake disc, looking first at the features of the brake disc, ignoring some of its internal structure, as only the surface of the brake disc is used for matching. However, the surface of the brake disc still has small protrusions or depressions which hardly play a role in the registration process due to the accuracy of the camera, the pretreatment process and the like, and the protrusions or depressions are only present in some types of brake discs. Thus a further simplification of the brake disc is made.
And designing and generating parameters corresponding to the brake disc after simplification. The parameters and corresponding labels are shown in fig. 7(b) and 7 (c).
The number of the corresponding parameters is 7, which are respectively as follows:
OR: outer Radius, Radius of the largest Outer circle of the brake disc.
OH: outer Height, the Height of the maximum Outer circle of the brake disc.
OTR: outer Power Radius, Radius of the boss on the front side of the brake disc.
OTH: outer Tower Height, Height of the boss on the front surface of the brake disc.
ICR: inner Power Radius, Radius of the brake disc reverse groove.
ICH: inner Power Height, Height of the brake disc reverse side groove.
PR: radius of the middle hole of the Pit Radius brake disc.
By means of the 7 parameters, a complete brake disc template can be generated, and therefore the 7 parameters are characteristic parameters of the object structure.
S12, processing the characteristic parameters to obtain point cloud data of the object surface;
for the front or back brake disc surface, it can be considered to be composed of two structures: a ring and a cylinder. The brake disc was disassembled using rings and cylinders as shown in the following table:
Figure BDA0002530621570000041
Figure BDA0002530621570000051
after the brake disc is decomposed, only how to generate a circular ring or a cylinder needs to be considered, and then the circular ring or the cylinder is spliced according to the position. Both the ring and the cylinder can be seen as being made up of a plurality of circles. Where a ring can be seen as a circle with a radius that increases from an inner diameter to an outer diameter, a cylinder can be seen as a circle with only a height change. And the point cloud of the circle may be dispersed into one point. Therefore, the equation of the circle is used for forming a circle, and then the circles are pieced together to form the circular ring and the cylinder. The following is a specific algorithm for generating circles and cylinders:
1. algorithm for generating a circular point cloud, genCircle:
inputting: radius r, height z, sampling angle interval ab
(1) The initialization angle a is 0, the index i of the point.
(2) If a > is 360, the circle generation is finished. If the current angle a is less than 360, go to (3) and continue execution.
(3) Newly creating a point pi(xi,yi,zi)。The angle a is converted to the system of radians α. The position of the point is calculated using equation (1-1):
Figure BDA0002530621570000052
the point is added to the point cloud.
(4) Let a increase ab. And (5) returning to the step (2) to continue the execution.
2. Algorithm to generate a circle, genRing:
inputting: inner radius rbeg, outer radius rend, height z, sampling radius interval rb, sampling angle interval ab
(1) The initialization radius r is rbeg.
(2) And if r > is rend, finishing the generation of the circular ring. If the value is less than rend, go to (3) and continue execution.
(3) Call gen circle (r, z, ab) to generate a circle.
(4) And r increases rb. And (5) returning to the step (2) to continue the execution.
3. The algorithm for generating cylinders genCylinder:
inputting: radius r, height ranges zbeg and zend, sampling height interval zb, sampling angle interval ab
(1) The initialization radius z is zbeg.
(2) And if z > is zend, finishing the generation of the circular ring. If the value is less than zend, proceed to (3) and continue execution.
(3) Call gen circle (r, z, ab) to generate a circle.
(4) And z is increased by zb. And (5) returning to the step (2) to continue the execution.
It can be seen that the method of creating the ring and cylinder is similar. In actual production, corresponding methods are respectively called to generate according to the structural parameters in the table 3-1. Using this method, the actual generated original point cloud image is shown in fig. 8.
S13, preprocessing the point cloud data to generate a point cloud template;
the generated point cloud data can not be directly registered, and a certain pretreatment is needed to obtain a better registration effect. Please refer to the steps described in fig. 2 for the flow of preprocessing the point cloud image.
S14, acquiring information of the point cloud template, wherein the information comprises point cloud pairs and point cloud normals;
before the registration process, some information of the point cloud image, including point cloud pairs, normal lines of the point cloud, and the like, needs to be acquired, which are important information used in the registration process. Please refer to the flow shown in fig. 4 for a method for obtaining a point cloud normal.
When processing point clouds, corresponding point pairs in two point cloud images or K points adjacent to a certain point in the point clouds are often required. To address such problems, a Kd-Tree structure may be used to store point clouds for K-nearest neighbor searching in high dimensional space. Please refer to the flow shown in fig. 5 for a method of obtaining a point cloud pair or neighboring points.
S15, the flow ends.
Referring to fig. 2, fig. 2 shows a schematic flowchart of an algorithm according to an image acquisition diagram, which specifically includes the following steps:
s20: the flow process is started.
S21: and carrying out down-sampling processing on the point cloud data.
Please refer to the flow shown in fig. 3 for processing the point cloud data in a downsampling manner.
S22: and carrying out smoothing treatment on the point cloud data.
The point cloud data generated by the 3D camera is typically noisy or subject to measurement errors. If point cloud data with noise and measurement errors are directly used for registration, the quality of information carried by the distance between adjacent points and the normal line can be reduced, and the registration effect can be reduced. The point cloud data is smoothed before registration.
The point cloud smoothing may be performed using moving least squares [53] (MLS). The least squares method is to set a fitting function and then find the parameters of the fitting function by minimizing the sum of the squares of the errors [54 ].
The moving least squares method is characterized as follows:
(1) the value of a certain point is only related to the points in its vicinity. A distance threshold may be set, the space within the threshold being referred to as the area of influence of the point, and the points outside the area of influence being independent of the value of the point.
(2) The method for establishing the fitting function f (x) is more special and comprises the coefficient vector alpha (x) and the basis function PT(x) Consists of the following components:
f(x)=α(x)PT(x) (2-1)
the basis functions may be linear or quadratic:
Figure BDA0002530621570000071
the coefficient vector is:
α(x)=[α1(x),α2(x),…,αm(x)] (2-3)
different basis functions can be used in the moving least square method, so that different accuracies are obtained, and different smooth degrees are obtained by using different coefficient vectors, so that a curved surface can be better fitted.
The smoothing parameters set in actual production are generally smaller, so that the change of the point cloud by direct observation is not obvious, but the partially protruding points of the plane of the brake disc are less, and the point cloud of the middle part of the two planes of the brake disc becomes smoother.
S23: the flow is ended.
Referring to fig. 3, fig. 3 is a schematic diagram illustrating a downsampling process flow, which specifically includes the following steps:
s30, the processing flow is started.
S31, a minimum rectangular solid space, also called a minimum bounding box, containing all the points in the point cloud image is obtained.
Point cloud down-sampling is a processing method for reducing the density of point clouds, reducing the number of points in the point clouds and simultaneously keeping the structural characteristics of objects represented by the point clouds as much as possible.
First, the minimum bounding box of the point cloud is determined. The minimum bounding box is the minimum external cuboid containing the object in the point cloud image, and is the minimum cuboid capable of completely bounding the object in the point cloud image. The minimum value and the maximum value of all points in the point cloud image in the direction of X, Y, Z are obtained, and the minimum bounding box can be established by using the 6 values.
S32, dividing the minimum bounding box into a plurality of small grids to ensure that all points in the point cloud are contained in the grids; the small grid containing no dots is deleted.
Setting a division distance L in each directionx、Ly、LzThe three values may not be equal. The grid is divided in the minimum bounding box using a division distance, with the division being performed every other division distance. After all the directions are divided, the minimum bounding box is divided into a plurality of small cuboids, and the length, the width and the height of each small cuboid are Lx、LyAnd Lz. All points in the point cloud are in a small cuboid. And all the points in the point cloud are traversed once, so that the data points contained in each small cuboid can be calculated.
Small cuboids containing no dots were removed.
And S33, obtaining the centroid of the residual small grid.
Let a total of n points in the small cuboid, the coordinate of each point is pi(xi,yi,zi) Coordinates of the center of mass
Figure BDA0002530621570000081
Comprises the following steps:
Figure BDA0002530621570000082
and S34, deleting all points in the point cloud, and adding the point cloud with the centroid of the small grid as a new point.
And deleting all points in the small cuboid in the point cloud, replacing the centroid of the small cuboid as one point, and adding the point cloud with the centroid of the small cuboid.
Through the up-down sampling processing, the reduction of the density of the points in the point cloud image is completed.
S34: the flow is ended.
As shown in fig. 4, fig. 4 is a schematic flow chart of a method for obtaining a point cloud normal, and specifically includes the following steps:
s40, the processing flow is started.
And S41, randomly selecting a point in the point cloud as a starting point for calculating the normal of the point cloud.
Firstly, randomly selecting a point in the point cloud as a starting point for calculating the normal vector of the point cloud curved surface. Calculating the characteristic vector corresponding to the minimum characteristic value of the point
Figure BDA0002530621570000091
And is provided with
Figure BDA0002530621570000092
Is the normal vector of the point. If the specific direction is clear in practical application, such as a brake disc point cloud, the orientation of the outer surface is generally used as the direction of a normal vector. Can select a special starting point and set
Figure BDA0002530621570000093
Or
Figure BDA0002530621570000094
As a normal vector
Figure BDA0002530621570000095
And S42, searching adjacent points near the starting point, and linearly fitting the tangent plane to obtain a normal vector of a certain point in the curved surface where the point is located.
Calculating the feature vectors of K adjacent points of the starting point
Figure BDA0002530621570000096
And calculating the normal vector of the starting point
Figure BDA0002530621570000097
Feature vector of adjacent point
Figure BDA0002530621570000098
The included angle of (a). If less than 90 degrees, take
Figure BDA0002530621570000099
As a starting point normal vector. If the included angle is larger than 90 degrees, the explanation direction is reversed, and the angle is taken
Figure BDA00025306215700000910
As a normal vector.
And S43, determining the direction of the normal vector of the point cloud curved surface.
The normal of a point in a continuous curved surface needs to be taken through the point to form a tangent plane, and the normal perpendicular to the tangent plane is the normal of the point in the curved surface. However, the point cloud data is discretized, and the tangent plane cannot be directly obtained. Therefore, some adjacent points around the point need to be found, and then the tangent plane is linearly fitted by using the least square method, and then the normal vector is obtained. Further analysis can be converted into the problem of solving the characteristic value of the covariance matrix.
The specific calculation steps are as follows:
(1) for a certain point piFirst, the sum p is obtainediK points closest together { p }i1,…,pik,…,piK}. Finding K neighbors can be achieved with the Kd-Tree method.
(2) Set point pi(xi,yi,zi) Has a tangent plane of axi+byi+cziAnd + d is 0. For convenience, a may be set2+b2+c21. Then the normal to the tangent plane, i.e. piThe normal vector is
Figure BDA00025306215700000913
(3) Point piIs the k-th neighboring point pik(xik,yik,zik) The distance to the tangent plane is:
Figure BDA00025306215700000911
the resulting tangent plane must have the smallest sum of squares of distances to all neighboring points:
Figure BDA00025306215700000912
the normal vector is obtained by obtaining the values of a, b, and c that minimize f (a, b, c).
(4) Calculating the total centroid of k neighboring points
Figure BDA0002530621570000101
Then calculates the covariance matrix CiAnd corresponding eigenvalues and eigenvectors.
Figure BDA0002530621570000102
Wherein λjAnd
Figure BDA0002530621570000103
are the corresponding eigenvalues and eigenvectors. Wherein the least eigenvalue corresponds to an eigenvector
Figure BDA0002530621570000104
I.e. point piThe normal vector of (2).
And S44, taking the adjacent point of which the normal vector is already calculated by the starting point as the current point, repeating the steps, and calculating the normal vector of the adjacent point of the current point. Until the normal vectors of all the points in the point cloud are calculated.
And calculating all points in the point cloud according to the steps to obtain normal vectors of all the points.
S45, the flow ends.
As shown in fig. 5, fig. 5 is a schematic flow chart of acquiring neighboring points by using Kd-Tree structure, which specifically includes the following steps:
s50, the processing flow is started.
And S51, constructing a Kd-Tree structure, and dividing dimensions and scores.
Before constructing the Kd-Tree, a dimension division strategy and a division value strategy are firstly determined. Let the Kd-Tree to be constructed be T.
First, the dimension i and the division value V of the division are calculatediThe element of the median is also referred to as the partition element. The extent of the data set in space is then calculated.
Each time a subtree is divided by Kd-Tree, a hyperplane needs to be specified, typically a hyperplane perpendicular to the ith coordinate axis is selected. Then each division needs to determine the number of dimensions first, and a simple method is to select directly according to the serial number of the dimensions, such as selecting the 1 st dimension for the first time, selecting the 2 nd dimension for the second time, and so on. However, the Kd-Tree constructed by this method is not uniform for the data segmentation with non-uniform distribution. The other method is to count the variance of the point cloud data in the Kd-Tree in each dimension, and the dimension with the largest variance is selected as the segmentation dimension of the Kd-Tree.
Then, a partitioning value strategy is selected, wherein the partitioning value is a value selected in the ith dimension, and the number of nodes in the two partitioned subtrees is as average as possible. The median of all data in the subtree in the ith dimension may generally be selected as the partition value.
S52, storing the point cloud by using a Kd-Tree structure.
The following is a method of constructing a Kd-Tree storage point cloud:
(1) for a K-dimensional data set, first divide the dimension i into values ViThe partition elements and the set range are stored in the current node of the Kd-Tree.
(2) All points in the K-dimensional data set are related to the partition value V in the dimension iiMaking a comparison if the value of the data point in the dimension i is less than ViThen put into the left sub-tree. If the value of the data point in dimension i is greater than ViThen put into the right subtree.
(3) If the number of the current data points of the subtree is more than 1, the step (1) is entered to continue to divide the subtree, and if the number of the points of the subtree is less than or equal to 1, the division of the current subtree is terminated.
S53, finding neighboring points in the Kd-Tree structure.
The following is a method for finding the corresponding point using the Kd-Tree:
(1) a normal binary tree search is first performed. For one dataAnd comparing the point with the root node of the Kd-Tree, if the division value is smaller than the division value of the root node, entering the left sub-Tree to continue searching, and if the division value is larger than the root node, entering the right sub-Tree to continue searching. When compared with the nodes in the tree, only the dividing value V of the ith dimension recorded in the current node is compared withiA comparison is made. Searching until the leaf node.
But the leaf node at this time is not necessarily the node closest to the data point to be searched. The algorithm also needs to backtrack to find more optimal nodes. The following is the backtracking process.
(2) Calculating the distance d between the data point to be searched and the nearest nodeiIn this case, the calculated distance is not the distance in one dimension but the euclidean distance in all dimensions. Then by the distance diA hypersphere centered on the data point sought is created.
(3) And backtracking upwards, and finding a parent node of the current point as the current node. And calculating whether the range of the sub-tree which is not visited in the current node in the whole space is partially overlapped with the hyperplane.
(4) And (4) if the nodes do not coincide with each other, returning to the step (3) until the root node is searched.
(5) If there is partial coincidence, the Euclidean distance between the current node and the searched data point in the tree is calculated, if smaller, the current nearest node and the distance d are updatediAnd recalculating the hypersphere. And if the space range of the sub-tree of the current node is still coincident with the hypersphere, entering the sub-tree to continue searching until the leaf node is searched. And then, the step (3) is carried out to trace back upwards.
The last found current nearest node is the node with the minimum distance to the searched data point.
S54, the flow ends.
As shown in fig. 6, fig. 6 shows a schematic structural diagram of an image generation system, and the system of this embodiment mainly includes the following four sub-modules: the system comprises a point cloud generating module 100, a down-sampling module 200, a point cloud optimizing module 300 and a point cloud information processing module 400. Wherein:
the point cloud construction module 100: the system comprises a data acquisition module, a data processing module and a data processing module, wherein the data acquisition module is used for acquiring input object structure parameters and a curved surface equation or a line equation;
the down-sampling module 200: the point cloud data processing device is used for carrying out down-sampling processing on the point cloud data, keeping the structural features of objects represented by the point cloud data and reducing the number of points in the point cloud data;
the point cloud optimization module 300: the system is used for smoothing the point cloud to obtain more optimized point cloud data;
the point cloud information processing module 400: the method is used for acquiring information of all points in the point cloud, including information of a normal line, adjacent points and the like.
In practical applications, the modules described in the method and system disclosed by the present invention may be deployed on one server, or each module may be deployed on a different server independently, and particularly, in order to provide a stronger computing processing capability, the modules may be deployed on a cluster server as needed.
An embodiment of the present application further provides an electronic device, where the electronic device includes a processor and a memory, where the memory stores an executable program, and when the executable program runs on a computer, the computer executes the target detection method and system described in any of the above embodiments.
It should be noted that, all or part of the steps in the methods of the above embodiments may be implemented by hardware related to instructions of a computer program, which may be stored in a computer-readable storage medium, which may include, but is not limited to: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (9)

1. An image generation method characterized by comprising the steps of:
acquiring an object image, and extracting object structure characteristic parameters on the image;
processing the characteristic parameters to obtain point cloud data of the object surface;
preprocessing the point cloud data to generate a point cloud template;
and acquiring information of the point cloud template, wherein the information comprises point cloud pairs and point cloud normals.
2. The method of claim 1, the obtaining point cloud data of an object surface comprising obtaining planar point cloud data and edge point cloud data, respectively; preprocessing the point cloud data comprises respectively preprocessing the plane point cloud data and the edge point cloud data; the method also comprises the step of combining the plane point cloud data and the edge point cloud data before the point cloud template is generated.
3. The method of claim 1, wherein the pre-processing of the point cloud data comprises the steps of:
carrying out down-sampling processing on the point cloud data, and reducing the number of points in the point cloud data while keeping the structural features of an object represented by the point cloud data;
and carrying out smoothing treatment on the point cloud data.
4. The method of claim 3, wherein said downsampling process comprises the steps of:
solving a minimum cuboid space containing all points in the point cloud image, which is also called a minimum bounding box;
dividing the minimum bounding box into a plurality of small grids to ensure that all points in the point cloud are contained in the grids; deleting the small grid containing no dots;
obtaining the mass center of the rest small grids;
and deleting all points in the point cloud, and adding the point cloud with the centroid of the small grid as a new point.
5. The method of claim 1, the acquiring point cloud normals comprising:
randomly selecting a point in the point cloud as a starting point for calculating a point cloud normal;
searching adjacent points near the starting point, and linearly fitting a tangent plane to obtain a normal vector of a certain point in the curved surface where the point is located;
determining the direction of a point cloud curved surface normal vector;
and taking the adjacent point of which the normal vector is already calculated by the starting point as the current point, repeating the steps, and calculating the normal vector of the adjacent point of the current point. Until the normal vectors of all the points in the point cloud are calculated.
6. The method according to claim 1, wherein the finding of the point cloud pair is obtained by using a Kd-Tree structure, comprising the following steps:
constructing a Kd-Tree structure, and dividing dimension and score;
storing the point cloud with a Kd-Tree structure;
the point cloud pair is looked up in the Kd-Tree.
7. The method of claim 3, wherein the smoothing of the point cloud data is performed by a moving least squares method, the least squares method comprising a fitting function consisting of a coefficient vector α (x) and a basis function PT(x) The fitting function satisfies the following formula:
f(x)=α(x)PT(x)。
8. an image generation system is characterized by at least comprising a point cloud generation module, a down-sampling module, a point cloud optimization module and a point cloud information processing module, wherein:
a point cloud construction module: the system comprises a data acquisition module, a data processing module and a data processing module, wherein the data acquisition module is used for acquiring input object structure parameters and a curved surface equation or a line equation;
a down-sampling module: the point cloud data processing device is used for carrying out down-sampling processing on the point cloud data, keeping the structural features of objects represented by the point cloud data and reducing the number of points in the point cloud data;
a point cloud optimization module: the system is used for smoothing the point cloud to obtain more optimized point cloud data;
the point cloud information processing module: the method is used for acquiring information of all points in the point cloud, including information of a normal line, adjacent points and the like.
9. An electronic device, wherein the system comprises a processor and a memory, wherein the memory is configured to store an executable program;
the processor is configured to execute the executable program to implement the method of any one of claims 1-7.
CN202010517305.5A 2020-06-09 2020-06-09 Image generation method and system Withdrawn CN111915732A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010517305.5A CN111915732A (en) 2020-06-09 2020-06-09 Image generation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010517305.5A CN111915732A (en) 2020-06-09 2020-06-09 Image generation method and system

Publications (1)

Publication Number Publication Date
CN111915732A true CN111915732A (en) 2020-11-10

Family

ID=73237648

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010517305.5A Withdrawn CN111915732A (en) 2020-06-09 2020-06-09 Image generation method and system

Country Status (1)

Country Link
CN (1) CN111915732A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023110135A1 (en) * 2021-12-17 2023-06-22 Nordischer Maschinenbau Rud. Baader Gmbh + Co. Kg Method and device for determining the pose of curved articles and for attaching said articles

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023110135A1 (en) * 2021-12-17 2023-06-22 Nordischer Maschinenbau Rud. Baader Gmbh + Co. Kg Method and device for determining the pose of curved articles and for attaching said articles

Similar Documents

Publication Publication Date Title
JP5705147B2 (en) Representing 3D objects or objects using descriptors
Salti et al. A performance evaluation of 3d keypoint detectors
Ji et al. A novel simplification method for 3D geometric point cloud based on the importance of point
Sun et al. An efficient and compact 3D local descriptor based on the weighted height image
CN114359042A (en) Point cloud splicing method and device, three-dimensional scanner and electronic equipment
Sun et al. Zernet: Convolutional neural networks on arbitrary surfaces via zernike local tangent space estimation
CN113168729B (en) 3D shape matching method and device based on local reference coordinate system
Drost et al. Almost constant-time 3D nearest-neighbor lookup using implicit octrees
CN116596755B (en) Method, device, equipment and storage medium for splicing point cloud data
Li et al. Improved algorithm for point cloud registration based on fast point feature histograms
JP7075654B2 (en) 3D CAD model partial search method and 3D CAD model search method
Lu et al. Automatic point cloud registration algorithm based on the feature histogram of local surface
Akgül et al. Density-based 3D shape descriptors
Pratikakis et al. Partial 3D object retrieval combining local shape descriptors with global fisher vectors
Du et al. MDCS with fully encoding the information of local shape description for 3D Rigid Data matching
CN111915732A (en) Image generation method and system
JP2017168081A (en) 3d object localization with descriptor
CN110570511B (en) Processing method, device and system of point cloud data and storage medium
CN115147433A (en) Point cloud registration method
Katayama et al. A retrieval method for 3D CAD assembly models using 3D radon transform and spherical harmonic transform
CN115371596A (en) Straightness measuring method and device based on iterative search
CN115471636A (en) Virtual scene determination method and device
Schmitt et al. A 3D shape descriptor based on depth complexity and thickness histograms
CN113111741A (en) Assembly state identification method based on three-dimensional feature points
Sa et al. Depth grid-based local description for 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
WW01 Invention patent application withdrawn after publication

Application publication date: 20201110

WW01 Invention patent application withdrawn after publication