CN109242955B - Workpiece manufacturing characteristic automatic identification method and device based on single image - Google Patents

Workpiece manufacturing characteristic automatic identification method and device based on single image Download PDF

Info

Publication number
CN109242955B
CN109242955B CN201810937987.8A CN201810937987A CN109242955B CN 109242955 B CN109242955 B CN 109242955B CN 201810937987 A CN201810937987 A CN 201810937987A CN 109242955 B CN109242955 B CN 109242955B
Authority
CN
China
Prior art keywords
concave
curved surface
convex
image
shape
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
Application number
CN201810937987.8A
Other languages
Chinese (zh)
Other versions
CN109242955A (en
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.)
Shandong Normal University
Original Assignee
Shandong Normal University
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 Shandong Normal University filed Critical Shandong Normal University
Priority to CN201810937987.8A priority Critical patent/CN109242955B/en
Publication of CN109242955A publication Critical patent/CN109242955A/en
Application granted granted Critical
Publication of CN109242955B publication Critical patent/CN109242955B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a workpiece manufacturing characteristic automatic identification method and a device based on a single image, wherein the method comprises the following steps: acquiring a workpiece image, and determining a reflection map equation corresponding to the image; solving a reflection diagram equation reversely to obtain surface gradient and height, and reconstructing a three-dimensional curved surface of the workpiece; acquiring the shape characteristics of the three-dimensional curved surface, and segmenting the curved surface according to the shape characteristics; and combining the concave-convex characteristic identification rule to obtain the concave-convex characteristic of each divided curved surface. The method does not depend on a CAD three-dimensional model, can realize automatic identification of workpiece manufacturing characteristics only by applying the related technology of computer-aided geometric design on the basis of a single two-dimensional image of a part, and has higher practical value in the aspect of automatic identification of a robot.

Description

