Analysis of feature extraction from slice image of

  • Detail

Aiming at the key problems in reverse engineering, this paper adopts contour polygonization algorithm and polygon Boolean operation to solve the problem of feature extraction of part slice image, and discusses the implementation method of solid reconstruction

1 overview

reverse engineering in the modern sense (also known as reverse engineering technology) is actually the construction of three-dimensional solid models of parts or products based on existing parts or product prototypes. At present, reverse engineering technology has become an important way for countries all over the world to digest and absorb foreign advanced technology. The basic idea of reverse engineering is to obtain the data information of the existing foreign products through various measurement methods (such as the original data measured by coordinate measuring machine, the cross-sectional image of the parts obtained by means of industrial CT scanning, scanner scanning or digital photography, etc.), and then carry out a series of processing on these images or data before feature recognition, and then, Using these identified feature information, with the help of commercialized geometric modeling software, solid modeling is carried out to form a three-dimensional solid model of the part, and then through the improvement of the reconstructed solid model, a new product with better performance is constructed and designed. At present, the main problem that puzzles reverse engineering is feature recognition. From the research status at home and abroad, it is basically to use human-computer interaction to repair the data or manual processing to repair the original measurement data before feature recognition, which greatly extends the manufacturing cycle of products. Therefore, this paper studies an automatic feature recognition method that reduces the conversion cost. Compared with the existing methods, it greatly improves the automation of feature recognition and shortens the manufacturing cycle of products

basic idea of algorithm

in reference [1], we discussed the filtering and boundary extraction of the product slice sectional image, from which we can obtain the contour information of the product sectional area (that is, it is composed of a series of closed inner and outer rings). The work of this paper is to polygonize these contour information (composed of pixel points) (that is, the contour is approximately represented by a small straight line segment), then ring match each layer of contour data after polygonization layer by layer, and extract a series of geometric features that can be used for feature modeling. Finally, the secondary development tools provided by the commercial modeling software are used to program and read these feature information, automatically carry out solid modeling, generate part drawings and NC codes that can be used for NC machining or STL files for Laser Rapid Prototyping for machining and manufacturing

(1) polygonization of boundary contour

the contour curve (or inner and outer ring information) of the part obtained after boundary extraction is connected by adjacent image elements. Because such a curve not only contains too many points, but also contains noise information that cannot be eliminated in image processing, it not only has a large amount of data and low efficiency in feature recognition processing, but also is difficult to carry out feature recognition. Therefore, these data must be polygonized before feature recognition

strictly speaking, any curve that can be displayed on the computer display is a polygon, because any curve displayed on the screen is formed by connecting two adjacent pixels. Theoretically, any curve and any accuracy requirements can be achieved by polygon approximation. Here, the purpose of polygonization is to minimize the number of vertices. In addition, as mentioned earlier, the data obtained from the previous preprocessing often contains a large number of noise components. For these unfiltered noises, we also hope to eliminate them as much as possible during polygonization. Therefore, when polygonizing, we first group the curve contour points to be polygonized, and then check whether each group of points are collinear. If not, continue to segment the points of this group until they are collinear; Similarly, two adjacent groups of points that have been checked to be collinear are checked for collinearity. If they are collinear, they are combined into one. In this way, they are continuously divided and merged until all the point combination parts are processed

there are two key problems to be solved here: one is how to judge that the point set is collinear. The main problem is how to determine the error threshold of collinearity. The most direct method is to judge the distance between the point and the straight line, but this judgment method often causes graphic distortion. As shown in Figure 1

figure 1

although the distance between point C and straight line AB to open the oil pump is very small, the three points of ABC are not collinear. In order to solve this problem, in this algorithm, two steps are used to solve this problem. First, check the distance between point C and straight line ab. if this value is greater than the given threshold value, it is considered that it is not collinear; Otherwise, check the change of the arc length (replaced by the approximate line segment). If the change of the arc length is less than the given threshold, it is considered to be collinear, otherwise, it is considered not to be collinear. By using this method, we can avoid mistaking this situation as ABC three points collinear. The second is that the intersection of lines and arcs often causes serious distortion of graphics. As shown in Figure 2 (b)

in order to solve this problem, in general image vectorization algorithms, the threshold is often very small, which often leads to a doubling of the amount of data. Therefore, in the algorithm of this paper, first, the points that are considered to be collinear are fitted by the least square method, then the two points of the two ends of the nearest line are projected to the line respectively, and the two projection points are taken as the two endpoints of the fitted line, which solves this problem well, as shown in Figure 2 (c)

