A method and system for generating three-dimensional models based on image upload
By using a method based on image uploads, analyzing light and shadow changes and combining with standard modeling factors, the problem of high cost and complexity of 3D modeling technology is solved, and efficient and accurate 3D model generation is achieved, which is suitable for a variety of surfaces.
Patent Information
- Application Number
- CN202410454736.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-16
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-04-16
AI Technical Summary
Existing 3D modeling technology is costly, complex, and difficult to capture the precise surface of complex objects, especially transparent or reflective surfaces, which limits its popular application.
Using a method based on image upload, the object images are obtained from multiple angles through the camera unit and ring light source, the light and shadow changes are analyzed to infer the three-dimensional shape characteristics, the basic framework of the model is established by combining standard modeling factors, and the details are optimized through image micro-processing technology.
It reduces the cost and threshold of 3D modeling, improves efficiency, and can generate accurate and detailed 3D models without the need for professional scanning equipment and complex software. It is suitable for a variety of surfaces, including complex and reflective surfaces.
Smart Images

Figure CN118071937B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and system for generating a three-dimensional model based on image upload. Background Art
[0002] With the rapid development of 3D scanning technology, the generation and application of 3D models are becoming more and more popular. From industrial design and medical simulation to game production and movie special effects, high-quality 3D models are becoming essential. This drives the demand for efficient and accurate 3D scanning and modeling technology. However, despite the great market demand, existing 3D modeling technology still faces many challenges, especially in terms of cost, ease of use and accurate modeling of complex objects.
[0003] The existing 3D scanning modeling technology mainly relies on high-end scanning equipment and complex software. These technologies can capture the shape and details of objects through laser scanning, structured light scanning or optical methods to create accurate 3D models. However, after scanning the surface information of the object, these methods need to use a series of complex image processing technologies to calculate the 3D features of the object, which usually requires expensive optical equipment and powerful computing equipment. This greatly increases the overall cost of the equipment, limiting the popularization and application of 3D modeling technology. Conventional scanning cameras are difficult to capture details of some special surfaces (such as transparent or reflective surfaces), which brings difficulties to the application of 3D scanning modeling technology.
[0004] In view of this, it is necessary to improve the existing three-dimensional scanning modeling technology to solve the technical problems of complex modeling process and high cost. Summary of the invention
[0005] The purpose of the present invention is to provide a method and system for generating a three-dimensional model based on image upload to solve the above technical problems.
[0006] To achieve this object, the present invention adopts the following technical solutions:
[0007] A method for generating a three-dimensional model based on image upload, comprising:
[0008] Using an imaging module to obtain images of the object to be modeled from at least three angles; the imaging module includes a camera unit and a ring light source;
[0009] By identifying the light and shadow contrast of the edges and concave and convex parts of the object to be modeled in each picture, the light and shadow changes on the surface of the object to be modeled are analyzed, and the three-dimensional shape characteristics of the object to be modeled are inferred by combining the analysis results of light and shadow changes at multiple angles;
[0010] Based on the three-dimensional shape features, a model basic framework of the object to be modeled is established, and a standard modeling factor is used to match the three-dimensional shape features and merge them into the model basic framework to establish a preliminary three-dimensional model; the standard modeling factor is a standard geometric figure;
[0011] The preliminary three-dimensional model is subjected to detail optimization processing by image micro-processing technology to obtain an optimized three-dimensional model; the detail optimization processing includes edge smoothing, appearance adjustment, and concave-convex feature setting.
[0012] Optionally, the imaging module includes a turntable, the camera unit and the annular light source are respectively installed on the turntable, and a first driving component is provided on one side of the turntable, and the first driving component is used to drive the turntable to rotate, so as to drive the camera unit to obtain pictures of the object to be modeled from multiple angles.
[0013] Optionally, the step of analyzing the light and shadow changes on the surface of the object to be modeled by identifying the light and shadow contrast of the edge and concave and convex parts of the object to be modeled in each picture, specifically includes:
[0014] Preprocessing each image; the preprocessing includes adjusting the brightness and contrast of the image;
[0015] The edge enhancement filter is applied to the preprocessed image to enhance the edge, define the shape edge of the object, and identify the edge contour information;
[0016] By comparing the light and shadow of the surface of the object to be modeled in the edge-enhanced image, the light and dark differences between the bright and shadow areas of the surface are analyzed to identify the concave and convex changes on the surface of the object to be modeled;
[0017] According to the results of light and shadow contrast, the raised or sunken areas on the surface of the object are marked on the image through image drawing software to mark obvious concave and convex features;
[0018] Complete the edge recognition of the object to be modeled and the light and shadow comparison of the concave and convex parts in each picture in turn, obtain the edge contour information and concave and convex features of each picture, and integrate and summarize them.
[0019] Optionally, the three-dimensional shape features of the object to be modeled are inferred by combining the analysis results of light and shadow changes at multiple angles; specifically including:
[0020] Synthesize the analysis results of light and shadow changes in pictures from multiple angles. During the synthesis process, the edge contour information in each picture is dispersed into a number of first data points. All the first data points are matched and merged in combination with the perspective information of each picture to form a continuous three-dimensional shape contour.
[0021] Dispersing the concave and convex features in each image into a plurality of second data points, and matching and fusing the second data points onto the three-dimensional shape contour in combination with the viewing angle information of each image;
[0022] An in-depth analysis is performed on the light and shadow changes in each image, and the light and shadow changes are converted into depth information in three-dimensional space through a preset algorithm. The obtained depth information is matched to the corresponding first data point and second data point to calculate the three-dimensional shape features of the object to be modeled.
[0023] Optionally, the step of establishing a model basic framework of the object to be modeled based on the three-dimensional shape features specifically includes:
[0024] Selecting the closest basic shape as the model basic framework according to the three-dimensional shape contour in the three-dimensional shape feature;
[0025] Adjust the selected model base frame according to the specific size and proportion of the object to be modeled, and the adjustment process includes adjusting the height, width and depth of the frame;
[0026] Positioning the adjusted model base frame in the three-dimensional modeling space so that its position in the three-dimensional modeling space is consistent with the placement orientation of the object to be modeled;
[0027] The contour line of the located model basic framework is trimmed according to the depth information of the first data point to make it match the three-dimensional shape contour in the three-dimensional shape feature.
[0028] Optionally, a standard modeling factor is used to match the three-dimensional shape feature and is integrated into the model basic framework to establish a preliminary three-dimensional model; specifically, the method includes:
[0029] According to each concave-convex feature of the three-dimensional shape feature, the most matched standard modeling factor is selected from the modeling database;
[0030] According to the geometric features of the object to be modeled, the selected standard modeling factors are adjusted in size and shape and positioned in the three-dimensional modeling space;
[0031] The adjusted and positioned standard modeling factors are integrated into the model basic framework, and smoothing is performed between the standard modeling factors and the model basic framework;
[0032] The fused standard modeling factors are corrected according to the depth information of the second data point to establish a preliminary three-dimensional model.
[0033] Optionally, the preliminary three-dimensional model is subjected to detail optimization processing by image micro-processing technology to obtain an optimized three-dimensional model; specifically, the process includes:
[0034] Perform edge smoothing on the preliminary three-dimensional model by using image micro-processing technology to reduce jagged edges and hard edges on the preliminary three-dimensional model;
[0035] Performing appearance adjustment on the surface of the preliminary three-dimensional model, wherein the appearance adjustment includes adjusting brightness, contrast and saturation, and applying a preset texture pattern;
[0036] Using a normal map to set the concave and convex features of the preliminary three-dimensional model to increase the level of detail of the surface of the preliminary three-dimensional model;
[0037] The overall appearance of the preliminary three-dimensional model is evaluated, and the preliminary three-dimensional model is fine-tuned according to the appearance evaluation result to obtain an optimized three-dimensional model.
[0038] Optionally, the preliminary three-dimensional model is subjected to detail optimization processing by image micro-processing technology to obtain an optimized three-dimensional model; and then the method further includes:
[0039] The optimized three-dimensional model is retrieved from the three-dimensional modeling software to a format conversion unit, and the three-dimensional model is converted into a preset standard format by the format conversion unit and stored.
[0040] The present invention also provides a system for generating a three-dimensional model based on image upload, which is used to implement the method for generating a three-dimensional model based on image upload as described above, and the generation system includes:
[0041] An imaging module, used to obtain images of the object to be modeled from at least three angles; the imaging module includes a camera unit and a ring light source;
[0042] An image processing module is used to identify the light and shadow contrast of the edges and concave and convex parts of the object to be modeled in each image, so as to analyze the light and shadow changes on the surface of the object to be modeled;
[0043] A three-dimensional feature inference module is used to infer the three-dimensional shape features of the object to be modeled by combining the analysis results of light and shadow changes at multiple angles;
[0044] A three-dimensional modeling module, based on the three-dimensional shape features, establishes a model basic framework of the object to be modeled, uses standard modeling factors to match the three-dimensional shape features, and fuses them to the model basic framework to establish a preliminary three-dimensional model;
[0045] A model optimization module, used to optimize the details of the preliminary three-dimensional model by using image micro-processing technology to obtain an optimized three-dimensional model;
[0046] The display module is used to display the optimized three-dimensional model.
[0047] Optionally, the generating system further comprises a bracket, a rotating drive assembly is arranged on the bracket along the Z-axis direction, a mounting plate is arranged at the driving end of the rotating drive assembly, a first driving assembly is arranged on the mounting plate, a turntable is arranged at the driving end of the first driving assembly, the camera unit and the annular light source are both mounted on the turntable; the rotating drive assembly is used to drive the imaging module to rotate around the Z-axis direction.
[0048] Compared with the prior art, the present invention has the following beneficial effects: when working, a ring light source and a camera unit are used to capture images of the object to be modeled from at least three different angles to obtain a comprehensive perspective; by analyzing the light and shadow contrast of the edges and concave and convex parts of the object to be modeled in each image under different lighting conditions, the light and shadow changes on the surface of the object to be modeled are identified, and the three-dimensional shape features of the object to be modeled are inferred by combining the light and shadow change analysis results from multiple angles, and a basic model framework of the object to be modeled is constructed, and standard modeling factors matching these features are used to integrate and improve the framework, thereby establishing a preliminary three-dimensional model, and then by applying the image Micro-processing technology is used to optimize the details of this preliminary 3D model to obtain the final optimized 3D model; this method analyzes the light and shadow changes of the object to be modeled by capturing pictures from different angles, and can more accurately infer its 3D shape characteristics, thereby generating a more accurate and detailed 3D model. This method combines standard modeling factors and detail optimization processing to efficiently create a 3D model that is both accurate and has high-quality texture and detail performance; there is no need to rely on professional scanning equipment and complex modeling software, which greatly improves the efficiency of 3D modeling, significantly reduces the threshold and cost of 3D modeling, and expands the scope of application of modeling. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0050] The structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification so as to facilitate understanding and reading by persons familiar with this technology. They are not used to limit the conditions under which the present invention can be implemented, and therefore have no substantive technical significance. Any structural modification, change in proportion or adjustment of size, without affecting the effects and purposes that can be achieved by the present invention, should still fall within the scope of the technical contents disclosed by the present invention.
[0051] Figure 1 This is one of the flowcharts of the method for generating a three-dimensional model according to the first embodiment of the present invention;
[0052] Figure 2 The second flowchart of the method for generating a three-dimensional model of the first embodiment;
[0053] Figure 3 The third flowchart of the method for generating a three-dimensional model of the first embodiment;
[0054] Figure 4 The fourth flowchart of the method for generating a three-dimensional model of the first embodiment;
[0055] Figure 5 It is a schematic diagram of the structural part of the three-dimensional model generation system of the second embodiment. DETAILED DESCRIPTION
[0056] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0057] In the description of the present invention, it should be understood that the terms "upper", "lower", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. It should be noted that when a component is considered to be "connected" to another component, it may be directly connected to the other component or there may be a centrally arranged component at the same time.
[0058] The technical solution of the present invention is further described below with reference to the accompanying drawings and through specific implementation methods.
[0059] Embodiment 1:
[0060] Combination Figures 1 to 4 As shown, an embodiment of the present invention provides a method for generating a three-dimensional model based on image upload, comprising:
[0061] S1, using an imaging module 10 to obtain images of the object to be modeled from at least three angles; the imaging module 10 includes a camera unit 11 and a ring light source 12;
[0062] The imaging module 10 used includes a camera unit 11 and a ring light source 12. The camera unit 11 is used to capture images of the object to be modeled from at least three different angles, ensuring that information about the object is obtained from multiple perspectives. The ring light source 12 is placed around the camera to provide uniform lighting, reduce shadows and reflections, reduce distortion in the image, ensure image quality, and make subsequent model reconstruction more accurate; multi-angle shooting ensures comprehensive capture of the object to be modeled, laying the foundation for accurate reconstruction of the three-dimensional shape.
[0063] S2, by identifying the light and shadow contrast of the edge and concave and convex parts of the object to be modeled in each picture, to analyze the light and shadow changes on the surface of the object to be modeled, and to infer the three-dimensional shape characteristics of the object to be modeled by combining the analysis results of the light and shadow changes at multiple angles;
[0064] The three-dimensional shape characteristics of an object are inferred by analyzing the light and shadow contrast of the edges and concave and convex parts of the object to be modeled in pictures taken from different angles; this process involves carefully observing and interpreting the reaction of the object surface under different lighting conditions, especially the light and shadow changes of the edges and convex or concave parts. Using existing light and shadow information to infer the three-dimensional shape does not require complex hardware equipment. This method makes it more economical and easy to operate to capture the three-dimensional features of an object, and also shows high accuracy in capturing complex shapes.
[0065] S3, based on the three-dimensional shape features, establish the model basic framework of the object to be modeled, use standard modeling factors to match the three-dimensional shape features, and merge them into the model basic framework to establish a preliminary three-dimensional model; the standard modeling factors are standard geometric figures;
[0066] The basic model framework of the object to be modeled is established based on the extracted 3D shape features, and then standard geometric figures are used as modeling factors to match and merge these features to build a preliminary 3D model. This involves selecting suitable basic geometric shapes and adjusting and positioning them to ensure that they match the shape and size of the actual object. By using standard modeling factors, the modeling process of complex shapes is simplified. This method improves modeling efficiency and reduces the professional requirements of 3D modeling; accurately matching and integrating the basic framework and standard factors can quickly obtain a preliminary 3D model.
[0067] S4, through image micro-processing technology, the preliminary three-dimensional model is optimized in detail to obtain an optimized three-dimensional model; the detail optimization processing includes smoothing edges, adjusting appearance, and setting concave and convex features.
[0068] And optimize the details of the preliminary 3D model, including smoothing edges, adjusting textures and colors, and setting concave and convex features. These processes are achieved through image micro-processing technology, with the aim of improving the realism and detail richness of the model; significantly improving the visual quality of the model, making it more realistic and detailed. Through meticulous texture and color adjustments, the model can better reflect the real appearance of the original object, while edge smoothing and concave and convex feature settings further enhance the model's three-dimensional sense and depth perception, providing high-quality output for the final application scenario (such as 3D printing or virtual display).
[0069] It should be noted that, through the light and shadow pictures provided by the imaging module 10, this solution enables ordinary users to create high-quality three-dimensional models through simple equipment, such as a ring light source 12 and an ordinary camera. In addition, this method is particularly suitable for objects to be modeled with not too complex graphics, allowing rapid prototyping and accelerating the development process from concept to product, while maintaining a high degree of flexibility and adaptability, extracting three-dimensional shape features through light and shadow recognition technology, simplifying the technical difficulties faced in the traditional three-dimensional scanning modeling process; and has good capabilities in dealing with problems such as processing reflective or transparent surfaces.
[0070] The working principle of the present invention is as follows: when working, the ring light source 12 and the camera unit 11 are used to capture pictures of the object to be modeled from at least three different angles to obtain a comprehensive perspective; by analyzing the light and shadow contrast of the edges and concave and convex parts of the object to be modeled in each picture under different lighting conditions, the light and shadow changes on the surface of the object to be modeled are identified, and the three-dimensional shape features of the object to be modeled are inferred by combining the light and shadow change analysis results from multiple angles. Based on these three-dimensional shape features, a basic model framework of the object to be modeled is constructed, and standard modeling factors matching these features are used to integrate and improve the framework, thereby establishing a preliminary three-dimensional model, and then the preliminary three-dimensional model is refined by applying image micro-processing technology. Optimization processing on the nodes, including smoothing edges, adjusting textures and colors, and setting concave and convex features, to obtain the final optimized 3D model; compared with the 3D scanning modeling technology in the prior art, this method analyzes the light and shadow changes of the object to be modeled by analyzing the pictures captured from different angles, and can more accurately infer its 3D shape characteristics, thereby generating a more accurate and detailed 3D model. This method can efficiently create a 3D model that is both accurate and has high-quality texture and detail expression by combining standard modeling factors and detail optimization processing; there is no need to rely on professional scanning equipment and complex modeling software, which greatly improves the efficiency of 3D modeling, significantly reduces the threshold and cost of 3D modeling, and expands the scope of application of modeling.
[0071] In this embodiment, it is specifically described that the imaging module 10 includes a turntable 50, the camera unit 11 and the annular light source 12 are respectively installed on the turntable 50, and a first driving component 40 is provided on one side of the turntable 50. The first driving component 40 is used to drive the turntable 50 to rotate, so as to drive the camera unit 11 to obtain pictures of the object to be modeled from multiple angles.
[0072] By rotating the turntable 50, it is possible to achieve multi-directional shooting of the object to be modeled, ensuring that the acquired pictures can fully cover every surface of the object, providing sufficient viewing angle data for subsequent three-dimensional modeling. The camera and light source move with the turntable 50, avoiding the time and effort required to adjust the camera angle or position separately, and improving shooting efficiency and picture consistency.
[0073] In this embodiment, it is specifically described that step S2 specifically includes:
[0074] S21, preprocessing each image; the preprocessing includes adjusting the brightness and contrast of the image;
[0075] Automatic or manual adjustments are made through image processing software to ensure that the details of the object to be modeled in the image are clearer; the main advantage of preprocessing is to optimize the image quality, providing a more accurate basis for subsequent edge detection and light and shadow contrast analysis. By adjusting the brightness and contrast, the negative impact of lighting conditions on image analysis can be reduced, and the accuracy of edge and concave-convex feature recognition can be improved.
[0076] S22, performing edge enhancement on the preprocessed image by applying an edge enhancement filter to define the outer edge of the object to identify edge contour information;
[0077] Apply edge enhancement filters, such as Sobel or Canny algorithms, to highlight the edge information in the preprocessed image and define the edge of the object. This step is performed automatically and aims to make the shape of the object to be modeled more obvious by enhancing the edge contours in the image. It improves the recognizability of the object contour and provides clear edge information for subsequent concave and convex change analysis, which helps to capture the geometric features of the object more accurately, especially in complex backgrounds, and can effectively distinguish between objects and backgrounds, improving the accuracy and efficiency of the entire modeling process.
[0078] S23, performing light and shadow comparison on the surface of the object to be modeled in the edge-enhanced image, analyzing the difference in brightness between the bright area and the shadow area on the surface, so as to identify the concave-convex changes on the surface of the object to be modeled;
[0079] By analyzing the edge-enhanced image, the difference in light and dark between the bright and shadow areas on the surface of the object can be identified. This step relies on visual analysis or automated algorithms to determine which areas have light and shadow changes due to convexities or concavities. The advantage of light and shadow contrast analysis is that it can infer the slight changes in the surface of the object through the natural distribution of light on the surface of the object; this method makes it possible to extract three-dimensional information from two-dimensional images, improves the richness and authenticity of the model details, and can more accurately capture the surface features of objects with complex or fine structures.
[0080] S24, based on the result of light and shadow contrast, mark the convex area or concave area on the surface of the object on the image by using image drawing software to mark obvious concave and convex features;
[0081] Use image editing or drawing software to automatically mark the raised and sunken areas on the surface of the object based on the light and shadow contrast results. This provides detailed surface structure information for the 3D model, which is essential for reconstructing the true appearance of the object; by accurately marking the concave and convex features, the realism of the model is greatly enhanced, especially when simulating lighting and shadow effects, it can more realistically reflect the physical properties of the object.
[0082] S25, completing edge recognition of the object to be modeled and light and shadow comparison of the concave and convex parts in each picture in turn, obtaining edge contour information and concave and convex features of each picture, and integrating and summarizing them.
[0083] The combined image information provides a comprehensive 3D shape description, which is essential for building an accurate 3D model. By summarizing information from each angle, the model can be ensured to be accurate in all directions, especially for complex objects, and its geometry and surface features can be effectively reconstructed, improving the integrity and consistency of the model.
[0084] In this embodiment, it is further explained that step S2 also includes:
[0085] S26, synthesizing the analysis results of light and shadow changes in the pictures from multiple angles. During the synthesis process, the edge contour information in each picture is dispersed into a plurality of first data points, and all the first data points are matched and merged in combination with the viewing angle information of each picture to form a continuous three-dimensional shape contour;
[0086] The light and shadow change analysis results obtained from pictures taken at different angles are synthesized to form a coherent three-dimensional shape outline; the edge contour information identified in each picture is first converted into multiple first data points, which represent the position information of the edge of the object. Then, computer vision technology is used to spatially match and fuse all first data points in combination with the shooting angle of each picture to construct a complete three-dimensional object outline; a continuous three-dimensional shape wheel can be reconstructed from scattered two-dimensional picture information. By accurately matching and fusing data points from different angles, the true three-dimensional outline of the object to be modeled can be restored to the greatest extent, improving the accuracy and realism of the final model.
[0087] S27, dispersing the concave-convex features in each image into a plurality of second data points, and matching and fusing the second data points onto a three-dimensional shape contour in combination with viewing angle information of each image;
[0088] The identified concave-convex features are converted into second data points, and combined with the perspective information of each image, these data points are matched and fused to the previously formed three-dimensional shape contour; specifically, this includes analyzing the specific position and shape of each concave-convex feature in space, and fusing these features into the three-dimensional contour in the form of data points to ensure the accurate representation of the concave-convex information in the three-dimensional model.
[0089] S28, performing an in-depth analysis of the light and shadow changes in each image, converting the light and shadow changes into depth information in three-dimensional space through a preset algorithm, and matching the obtained depth information to the corresponding first data point and second data point to calculate the three-dimensional shape features of the object to be modeled.
[0090] Further in-depth analysis of the light and shadow changes in each image is performed, and these light and shadow changes are converted into depth information in three-dimensional space through a preset algorithm. This usually involves the use of complex image processing and three-dimensional reconstruction algorithms, such as light transfer models or deep learning models, to estimate the depth of each point on the surface of the object. Subsequently, this depth information is accurately matched to the corresponding first and second data points, and finally the precise three-dimensional shape features of the object to be modeled are calculated.
[0091] In this embodiment, it is specifically described that step S3 specifically includes:
[0092] S31, selecting the closest basic shape as the model basic framework according to the three-dimensional shape contour in the three-dimensional shape feature;
[0093] From the 3D shape features obtained from multiple angles, a basic shape (such as a sphere, cube, cylinder, etc.) that is closest to it is selected as the basic framework of the model. This selection process involves comparing the similarity between the 3D shape features and various basic shapes to determine which basic shape is most suitable as a starting point. Selecting the closest basic framework can greatly simplify the subsequent modeling process because it means that fewer adjustments are required to make the basic framework fit the shape of the actual object. This method improves the efficiency of modeling and lays the foundation for achieving a high-quality final model.
[0094] S32, adjusting the selected model basic frame according to the specific size and proportion of the object to be modeled, the adjustment process including adjusting the height, width and depth of the frame;
[0095] According to the specific size and proportion of the object to be modeled, the selected model base frame is adjusted in detail. This includes adjusting the height, width and depth of the base frame to ensure that the proportion of the frame matches the actual object. This process is completed through the size adjustment tools in the 3D modeling software to ensure high-precision adjustment. By accurately adjusting the size and proportion of the model base frame, it can be ensured that the model is highly consistent with the object to be modeled in terms of geometry, enhancing the accuracy of the model.
[0096] S33, positioning the adjusted model basic frame in the three-dimensional modeling space so that its position in the three-dimensional modeling space is consistent with the placement orientation of the object to be modeled;
[0097] It is necessary to use the positioning tools of the 3D modeling software to accurately spatially position the framework according to the position and orientation of the object to be modeled in the captured image. The advantage of correctly positioning the basic framework of the model is that it ensures that the subsequent added details and adjustments are based on the correct reference objects, thereby enhancing the spatial accuracy of the model. This is crucial for the overall consistency of the model and the final visual effect, especially when the model is used for animation or virtual reality applications. Correct spatial positioning can greatly enhance the user experience.
[0098] S34, trimming the contour of the located model base frame according to the depth information of the first data point to make it match the three-dimensional shape contour in the three-dimensional shape feature.
[0099] Adjusting the details of the model based on the depth information so that its contours are more consistent with the three-dimensional shape contours of the actual object. This process involves manually or automatically adjusting the vertices and edges of the model in the 3D modeling software to ensure a high degree of fit. The advantage of contour trimming is that it can make the model reflect the true shape of the object to be modeled at a more subtle level, especially for the curves and complex structures of the object. This meticulous adjustment improves the accuracy and realism of the model, which is crucial for subsequent steps such as texture mapping and detail processing.
[0100] In this embodiment, it is further explained that step S3 also includes:
[0101] S35, selecting the most matched standard modeling factor from the modeling database according to each concave-convex feature of the three-dimensional shape feature;
[0102] According to the concave-convex information in the three-dimensional shape features obtained from multiple angles, the best matching standard modeling factors, such as predefined geometric shapes or modules, are selected from the modeling database; this process involves a matching algorithm to evaluate which modeling factor can best represent the specific concave-convex features. Selecting the best matching standard modeling factors can significantly improve modeling efficiency, because these predefined elements already have a certain level of detail and can be directly used to build complex three-dimensional shapes; this not only speeds up the modeling process, but also ensures the accuracy and consistency of the model, especially when representing the specific concave-convex features of the object.
[0103] S36, adjusting the size and shape of the selected standard modeling factor and positioning it in the three-dimensional modeling space according to the geometric features of the object to be modeled;
[0104] The selected standard modeling factors need to be adjusted in size and shape and positioned in the 3D modeling space according to the specific geometric features of the object to be modeled, which usually involves scaling, rotating and moving these factors to ensure that they accurately fit the relevant parts of the model's basic framework. Accurate adjustment and positioning of standard modeling factors can ensure accurate docking and natural transition of various parts of the model, improving the overall accuracy and detail richness of the model.
[0105] S37, integrating the adjusted and positioned standard modeling factors into the model basic framework, and performing smoothing processing between the standard modeling factors and the model basic framework;
[0106] The adjusted and positioned standard modeling factors are merged into the basic model framework. This process may include ensuring that the connections between factors are seamless and natural, and performing necessary smoothing on the seams to eliminate any unnatural edges or corners; the fusion and smoothing steps ensure a natural transition between the various parts of the model. This meticulous processing helps the model to be more visually coherent, especially when the model needs to be rendered with high quality or used for high-precision simulation, the effect of smoothing is particularly important.
[0107] S38, modifying the fused standard modeling factors according to the depth information of the second data point to establish a preliminary three-dimensional model.
[0108] The fused model is corrected based on the depth information provided by the second data point. This means that each part of the model needs to be carefully adjusted to ensure that the position, size and shape of the elements are completely consistent with the three-dimensional shape characteristics of the actual object, thereby establishing a preliminary three-dimensional model.
[0109] In this embodiment, it is specifically described that step S4 specifically includes:
[0110] S41, performing edge smoothing on the preliminary three-dimensional model by using image micro-processing technology to reduce jagged edges and hard edges of the preliminary three-dimensional model;
[0111] The preliminary 3D model is edge smoothed by image micro-processing technology, aiming to eliminate the jagged and hard edges of the model and make the model's contour more natural and smooth. This process involves applying various smoothing algorithms, such as anti-aliasing technology, to improve the visual effect of the model's edges.
[0112] S42, performing appearance adjustment on the surface of the preliminary three-dimensional model, where the appearance adjustment includes adjusting brightness, contrast and saturation, and applying a preset texture pattern;
[0113] The surface of the preliminary 3D model is adjusted for appearance, including the adjustment of brightness, contrast, saturation and the application of preset texture patterns. This process aims to improve the color and texture of the model. Appearance adjustment is usually performed in 3D modeling software and can be achieved through texture mapping and shading technology. Make the color and texture of the model closer to the real object. Applying appropriate textures can not only increase the level of detail of the model, but also visually simulate complex material effects, such as metallic luster, cloth texture, etc., greatly improving the application value of the model.
[0114] S43, using a normal map to set the concave and convex features of the preliminary three-dimensional model to increase the level of detail of the surface of the preliminary three-dimensional model;
[0115] The concave and convex features of the preliminary 3D model are set by using normal mapping technology, aiming to increase the level of detail on the model surface. Among them, normal mapping is a commonly used technology that enhances the details of the model surface by simulating the height difference under lighting, making it look more deep and complex.
[0116] S44, evaluating the overall appearance of the preliminary three-dimensional model, and fine-tuning the preliminary three-dimensional model according to the appearance evaluation result.
[0117] Evaluate the overall appearance of the preliminary 3D model and make any necessary adjustments to the model based on the evaluation results. This evaluation process includes checking the model from all angles to ensure the consistency of color, texture, and details, and that the overall quality of the model meets the expected standards. Fine-tuning may involve adjusting texture details, improving color matching, or optimizing certain geometric features of the model.
[0118] The main advantage of conducting overall appearance evaluation and fine-tuning is to ensure that the final model is visually perfect, and every detail is carefully adjusted and optimized. This process is crucial to improving the professionalism and completeness of the model and ensuring that the model can achieve the best visual effects in various application scenarios.
[0119] In this embodiment, it is further explained that after step S4, the following steps are further included:
[0120] S5, the optimized three-dimensional model is retrieved from the three-dimensional modeling software to a format conversion unit, and the three-dimensional model is converted into a preset standard format by the format conversion unit and stored.
[0121] Use a format conversion unit, which may be a software tool or service, to convert the 3D model file into a specific preset standard format, such as STL, OBJ or other formats compatible with the target platform or application; the converted model is stored in the preset standard format for subsequent use or sharing. By converting the model to the preset standard format, it ensures that the 3D model can be widely used on different software, platforms or devices, including but not limited to 3D printing, virtual applications and online sharing.
[0122] Embodiment 2:
[0123] Combination Figure 5 As shown, the present invention also provides a system for generating a three-dimensional model based on image upload, characterized in that, for implementing the method for generating a three-dimensional model based on image upload as in the first embodiment, the generating system comprises:
[0124] The imaging module 10 is used to obtain images of the object to be modeled from at least three angles; the imaging module 10 includes a camera unit 11 and a ring light source 12;
[0125] An image processing module is used to identify the light and shadow contrast of the edges and concave and convex parts of the object to be modeled in each image, so as to analyze the light and shadow changes on the surface of the object to be modeled;
[0126] A three-dimensional feature inference module is used to infer the three-dimensional shape features of the object to be modeled by combining the analysis results of light and shadow changes at multiple angles;
[0127] The 3D modeling module builds the basic model framework of the object to be modeled based on the 3D shape features, uses standard modeling factors to match the 3D shape features, and integrates them into the basic model framework to build a preliminary 3D model.
[0128] A model optimization module is used to optimize the details of the preliminary three-dimensional model through image micro-processing technology to obtain an optimized three-dimensional model;
[0129] The display module is used to display the optimized three-dimensional model.
[0130] In this embodiment, the generating system also includes a bracket 20, on which a rotating drive component 30 is arranged along the Z-axis direction, a mounting plate is arranged at the driving end of the rotating drive component 30, a first driving component 40 is arranged on the mounting plate, a turntable 50 is arranged at the driving end of the first driving component 40, and the camera unit 11 and the annular light source 12 are both installed on the turntable 50; the rotating drive component 30 is used to drive the imaging module 10 to rotate around the Z-axis direction.
[0131] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating a three-dimensional model based on image upload, characterized in that: include: Using an imaging module to obtain images of the object to be modeled from at least three angles; The imaging module includes a camera unit and a ring light source; By identifying the light and shadow contrast of the edges and concave and convex parts of the object to be modeled in each picture, the light and shadow changes on the surface of the object to be modeled are analyzed, and the three-dimensional shape characteristics of the object to be modeled are inferred by combining the analysis results of light and shadow changes at multiple angles; Based on the three-dimensional shape features, a model basic framework of the object to be modeled is established, and a standard modeling factor is used to match the three-dimensional shape features and merge them into the model basic framework to establish a preliminary three-dimensional model; the standard modeling factor is a standard geometric figure; By using image micro-processing technology, the preliminary three-dimensional model is subjected to detail optimization processing to obtain an optimized three-dimensional model; the detail optimization processing includes smoothing edges, adjusting appearance, and setting concave and convex features; The method of analyzing the light and shadow changes on the surface of the object to be modeled by identifying the light and shadow contrast of the edges and concave and convex parts of the object to be modeled in each picture specifically includes: Preprocessing each image; the preprocessing includes adjusting the brightness and contrast of the image; The edge enhancement filter is applied to the preprocessed image to enhance the edge, define the shape edge of the object, and identify the edge contour information; By comparing the light and shadow of the surface of the object to be modeled in the edge-enhanced image, the light and dark differences between the bright and shadow areas of the surface are analyzed to identify the concave and convex changes on the surface of the object to be modeled; According to the results of light and shadow contrast, the raised and sunken areas on the surface of the object are marked on the image through image drawing software to mark obvious concave and convex features; Complete edge recognition of the object to be modeled and light and shadow comparison of the concave and convex parts in each picture in turn, obtain edge contour information and concave and convex features of each picture, and integrate and summarize them; The three-dimensional shape features of the object to be modeled are inferred by combining the analysis results of light and shadow changes at multiple angles; specifically, the following steps are performed: Synthesize the analysis results of light and shadow changes in pictures from multiple angles. During the synthesis process, the edge contour information in each picture is dispersed into a number of first data points. All the first data points are matched and merged in combination with the perspective information of each picture to form a continuous three-dimensional shape contour. Dispersing the concave and convex features in each image into a plurality of second data points, and matching and fusing the second data points onto the three-dimensional shape contour in combination with the viewing angle information of each image; Performing an in-depth analysis of the light and shadow changes in each image, converting the light and shadow changes into depth information in a three-dimensional space through a preset algorithm, and matching the obtained depth information to the corresponding first data point and the second data point to calculate the three-dimensional shape features of the object to be modeled; Wherein, the step of establishing a model basic framework of the object to be modeled based on the three-dimensional shape features specifically includes: Selecting the closest basic shape as the model basic framework according to the three-dimensional shape contour in the three-dimensional shape feature; Adjust the selected model base frame according to the specific size and proportion of the object to be modeled, and the adjustment process includes adjusting the height, width and depth of the frame; Positioning the adjusted model base frame in the three-dimensional modeling space so that its position in the three-dimensional modeling space is consistent with the placement orientation of the object to be modeled; According to the depth information of the first data point, the contour line of the located model basic frame is trimmed to match the three-dimensional shape contour in the three-dimensional shape feature; Among them, using standard modeling factors to match the three-dimensional shape features and integrating them into the model basic framework to establish a preliminary three-dimensional model; specifically including: Selecting the most matching standard modeling factor from a modeling database according to each concave-convex feature of the three-dimensional shape feature; According to the geometric features of the object to be modeled, the size and shape of the selected standard modeling factors are adjusted and positioned in the three-dimensional modeling space; The adjusted and positioned standard modeling factors are integrated into the model basic framework, and smoothing is performed between the standard modeling factors and the model basic framework; The fused standard modeling factors are corrected according to the depth information of the second data point to establish a preliminary three-dimensional model.
2. The method for generating a three-dimensional model based on image upload according to claim 1, characterized in that: The imaging module includes a turntable, the camera unit and the annular light source are respectively installed on the turntable, and a first driving component is provided on one side of the turntable. The first driving component is used to drive the turntable to rotate, so as to drive the camera unit to obtain pictures of the object to be modeled from multiple angles.
3. The method for generating a three-dimensional model based on image upload according to claim 1, characterized in that: The preliminary three-dimensional model is subjected to detail optimization processing by image micro-processing technology to obtain an optimized three-dimensional model; specifically, the process includes: Perform edge smoothing on the preliminary three-dimensional model by using image micro-processing technology to reduce jagged edges and hard edges on the preliminary three-dimensional model; Performing appearance adjustment on the surface of the preliminary three-dimensional model, wherein the appearance adjustment includes adjusting brightness, contrast and saturation, and applying a preset texture pattern; Using a normal map to set the concave and convex features of the preliminary three-dimensional model to increase the level of detail of the surface of the preliminary three-dimensional model; The overall appearance of the preliminary three-dimensional model is evaluated, and the preliminary three-dimensional model is fine-tuned according to the appearance evaluation result to obtain an optimized three-dimensional model.
4. The method for generating a three-dimensional model based on image upload according to claim 1, characterized in that: The method further comprises: performing detail optimization processing on the preliminary three-dimensional model by using image micro-processing technology to obtain an optimized three-dimensional model; and then further comprising: The optimized three-dimensional model is retrieved from the three-dimensional modeling software to a format conversion unit, and the three-dimensional model is converted into a preset standard format by the format conversion unit and stored.
5. A system for generating a three-dimensional model based on image upload, characterized in that: The method for generating a three-dimensional model based on image upload according to any one of claims 1 to 4 is implemented, wherein the generating system comprises: An imaging module, used to obtain images of the object to be modeled from at least three angles; the imaging module includes a camera unit and a ring light source; An image processing module is used to identify the light and shadow contrast of the edges and concave and convex parts of the object to be modeled in each image, so as to analyze the light and shadow changes on the surface of the object to be modeled; A three-dimensional feature inference module is used to infer the three-dimensional shape features of the object to be modeled by combining the analysis results of light and shadow changes at multiple angles; A three-dimensional modeling module, based on the three-dimensional shape features, establishes a model basic framework of the object to be modeled, uses standard modeling factors to match the three-dimensional shape features, and fuses them to the model basic framework to establish a preliminary three-dimensional model; A model optimization module, used to optimize the details of the preliminary three-dimensional model by using image micro-processing technology to obtain an optimized three-dimensional model; The display module is used to display the optimized three-dimensional model.