Workpiece manufacturing characteristic automatic identification method and device based on single image
Technical Field
The invention belongs to the technical field of image-based feature recognition, and particularly relates to a workpiece manufacturing feature automatic recognition method and device based on a single image.
Background
The identification of workpiece manufacturing characteristics based on images is one of typical applications of computer vision in industry, and aims to acquire geometric shape information such as shape indexes and deflection angles of different types of workpieces so as to identify the workpieces, and is one of the development trends of the intellectualization of industrial production lines. In recent years, with the rapid development of software and hardware technologies, image-based manufacturing feature recognition technology has been widely applied to the field of machining such as reverse design and parallel engineering.
The current mature manufacturing feature identification methods include methods based on graphs and clues, which are collectively called pattern matching methods, and methods based on manufacturing resources, hybrid methods, etc., and the basic idea is to compare the geometric characteristics of the surface of the part with predefined feature patterns and find out the regions that conform to the feature boundary patterns. The identification method based on manufacturing resources is to construct an information model by mapping and then take surface clustering as manufacturing characteristics, but the identification effect of the method on the curved surface characteristics of the complex part model is not ideal. The rule and graph based hybrid algorithm requires that there be a solid edge where the curvature of the surface region of the model changes, which can divide the surface, but once a face contains multiple relief regions, the method will not be able to identify these relief making features.
The feature identification method needs to take the CAD three-dimensional model of the part as initial input, however, in an intelligent factory, a robot cannot acquire feature information and engineering dimension information of the CAD three-dimensional model in production links such as assembly or secondary processing, and a large amount of manual assistance and secondary input are needed for explaining the part features from the manufacturing perspective, so that the efficiency of full-automatic production and processing of enterprises is seriously reduced, and the production and processing cost of the enterprises is increased. In addition, for most of the small and medium-sized enterprises engaged in the manufacturing industry in China, the main business and profit source of the enterprises are still the incoming material processing, assembling and secondary processing, branding production and the like, and the embarrassing situation of lacking CAD models and core design information of parts is inevitable. Therefore, the traditional workpiece shape feature recognition method based on the CAD model has great limitation to such enterprises.
Therefore, how to perform the feature recognition by bypassing the traditional idea of performing the manufacturing feature recognition based on the CAD design model, and solve the problem of automatic recognition of the manufacturing features in the production and processing processes of incoming material processing, secondary assembly and the like is a technical problem which is urgently solved by the technical personnel in the field at present.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a workpiece manufacturing characteristic automatic identification method based on a single image. The method comprises the steps of taking a single image of a part as initial input, firstly estimating light source direction parameters of the image, and accordingly realizing three-dimensional reconstruction of the surface of a workpiece; then analyzing the shape index of the surface of the reconstructed three-dimensional model to calculate a characteristic segmentation line, and segmenting the curved surface by using the characteristic line to obtain a corresponding characteristic region; and finally, realizing effective identification of the workpiece manufacturing characteristics based on the characteristic identification rule. The method does not depend on a CAD three-dimensional model, can realize automatic identification of workpiece manufacturing characteristics only by applying the relevant technology of computer-aided geometric design on the basis of a single two-dimensional image of a part, and has higher practical value in the aspect of automatic identification of a robot.
In order to achieve the purpose, the invention adopts the following technical scheme:
a workpiece manufacturing characteristic automatic identification method based on a single image comprises the following steps:
acquiring a workpiece image, and determining a reflection map equation corresponding to the image;
solving a reflection diagram equation reversely to obtain surface gradient and height, and reconstructing a three-dimensional curved surface of the workpiece;
acquiring the shape characteristics of the three-dimensional curved surface, and segmenting the curved surface according to the shape characteristics;
and combining the concave-convex characteristic identification rule to obtain the concave-convex characteristic of each divided curved surface.
Further, the determination of the reflectometry equation comprises the steps of:
determining a reflectance map function, the independent variables of which include source polar angle, source azimuth angle and surface gradient;
estimating a light source polar angle and a light source azimuth angle according to pixel values on the image;
and (3) taking the surface gradient as a variable, carrying out linearization processing on the reflection map function, and determining a reflection map equation of the target entity imaging.
Further, the solving the reflectometry equation in reverse to obtain the surface gradient and height comprises:
approximating a discrete object surface gradient by a backward finite difference method;
carrying out Taylor expansion on a certain point on a corresponding given image by using a reflection map equation, and obtaining a height iterative formula by using a relaxation iterative method;
and iteratively solving the height value of the whole image by adopting the iterative formula.
Further, the obtaining of the shape feature of the three-dimensional curved surface and the segmenting of the curved surface according to the shape feature includes:
calculating the shape characteristics of each point of the three-dimensional curved surface according to the curvature;
acquiring characteristic lines for segmenting different types of curved surfaces according to the shape characteristics;
and segmenting the curved surface based on the characteristic line.
Further, the shape feature is a shape index, and the different types of curved surfaces are jointly determined by three different shape indexes:
Figure GDA0001809531840000021
K t =1+3(1+sgn(K h ,e))+(1-sgn(K g ,e))
wherein L = p uu ·n,M=p uV ·n,N=p VV ·n,
Figure GDA0001809531840000031
F=p u ·p v ,/>
Figure GDA0001809531840000032
p u And p v Is the first derivative, p, of the parametric surface uu 、p vv And p uv Is a second order derivative of the parametric surface>
Figure GDA0001809531840000033
Further, the obtaining the feature lines for segmenting the different types of curved surfaces includes:
calculating a scalar field equivalent to the shape index;
and mapping the parameter curve of the intersection line of the scalar domain and the plane Z =0 back to a curved surface, namely a characteristic line.
Further, the irregularity identification rule is: suppose s i And s j Representing two mutually associated local surfaces, p i And p j Each represents s i And s j Center point of (1), n i And n j Each represents p i And p j The actual normal vector of (a); and requires: (1) p is a radical of i And p j Both of themLocated in a coordinate system; (2) n is i And n j Are all unit vectors; (3) the normal vector direction is surface outward;
note d ij =p i -p j ,α=(n i ,d ij ),γ=(n j ,d ij ) If the following conditions are met: alpha-gamma is greater than or equal to 0, then s i And s j Having a partially concave relationship forming a concave feature; if the conditions are met: alpha-gamma is less than or equal to 0, then s i And s j Having a locally convex relationship, forming a convex feature;
for composite relief features consisting of three and more than three local surfaces:
having a structure of C 0 、C 1 The shape formed by the combination of continuous pits, valleys and planar areas, wherein at least one pit-shaped area is a composite concave characteristic;
having a structure of C 0 、C 1 A shape formed by assembling continuous peaks, ridges and planar regions, wherein at least one peak region is a composite convex feature;
wherein, C 0 Continuity means that the two regions are connected; c 1 Continuity means that the two regions are first order differential continuous, or are tangentially continuous.
Further, the method further comprises: and merging the segmentation curved surfaces with the same concave-convex characteristics according to the connection relation.
According to a second object of the present invention, there is also provided a computing device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method for automatically identifying manufacturing characteristics of a workpiece based on a single image when executing the program.
According to a third object of the present invention, the present invention further provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the method for automatic identification of manufacturing characteristics of a workpiece based on a single image.
The invention has the advantages of
1. The method is based on single two-dimensional image to perform feature recognition, is simple and convenient to operate, and has high efficiency. The method does not depend on a CAD three-dimensional design model, and has higher practical value for medium and small enterprises engaged in incoming material processing, secondary processing and branding production types.
2. The invention adopts eight neighborhood points of the pixel to locally estimate the elevation angle and the azimuth angle of the light source, and improves the traditional illumination model so as to be applied to three-dimensional reconstruction in a complex illumination environment.
3. The invention can realize the automatic identification of the workpiece manufacturing characteristics by applying the relevant technology of computer aided geometric design on the basis of a single image without manual intervention and expensive detection equipment, and has low cost.
4. The invention introduces various shape indexes, comprehensively covers the concave-convex type of the curved surface, and can realize accurate definition of the concave-convex characteristics of the workpiece by combining the set concave-convex characteristic identification rule.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application.
FIG. 1 is a flow chart of the overall process of the present invention;
FIG. 2 is a schematic diagram of system coordinates;
FIG. 3 is a schematic view of direction selection;
FIG. 4 is a comparison of three-dimensional reconstruction of an actual mouse grayscale image, wherein FIG. 4 (a) is an original grayscale image, FIG. 4 (b) shows the three-dimensional reconstruction effect of a conventional SFS algorithm, and FIG. 4 (c) shows the three-dimensional reconstruction effect of an improved SFS algorithm;
FIG. 5 is two examples of curved surface segmentation;
fig. 6 is an example of concave-convex feature recognition, in which fig. 6 (a) is an original two-dimensional image, and fig. 6 (b) is a graph of concave-convex feature recognition effect;
FIG. 7 is a concavo-convex shape feature classification;
FIG. 8 is a CAD designed model of a flange;
FIG. 9 illustrates a method of molding the flange;
FIG. 10 is a tree of feature identifications for flanges;
FIG. 11 shows the identification result of the convex-concave characteristic of the flange part by the algorithm;
fig. 12 illustrates concave-convex feature recognition of a mold, wherein fig. 12 (a) is an original gray image, and fig. 12 (b) illustrates a concave-convex feature recognition result;
fig. 13 is a concave-convex feature recognition of a U-shaped groove part, wherein fig. 13 (a) is an original two-dimensional image of the U-shaped groove part (b) is a U-shaped groove part concave-convex feature recognition result.
Detailed Description
It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the disclosure. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments according to the present application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, and it should be understood that when the terms "comprises" and/or "comprising" are used in this specification, they specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof, unless the context clearly indicates otherwise.
The embodiments and features of the embodiments in the present application may be combined with each other without conflict.
Example one
The embodiment discloses a workpiece manufacturing feature automatic identification method based on a single image, as shown in fig. 1, specifically comprising the following steps:
step 1: and acquiring a workpiece image, and determining a reflection map equation corresponding to the image.
Step 1.1: acquiring a workpiece image, and simulating the light environment of a scene by adopting an illumination model;
the three-dimensional reconstruction method selected herein is a method of recovering a Shape From Shading (SFS), and the main idea is to recover the orientation and relative height of each point on the surface of an object based on the gray-level value of a single image.
In the SFS problem, the reflection equation based on a lambertian surface is as follows:
Figure GDA0001809531840000051
where E (x, y) is the gray value at the pixel point (x, y), I (x, y) is the intensity of the incident light, p is the reflectivity, (p, q, -1) is the surface normal vector represented by the gradient, (p s ,q s And-1) is the direction of incidence of the light source.
The conventional SFS method generally makes the following assumptions on imaging conditions, optical characteristics, etc. for the purpose of simplifying the problem: the light source is a point light source at infinity or parallel light for uniform illumination; the reflection model is a lambertian surface reflection model; the imaging geometry is an orthogonal projection. However, due to the influence of factors such as high noise, low illumination and equipment vibration in a production field, the harsh assumed conditions cannot well simulate the actual situation, so that an accurate and universal three-dimensional reconstruction result cannot be obtained, and the accuracy of subsequent manufacturing feature identification is seriously influenced. Therefore, in order to make the method closer to the actual working and experimental environment, the assumption of the light source problem in the conventional SFS method is improved herein.
In the study of the SFS problem, object surface height is usually expressed as z = f (x, y), and equation (1) can be abbreviated as a more abstract general form of the luminance constraint equation, namely:
E(x,y)=R(p,q) (2)
where E (x, y) is the gray value at the pixel point (x, y), R is the reflectogram function, and p and q are the partial derivatives of the surface height value z with respect to x, y. ρ is the reflectivity, (p, q, -1) is the surface normal vector represented by the gradient, (p s ,q s And-1) is the direction of incidence of the light source.
Rewrite equation (1) to the following form:
Figure GDA0001809531840000061
in the formula (3), n is a curved surface normal vector;
Figure GDA0001809531840000062
is the light source vector direction; />
Figure GDA0001809531840000063
And theta s Respectively, the source polar angle and the azimuth angle, as shown in fig. 2. In image processing, ρ and I are generally set to be constant.
Polar angle of light source
Figure GDA0001809531840000064
Can be estimated from equation (4):
Figure GDA0001809531840000065
wherein: coefficient alpha i Comprises the following steps: a is 0 =0.5673 a 1 =0.6230 a 2 =0.1901 a 3 =-0.6314 a 4 =-0.5430 a 5 =0.8982 a 6 =0.3534 a 7 =-0.5001
Azimuth angle theta of light source s Can be estimated from equation (5):
Figure GDA0001809531840000066
here E x,y The O operation is the mean value calculated by all pixel points on the preprocessed image;
Figure GDA0001809531840000067
n is the number of selected directions, the direction selection method is shown in figure 3, 8 neighborhood points are selected as the increment directions in the algorithm, and delta I i Is (δ x) i ,δy i ) A change in gray scale value in a direction.
Therefore, the first and second electrodes are formed on the substrate,
Figure GDA0001809531840000068
after the illumination parameters are estimated
Figure GDA0001809531840000069
And theta s Then, we can find the gradient (p, q) and height of the object surface. Compared with the traditional method, the improved method does not simply assume that the light source directions are uniformly set to be (0, -1), but first assumes that the normal vector distribution of the object surface is consistent in the three-dimensional space, then locally estimates the elevation angle and the azimuth angle of the light source by using eight neighborhood points of pixel points on the image, and finally obtains the estimation parameters related to the light source directions by adopting a relevant statistical method. The method reduces the limitation that the traditional method limits the application of the SFS due to unsuitably assuming certain prior conditions, so that the method for three-dimensional reconstruction can be more flexibly suitable for different environments.
Step 1.2: and (5) carrying out linearization processing on the reflection map function by utilizing the surface gradient, and determining a reflection map equation of the target entity imaging.
The surface gradient (p, q) is used as a variable, and the reflection map function is linearized by using the variable, which assumes that the low-order terms in the reflection map play a major role, so that the non-linear terms regarding p and q in equation (1) are directly omitted, thereby obtaining the following linear SFS problem:
Figure GDA0001809531840000071
wherein:
Figure GDA0001809531840000072
step 2: and solving the equation of the reflection diagram in a reverse direction to obtain the surface gradient or height and reconstruct the three-dimensional curved surface of the workpiece.
Step 2.1: approximating the gradient (p, q) of the surface of a discrete object by a backward finite difference method, i.e. such that
Figure GDA0001809531840000073
M and N are respectively the row number and the column number of the discrete image. The difference is substituted into the formula (6) and appropriately modified to obtain the following formula: />
Figure GDA0001809531840000074
Wherein:
Figure GDA0001809531840000075
(8) Where h ≠ 0, i.e., p s ≠q s . For equation (7), if the boundary condition z is known i,0 ,z 0,j The height value of each point on the surface can be solved.
Step 2.2: the reflection map equation of the image is deformed, taylor expansion is carried out on a certain point on the corresponding given gray level image by using the reflection map equation, and finally, a height iterative formula (9) is obtained by using a relaxation iterative method:
Figure GDA0001809531840000076
wherein omega is a relaxation factor, wherein,
Figure GDA0001809531840000077
is z i,j And has the following results:
Figure GDA0001809531840000078
in order to ensure the convergence of the relaxation iteration format, the value range of the relaxation factor ω is: omega is more than 0 and less than 2. The initial value for the iteration is generally assumed to be
Figure GDA0001809531840000081
Step 2.3: the height value of the whole two-dimensional gray image can be solved in an iterative manner by using the formula (9), and the three-dimensional curved surface reconstruction of the part is realized.
Fig. 4 shows a three-dimensional reconstruction effect diagram of an actual mouse grayscale image, and it can be seen from comparison between fig. 4 (b) and (c) that the three-dimensional effect diagram reconstructed by the improved algorithm herein has a good improvement in continuity and smoothness, a high definition of surface contour, and a vivid reproduction of the three-dimensional appearance of the mouse. Table 1 shows the error in the three-dimensional reconstruction of the mouse image and the comparison in the time required for the algorithm of the improved SFS algorithm with the conventional SFS algorithm. Although the improved SFS algorithm is somewhat slow in processing time, the error of reconstruction is greatly reduced, so that the average error value is reduced.
TABLE 1 comparison of Performance of the improved SFS Algorithm with the conventional SFS Algorithm for three-dimensional mouse reconstruction
Figure GDA0001809531840000082
And step 3: acquiring the shape characteristics of the three-dimensional curved surface, and segmenting the curved surface according to the shape characteristics;
the characteristics of the mechanical parts have function specificity and certain commonality, and if the commonality parts are designed into a sharing model, the redundancy of data information can be greatly reduced, and the effect of double results with half effort is achieved. The concave-convex machining feature is a basic machining feature of a machined part, is a bridge for connecting low-level geometric description and a feature oriented to a specific field, and is a preferred feature for developing a shared model, so that the concave-convex machining feature is mainly identified in the geometric shape feature.
The following requires identification of the manufacturing features based on the reconstructed three-dimensional model. The curvature of any point on the space curved surface is an important attribute for describing the shape of the three-dimensional model, reflects the concave-convex degree of the curved surface where the point is located, and has rotation invariance and translation invariance. The Gaussian curvature and the average curvature contain shape information of a curved surface, and different concave-convex areas are calculated on the basis of the two curvatures, so that the method can be used as a basic research method for identifying the three-dimensional object. Of course, if the influence of the material direction of the part is considered, the details and the precision of concave-convex feature identification can be improved. Manual intervention and detection equipment is still required, efficiency is too low, and such subtle features need not be recognized for robotic automatic recognition. Therefore, the shape index of the curved surface is calculated according to the curvature, and the concave-convex structure of the curved surface can be conveniently identified.
Step 3.1: calculating the shape index of the curved surface according to the curvature;
in three-dimensional space, a discrete parametric surface can be generally represented as:
p=p(u,v)=[u,v,f(u,v)] T ,u=1,...,m;v=1,...,n。 (11)
the shape index of the present embodiment may be selected as K g Or K h
Figure GDA0001809531840000091
Wherein, L = p uu ·n,M=p uV ·n,N=p VV ·n,
Figure GDA0001809531840000092
F=p u ·p v ,/>
Figure GDA0001809531840000093
p u And p v Is the first derivative, p, of the parametric surface uu 、p vv And p uv Is the second derivative of the parametric surface.
K g And K h Defined by two basic forms of a curved surface.
For greater accuracy and stability of the method, a further shape index K can also be introduced t The calculation formula is as follows:
K t =1+3(1+sgn(K h ,e))+(1-sgn(K g ,e)) (13)
wherein:
Figure GDA0001809531840000094
step 3.2: acquiring characteristic lines for dividing different areas by using the shape index;
according to the shape index K g And K h Positive and negative properties, there are generally 8 types of zone representations, as shown in table 2.
Table 2 8 surface types determined by shape index
Type of curved surface area K g K h K t
Pit + + 7
Peak/top surface + - 1
Valley/grain flour 0 + 8
Ridge/land 0 - 2
Saddle valley - + 9
Saddle ridge - - 3
Min/labyrinthine - 0 6
Plane surface 0 0 5
After the curved surface segmentation is finished, the type of the region can be judged according to the positive and negative properties of the shape index of the sampling point on each region. For example: k of one point in a certain area after division g If the value is positive, then the region may be a pit or a peak region. At this time, it is necessary to determine the point K h Positive or negative of (A), if K h The value of (d) is such that the region is of a pit type; otherwise, it is peak type. Let p (u, v) be a C 2 A continuous regular parametric surface, then K is satisfied on the surface g The locus line of points of =0 is called a parabolic curve, which divides the curved surface into shape indices K g Two part regions greater than 0 and less than 0. By substituting formula (13) for formula (12)
Figure GDA0001809531840000101
Since p = p (u, v) is a regular surface, then
Figure GDA0001809531840000102
Therefore, the formula (14) can be further simplified by the formula (15), and the shape index K is required g =0, it is equivalent to computing the scalar field:
Ψ=(p uu ·(p u ×p v ))(p vv ·(p u ×p v ))-(p uv ·(p u ×p v )) 2 =0 (16)
and K g Similarly, by reducing the shape index K h Obtaining a product of general formula K h Scalar domain Φ with same zero solution set:
Φ=(p uu ·(p u ×p v ))|p v | 2 -2(p uv ·(p u ×p v ))p u ·p v +(p vv ·(p u ×p v ))|p u | 2 (17)
now mapping the parametric curves of the intersection of scalar fields Ψ and Φ with plane Z =0 back onto the surface p = p (u, v), the feature curves can be obtained that segment the original surface into different regions, as shown in fig. 5.
Step 3.3: the curved surface is segmented by the characteristic lines.
And obtaining a unique region segmentation representation corresponding to the original model from the different regions and the topological relation among the different regions.
And 4, step 4: and combining concave-convex characteristic identification rules to define concave-convex characteristics of each segmentation curved surface.
The identification of the concave-convex characteristic of the curved surface is based on the following definitions:
suppose that: s i And s j Representing two mutually associated local surfaces, p i And p j Each represents s i And s j Center point of (1), n i And n j Each represents p i And p j The actual normal vector of (a). And requires: (1) p is a radical of i And p j Both are located in a certain coordinate system; (2) n is i And n j Are all unit vectors(ii) a And (3) the normal vector is surface outward.
Define 1 a partially concave relationship, s i And s j Both of which may be independently bound to p i And p j And n thereof i And n j Expand the corresponding description, note d ij =p i -p j ,α=(n i ,d ij ),γ=(n j ,d ij ) If the following conditions are met: alpha-gamma is greater than or equal to 0, then s i And s j Having a local concavity relationship, forming a concave feature, corresponding to a shape index K g ≥0,K h >0。
Define 2 a local convex relationship, having the same initial description as the local concave relationship, provided that the condition is met: alpha-gamma is less than or equal to 0, then s i And s j Has local convex relation, forms convex characteristics, and has corresponding shape index K g ≥0,K h <0。
The concave-convex feature recognition rule defined above is based on two surfaces, but if there is a composite concave-convex feature composed of three and more surfaces, the following recognition rule needs to be adopted:
c in the following definitions 0 Continuity means that the two regions are connected or positioned continuously, such continuity merely ensuring that there is no gap between the curved surfaces but that they are in full contact; c 1 Continuity means that the two regions are first order differential continuous, or are tangentially continuous.
Definitions 3 composite concave features are a class with C 0 、C 1 A shape formed by combining continuous pits, valleys and planar regions, wherein at least one pit region is included, and the corresponding shape index K h >0。
Definitions 4 composite convex features are a class with C 0 、C 1 The shape formed by the integration of continuous peaks, ridges and planar regions, wherein at least one peak region is included in the shape index K h <0。
Definition 5 the transition feature belongs to the auxiliary shape feature, and can be divided into 3 cases of rib round corner, concave rib round corner and chamfer, and mainly plays a role in separation. It is composed of the following 2 groups of curvature domains:
(1) A convex transition combination comprising a peak, saddle or ridge curvature domain;
(2) Concave transition combinations comprising concave, saddle or valley shaped curvature domains.
And 5: and merging the segmentation curved surfaces with the same concave-convex characteristics according to the connection relation.
The same type of curved surfaces can form regions with different areas according to the connection relationship after polymerization, and the regions are connected and combined according to a certain rule to obtain the local curved surface characteristics of the model. The region growing method is used to identify manufacturing features from the region representation model. The method comprises the following specific steps:
(1) Starting from any unaccessed surface patch, searching the adjacent surface patch, if the accessed surface patch and the initial surface patch have the same concave (convex) feature definition, fusing the accessed surface patch and the initial surface patch into the initial area, and setting the surface patch as accessed.
(2) If all the curved slices have been accessed, the search is ended, otherwise, the step (1) is turned to. Until no qualified curved surface pieces are available.
Example two
An object of the present embodiment is to provide a computing device.
An apparatus for automatic workpiece manufacturing feature recognition based on a single image, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the program, comprising:
acquiring a workpiece image, and determining a reflection map equation corresponding to the image;
solving a reflection diagram equation reversely to obtain surface gradient and height, and reconstructing a three-dimensional curved surface of the workpiece;
acquiring the shape characteristics of the three-dimensional curved surface, and segmenting the curved surface according to the shape characteristics;
and combining the concave-convex characteristic identification rule to obtain the concave-convex characteristic of each divided curved surface.
EXAMPLE III
An object of the present embodiment is to provide a computer-readable storage medium.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, performs the steps of:
acquiring a workpiece image, and determining a reflection map equation corresponding to the image;
solving a reflection diagram equation reversely to obtain surface gradient and height, and reconstructing a three-dimensional curved surface of the workpiece;
acquiring the shape characteristics of the three-dimensional curved surface, and segmenting the curved surface according to the shape characteristics;
and combining the concave-convex characteristic identification rule to obtain the concave-convex characteristic of each divided curved surface.
The steps involved in the second and third embodiments correspond to the first embodiment of the method, and the detailed description thereof can be found in the relevant description of the first embodiment. The term "computer-readable storage medium" should be taken to include a single medium or multiple media containing one or more sets of instructions; it should also be understood to include any medium that is capable of storing, encoding or carrying a set of instructions for execution by a processor and that cause the processor to perform any of the methods of the present invention.
And (4) verification result:
taking a model of a mechanical part as an example, as shown in fig. 6, fig. 6 (a) is an original two-dimensional image, and fig. 6 (b) is a concave-convex feature recognition effect map. From this figure it can be seen that the concave and convex regions of this mechanical part model were successfully identified using the algorithm herein, for a total of 3 concave regions (regions indicated by the letter a) and 4 convex regions (regions indicated by the letter b), where the shape index K of the center point of the a1 face is g =1.0845e-04,K h =0.0206,K t =8, this surface is a valley concavity according to table 2, and the remaining surfaces are non-characteristic regions.
A typical detailed classification of the features of the concave-convex shape is shown in fig. 7.
A flange model (see fig. 8) is designed in CAD and compared with the present recognition method using the conventional feature recognition method. In the original CAD model, the used modeling method comprises stretching, cutting, mirroring, fillets and the like (as shown in FIG. 9), the information is the operation oriented to geometric modeling and is not the manufacturing characteristics of the part, therefore, the characteristics and the dimension parameter information of the part need to be input manually and secondarily in the identification process, the traditional manufacturing characteristic identification method is utilized, the system maps the design characteristics into the corresponding processing and manufacturing characteristics such as grooves, holes, steps, chamfers and the like (as shown in FIG. 10), and the identification precision is high under the condition of manual assistance. Fig. 11 shows the identification result of the flange part by using the algorithm, manual intervention is not required in the identification process, and the concave-convex manufacturing characteristics of the flange can be identified only by a single two-dimensional image of the part (wherein the shape indexes Kh at four circular holes are both larger than zero and are concave characteristics, and the middle part is a composite convex characteristic), so that the efficiency is high, but the identification precision needs to be improved.
To further verify the effect of the method described herein, identification of concave-convex features was performed on the two part images, respectively. Where fig. 12 is the original grayscale image and the concave-convex feature recognition result of a mold, as shown in fig. 12 (b), inside the white contour line is a composite concave feature composed of a set of pits, valleys, and planar regions.
Fig. 13 shows part of the results of a U-groove part identification process, and table 3 shows the main shape characteristic values of the sampling points of fig. 13 (b). Local concave-convex characteristics of each sampling point can be identified by combining the table 3 and concave-convex characteristic identification rules, and the position 1 of each sampling point is a concave characteristic; sample point 2 position is a compound convex feature, but close to a plane; sample 3 locations are complex convex features and sample 4 locations are concave features. Therefore, the identification result based on the three-dimensional reconstruction features is very consistent with the concave-convex structure of the real object, and the effectiveness of the algorithm is fully proved.
TABLE 3 form index feature List for each labeled point in FIG. 13 (b)
Figure GDA0001809531840000131
The invention has the advantages of
1. The method is based on single two-dimensional image to perform feature recognition, is simple and convenient to operate, and has high efficiency. The method does not depend on a CAD three-dimensional design model, and has higher practical value for medium and small enterprises engaged in incoming material processing, secondary processing and branding production types.
2. The invention adopts eight neighborhood points of the pixel to locally estimate the elevation angle and the azimuth angle of the light source, and improves the traditional illumination model so as to be applied to three-dimensional reconstruction in a complex illumination environment.
3. The invention can realize the automatic identification of the workpiece manufacturing characteristics by applying the relevant technology of computer-aided geometric design on the basis of a single image without manual intervention and expensive detection equipment, and has low cost.
4. The invention introduces various shape indexes, comprehensively covers the concave-convex type of the curved surface, and can realize accurate definition of the concave-convex characteristics of the workpiece by combining the set concave-convex characteristic identification rule.
Those skilled in the art will appreciate that the modules or steps of the present invention described above can be implemented using general purpose computer means, or alternatively, they can be implemented using program code that is executable by computing means, such that they are stored in memory means for execution by the computing means, or they are separately fabricated into individual integrated circuit modules, or multiple modules or steps of them are fabricated into a single integrated circuit module. The present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Although the embodiments of the present invention have been described with reference to the accompanying drawings, it is not intended to limit the scope of the present invention, and it should be understood by those skilled in the art that various modifications and variations can be made without inventive efforts by those skilled in the art based on the technical solution of the present invention.