(a) before processing (b) (c) after processing

Figure 2

(2) feature matching

the purpose of feature matching is to find out the constituent features of the product by means of ring matching according to the contour curve on the cross-section of different slices where the output signal of each sensor of the part is often weak. In this algorithm, all the rings on different slice layers are polygonized in advance, so we can judge whether the two rings on different layers represent the same feature according to the Boolean operation of polygons. The basic idea of the algorithm can be described as follows:

let P1 and P2 represent two polygon rings on different layers respectively, and R1 and R2 represent the rectangular bounding boxes of P1 and P2 respectively, as shown in Figure 3

figure 3

① first determine whether the rectangles R1 and R2 intersect, or R1 and R2 do not intersect, that is, R1 ∩ R2 = Φ, It means that these two polygons cannot belong to two sections on the same feature, and false is returned. Otherwise, proceed to the next step

② if the rectangles R1 and R2 intersect, calculate the areas of the two polygons in turn. If the ratio of the areas of the two polygons is greater than the given threshold, it indicates that the shapes of the two polygons are very different and do not belong to two sections on the same feature, and return false. Otherwise, proceed to the next step

③ calculate the intersection of these two polygons, that is, P = P1 ∩ P2; If the difference between P and the original polygon is very small, it means that the two polygons are two sections of the same feature, and trur is returned. Otherwise, continue to judge with the following steps:

A. if a rectangular bounding box is contained in another rectangular bounding box, such as R2 ∈ R1, first calculate the intersection of R2 and polygon P1, that is, R2 ∩ P1, and then calculate its intersection with polygon P2. If the difference between the area of the polygon (i.e. intersection) obtained after intersection and the area of the original polygon is less than the given threshold, then it is considered that the difference between the area of these two polygons (i.e. intersection) and the area of the original polygon is less than the given threshold, then it is considered that these two polygons belong to two sections of the same feature, and trur is returned; Otherwise, the two sections do not belong to the same feature and return false

b. for cases other than the above, first calculate the intersection of the rectangular bounding boxes of the two polygons, that is, R12 = R1 ∩ R2. If the ratio of R12 to the area of the bounding box R1 (or R2) is not within the preset allowable range, it means that the two polygons cannot belong to two sections of the same feature, and false is returned; Otherwise, calculate the intersection of polygon P1, polygon P2 and rectangle R12 respectively. For example, let their intersection be P1 '= P1 ∩ R12, P2' = P2 ∩ R12 respectively; Then, the current development status of the domestic plastic machinery industry is that there are low independent innovation ability and few advanced and personalized special varieties. Then calculate the bounding boxes R1 'and R2' of polygons P1 'and P2' respectively, so that R1 = R1 ', R2 = R2', return to step (1) and repeat the above process

in order to further improve the efficiency of polygon intersection, in the process of polygon intersection, we first judge whether the polygon is a convex polygon or a general polygon, and then use different algorithms for polygon intersection. Because the intersection algorithm of convex polygons is much simpler than that of general polygons, this method can greatly improve the efficiency of the algorithm

(3) solid reconstruction

solid reconstruction is to reconstruct the three-dimensional solid model of the part by using the solid modeling method and geometric modeling software based on various shape features extracted after feature recognition according to the algorithm described above. Generally speaking, after the feature recognition is completed, we get all kinds of feature information about the constituent parts (such as basic features, structural features, auxiliary features, etc.). Before 3D feature reconstruction, we first classify the various features of the constituent products, usually starting from the basic features, classify the various structural features to form a feature classification tree, Then, 3D feature modeling software is used for 3D reconstruction. In 3D reconstruction, the feature classification tree is used to start with the basic feature of the product (or part), and then add various structural features based on the feature, and finally form the 3D model of the product. In order to complete the whole modeling process automatically, it is generally necessary to carry out secondary development with the help of secondary development tools provided by commercial modeling software to complete the required operations. In the system of this paper, when we carry out three-dimensional reconstruction, we use the secondary development tool provided by the commercial modeling software solidwork97 to carry out secondary development with visual basic language, and realize the process of automatically constructing the three-dimensional model of the product by using the above identified feature information. Figure 4 is an example of the part constructed by this method

Figure 4


this paper focuses on the problem of feature recognition and 3D reconstruction in reverse engineering. The problem of feature recognition has always been a bottleneck in reverse engineering. In this paper, polygonization and polygon Boolean operations are used to solve the problem of automatic feature recognition. Practice shows that the algorithm is effective for the reverse design of parts with medium complexity

Copyright © 2011 JIN SHI