Image registration methods, equipment, media and products for additive manufacturing
By constructing a special grid-like initial calibration pattern and performing a straight-line fitting operation, the problem of insufficient registration accuracy of traditional calibration plates in laser powder bed fusion additive manufacturing is solved, achieving accurate registration in damaged and noisy environments, and improving the accuracy of equipment calibration and printing quality inspection.
Patent Information
- Application Number
- CN202611241803.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-17
- Publication Date
- 2026-11-17
AI Technical Summary
In existing technologies, traditional calibration plate patterns are prone to damage, shadow noise, and unclear edges in laser powder bed fused additive manufacturing. This makes it difficult to accurately align the calibration plate pattern captured by the camera with the original design calibration pattern, and makes it impossible to accurately adjust printing parameters.
An initial calibration pattern is constructed, consisting of a grid composed of several parallel uniform and non-uniform straight lines. The calibration board is printed and photographed using additive manufacturing equipment. Gaussian blurring and edge point extraction are performed, and straight line fitting is carried out to establish a homography matrix, thereby achieving registration between the initial and target calibration patterns.
Even with defects and shadow noise in the calibration pattern, accurate registration of the camera-captured pattern with the original design pattern was achieved, improving the calibration accuracy of the additive manufacturing equipment and providing a benchmark for print quality inspection.
Smart Images