Claims (7)

1. A workpiece manufacturing characteristic automatic identification method based on a single image is characterized by comprising the following steps:
acquiring a workpiece image, and determining a reflection map equation corresponding to the image;
solving the equation of the reflection diagram reversely to obtain the surface gradient and height, and reconstructing the three-dimensional curved surface of the workpiece;
acquiring the shape characteristics of the three-dimensional curved surface, and segmenting the curved surface according to the shape characteristics;
combining concave-convex characteristic identification rules to obtain concave-convex characteristics of each segmented curved surface;
the determination of the reflectometry equation comprises the steps of:
determining a reflectance map function, the independent variables of which include source polar angle, source azimuth angle and surface gradient;
estimating a light source polar angle and a light source azimuth angle according to pixel values on the image;
taking the surface gradient as a variable, carrying out linearization processing on the reflection map function, and determining a reflection map equation of target entity imaging;
solving the reflectometry equation in reverse to obtain the surface gradient and height comprises:
approximating a discrete object surface gradient by a backward finite difference method;
carrying out Taylor expansion on a certain point on a corresponding given image by using a reflection map equation, and obtaining a height iterative formula by using a relaxation iterative method;
iteratively solving the height value of the whole image by adopting the iterative formula;
acquiring the shape characteristics of the three-dimensional curved surface, and segmenting the curved surface according to the shape characteristics comprises the following steps:
calculating the shape characteristics of each point of the three-dimensional curved surface according to the curvature;
acquiring characteristic lines for segmenting different types of curved surfaces according to the shape characteristics;
segmenting the curved surface based on the characteristic line;
the concave-convex recognition rule is as follows:
suppose s i And s j Representing two mutually associated local surfaces, p i And p j Each represents s i And s j Center point of (1), n i And n j Each represents p i And p j The actual normal vector of (a); and requires: (1) p is a radical of i And p j Both are located in a certain coordinate system; (2) n is i And n j Are all unit vectors; (3) the normal vector direction is surface outward;
note d ij =p i -p j ,α=(n i ,d ij ),γ=(n γ ,d ij ) If the following conditions are met: alpha-gamma is greater than or equal to 0, then s i And s j Having a partially concave relationship forming a concave feature; if the conditions are met: alpha-gamma is less than or equal to 0, then s i And s j Having a locally convex relationship, forming a convex feature;
judging the type of the region according to the positive and negative properties of the shape index of the pixel point on each region;
for composite relief features consisting of three and more than three local surfaces:
having a structure of C 0 、C 1 The shape formed by the combination of continuous pits, valleys and planar areas, wherein at least one pit-shaped area is a composite concave characteristic;
having a C 0 、C 1 The shape formed by the aggregation of continuous peaks, ridges and planar areas at least comprises a peak-shaped area which is a composite convex characteristic;
wherein, C 0 Continuity means that the two regions are connected; c 1 Continuity means that the two regions are first order differential continuous, or are tangentially continuous.
2. The method of claim 1, wherein the shape features are shape indices, and the different types of surfaces are determined by three different shape indices:
Figure FDA0003994426300000021
K t =1+3(1+sgn(K h ,e))+(1-sgn(K g ,e))
wherein, L = p aa ·n,M=p aV ·n,N=p vv ·n,
Figure FDA0003994426300000022
F=p α ·p v
Figure FDA0003994426300000023
p u And p v Is the first derivative, p, of the parametric surface uu 、p vv And p uv Is the second order derivative of the parametric surface,
Figure FDA0003994426300000024
3. the method of claim 2, wherein the obtaining of the feature lines for segmenting different types of surfaces comprises:
calculating a scalar field equivalent to the shape index;
and mapping the parameter curve of the intersection line of the scalar domain and the plane Z =0 back to a curved surface, namely a characteristic line.
4. The method for automatically identifying manufacturing features of a workpiece based on a single image as claimed in claims 1-2, wherein the concave-convex identification rule is as follows: k of points in a region after division g If the value is positive, then the region may be a pit or a peak-type region; at this time, it is necessary to determine K of a point h Positive and negative, if K h The value of (d) is such that the region is of a pit type; otherwise, it is peak type.
5. The method of claim 1, wherein the method further comprises: and merging the segmentation curved surfaces with the same concave-convex characteristics according to the connection relation.
6. A computing device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the method for automatic identification of manufacturing characteristics of a workpiece based on a single image according to any one of claims 1 to 5.
7. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the method for automatic identification of manufacturing characteristics of a workpiece based on a single image according to any one of claims 1 to 5.
CN201810937987.8A 2018-08-17 2018-08-17 Workpiece manufacturing characteristic automatic identification method and device based on single image Active CN109242955B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810937987.8A CN109242955B (en) 2018-08-17 2018-08-17 Workpiece manufacturing characteristic automatic identification method and device based on single image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810937987.8A CN109242955B (en) 2018-08-17 2018-08-17 Workpiece manufacturing characteristic automatic identification method and device based on single image

