A correction method and system for optical scanning of 3D printing
By identifying and correcting the cross-sectional size ratio of the three-dimensional digital model generated by the optical scanning equipment, the problem of size distortion in the existing technology is solved, the accurate verification and correction of the 3D printing model is achieved, and the effect of 3D printing is improved.
Patent Information
- Application Number
- CN202410828154.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-06-25
AI Technical Summary
In 3D printing, existing optical scanning equipment causes size distortion of the three-dimensional digital model due to equipment accuracy limitations and the influence of the scanning environment and object surface characteristics, which cannot be effectively detected and corrected, resulting in a waste of 3D printing costs.
By obtaining the three-dimensional digital model and two-dimensional image generated by the optical scanner, identify the model type, use the pre-built database to determine the cross-section position and size ratio reference range, extract the cross-section size ratio, determine whether there is geometric distortion, and perform correction based on the reference range .
It realizes automatic verification and correction of scanned models, improves the accuracy and efficiency of 3D printing, and is especially suitable for single-piece or models of specific shapes.
Smart Images

Figure CN118386554B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of 3D modeling, and in particular to a correction method and system for optical scanning of 3D printing. Background Art
[0002] There are optical scanning devices on the market that are specifically used for 3D printing modeling. The device uses 3D structured light to scan the surface of the model, thereby helping users to quickly build models. Optical scanners are often used to scan single parts and then quickly build models to provide a model basis for subsequent 3D printing.
[0003] Existing optical scanning equipment has limited accuracy and is easily affected by the scanning environment and surface characteristics of the object during scanning. The established three-dimensional digital model is prone to dimensional distortion, resulting in problems with the model's proportions. Existing technology is unable to detect and correct defects in the scanned model. Models with problems cannot be used after 3D printing or the effect is poor, resulting in a waste of printing costs. Summary of the invention
[0004] In view of this, an object of the present invention is to provide a correction method and system for optical scanning of 3D printing, so as to solve the problem that the optical scanner in the prior art has poor effect in practical application.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] A correction method for optical scanning of 3D printing of the present invention comprises the steps of:
[0007] Acquire a three-dimensional digital model and a two-dimensional image of the target model generated by the optical scanner through scanning the target model;
[0008] Identify the target model based on the two-dimensional image to obtain the type of the target model;
[0009] Determining multiple target cross-sectional positions corresponding to the type of the target model and cross-sectional size ratio reference ranges of the multiple target cross-sectional positions from a pre-constructed database, wherein the database includes cross-sectional positions of multiple types of models and cross-sectional size ratio reference ranges of the cross-sectional positions;
[0010] Extracting a cross section at a target cross section position of the three-dimensional digital model and a size ratio of the cross section at the target cross section position;
[0011] Determining whether the three-dimensional digital model has geometric distortion based on the size ratio of the cross section at the target cross section position of the three-dimensional digital model and the corresponding cross section size ratio reference range;
[0012] When the three-dimensional digital model has geometric distortion, the three-dimensional digital model is corrected based on a corresponding size ratio reference range.
[0013] In an embodiment of the present application, the number of the two-dimensional images is multiple, and the multiple two-dimensional images are acquired at different angles when scanning the target model, wherein the target model is identified based on the two-dimensional images to obtain the type of the target model, including:
[0014] Preprocessing the multiple two-dimensional images to obtain multiple preprocessed images, wherein the preprocessing method includes high-pass filtering;
[0015] Extract contour features of multiple pre-processed images; input multiple contour features into the pre-built recognition model to obtain the recognition results of each two-dimensional image And the recognition results Confidence ,in, is the serial number of the recognition result;
[0016] The recognition results corresponding to multiple two-dimensional images Confidence Sum and get the recognition result The total confidence level of
[0017] The recognition result with the largest total confidence value is taken as the type of the target model.
[0018] In one embodiment of the present application, the method for constructing the recognition model includes:
[0019] Acquire multiple sample images;
[0020] Preprocessing the sample image to obtain a preprocessed sample image;
[0021] Extracting the contour of the preprocessed sample image to obtain a sample contour;
[0022] Annotating the sample contour to obtain training data, wherein the annotation content includes type and confidence level;
[0023] The artificial neural network is trained based on the training data and combined with the gradient descent method to obtain a recognition model.
[0024] In one embodiment of the present application, the database construction method includes:
[0025] Get multiple model samples for multiple models;
[0026] Determine the position of the datum section and the position of the reference section based on the type of the model sample;
[0027] extracting a reference section from the model sample based on the position of the reference section, and extracting a reference section from the model sample based on the position of the reference section, wherein the reference section and the reference section are parallel;
[0028] Extract the area of the reference cross section of each model sample , the area of the reference cross section , the centroid position of the reference section and the centroid position of the reference section ;
[0029] Calculate the proportion of samples for each model and angle ,in, , the angle for The angle between the connecting line and the perpendicular bisector of the reference section; Calculate multiple proportions in each type of model sample The average and standard deviation , and multiple angles The average and standard deviation ;
[0030] The proportion of samples for each type of model The value range of and the angle The value range of ,in, is the first range adjustment parameter, Adjusting parameters for the second range;
[0031] Based on the location of the reference section, the location of the benchmark section, the proportion of each type of model sample The value range of And the angle The value range of Build the database.
[0032] In one embodiment of the present application, the area of the reference cross section of each model sample is extracted. and the area of the reference cross section ,include:
[0033] Execute the bounding box algorithm on the benchmark section and the reference section of each model sample to obtain the minimum circumscribed rectangle of the benchmark section and the minimum circumscribed rectangle of the reference section;
[0034] Calculate the area of the minimum circumscribed rectangle of the reference cross section, and use the area of the minimum circumscribed rectangle of the reference cross section as the area of the reference cross section Calculate the area of the minimum circumscribed rectangle of the reference cross section, and use the area of the minimum circumscribed rectangle of the reference cross section as the area of the reference cross section .
[0035] In one embodiment of the present application, extracting a cross section at a target cross section position of the three-dimensional digital model and a size ratio of the cross section at the target cross section position includes:
[0036] Extracting a benchmark section and a reference section of the three-dimensional digital model from a target section position;
[0037] Extraction ratio of the base section and reference section based on the three-dimensional digital model and angle .
[0038] In one embodiment of the present application, judging whether the three-dimensional digital model has geometric distortion based on the size ratio of the cross section at the target cross section position of the three-dimensional digital model and the corresponding cross section size ratio reference range includes:
[0039] The scale of the three-dimensional digital model and angle When the target condition is met, it is determined that the three-dimensional digital model has geometric distortion, otherwise, it is determined that there is no geometric distortion, wherein the target condition includes:
[0040] At the angle Not falling into the angle The value range of When , determining that the three-dimensional digital model has local concave-convex distortion;
[0041] In the ratio Not in proportion The value range of , and the angle Fall into the angle The value range of When the three-dimensional digital model is determined to have overall size distortion.
[0042] In one embodiment of the present application, the three-dimensional digital model is corrected based on the corresponding size ratio reference range, including:
[0043] When the geometric distortion type is local concave-convex distortion, the contour of the reference cross section or the annular area where the contour of the reference cross section is located is taken as the defect position;
[0044] The defect position is marked in the three-dimensional digital model and outputted to the outside to prompt the defect position to be scanned repeatedly, and the defect position is corrected based on the three-dimensional data of the repeated scan.
[0045] In one embodiment of the present application, the three-dimensional digital model is corrected based on the corresponding size ratio reference range, including:
[0046] When the geometric distortion type is overall size distortion, the ratio does not fall into the ratio The value range of The reference cross section is taken as the reference defect cross section;
[0047] Extract multiple defective sections within a preset range near the reference defective section, wherein the ratio of the defective section to the reference section does not fall within the ratio The value range of ;
[0048] The reference defect section and the defect section are enlarged or reduced based on the centroid to obtain a plurality of corrected sections, wherein the ratio of the corrected section to the reference section falls within the ratio The value range of ;
[0049] A new section is inserted between the corrected sections based on an interpolation method; and a surface is fitted based on the contours of all the corrected sections and the contours of the new section to obtain a corrected three-dimensional digital model.
[0050] The present application also provides a 3D printed optical scanning correction system, comprising:
[0051] An acquisition module, used for acquiring a three-dimensional digital model and a two-dimensional image of the target model generated by the optical scanner through scanning the target model;
[0052] A recognition module, used to recognize the target model based on the two-dimensional image to obtain the type of the target model;
[0053] A range determination module, used to determine a plurality of target cross-sectional positions corresponding to the type of the target model and a reference range of cross-sectional size ratios of the plurality of target cross-sectional positions from a pre-constructed database, wherein the database includes cross-sectional positions of multiple types of models and reference ranges of cross-sectional size ratios of the cross-sectional positions;
[0054] A feature extraction module, used to extract the cross section at the target cross section position of the three-dimensional digital model and the size ratio of the cross section at the target cross section position;
[0055] A comparison and analysis module, used for judging whether the three-dimensional digital model has geometric distortion based on the size ratio of the cross section at the target cross section position of the three-dimensional digital model and the corresponding cross section size ratio reference range;
[0056] The correction module is used to correct the three-dimensional digital model based on the corresponding size ratio reference range when the three-dimensional digital model has geometric distortion.
[0057] The beneficial effects of the present invention are as follows: a correction method and system for optical scanning of 3D printing of the present invention obtains a two-dimensional image of the model when scanning the model. Recognition is performed based on the two-dimensional image of the model. If recognition is possible, the reference range of the cross-sectional dimension ratio of multiple cross-sectional positions of the model is obtained in the database, and then the cross-sectional dimension ratio of the three-dimensional digital model is obtained at the cross-sectional dimension. The cross-sectional dimension ratio is used to determine whether the three-dimensional digital model has geometric defects. If so, the three-dimensional digital model is corrected according to the reference range of the cross-sectional dimension ratio. The present application can automatically verify the recognizable three-dimensional digital model generated by scanning, and has good verification and correction effects for single or specific shaped models. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:
[0059] FIG1 is a flow chart of a correction method for optical scanning of 3D printing shown in one embodiment of the present application;
[0060] FIG2 is a cross-sectional schematic diagram of an embodiment of the present application;
[0061] FIG3 is a schematic diagram of a baseline cross section and a reference cross section of a defect-free model in an embodiment of the present application;
[0062] FIG4 is a schematic diagram of a base cross section and a reference cross section of a local concave-convex defect model in an embodiment of the present application;
[0063] FIG5 is a schematic diagram of a base section and a reference section of an overall size defect model in an embodiment of the present application;
[0064] FIG6 is a structural diagram of a 3D printing optical scanning correction system shown in an embodiment of the present application;
[0065] FIG. 7 shows a schematic diagram of the structure of a computer system suitable for implementing the electronic device of the embodiment of the present application. DETAILED DESCRIPTION
[0066] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0067] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show the layers related to the present invention rather than being drawn according to the number, shape and size ratio of the layers in actual implementation. In actual implementation, the type and quantity of each layer may be changed arbitrarily, and the layer layout may also be more complicated.
[0068] In the following description, numerous details are discussed to provide a more thorough explanation of embodiments of the present invention; however, it is apparent to one skilled in the art that embodiments of the present invention may be practiced without these specific details.
[0069] Figure 1 is a flow chart of a correction method for optical scanning of 3D printing shown in one embodiment of the present application, such as Figure 1 As shown:
[0070] A correction method for optical scanning of 3D printing in this embodiment may include steps S110 to S160:
[0071] S110, obtaining a three-dimensional digital model and a two-dimensional image of the target model generated by the optical scanner by scanning the target model; the optical scanning device for 3D printing usually has a camera. These cameras are mainly used to capture and record the three-dimensional shape and details of the object so as to accurately copy or modify it during the 3D printing process. The present application uses the camera on the optical scanning device to collect two-dimensional images at multiple angles to facilitate the recognition of the target model;
[0072] S120, identifying the target model based on the two-dimensional image to obtain the type of the target model; in addition, when the target model is not identified, the process ends.
[0073] This application uses a recognition model to recognize a two-dimensional image. The specific recognition process includes:
[0074] S121, preprocessing the multiple two-dimensional images to obtain multiple preprocessed images, wherein the preprocessing method includes high-pass filtering; the preprocessing methods in the present application include: grayscale: converting a color image into a grayscale image to reduce the amount of data to be processed; filtering: using a filter (such as a Gaussian filter) to remove noise and unnecessary details in the grayscale image. Binarization: converting a grayscale image into a binary image to facilitate edge detection and contour extraction; S122, extracting contour features of multiple preprocessed images; and inputting multiple contour features into a pre-built recognition model to obtain a recognition result for each two-dimensional image And the recognition results Confidence ,in, is the serial number of the recognition result;
[0075] This application uses edge detection algorithms (such as Canny, Sobel, Laplacian, etc.) to identify edges in images. And output to the recognition model for recognition. Among them, the labels of the training samples of the recognition model include device type and confidence level. Therefore, the recognition model outputs the recognition result Confidence .
[0076] In the present application, the method for constructing the recognition model includes: acquiring multiple sample images; preprocessing the sample images to obtain preprocessed sample images; extracting the contours of the preprocessed sample images to obtain sample contours; annotating the sample contours to obtain training data, wherein the annotation content includes type and confidence; training an artificial neural network based on the training data and in combination with the gradient descent method to obtain a recognition model.
[0077] S123, the recognition results corresponding to the multiple two-dimensional images are Confidence Sum and get the recognition result The total confidence level.
[0078] S124, taking the recognition result with the largest total confidence value as the type of the target model. The present application determines the final recognition result of the target model based on the confidence.
[0079] S130, determining multiple target cross-sectional positions corresponding to the type of the target model and the cross-sectional size ratio reference range of the multiple target cross-sectional positions from a pre-constructed database, wherein the database includes the cross-sectional positions of multiple types of models and the cross-sectional size ratio reference range of the cross-sectional positions; the model types in the database in the present application can be consistent with the model types in the recognition model, that is, in this case, as long as the recognition can be performed, then the corresponding type of multiple target cross-sectional positions and the cross-sectional size ratio reference range of the multiple target cross-sectional positions can be found in the database. In addition, the existing recognition model can also be called. If this is the case, it is also necessary to match the recognition result with the database. If the corresponding type of model exists in the database, the corresponding multiple target cross-sectional positions and the cross-sectional size ratio reference range of the multiple target cross-sectional positions are output.
[0080] The present application determines whether a three-dimensional digital model is distorted based on the size ratios of multiple cross sections of the model. The cross section positions are determined based on the shape features of the three-dimensional model.
[0081] For example, if the three-dimensional model is a beverage bottle, then the ratio of the area of the cover cross section and the bottle cross section, the angle between the centroid of the two and the perpendicular bisector, etc. can reflect whether the three-dimensional model is distorted. If the three-dimensional model is more complex, such as a plant model, then the cross section can be a crown cross section, a trunk cross section, etc. However, the complexity of the plant model is relatively high, and there are many plant species, resulting in greater uncertainty. The detection and correction effect of this application is not good. Therefore, this application is mainly aimed at single models with low structural complexity and identifiable.
[0082] Secondly, the cross-sectional direction in this application is also set. For some monomer models with regular shapes, such as water bottles, cups, pens, mobile phones, cars, character action figures, etc. that are similar to cylinders, the cross-section is perpendicular to the long axis; for some non-monomer models with irregular shapes, such as plants, human organs, etc., you can roughly find a long axis, and then set multiple representative positions to extract the cross-section, such as the connection positions of the components.
[0083] In addition, the target cross-section positions in the present application may be one group or multiple groups, and each group of cross-sections includes one base cross-section and multiple reference cross-sections, and the base cross-section is parallel to the reference cross-section.
[0084] Figure 2 This is a cross-sectional diagram of an embodiment of the present application. Figure 2 In the figure, 210 is the base section and 220 is the reference section.
[0085] Based on the above description, the database construction process in the present application includes: S131, obtaining multiple model samples of multiple models; wherein each type of model contains multiple samples, thereby facilitating finding the size ratio rule of each type of model.
[0086] S132, determine the position of the reference section and the position of the reference section based on the type of the model sample; wherein the position of the reference section and the position of the reference section are determined based on the rules mentioned above. Specifically, the reference section can select some connections, protrusions or depressions. Multiple reference sections are set, and the model can be divided into multiple areas, and a reference section is set for each area. It can be understood that the partitions of the same type of three-dimensional models are the same.
[0087] S133, extracting a reference section from the model sample based on the position of the reference section, and extracting a reference section from the model sample based on the position of the reference section, wherein the reference section and the reference section are parallel;
[0088] S134, extracting the area of the reference cross section of each model sample , the area of the reference cross section , the centroid position of the reference section and the centroid position of the reference section ; Among them, since the cross-sectional shapes of some models, such as character models, are irregular, it is not convenient to directly calculate the area in advance. This application performs a bounding box algorithm on the reference cross section and the reference cross section of each model sample to obtain the minimum circumscribed rectangle of the reference cross section and the minimum circumscribed rectangle of the reference cross section;
[0089] Calculate the area of the minimum circumscribed rectangle of the reference cross section, and use the area of the minimum circumscribed rectangle of the reference cross section as the area of the reference cross section Calculate the area of the minimum circumscribed rectangle of the reference cross section, and use the area of the minimum circumscribed rectangle of the reference cross section as the area of the reference cross section .
[0090] Since if the surface of the model is distorted by pits or protrusions, or the overall shape is distorted, the corresponding minimum circumscribed rectangle will also change, the application uses the area of the minimum circumscribed rectangle to replace the actual area of the cross section, so that the area of the irregular cross section can be quickly obtained.
[0091] S135, calculate the proportion of each model sample and angle ,in, , the angle for The angle between the connecting line and the perpendicular bisector of the reference section;
[0092] The cross-sectional size ratio in this application mainly includes two parameters, the ratio and angle ,Proportion The area of the reference cross section Area of the reference cross section Since a reference section is extracted from each area of the model sample, there is a ratio for each area of each model. Among them, the proportion It is used to indicate the cross-sectional proportions of each part of the model. If there are pits or bumps on the surface of the 3D model, the proportions will be Changes occur. Angle for The angle between the connecting line and the perpendicular bisector of the reference section, It is used to indicate whether the centroid of the cross section of each part of the model has changed. If there are pits or bumps on the surface of the three-dimensional model, the centroid of the cross section will also change.
[0093] S136, calculate multiple proportions in each type of model sample The average and standard deviation , and multiple angles The average and standard deviation ;
[0094] S137, the proportion of samples for each type of model The value range of And the angle The value range of ,in, is the first range adjustment parameter, Adjusting parameters for the second range;
[0095] Among them, the cross-sectional dimensions of the models of each category are similar. Therefore, this application uses the mean value and standard deviation to construct the corresponding reference range. However, in some cases, there are also models of the same category with large morphological differences, so this application also needs to eliminate data with extreme values.
[0096] Specifically, each ratio With the average Compare and remove the ratio values whose difference exceeds the preset threshold. With the average Compare and compare the angles whose differences exceed the preset threshold The remaining data is used to calculate the standard deviation and construct the corresponding reference range. and the second range adjustment parameter to adjust the size of the reference range.
[0097] S138, based on the location of the reference section, the location of the benchmark section, and the proportion of each type of model sample The value range of And the angle The value range of Build the database.
[0098] S140, extracting a cross section at a target cross section position of the three-dimensional digital model and a size ratio of the cross section at the target cross section position;
[0099] The method for extracting the size ratio of the cross section at the target cross section position of the three-dimensional digital model is the same as the above process, including:
[0100] S141, extracting a reference section and a datum section of the three-dimensional digital model from the target section position;
[0101] S142, extracting a scale based on the base section and the reference section of the three-dimensional digital model and angle ;
[0102] S150: Determine whether the three-dimensional digital model has geometric distortion based on a cross-section size ratio at a target cross-section position of the three-dimensional digital model and a corresponding cross-section size ratio reference range.
[0103] Figure 3 is a schematic diagram of a reference cross section and a reference cross section of a defect-free model in an embodiment of the present application, such as Figure 3 As shown, taking a beverage bottle as an example, under normal circumstances, the datum section and the reference section are parallel, and the connecting line of the two centroids The angle with the perpendicular bisector of the reference section is close to 0. And the ratio of the area of the reference section to the reference section falls within the ratio The value range of .
[0104] Specifically, the judgment criteria in this embodiment are as follows:
[0105] (1) At the angle Not falling into the angle The value range of When , determining that the three-dimensional digital model has local concave-convex distortion;
[0106] Figure 4 Schematic diagram of the base section and reference section of the local concave-convex defect model in one embodiment of the present application, such as Figure 4 As shown, when there are local concave-convex defects in the model, regardless of the proportion Does it fall into proportion? The value range of , as long as the angle Not falling into the angle The value range of When , it means that the centroid of the reference section and the centroid of the reference section have a large relative displacement, indicating that the reference section or the surface corresponding to the reference section has an uneven deformation. Referring to common distortion phenomena, it is inferred that local concave-convex distortion has occurred; (2) In the ratio Not in proportion The value range of , and the angle Fall into the angle The value range of When the three-dimensional digital model is determined to have overall size distortion.
[0107] Figure 5 Schematic diagram of the reference section and reference section of the overall size defect model in one embodiment of the present application, such as Figure 5 As shown, if the ratio Not in proportion The value range of , indicating that the surface corresponding to the reference section or reference section is distorted. Fall into the angle The value range of , indicating that the centroid of the reference section and the centroid of the reference section do not have a large relative displacement. Therefore, it can be inferred that the surface corresponding to the reference section or the reference section has a uniform expansion or concave deformation in all directions.
[0108] S160: When the three-dimensional digital model has geometric distortion, correct the three-dimensional digital model based on a corresponding size ratio reference range.
[0109] Based on the above judgment results, in this embodiment, correction is performed in the following manner:
[0110] (1) When the geometric distortion type is local concave-convex distortion, the contour of the reference cross section or the annular area where the contour of the reference cross section is located is taken as the defect position;
[0111] The defect position is marked in the three-dimensional digital model and outputted to the outside to prompt the defect position to be scanned repeatedly, and the defect position is corrected based on the three-dimensional data of the repeated scan.
[0112] When the geometric distortion type is local concave-convex distortion, the present application marks the corresponding position, thereby prompting external personnel to scan the defect position repeatedly for multiple times, and taking the average value of multiple scans to correct the defect position of the three-dimensional digital model;
[0113] (2) When the geometric distortion type is overall size distortion, the ratio that does not fall into the ratio The value range of The reference cross section is taken as the reference defect cross section;
[0114] Extract multiple defective sections in a specific range near the reference defective section, wherein the ratio of the defective section to the reference section does not fall within the ratio The value range of ;
[0115] The reference defect section and the defect section are enlarged or reduced based on the centroid to obtain a plurality of corrected sections, wherein the ratio of the corrected section to the reference section falls within the ratio The value range of ;
[0116] A new section is inserted between the corrected sections based on an interpolation method; and a surface is fitted based on the contours of all the corrected sections and the contours of the new section to obtain a corrected three-dimensional digital model.
[0117] If the geometric distortion type is overall size distortion, then a simple scaling correction can be performed. This application first determines the corresponding part of the defective section in the three-dimensional digital model, and then extracts multiple defective sections in the part. These defective sections are scaled and repaired, and finally interpolation and fitting are performed between the corrected sections to obtain the corrected three-dimensional digital model. Among them, if there are multiple parts of the reference section that are defective sections, each part is corrected according to the above steps, and the model as a whole can be corrected.
[0118] A correction method for optical scanning of 3D printing of the present invention obtains a two-dimensional image of the model when scanning the model. Recognition is performed based on the two-dimensional image of the model. If recognition can be performed, the reference range of the cross-sectional dimension ratio of multiple cross-sectional positions of the model is obtained in the database, and then the cross-sectional dimension ratio of the three-dimensional digital model is obtained at the cross-sectional dimension. The cross-sectional dimension ratio is used to determine whether the three-dimensional digital model has geometric defects. If so, the three-dimensional digital model is corrected according to the reference range of the cross-sectional dimension ratio. The present application can automatically verify the recognizable three-dimensional digital model generated by scanning, and has good verification and correction effects for single or specific shaped models.
[0119] like Figure 6 As shown, the present application also provides a 3D printed optical scanning correction system, including:
[0120] An acquisition module, used for acquiring a three-dimensional digital model and a two-dimensional image of the target model generated by the optical scanner through scanning the target model;
[0121] A recognition module, used to recognize the target model based on the two-dimensional image to obtain the type of the target model;
[0122] A range determination module, used to determine a plurality of target cross-sectional positions corresponding to the type of the target model and a reference range of cross-sectional size ratios of the plurality of target cross-sectional positions from a pre-constructed database, wherein the database includes cross-sectional positions of multiple types of models and reference ranges of cross-sectional size ratios of the cross-sectional positions;
[0123] A feature extraction module, used to extract the cross section at the target cross section position of the three-dimensional digital model and the size ratio of the cross section at the target cross section position;
[0124] A comparison and analysis module, used for judging whether the three-dimensional digital model has geometric distortion based on the size ratio of the cross section at the target cross section position of the three-dimensional digital model and the corresponding cross section size ratio reference range;
[0125] The correction module is used to correct the three-dimensional digital model based on the corresponding size ratio reference range when the three-dimensional digital model has geometric distortion.
[0126] A 3D printed optical scanning correction system of the present invention acquires a two-dimensional image of the model when scanning the model. Recognition is performed based on the two-dimensional image of the model. If recognition is possible, the reference range of the cross-sectional dimension ratio of multiple cross-sectional positions of the model is obtained in the database, and then the cross-sectional dimension ratio of the three-dimensional digital model is obtained at the cross-sectional dimension. The cross-sectional dimension ratio is used to determine whether the three-dimensional digital model has geometric defects. If so, the three-dimensional digital model is corrected according to the reference range of the cross-sectional dimension ratio. The present application can automatically verify the recognizable three-dimensional digital model generated by scanning, and has good verification and correction effects for single bodies or models of specific shapes.
[0127] Figure 7 The structure diagram of the computer system suitable for implementing the electronic device of the embodiment of the present application is shown. It should be noted that: Figure 7 The computer system of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0128] like Figure 7 As shown, the computer system includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 702 or the program loaded from the storage part 708 to the random access memory (RAM) 703, such as executing the method in the above embodiment. In RAM 703, various programs and data required for system operation are also stored. CPU 701, ROM 702 and RAM 703 are connected to each other through a bus 704. Input / output (I / O) interface 705 is also connected to bus 704.
[0129] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed so that a computer program read therefrom is installed into the storage section 708 as needed.
[0130] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 709, and / or installed from a removable medium 711.
[0131] When the computer program is executed by the central processing unit (CPU) 701 , various functions defined in the system of the present application are performed.
[0132] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable computer program. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. A computer program contained on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0133] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. Among them, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the above-mentioned module, a program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0134] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not constitute limitations on the units themselves in some cases.
[0135] Another aspect of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor of a computer, the computer executes the above method. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device.
[0136] Another aspect of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in each of the above embodiments.
[0137] The above embodiments are only preferred embodiments for fully illustrating the present application, and the protection scope of the present application is not limited thereto. Any equivalent substitution or change made by a person skilled in the art based on the present application is within the protection scope of the present application.
Claims
1. A method for correcting optical scanning of 3D printing, characterized in that: Includes steps: Acquire a three-dimensional digital model and a two-dimensional image of the target model generated by the optical scanner through scanning the target model; Identify the target model based on the two-dimensional image to obtain the type of the target model; Determining multiple target cross-sectional positions corresponding to the type of the target model and cross-sectional size ratio reference ranges of the multiple target cross-sectional positions from a pre-constructed database, wherein the database includes cross-sectional positions of multiple types of models and cross-sectional size ratio reference ranges of the cross-sectional positions; Extracting a cross section at a target cross section position of the three-dimensional digital model and a size ratio of the cross section at the target cross section position; Determining whether the three-dimensional digital model has geometric distortion based on the size ratio of the cross section at the target cross section position of the three-dimensional digital model and the corresponding cross section size ratio reference range; When the three-dimensional digital model has geometric distortion, the three-dimensional digital model is corrected based on a corresponding size ratio reference range.
2. The method for correcting optical scanning of 3D printing according to claim 1, characterized in that: The number of the two-dimensional images is multiple, and the multiple two-dimensional images are acquired at different angles when scanning the target model, wherein the target model is identified based on the two-dimensional images to obtain the type of the target model, including: Preprocessing the multiple two-dimensional images to obtain multiple preprocessed images, wherein the preprocessing method includes high-pass filtering; Extract contour features of multiple pre-processed images; input multiple contour features into the pre-built recognition model to obtain the recognition results of each two-dimensional image And the recognition results Confidence ,in, is the serial number of the recognition result; The recognition results corresponding to multiple two-dimensional images Confidence Sum and get the recognition result The total confidence level of The recognition result with the largest total confidence value is taken as the type of the target model.
3. The method for correcting optical scanning of 3D printing according to claim 2, characterized in that: The method for constructing the recognition model includes: Acquire multiple sample images; Preprocessing the sample image to obtain a preprocessed sample image; Extracting the contour of the preprocessed sample image to obtain a sample contour; Annotating the sample contour to obtain training data, wherein the annotation content includes type and confidence level; The artificial neural network is trained based on the training data and combined with the gradient descent method to obtain a recognition model.
4. The method for correcting optical scanning of 3D printing according to claim 1, characterized in that: The construction method in the database includes: Get multiple model samples for multiple models; Determine the position of the datum section and the position of the reference section based on the type of the model sample; extracting a reference section from the model sample based on the position of the reference section, and extracting a reference section from the model sample based on the position of the reference section, wherein the reference section and the reference section are parallel; Extract the area of the reference cross section of each model sample , the area of the reference cross section , the centroid position of the reference section and the centroid position of the reference section ; Calculate the proportion of samples for each model and angle ,in, , the angle for The angle between the connecting line and the perpendicular bisector of the reference section; Calculate multiple proportions in each type of model sample The average and standard deviation , and multiple angles The average and standard deviation ; The proportion of samples for each type of model The value range of And the angle The value range of ,in, is the first range adjustment parameter, Adjusting parameters for the second range; Based on the location of the reference section, the location of the benchmark section, the proportion of each type of model sample The value range of And the angle The value range of Build the database.
5. A correction method for optical scanning of 3D printing according to claim 4, characterized in that: Extract the area of the reference cross section of each model sample and the area of the reference cross section ,include: Execute the bounding box algorithm on the benchmark section and the reference section of each model sample to obtain the minimum circumscribed rectangle of the benchmark section and the minimum circumscribed rectangle of the reference section; Calculate the area of the minimum circumscribed rectangle of the reference cross section, and use the area of the minimum circumscribed rectangle of the reference cross section as the area of the reference cross section Calculate the area of the minimum circumscribed rectangle of the reference cross section, and use the area of the minimum circumscribed rectangle of the reference cross section as the area of the reference cross section .
6. A correction method for optical scanning of 3D printing according to claim 4, characterized in that: Extracting a section at a target section position of the three-dimensional digital model and a size ratio of the section at the target section position includes: Extracting a benchmark section and a reference section of the three-dimensional digital model from a target section position; Extraction ratio of the base section and reference section based on the three-dimensional digital model and angle .
7. A correction method for optical scanning of 3D printing according to claim 6, characterized in that: Judging whether the three-dimensional digital model has geometric distortion based on the size ratio of the cross section at the target cross section position of the three-dimensional digital model and the corresponding cross section size ratio reference range includes: The scale of the three-dimensional digital model and angle When the target condition is met, it is determined that the three-dimensional digital model has geometric distortion, otherwise, it is determined that there is no geometric distortion, wherein the target condition includes: At the angle Not falling into the angle The value range of When , determining that the three-dimensional digital model has local concave-convex distortion; In the ratio Not in proportion The value range of , and the angle Fall into the angle The value range of When the three-dimensional digital model is determined to have overall size distortion.
8. A correction method for optical scanning of 3D printing according to claim 7, characterized in that: Correcting the three-dimensional digital model based on the corresponding size ratio reference range includes: When the geometric distortion type is local concave-convex distortion, the contour of the reference cross section or the annular area where the contour of the reference cross section is located is taken as the defect position; The defect position is marked in the three-dimensional digital model and outputted to the outside to prompt the defect position to be scanned repeatedly, and the defect position is corrected based on the three-dimensional data of the repeated scan.
9. The method for correcting optical scanning of 3D printing according to claim 7, characterized in that: Correcting the three-dimensional digital model based on the corresponding size ratio reference range includes: When the geometric distortion type is overall size distortion, the ratio does not fall into the ratio The value range of The reference cross section is taken as the reference defect cross section; Extract multiple defective sections within a preset range near the reference defective section, wherein the ratio of the defective section to the reference section does not fall within the ratio The value range of ; The reference defect section and the defect section are enlarged or reduced based on the centroid to obtain a plurality of corrected sections, wherein the ratio of the corrected section to the reference section falls within the ratio The value range of ; A new section is inserted between the corrected sections based on an interpolation method; and a surface is fitted based on the contours of all the corrected sections and the contours of the new section to obtain a corrected three-dimensional digital model.
10. A correction system for optical scanning of 3D printing, characterized in that: include: An acquisition module, used for acquiring a three-dimensional digital model and a two-dimensional image of the target model generated by the optical scanner through scanning the target model; A recognition module, used to recognize the target model based on the two-dimensional image to obtain the type of the target model; A range determination module, used to determine a plurality of target cross-sectional positions corresponding to the type of the target model and a reference range of cross-sectional size ratios of the plurality of target cross-sectional positions from a pre-constructed database, wherein the database includes cross-sectional positions of multiple types of models and reference ranges of cross-sectional size ratios of the cross-sectional positions; A feature extraction module, used to extract the cross section at the target cross section position of the three-dimensional digital model and the size ratio of the cross section at the target cross section position; A comparison and analysis module, used for judging whether the three-dimensional digital model has geometric distortion based on the size ratio of the cross section at the target cross section position of the three-dimensional digital model and the corresponding cross section size ratio reference range; The correction module is used to correct the three-dimensional digital model based on the corresponding size ratio reference range when the three-dimensional digital model has geometric distortion.
Citation Information
Patent Citations
Method for virtually selecting clothing
CN106659259A
3 Dimension Scanner System for Tooth modelling
KR1020020028133A
Manipulating one or more formation variables to form three-dimensional objects
US20200004225A1