Figure CN123118709A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of additive manufacturing technology, and in particular to an image registration method, apparatus, medium and product for additive manufacturing. Background Technology
[0002] Image registration refers to obtaining a homography matrix, representing the pixel coordinate transformation relationship between two overlapping images, through steps such as feature point extraction, feature point matching, and homography matrix calculation. For images generated by multiple fixed cameras or sensors, a calibration board with a fixed pattern is often photographed, and the sub-pixel coordinate matching relationship of the corner points or spots on it is extracted to calculate an accurate homography matrix. Common calibration boards are classified according to their patterns, such as checkerboard calibration boards, circular grid calibration boards, and ChArUco (a type of calibration board). The use of these calibration boards requires a certain level of image quality: if shadows, smudges, or pattern damage exist, the recognition and positioning of the calibration board will inevitably have significant errors, or even fail to recognize the image.
[0003] Laser Powder Bed Fusion (LPBF) is a mainstream metal additive manufacturing technology. Its basic principle is to use lasers to sinter metal powder, layer by layer, and then sinter each layer to print the designed structure. Each printed layer corresponds to a two-dimensional binary design drawing, which represents the planned shape of that layer's structure; this is referred to as the design drawing below. In additive manufacturing, cameras are used to monitor the printing process online, allowing for adjustments to printing parameters and recording and studying the impact of process image data on the final product quality.
[0004] LPBF additive manufacturing online monitoring image registration not only achieves registration between images from various cameras, but also registers these images with the design drawings of each layer during additive manufacturing. The ideal registration method is to use a specific calibration pattern as a calibration board to accurately monitor the registration between images. However, the surface of laser printing is often uneven, and traditional calibration board patterns have significant defects, shadow noise, and unclear edges during printing, making it difficult to identify and extract accurate key points.
[0005] Therefore, a new image registration method for additive manufacturing is urgently needed to solve the above-mentioned technical problems and achieve accurate registration of the calibration board pattern and design drawing captured by the camera. Summary of the Invention
[0006] The technical problem to be solved by this disclosure is to overcome the shortcomings of traditional calibration plate patterns in the prior art, which have large defects and shadow noise during printing, unclear edges, difficulty in identifying and extracting accurate key points, inability to accurately register the calibration plate pattern captured by the camera with the original design calibration pattern, and inability to accurately adjust printing parameters. The disclosure provides an image registration method, device, medium and product for additive manufacturing.
[0007] This disclosure solves the above-mentioned technical problems through the following technical solution:
[0008] Firstly, an image registration method for additive manufacturing is provided, the image registration method comprising:
[0009] An initial calibration pattern is constructed, and the initial calibration pattern is printed using additive manufacturing equipment to obtain a printed calibration board;
[0010] The initial calibration pattern includes several parallel and uniformly arranged first straight lines and several parallel and non-uniformly arranged second straight lines, wherein the first straight lines and the second straight lines are perpendicular to each other to form a grid.
[0011] The printed calibration board is photographed to obtain the photographed calibration pattern;
[0012] The captured calibration pattern is preprocessed based on a linear fitting operation to obtain the target calibration pattern;
[0013] Establish the homography matrix between the initial calibration pattern and the target calibration pattern;
[0014] The initial calibration pattern and the target calibration pattern are registered based on the homography matrix.
[0015] Optionally, the step of preprocessing the captured calibration pattern based on line fitting to obtain the target calibration pattern includes:
[0016] Gaussian blur is applied to the captured calibration pattern to obtain a noise-reduced image;
[0017] The denoised image is subjected to edge point extraction to obtain the extracted image;
[0018] The line fitting operation is performed on each first straight line and each second straight line in the extracted image to obtain the first fitted straight line corresponding to each first straight line and the second fitted straight line corresponding to each second straight line, so as to form the target calibration pattern.
[0019] And / or, the step of establishing the homography matrix between the initial calibration pattern and the target calibration pattern includes:
[0020] Obtain the first two-dimensional label corresponding to each intersection point in the initial calibration pattern;
[0021] Obtain the second two-dimensional label corresponding to each intersection point in the target calibration pattern;
[0022] A homography matrix between the initial calibration pattern and the target calibration pattern is established based on the first two-dimensional label and the second two-dimensional label.
[0023] Optionally, the step of obtaining the second two-dimensional label corresponding to each intersection point in the target calibration pattern includes:
[0024] Obtain the intersection points between each of the first fitted lines and each of the second fitted lines in the target calibration pattern;
[0025] The baseline of the target calibration pattern is obtained based on the second fitted straight line;
[0026] The first center point of the baseline and the second center point of the target calibration pattern are obtained based on the intersection point.
[0027] Based on the first center point and the second center point, obtain the two-dimensional labels corresponding to each intersection point in the target calibration pattern.
[0028] Optionally, the plurality of parallel non-uniformly arranged second straight lines include a plurality of first sub-straight lines and a plurality of second sub-straight lines, wherein the plurality of first sub-straight lines are uniformly arranged among each other, the plurality of second sub-straight lines are uniformly arranged among each other, and the spacing between the plurality of first sub-straight lines is greater than the spacing between the plurality of second sub-straight lines.
[0029] The step of obtaining the baseline of the target calibration pattern based on the second fitted straight line includes:
[0030] Obtain the first and second fitted sub-lines from the second fitted line;
[0031] Wherein, the first fitted sub-line corresponds to the first sub-line, and the second fitted sub-line corresponds to the second sub-line;
[0032] The second fitted sub-line located in the middle among several second fitted sub-lines is taken as the baseline.
[0033] Optionally, the step of obtaining the first center point of the baseline and the second center point of the target calibration pattern based on the intersection point includes:
[0034] Based on each intersection point, obtain several target intersection points on the baseline;
[0035] The number of target intersection points is the same as the number of the first straight lines;
[0036] The first center point of the baseline is obtained based on the plurality of target intersection points;
[0037] The second center point of the target calibration pattern is obtained from the remaining intersection points after removing the target intersection points from all intersection points.
[0038] Optionally, the step of obtaining the second two-dimensional label corresponding to each intersection point in the target calibration pattern based on the first center point and the second center point includes:
[0039] The X-projection axis direction and Y-projection axis direction of the target calibration pattern are obtained based on the first center point and the second center point;
[0040] Based on the X-axis projection direction and the Y-axis projection direction, each intersection point is projected onto the X-axis projection direction and the Y-axis projection direction respectively to obtain the corresponding intersection point projection.
[0041] Clustering and sorting of all intersection point projections yields the second two-dimensional label corresponding to each intersection point in the target calibration pattern.
[0042] Optionally, the step of establishing the homography matrix between the initial calibration pattern and the target calibration pattern based on the first two-dimensional label and the second two-dimensional label includes:
[0043] Match the first two-dimensional label and the second two-dimensional label at the same intersection point to obtain several matching points;
[0044] The RANSAC (RANdom Sampling Consensus) algorithm is used to select several consistent points from all the matching points.
[0045] A homography matrix is established between the additive manufacturing monitoring cameras based on the aforementioned points of agreement.
[0046] In a second aspect, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and for running on the processor, wherein the processor executes the computer program to implement the additive manufacturing image registration method described above.
[0047] Thirdly, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the image registration method for additive manufacturing described above.
[0048] Fourthly, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the image registration method for additive manufacturing described above.
[0049] Based on common knowledge in the field, the above-mentioned preferred conditions can be combined arbitrarily to obtain various preferred embodiments of this disclosure.
[0050] The positive and progressive effects of this disclosure are as follows:
[0051] This disclosure discloses an image registration method, apparatus, medium, and product for additive manufacturing. It constructs a special initial calibration pattern, comprising several parallel, uniformly arranged first straight lines and several parallel, non-uniformly arranged second straight lines, with the first and second lines perpendicular to each other to form a grid. The initial calibration pattern is printed using additive manufacturing equipment to obtain a printed calibration board. The printed calibration board is then photographed to obtain a photographed calibration pattern. A target calibration pattern, obtained through line fitting, is used to establish a homography matrix between the initial and target calibration patterns. Registration is then performed on the initial and target calibration patterns based on this homography matrix. This method ensures that even when the photographed calibration pattern has significant defects, shadow noise, and unclear edges, the target calibration pattern is obtained through line fitting, thus completing the registration between the initial calibration pattern (the originally designed calibration pattern) and the target calibration pattern (the calibration board pattern related to camera photography). This exhibits strong robustness and allows for precise identification of equipment malfunctions based on the registration results, facilitating adjustments to printing parameters and achieving calibration of the additive manufacturing equipment. This provides a benchmark for subsequent printing quality inspection in additive manufacturing. Attached Figure Description
[0052] Figure 1 A schematic diagram of the first process of the image registration method for additive manufacturing provided in Embodiment 1 of this disclosure;
[0053] Figure 2 This is a schematic diagram of the initial calibration pattern in the image registration method for additive manufacturing provided in Embodiment 1 of this disclosure;
[0054] Figure 3 The two-dimensional mesh diagram of the three-dimensional mesh model corresponding to the initial calibration pattern in the image registration method for additive manufacturing provided in Embodiment 1 of this disclosure;
[0055] Figure 4 This is a schematic diagram of the target calibration pattern in the image registration method for additive manufacturing provided in Embodiment 1 of this disclosure;
[0056] Figure 5 This is a schematic diagram of the second process of the image registration method for additive manufacturing provided in Embodiment 1 of this disclosure;
[0057] Figure 6 A schematic diagram of the third process of the image registration method for additive manufacturing provided in Embodiment 1 of this disclosure;
[0058] Figure 7 for Figure 4A schematic diagram of the target marking pattern with a second two-dimensional label;
[0059] Figure 8 for Figure 2 A schematic diagram of the initial calibration pattern corresponding to the first two-dimensional label;
[0060] Figure 9 This is a schematic diagram of the registration result in the image registration method for additive manufacturing provided in Embodiment 1 of this disclosure;
[0061] Figure 10 This is a schematic diagram of the structure of the electronic device provided in Embodiment 2 of this disclosure. Detailed Implementation
[0062] The present disclosure is further illustrated below by way of embodiments, but the present disclosure is not limited to the scope of the embodiments described herein.
[0063] The prefixes such as "first" and "second" used in this disclosure are merely for distinguishing different descriptive objects and do not limit the position, order, priority, quantity, or content of the described objects. The use of ordinal numbers and other prefixes used to distinguish descriptive objects in this disclosure does not constitute a limitation on the described objects. The description of the described objects is given in the claims or the context of the embodiments, and should not constitute an unnecessary limitation due to the use of such prefixes. Furthermore, in the description of this embodiment, unless otherwise stated, "multiple" means two or more.
[0064] Example 1
[0065] This embodiment provides an image registration method for additive manufacturing, such as... Figure 1 As shown, the image registration method includes:
[0066] S1. Construct an initial calibration pattern and print the initial calibration pattern using additive manufacturing equipment to obtain a printed calibration board.
[0067] S2. Take a picture of the printed calibration board to obtain the calibration pattern.
[0068] S3. Based on the line fitting operation, the captured calibration pattern is preprocessed to obtain the target calibration pattern.
[0069] S4. Establish the homography matrix between the initial calibration pattern and the target calibration pattern.
[0070] S5. Register the initial calibration pattern and the target calibration pattern based on the homography matrix.
[0071] The initial calibration pattern includes several parallel, uniformly (equally spaced) first straight lines and several parallel, non-uniformly arranged second straight lines. The first and second straight lines are perpendicular to each other to form a grid. Figure 2 As shown, the initial calibration pattern consists of two sets of parallel lines (a first horizontal line and a second vertical line). These two sets of parallel lines intersect perpendicularly to form a grid, meaning the initial calibration pattern is a non-uniformly arranged checkerboard grid. The first line consists of four parallel, evenly spaced lines, while the second line consists of five parallel, non-uniformly spaced lines. The three rightmost lines in the second line are spaced closer together, half the spacing of the leftmost lines. The size of the initial calibration pattern is represented as P1(rows1, cols1), where cols1 is the number of uniformly spaced first lines, and rows1 is the number of non-uniformly spaced second lines. Figure 2 The initial calibration pattern shown can be represented as P1(5,4).
[0072] Based on this initial calibration pattern, design a corresponding 3D mesh model with a certain height. Figure 3 This is a two-dimensional mesh diagram corresponding to the three-dimensional mesh model, to facilitate 3D (3D) printing using additive manufacturing equipment, resulting in a printed calibration plate. The target calibration pattern is as follows: Figure 4 As shown.
[0073] The image registration method for additive manufacturing in this embodiment constructs a special initial calibration pattern, which includes several parallel and uniformly arranged first straight lines and several parallel and non-uniformly arranged second straight lines. The first and second straight lines are perpendicular to each other to form a grid. The initial calibration pattern is printed using additive manufacturing equipment to obtain a printed calibration board. The printed calibration board is photographed to obtain a photographed calibration pattern. The target calibration pattern obtained by line fitting operation is used to extract labels from the initial calibration pattern and the target calibration pattern to achieve registration between the two. This method can still complete the registration between the initial calibration pattern (the originally designed calibration pattern) and the target calibration pattern (the calibration board pattern related to camera shooting) even when the photographed calibration pattern has significant defects, shadow noise, and unclear edges. It has strong robustness, can accurately locate equipment abnormalities, and achieve calibration of additive manufacturing equipment, providing a benchmark for subsequent printing quality inspection in additive manufacturing.
[0074] In an alternative implementation, such as Figure 5 As shown, step S3 above includes:
[0075] S31. Perform Gaussian blur operation on the captured calibration pattern to obtain the noise-reduced image.
[0076] S32. Perform edge point extraction on the denoised image to obtain the extracted image.
[0077] S33. Perform line fitting operations on each first straight line and each second straight line in the extracted image to obtain the first fitted straight line corresponding to each first straight line and the second fitted straight line corresponding to each second straight line, so as to form the target calibration pattern.
[0078] As mentioned above, the initial calibration pattern is denoted as P1(rows1, cols1), where cols1 is the number of uniformly arranged first straight lines, and rows1 is the number of partially equidistant second straight lines. Figure 2 The initial calibration pattern shown is represented as P1(5,4).
[0079] By performing a line fitting operation, we obtain the first fitted line corresponding to each first line and the second fitted line corresponding to each second line, forming a target calibration pattern. The size of the target calibration pattern is also represented as P2(rows2, cols2), where cols2 is the number of uniformly arranged first fitted lines, and rows2 is the number of imperfectly equidistant second fitted lines, with cols2 = cols1 and rows2 = rows1. Figure 4 The target calibration pattern shown can be represented as P2(5,4).
[0080] The calibration pattern is denoised by Gaussian blurring. Edge point extraction is performed using the Canny operator (an edge detection operator). Finally, a line fitting operation, such as the RANCAC algorithm, is used. Each fitting operation extracts the longest line with the most supported edge points. The remaining edge points are then used to continue the fitting process until all rows1 + cols1 straight lines in the calibration pattern are extracted, thus obtaining the target calibration pattern.
[0081] Specifically, the principle of line fitting is as follows:
[0082] The formulas corresponding to the parameters of the line (A, B, C) are as follows:
[0083] ;
[0084] in: At the same time, it will also calculate the projection values of all support points onto the straight line:
[0085] ;
[0086] Where (xi, yi) are the coordinates of the i-th support point. The largest projection value d is selected from all projection values. promax and the minimum projection value d promin Then, the coordinates of the corresponding points are calculated and used as the endpoints of the actual line segment of the fitted line. The specific calculation formula is as follows:
[0087] ;
[0088] ;
[0089] Among them (X) min Y min (X) max Y max ) are the coordinates of the two endpoints of the fitted line.
[0090] In an alternative implementation, such as Figure 5 As shown, step S4 above includes:
[0091] S41. Obtain the first two-dimensional label corresponding to each intersection point in the initial calibration pattern.
[0092] S42. Obtain the second two-dimensional label corresponding to each intersection point in the target calibration pattern.
[0093] S43. Based on the first two-dimensional label and the second two-dimensional label, establish the homography matrix between the initial calibration pattern and the target calibration pattern.
[0094] Two-dimensional labels can also be called corner points or feature points.
[0095] A first homography matrix can be established from the initial calibration pattern to the target calibration pattern, and the initial calibration pattern can be registered to the target calibration pattern through the first homography matrix; alternatively, a second homography matrix can be established from the target calibration pattern to the initial calibration pattern, and the target calibration pattern can be registered to the initial calibration pattern through the second homography matrix.
[0096] In an alternative implementation, such as Figure 6 As shown, step S42 above includes:
[0097] S421. Obtain the intersection points between each first fitted line and each second fitted line in the target calibration pattern.
[0098] S422. Obtain the baseline of the target calibration pattern based on the second fitted straight line.
[0099] S423. Obtain the first center point of the baseline and the second center point of the target calibration pattern based on the intersection point.
[0100] S424. Based on the first center point and the second center point, obtain the two-dimensional labels corresponding to each intersection point in the target calibration pattern.
[0101] The specific method for obtaining the intersection points (Pc) between each first fitted line and each second fitted line in the target calibration pattern is as follows:
[0102] First, select any two lines (A1, B1, C1) and (A2, B2, C2) from the first and second fitted lines, and check if they are parallel, using the following formula:
[0103] ;
[0104] If the absolute value of det is close to zero, it means that the two lines are parallel and have no intersection point. Otherwise, the intersection point is calculated. The formula for calculating the intersection point Pc of two lines is as follows:
[0105] ;
[0106] ;
[0107] Where (x) c y c Let Pc be the coordinates of the intersection point Pc of the two lines. This intersection point needs to be checked to ensure that it lies within the range of the two line segments. The calculation method is to calculate the difference between the sum of the distances from this point to the endpoints of the line segments and the length of the line segments, as shown in the following formula:
[0108] ;
[0109] ;
[0110] in,( (), ( ) are the coordinates of the two endpoints of the line segment. Let the sum of the distances from a point to the endpoints of a line segment be the sum of the distances from that point to the endpoints of the line segment. If the difference between the sum of the distances from that point to the endpoints of the line segment is 1, then the sum of the distances from that point to the endpoints of the line segment is 1. If the value is greater than the set threshold, it is considered to be outside the line segment, and therefore (x) will not be included. c y c If a point is listed as a valid intersection and does not participate in subsequent processes, it is considered to be within the line segment, and (x) is then considered a valid intersection. c y c ) are listed as valid intersection points and participate in subsequent processes.
[0111] In an optional embodiment, the plurality of parallel, non-uniformly arranged second straight lines include a plurality of first sub-straight lines and a plurality of second sub-straight lines. The plurality of first sub-straight lines are uniformly arranged among each other, and the plurality of second sub-straight lines are uniformly arranged among each other. The spacing between the plurality of first sub-straight lines is greater than the spacing between the plurality of second sub-straight lines. The step of obtaining the reference line of the target calibration pattern based on the second fitted straight line (step S422 above) includes:
[0112] Obtain the first and second fitted sub-lines from the second fitted line; take the second fitted sub-line in the middle position among several second fitted sub-lines as the baseline; wherein, the first fitted sub-line corresponds to the first sub-line, and the second fitted sub-line corresponds to the second sub-line.
[0113] Figure 2 In the initial calibration pattern P1(5,4) shown, the number of first straight lines is 4 and the number of second straight lines is 5. The second straight lines include several first sub-straight lines and several second sub-straight lines. The several first sub-straight lines are evenly distributed among each other, and the several second sub-straight lines are evenly distributed among each other. The spacing between the several first sub-straight lines is greater than the spacing between the several second sub-straight lines, that is, the spacing between the three second sub-straight lines closest to the right is less than the spacing on the left.
[0114] Figure 4 The target calibration pattern shown is represented as P2(5,4). The number of first fitted lines is 4, and the number of second fitted lines is 5. The second fitted lines include several first fitted sub-lines and several second fitted sub-lines. The several first fitted sub-lines are evenly distributed, and the several second fitted sub-lines are evenly distributed. The spacing between the several first fitted sub-lines is greater than the spacing between the several second fitted sub-lines. That is, the spacing between the three second fitted sub-lines closest to the right is less than the spacing on the left. The second fitted sub-line in the middle position among the several second fitted sub-lines is taken as the baseline. That is, the middle line among the three second fitted sub-lines closest to the right is the baseline of the calibration pattern.
[0115] In an optional implementation, the step of obtaining the first center point of the baseline and the second center point of the target calibration pattern based on the intersection point (step S423 above) includes:
[0116] Based on each intersection point, obtain several target intersection points on the baseline; the number of target intersection points is the same as the number of the first straight line; obtain the first center point of the baseline based on several target intersection points; obtain the second center point of the target calibration pattern based on the remaining intersection points after removing several target intersection points from all intersection points.
[0117] First, calculate the Euclidean distance (in pixels) between the intersection points of the lines calculated above, and count the distance dnear2 between each point and its two nearest points. In ascending order, the cols2 points with the smallest dnear2 are the cols2 points Pb on the baseline of the target calibration pattern. The cols2 points Pb are several target intersection points.
[0118] The first center point Pbcenter of the baseline is obtained by averaging the coordinates of the two Pb points cols2. The second center point Center of the target calibration pattern is obtained by averaging the coordinates of the remaining points.
[0119] Specifically, the first center point The calculation formula is:
[0120] .
[0121] In an optional implementation, the step of obtaining the two-dimensional labels corresponding to each intersection point in the target calibration pattern based on the first center point and the second center point (step S424 above) includes:
[0122] The X-axis and Y-axis directions of the target calibration pattern are obtained based on the first and second center points; each intersection point is projected onto the X-axis and Y-axis respectively based on the X-axis and Y-axis projection directions to obtain the corresponding intersection point projections; all intersection point projections are clustered and sorted to obtain the second two-dimensional label corresponding to each intersection point in the target calibration pattern.
[0123] Obtain the unit vector of the line connecting the second center point Center to Pbcenter, which is the Y-axis projection direction. direction :
[0124] ;
[0125] To obtain the X-projection direction, it is necessary to first calculate the vector connecting each Pb point to the Center and the y-direction. direction The included angle:
[0126] ;
[0127] There are cols Pb values, corresponding to cols angle values. The Pb with the smallest angle is taken as p_start, and the Pb with the largest angle is taken as p_end. These two values determine the X projection direction. direction The formula is as follows:
[0128] ;
[0129] Project each intersection point Pc onto the X-projection axis and Y-projection axis respectively to obtain the corresponding intersection point projections. The formula is as follows:
[0130] ;
[0131] ;
[0132] Clustering and sorting are performed on all intersection point projections to obtain the second two-dimensional label (tagy2, tagx2) corresponding to each intersection point in the target calibration pattern. For example, K-Means clustering is used, and then sorted according to the projection center, assigning a label to each point in each cluster. The number of projection clusters on the X-axis is cols2, and the cluster label tagx2 ranges from [0, cols2-1]. The number of projection clusters on the Y-axis is rows2, and the cluster label tagy2 ranges from [0, rows2-1]. The two labels together constitute the unique second two-dimensional label (tagy2, tagx2) for each intersection point Pc. Figure 7 A target calibration pattern with a second two-dimensional label is shown.
[0133] As for the first two-dimensional labels (tagy1, tagx1) corresponding to each intersection point in the initial calibration pattern, they can be obtained using the existing open-source computer vision library OpenCV (Open Source Computer Vision Library), or they can be obtained using the method described above in this disclosure. Figure 8 An initial calibration pattern with a first two-dimensional label is shown.
[0134] In an optional implementation, the step of establishing the homography matrix between the initial calibration pattern and the target calibration pattern based on the first two-dimensional label and the second two-dimensional label (step S43 above) includes:
[0135] Match the first and second two-dimensional labels at the same intersection point to obtain several matching points; use the RANSAC algorithm to select several consistent points from all matching points; and establish the homography matrix between additive manufacturing monitoring cameras based on several consistent points.
[0136] Specifically, based on the first and second two-dimensional labels of the same intersection point, the same intersection point in different images is correctly matched to obtain several matching points. The RANSAC algorithm is used to select several consistent points from all matching points. The consistent points are regarded as points with higher accuracy and correct matching relationships. Based on several consistent points, the homography matrix between additive manufacturing monitoring cameras is established. For example, the least squares method is used to estimate the overall optimal homography matrix as the homography matrix between additive manufacturing monitoring cameras.
[0137] Figure 9 A schematic diagram of the registration result after registering the initial calibration pattern and the target calibration pattern according to the homography matrix is shown. According to the schematic diagram of the registration result, the two-dimensional label matching is accurate, with no obvious mismatch (few burrs) and clear edge contours, indicating that the registration method disclosed in this paper has high accuracy.
[0138] Example 2
[0139] Figure 10 This is a schematic diagram of the structure of an electronic device according to an example embodiment of the present disclosure. The electronic device includes a memory, a processor, and a computer program stored in the memory and used to run on the processor. When the processor executes the computer program, it implements the additive manufacturing image registration method provided in Embodiment 1 above. Figure 10 The electronic device 90 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0140] like Figure 10 As shown, the electronic device 90 can be manifested as a general-purpose computing device, such as a server device. The components of the electronic device 90 may include, but are not limited to: at least one processor 91, at least one memory 92, and a bus 93 connecting different system components (including memory 92 and processor 91).
[0141] Bus 93 includes a data bus, an address bus, and a control bus.
[0142] The memory 92 may include volatile memory, such as random access memory (RAM) 921 and / or cache memory 922, and may further include read-only memory (ROM) 923.
[0143] The memory 92 may also include a program tool 925 (or utility) having a set (at least one) program module 924, such program module 924 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0144] The processor 91 executes various functional applications and data processing by running computer programs stored in the memory 92, such as the image registration method for additive manufacturing provided in Embodiment 1 above.
[0145] Electronic device 90 can also communicate with one or more external devices 94 (e.g., keyboard, pointing device, etc.). This communication can be performed via input / output (I / O) interface 95. Furthermore, electronic device 90 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 96. Figure 10 As shown, network adapter 96 communicates with other modules of electronic device 90 via bus 93. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with electronic device 90, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems.
[0146] It should be noted that although several units / modules or sub-units / modules of the electronic device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided and embodied by multiple units / modules.
[0147] Example 3
[0148] This disclosure also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the additive manufacturing image registration method provided in Embodiment 1 above.
[0149] The readable storage medium may be more specifically adopted, including but not limited to: portable disk, hard disk, random access memory, read-only memory, erasable programmable read-only memory, optical storage device, magnetic storage device, or any suitable combination thereof.
[0150] Example 4
[0151] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the additive manufacturing image registration method provided in Embodiment 1 above.
[0152] The program code for executing the computer program product disclosed herein can be written in any combination of one or more programming languages. The program code can be executed entirely on a user device, partially on a user device, as a stand-alone software package, partially on a user device and partially on a remote device, or entirely on a remote device.
[0153] While specific embodiments of this disclosure have been described above, those skilled in the art should understand that these are merely illustrative examples, and the scope of protection of this disclosure is defined by the appended claims. Those skilled in the art can make various changes or modifications to these embodiments without departing from the principles and essence of this disclosure, but all such changes and modifications fall within the scope of protection of this disclosure.
Claims
1. An image registration method for additive manufacturing, characterized in that, The image registration method includes: An initial calibration pattern is constructed, and the initial calibration pattern is printed using additive manufacturing equipment to obtain a printed calibration board; The initial calibration pattern includes several parallel and uniformly arranged first straight lines and several parallel and non-uniformly arranged second straight lines, wherein the first straight lines and the second straight lines are perpendicular to each other to form a grid. The printed calibration board is photographed to obtain the photographed calibration pattern; The captured calibration pattern is preprocessed based on a linear fitting operation to obtain the target calibration pattern; Establish the homography matrix between the initial calibration pattern and the target calibration pattern; The initial calibration pattern and the target calibration pattern are registered based on the homography matrix.
2. The image registration method according to claim 1, characterized in that, The step of preprocessing the captured calibration pattern based on linear fitting to obtain the target calibration pattern includes: Gaussian blur is applied to the captured calibration pattern to obtain a noise-reduced image; The denoised image is subjected to edge point extraction to obtain the extracted image; The line fitting operation is performed on each first straight line and each second straight line in the extracted image to obtain the first fitted straight line corresponding to each first straight line and the second fitted straight line corresponding to each second straight line, so as to form the target calibration pattern. And / or, the establishment of the homography moments between the initial calibration pattern and the target calibration pattern The steps of the array include: Obtain the first two-dimensional label corresponding to each intersection point in the initial calibration pattern; Obtain the second two-dimensional label corresponding to each intersection point in the target calibration pattern; A homography matrix between the initial calibration pattern and the target calibration pattern is established based on the first two-dimensional label and the second two-dimensional label.
3. The image registration method according to claim 2, characterized in that, The step of obtaining the second two-dimensional label corresponding to each intersection point in the target calibration pattern includes: Obtain the intersection points between each of the first fitted lines and each of the second fitted lines in the target calibration pattern; The baseline of the target calibration pattern is obtained based on the second fitted straight line; The first center point of the baseline and the second center point of the target calibration pattern are obtained based on the intersection point. Based on the first center point and the second center point, obtain the two-dimensional labels corresponding to each intersection point in the target calibration pattern.
4. The image registration method according to claim 3, characterized in that, The plurality of parallel non-uniformly arranged second straight lines include a plurality of first sub-straight lines and a plurality of second sub-straight lines. The plurality of first sub-straight lines are uniformly arranged among each other, and the plurality of second sub-straight lines are uniformly arranged among each other. The spacing between the plurality of first sub-straight lines is greater than the spacing between the plurality of second sub-straight lines. The step of obtaining the baseline of the target calibration pattern based on the second fitted straight line includes: Obtain the first and second fitted sub-lines from the second fitted line; Wherein, the first fitted sub-line corresponds to the first sub-line, and the second fitted sub-line corresponds to the second sub-line; The second fitted sub-line located in the middle among several second fitted sub-lines is taken as the baseline.
5. The image registration method according to claim 3, characterized in that, The step of obtaining the first center point of the baseline and the second center point of the target calibration pattern based on the intersection point includes: Based on each intersection point, obtain several target intersection points on the baseline; The number of target intersection points is the same as the number of the first straight lines; The first center point of the baseline is obtained based on the plurality of target intersection points; The second center point of the target calibration pattern is obtained from the remaining intersection points after removing the target intersection points from all intersection points.
6. The image registration method according to claim 3, characterized in that, The step of obtaining the second two-dimensional label corresponding to each intersection point in the target calibration pattern based on the first center point and the second center point includes: The X-projection axis direction and Y-projection axis direction of the target calibration pattern are obtained based on the first center point and the second center point; Based on the X-axis projection direction and the Y-axis projection direction, each intersection point is projected onto the X-axis projection direction and the Y-axis projection direction respectively to obtain the corresponding intersection point projection. Clustering and sorting of all intersection point projections yields the second two-dimensional label corresponding to each intersection point in the target calibration pattern.
7. The image registration method according to claim 1, characterized in that, The step of establishing the homography matrix between the initial calibration pattern and the target calibration pattern based on the first two-dimensional label and the second two-dimensional label includes: Match the first two-dimensional label and the second two-dimensional label at the same intersection point to obtain several matching points; The RANSAC algorithm is used to select several consistent points from all the matching points; A homography matrix is established between the additive manufacturing monitoring cameras based on the aforementioned points of agreement.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and for running on the processor, characterized in that, When the processor executes the computer program, it implements the image registration method for additive manufacturing as described in any one of claims 1-7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the image registration method for additive manufacturing as described in any one of claims 1-7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the image registration method for additive manufacturing as described in any one of claims 1-7.