Publications (2)

Publication Number Publication Date
CN109242955A CN109242955A (en) 2019-01-18
CN109242955B true CN109242955B (en) 2023-03-24

Family

ID=65069702

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810937987.8A Active CN109242955B (en) 2018-08-17 2018-08-17 Workpiece manufacturing characteristic automatic identification method and device based on single image

Country Status (1)

Country Link
CN (1) CN109242955B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110659652B (en) * 2019-09-10 2023-08-18 东华大学 Feature matching detection system of fan device Creo model

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012071688A1 (en) * 2010-12-03 2012-06-07 中国科学院自动化研究所 Method for analyzing 3d model shape based on perceptual information
WO2015154601A1 (en) * 2014-04-08 2015-10-15 中山大学 Non-feature extraction-based dense sfm three-dimensional reconstruction method
CN105354353A (en) * 2015-09-28 2016-02-24 武汉开目信息技术有限责任公司 MBD model based processing feature identification and modeling method
CN108154066A (en) * 2016-12-02 2018-06-12 中国科学院沈阳自动化研究所 A kind of Three-dimensional target recognition method based on curvature feature recurrent neural network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012071688A1 (en) * 2010-12-03 2012-06-07 中国科学院自动化研究所 Method for analyzing 3d model shape based on perceptual information
WO2015154601A1 (en) * 2014-04-08 2015-10-15 中山大学 Non-feature extraction-based dense sfm three-dimensional reconstruction method
CN105354353A (en) * 2015-09-28 2016-02-24 武汉开目信息技术有限责任公司 MBD model based processing feature identification and modeling method
CN108154066A (en) * 2016-12-02 2018-06-12 中国科学院沈阳自动化研究所 A kind of Three-dimensional target recognition method based on curvature feature recurrent neural network

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
基于Phong模型的多幅图像SFS算法研究;张宁等;《计算机技术与发展》;20130110(第01期);全文 *
基于月面单幅图像的软着陆障碍识别与安全区选取方法;吴伟仁等;《深空探测学报》;20141215(第04期);全文 *
基于球面调和函数的人脸识别;胡彭勇;《合肥学院学报(自然科学版)》;20080515(第02期);全文 *
张宁等.基于Phong模型的多幅图像SFS算法研究.《计算机技术与发展》.2013,(第01期), *

Also Published As

Publication number Publication date
CN109242955A (en) 2019-01-18

Similar Documents

Publication Publication Date Title
US9123112B2 (en) Method for the pre-processing of a three-dimensional image of the surface of a tyre for use in the inspection of said surface
Yang et al. Segmentation of measured point data using a parametric quadric surface approximation
Marshall et al. Robust segmentation of primitives from range data in the presence of geometric degeneracy
Zha et al. Geometric approaches to input file modification for part quality improvement in additive manufacturing
US20130266189A1 (en) Method for the pre-processing of a three-dimensional image of the surface of a tyre using successive b-spline deformations
CN108305289B (en) Three-dimensional model symmetry characteristic detection method and system based on least square method
CN114743259A (en) Pose estimation method, pose estimation system, terminal, storage medium and application
Zheng et al. An adaptive and stable method for fitting implicit polynomial curves and surfaces
Hu et al. Geometric feature enhanced line segment extraction from large-scale point clouds with hierarchical topological optimization
CN109242955B (en) Workpiece manufacturing characteristic automatic identification method and device based on single image
CN117132630A (en) Point cloud registration method based on second-order spatial compatibility measurement
Zhu et al. Curvature-variation-inspired sampling for point cloud classification and segmentation
Sacchi et al. Curvature estimation for segmentation of triangulated surfaces
Li et al. Three-dimensional point cloud registration by matching surface features with relaxation labeling method
Tazir et al. Cluster ICP: Towards sparse to dense registration
CN115147433A (en) Point cloud registration method
CN108876922B (en) Grid repairing method based on internal dihedral angle compensation regularization
Takashima et al. Recognition of free-form features for finite element meshing using deep learning
Zhao et al. NormalNet: Learning-based normal filtering for mesh denoising
Ji et al. Point cloud segmentation for complex microsurfaces based on feature line fitting
Belyaev et al. Detection of ridges and ravines on range images and triangular meshes
CN115147471A (en) Laser point cloud automatic registration method based on curvature density characteristics
CN110533781B (en) Automatic labeling method for multi-class three-dimensional model components
Sa et al. Depth grid-based local description for 3D point clouds
Lu et al. Fast point cloud registration algorithm using multiscale angle features

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