Intelligent three-dimensional modeling method and device based on machine learning
Through the methods of splitting images, gamma correction and feature point matching, and combining image and point cloud data for 3D modeling, the problem of low accuracy and adaptability of 3D modeling is solved and higher model accuracy and adaptability are achieved. .
Patent Information
- Application Number
- CN202411073886.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-08-07
AI Technical Summary
The accuracy and adaptability of three-dimensional modeling in the existing technology are low, mainly due to relying only on a single type of data in image data or point cloud data to confirm model parameters, resulting in insufficient accuracy.
By obtaining the image and point cloud data of the object to be modeled, split the image into sub-images and perform gamma correction, filter feature points, build a set of feature pairs, and use a machine learning model to combine the image and point cloud data to perform three-dimensional modeling.
It improves the accuracy and adaptability of 3D modeling, improves image quality through gamma correction and feature point matching, and combines image and point cloud data to enhance the accuracy and adaptability of model parameters.
Smart Images

Figure CN118608702A
Abstract
Description
Technical Field
[0001] The present application relates to the field of three-dimensional modeling technology, and more specifically, to an intelligent three-dimensional modeling method and device based on machine learning. Background Art
[0002] Intelligent 3D modeling is a new 3D modeling method that has emerged in recent years with the development of artificial intelligence and deep learning technologies. Compared to traditional 3D modeling, intelligent 3D modeling leverages deep learning algorithms to automatically and intelligently improve modeling efficiency and accuracy. The core of this technology lies in the use of deep learning algorithms to automatically extract data features or process data, and perform complex pattern recognition and prediction.
[0003] In the existing technology, the confirmation of 3D model parameters often relies solely on a single type of data in image data or point cloud data. 3D model parameters include geometric parameters (vertices, edges, faces, etc.) and texture parameters (texture images, material properties, colors, etc.). Image data and point cloud data both have their own characteristics. Considering only a single data case results in low precision of 3D model parameters, resulting in poor accuracy and adaptability of 3D modeling.
[0004] Therefore, how to combine image data and point cloud data to improve the accuracy and adaptability of three-dimensional modeling is a technical problem that needs to be solved. Summary of the Invention
[0005] The present invention provides an intelligent 3D modeling method based on machine learning to solve the technical problems of low accuracy and adaptability of 3D modeling in the prior art. The method comprises:
[0006] Acquiring an image and point cloud data of the object to be modeled, splitting the image of the object to be modeled into multiple sub-images according to illumination information of the image of the object to be modeled, evaluating illumination intensity of each sub-image based on the illumination information, determining a target gamma value for each sub-image based on the illumination intensity, and performing gamma correction on each sub-image according to the target gamma value, thereby obtaining a gamma-corrected image of the object to be modeled;
[0007] The first-class feature points and the second-class feature points are respectively screened out from the image and point cloud data of the object to be modeled, and a preset matching algorithm is used to determine whether the first-class feature points and the second-class feature points match each other. The first-class feature points and the second-class feature points that match each other are recorded as feature pairs, and the feature pairs are marked in the image to obtain the adjacent areas of the feature pairs;
[0008] Defining a relative image quality index of an adjacent area of the feature pair based on an image of the adjacent area of the feature pair and the object to be modeled, defining a point cloud accuracy index based on the point cloud data and the feature pair, and selecting feature pairs based on the relative image quality index and the point cloud accuracy index, respectively, to construct a first feature pair set and a second feature pair set;
[0009] Determine a quality feature pair by using the first feature pair set and the second feature pair set, construct a coordinate system transformation matrix based on the quality feature pair, the coordinate system transformation matrix converts the two-dimensional coordinates of the image pixel points of the object to be modeled into the three-dimensional coordinates of the point cloud of the object to be modeled, and merges the point cloud coordinate data;
[0010] The gamma-corrected image of the object to be modeled and the merged point cloud coordinate data are input into the preset machine learning model, the model parameters are output, and three-dimensional modeling is performed based on the model parameters.
[0011] In some embodiments of the present application, splitting the image of the object to be modeled into multiple sub-images according to illumination information of the image of the object to be modeled includes:
[0012] Identify shadow areas and non-shadow areas of the image of the object to be modeled, and determine the size of the shadow in the shadow area and the brightness of the non-shadow area, where the lighting information includes the size of the shadow and the brightness of the non-shadow area;
[0013] The non-shadow area is split by its brightness, and different labels are assigned according to the brightness range of the non-shadow area.
[0014] Split the shadow area by shadow size, and assign different labels according to the range to which the shadow size belongs;
[0015] The image of the object to be modeled is split into multiple sub-images according to the labels of the shadow area and the non-shadow area, and the shadow area or the non-shadow area under the same label is taken as a single sub-image.
[0016] In some embodiments of the present application, evaluating the illumination intensity of each sub-image using illumination information and determining a target gamma value for each sub-image based on the illumination intensity includes:
[0017] Lighting information also includes shadow conditions. The light source position is analyzed based on the shadow condition and shadow size, and the light source position is mapped to a surrounding distance. The density of the shadow area is defined as the ratio of the brightness of the shadow area to the brightness of the adjacent non-shadow area within the surrounding distance.
[0018] For the sub-image in the shadow area, determining a light intensity according to the density of the shadow area of the sub-image, and determining a target gamma value of the sub-image according to the first corresponding relationship;
[0019] For the sub-image in the non-shadow area, a light intensity is determined according to the brightness of the non-shadow area of the sub-image, and a target gamma value of the sub-image is determined through the second corresponding relationship.
[0020] In some embodiments of the present application, the first type of feature points and the second type of feature points are respectively screened out from the image and point cloud data of the object to be modeled, including:
[0021] Extracting feature points from the image of the object to be modeled by a feature extraction algorithm, and using the extracted feature points as a class of feature points;
[0022] In the point cloud data of the object to be modeled, the density of the point cloud is determined by calculating the average distance between the points in the point cloud, the local detail requirements of the object to be modeled are obtained, and two neighborhood intervals are determined according to the density of the point cloud and the local detail requirements respectively;
[0023] The intersection interval of the two neighborhood intervals is taken as the neighborhood of the point cloud, and the curvature is calculated in the neighborhood. The point where the curvature change exceeds the curvature threshold is taken as a feature point, and the feature point is regarded as a second-class feature point.
[0024] In some embodiments of the present application, a relative image quality index of a feature pair's adjacent region is defined based on an image of the feature pair's adjacent region and an image of the object to be modeled, including: ;
[0025] in, is the relative image quality index of the feature to the adjacent area, 3 is the three indicators of resolution, noise level and contrast in the image, For the image The quality weight of the indicator, For the image The size of the indicator, is the first The quality weight of the indicator, is the first The size of the index, n is the number of shadow areas in the adjacent area of the feature pair in the image, The first The reflection weight of the shadow area is The first The comprehensive shadow characteristic index of the shadow area.
[0026] In some embodiments of the present application, point cloud accuracy indicators are defined based on point cloud data and feature pairs, including:
[0027] Determine the location of the feature pair in the point cloud data and the neighborhood of the location; ;
[0028] in, is the point cloud accuracy index of the feature pair, 、 are the weights corresponding to the point cloud density and noise level in the feature pair neighborhood, 、 are the point cloud density and noise level in the neighborhood of the feature pair, 、 are the weights corresponding to the overall point cloud density and noise level of the point cloud data, 、 are the point cloud density and noise level of the entire point cloud data respectively.
[0029] In some embodiments of the present application, feature pairs are selected according to the relative image quality index and the point cloud accuracy index respectively to construct a first feature pair set and a second feature pair set, including:
[0030] Determine the relative image quality index and point cloud accuracy index of each feature pair, filter out the feature pairs that meet the relative image quality index threshold, and construct a first feature pair set. Filter out the feature pairs that meet the point cloud accuracy index threshold, and construct a second feature pair set.
[0031] In some embodiments of the present application, determining the quality feature pair by using the first feature pair set and the second feature pair set includes:
[0032] Select the feature pairs that intersect the first feature pair set and the second feature pair set as quality feature pairs;
[0033] If there are no overlapping or common feature pairs between the first feature pair set and the second feature pair set, a comprehensive quality index is defined by the relative image quality index and the point cloud accuracy index. Each feature pair in the first feature pair set and the second feature pair set is screened one by one based on the comprehensive quality index, and the feature pairs that meet the requirements are regarded as quality feature pairs.
[0034] Correspondingly, the present application also provides an intelligent three-dimensional modeling device based on machine learning, comprising:
[0035] a correction module, configured to obtain an image and point cloud data of the object to be modeled, split the image of the object to be modeled into multiple sub-images based on illumination information of the image of the object to be modeled, evaluate illumination intensity of each sub-image based on the illumination information, determine a target gamma value for each sub-image based on the illumination intensity, and perform gamma correction on each sub-image based on the target gamma value, thereby obtaining a gamma-corrected image of the object to be modeled;
[0036] The matching module is used to screen out the first-class feature points and the second-class feature points from the image and point cloud data of the object to be modeled, determine whether the first-class feature points and the second-class feature points match each other through a preset matching algorithm, record the first-class feature points and the second-class feature points that match each other as feature pairs, mark the feature pairs in the image, and obtain the adjacent areas of the feature pairs;
[0037] a definition module, configured to define a relative image quality index of an adjacent area of a feature pair based on an image of the adjacent area of the feature pair and an image of the object to be modeled, define a point cloud accuracy index based on the point cloud data and the feature pair, and select the feature pairs based on the relative image quality index and the point cloud accuracy index, respectively, to construct a first feature pair set and a second feature pair set;
[0038] a merging module, configured to determine quality feature pairs using the first feature pair set and the second feature pair set, construct a coordinate system transformation matrix based on the quality feature pairs, the coordinate system transformation matrix transforming the two-dimensional coordinates of the image pixel points of the object to be modeled into the three-dimensional coordinates of the point cloud of the object to be modeled, and merging the point cloud coordinate data;
[0039] The modeling module is used to input the gamma-corrected image of the object to be modeled and the merged point cloud coordinate data into a preset machine learning model, output model parameters, and perform three-dimensional modeling based on the model parameters.
[0040] By applying the above technical solution, the image and point cloud data of the object to be modeled are obtained, the image of the object to be modeled is split into multiple sub-images according to the illumination information of the image of the object to be modeled, the illumination intensity of each sub-image is evaluated by the illumination information, the target gamma value of each sub-image is determined based on the illumination intensity, and gamma correction is performed on each sub-image according to the target gamma value, so as to obtain the image of the object to be modeled after gamma correction; the first-class feature points and the second-class feature points are respectively screened out from the image and point cloud data of the object to be modeled, and a preset matching algorithm is used to determine whether the first-class feature points and the second-class feature points match, and the mutually matching first-class feature points and the second-class feature points are recorded as feature pairs, and the feature pairs are marked in the image to obtain the adjacent areas of the feature pairs; according to the feature pairs, the adjacent areas are obtained. The image of the nearby area and the object to be modeled is used to define the relative image quality index of the feature pair in the adjacent area, the point cloud accuracy index is defined according to the point cloud data and the feature pair, and the feature pairs are screened according to the relative image quality index and the point cloud accuracy index respectively to construct a first feature pair set and a second feature pair set; the quality feature pairs are determined by the first feature pair set and the second feature pair set, and the coordinate system transformation matrix is constructed based on the quality feature pairs. The coordinate system transformation matrix converts the two-dimensional coordinates of the image pixel points of the object to be modeled to the three-dimensional coordinates of the point cloud of the object to be modeled, and merges the point cloud coordinate data; the gamma-corrected image of the object to be modeled and the merged point cloud coordinate data are input into a preset machine learning model, the model parameters are output, and three-dimensional modeling is performed according to the model parameters. The present application performs gamma correction on each sub-image by using the target gamma value to ensure that the contrast of the image is within a reasonable range and improve the image quality. Feature pairs are selected based on relative image quality and point cloud accuracy metrics. A coordinate system transformation matrix is constructed based on these quality feature pairs. This transforms the position coordinates of the object to be modeled in the image into 3D coordinates on the point cloud. The point cloud data is then merged, combining the position coordinates of the object to be modeled in the image and point cloud. This improves the precision of the model parameters for the object's appearance and structure, ensuring the accuracy of 3D modeling. The gamma-corrected image of the object to be modeled and the merged point cloud coordinate data are input into a pre-set machine learning model, which outputs the model parameters. Other image features can be combined with the point cloud coordinate positions, for example, mapping the image's texture features to corresponding parts of the 3D model constructed from the point cloud, thereby improving the adaptability of 3D modeling. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0042] Figure 1A schematic diagram of a process flow of an intelligent three-dimensional modeling method based on machine learning proposed in an embodiment of the present invention is shown;
[0043] Figure 2 A schematic structural diagram of an intelligent three-dimensional modeling device based on machine learning proposed in an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0044] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0045] The present invention provides an intelligent three-dimensional modeling method based on machine learning. Figure 1 As shown, the method includes the following steps:
[0046] Step S101: Acquire an image and point cloud data of the object to be modeled, split the image of the object to be modeled into multiple sub-images according to the illumination information of the image of the object to be modeled, evaluate the illumination intensity of each sub-image based on the illumination information, determine the target gamma value of each sub-image based on the illumination intensity, and perform gamma correction on each sub-image according to the target gamma value, so as to obtain a gamma-corrected image of the object to be modeled.
[0047] In this embodiment, the image of the object to be modeled is a multi-angle image acquired by a camera, and the point cloud data is three-dimensional point cloud data of the target object acquired using a three-dimensional scanning device (such as a laser scanner or structured light scanner). The object to be modeled here can be an object, a person, an animal, or a scene. An image is split into multiple sub-images based on the image's lighting conditions (shadowed or unshadowed), and the target gamma value is determined by the illumination intensity of each sub-image. Gamma correction applies a nonlinear transformation to the image's brightness, which can improve image contrast. Adjusting the gamma value allows adaptation to varying lighting conditions, but excessive gamma correction can cause image distortion, so appropriate gamma correction must be ensured.
[0048] It's important to note that both images and point cloud data provide spatial information about a scene or object, albeit in different representations. Images provide spatial information from a two-dimensional perspective, while point clouds provide coordinate data in three-dimensional space. The lighting conditions within an image can significantly affect the extraction of texture and color features. For example, uneven lighting can reduce the contrast of texture features, making texture details difficult to discern and affecting texture and color mapping for subsequent 3D modeling.
[0049] In some embodiments of the present application, splitting the image of the object to be modeled into multiple sub-images according to illumination information of the image of the object to be modeled includes:
[0050] Identify shadow areas and non-shadow areas of the image of the object to be modeled, and determine the size of the shadow in the shadow area and the brightness of the non-shadow area, where the lighting information includes the size of the shadow and the brightness of the non-shadow area;
[0051] The non-shadow area is split by its brightness, and different labels are assigned according to the brightness range of the non-shadow area.
[0052] Split the shadow area by shadow size, and assign different labels according to the range to which the shadow size belongs;
[0053] The image of the object to be modeled is split into multiple sub-images according to the labels of the shadow area and the non-shadow area, and the shadow area or the non-shadow area under the same label is taken as a single sub-image.
[0054] In this embodiment, a shadow detection algorithm (such as one based on color, brightness, or texture) is used to identify shadow areas in an image. Shadows typically appear as darker or smoother areas that contrast with the surrounding environment. Non-shadow areas are classified by their brightness, and shadow areas are classified by their shadow size, thereby integrating them into a single sub-image with multiple categories.
[0055] In some embodiments of the present application, evaluating the illumination intensity of each sub-image using illumination information and determining a target gamma value for each sub-image based on the illumination intensity includes:
[0056] Lighting information also includes shadow conditions. The light source position is analyzed based on the shadow condition and shadow size, and the light source position is mapped to a surrounding distance. The density of the shadow area is defined as the ratio of the brightness of the shadow area to the brightness of the adjacent non-shadow area within the surrounding distance.
[0057] For the sub-image in the shadow area, determining a light intensity according to the density of the shadow area of the sub-image, and determining a target gamma value of the sub-image according to the first corresponding relationship;
[0058] For the sub-image in the non-shadow area, a light intensity is determined according to the brightness of the non-shadow area of the sub-image, and a target gamma value of the sub-image is determined through the second corresponding relationship.
[0059] In this embodiment, the shadow condition includes the shape, edges, and distribution of the shadow, which is used to estimate the direction and position of the light source. For example, a long shadow may indicate that the light source comes from the side, while a circular shadow may indicate that the light source comes from above. The light source position helps determine the edge of the shadow, and the preset distance outside the edge is set as the surrounding distance range. Generally speaking, shadow density refers to the ratio of the brightness of the shadow area to the brightness of the surrounding non-shadow area. The definition of this surrounding non-shadow area is specifically limited to improve the accuracy of shadow density.
[0060] In this embodiment, different shadow densities correspond to different light intensities, and different brightnesses of non-shadow areas correspond to different light intensities. The target gamma value of the sub-image is determined using the first correspondence or the second correspondence. The first correspondence is for the shadow areas, and the second correspondence is for the non-shadow areas. Different light intensities correspond to different target gamma values.
[0061] In step S102, the first-class feature points and the second-class feature points are respectively screened out from the image and point cloud data of the object to be modeled, and a preset matching algorithm is used to determine whether the first-class feature points and the second-class feature points match each other. The first-class feature points and the second-class feature points that match each other are recorded as feature pairs, and the feature pairs are marked in the image to obtain the adjacent area of the feature pairs.
[0062] In this embodiment, both image and point cloud data provide spatial information about the scene or object, although they are represented in different forms. The image provides spatial information from a two-dimensional perspective, while the point cloud provides coordinate data in a three-dimensional space. Image data usually contains rich texture information but lacks depth information; point cloud data provides precise geometric information but usually does not contain color or texture information. Preset matching algorithms include FLANN, Brute-Force, etc., which match feature points in the image with feature points in the point cloud. The matching algorithm will try to find feature point pairs with similar geometric properties in the image and point cloud. The feature pairs are marked in the image, and the preset range where the feature points are located is used as the adjacent area of the feature pairs. The feature pairs mentioned here are essentially feature points.
[0063] In some embodiments of the present application, the first type of feature points and the second type of feature points are respectively screened out from the image and point cloud data of the object to be modeled, including:
[0064] Extracting feature points from the image of the object to be modeled by a feature extraction algorithm, and using the extracted feature points as a class of feature points;
[0065] In the point cloud data of the object to be modeled, the density of the point cloud is determined by calculating the average distance between the points in the point cloud, the local detail requirements of the object to be modeled are obtained, and two neighborhood intervals are determined according to the density of the point cloud and the local detail requirements respectively;
[0066] The intersection interval of the two neighborhood intervals is taken as the neighborhood of the point cloud, and the curvature is calculated in the neighborhood. The point where the curvature change exceeds the curvature threshold is taken as a feature point, and the feature point is regarded as a second-class feature point.
[0067] In this embodiment, for images, feature extraction algorithms such as SIFT, SURF, and ORB are used to extract feature points from the image. These algorithms detect key points in the image and calculate information such as the orientation and scale of each key point. For point clouds, the local curvature of each point is calculated to identify points with significant curvature changes. These points may correspond to edges, corners, or areas of significant curvature change.
[0068] In this embodiment, local curvature refers to the degree of local curvature of the surface shape in the neighborhood around a specific point in three-dimensional space. In point cloud data, local curvature is generally used to describe the local geometric characteristics of each point in the point cloud, that is, the curvature change of the area near the point. The size of the neighborhood depends on the density of the point cloud and the required level of local detail. For example, the higher the density of the point cloud, the more points there are in each unit space, so the size of the neighborhood can be relatively small. The lower the density of the point cloud, the fewer points there are in each unit space, so the size of the neighborhood needs to be appropriately increased. Two neighborhood intervals are determined based on the density of the point cloud and the local detail requirements, and the intersection interval of the two neighborhood intervals is used as the neighborhood of the point cloud, thereby taking into account the density of the point cloud and the required level of local detail.
[0069] Step S103, defining the relative image quality index of the adjacent area of the feature pair based on the image of the adjacent area of the feature pair and the object to be modeled, defining the point cloud accuracy index based on the point cloud data and the feature pair, and filtering the feature pairs according to the relative image quality index and the point cloud accuracy index respectively to construct a first feature pair set and a second feature pair set.
[0070] In this embodiment, the matched feature points are feature pairs. To improve the accuracy of the coordinate system transformation matrix in step S104, the feature pairs need to be screened, retaining high-quality, high-precision feature pairs as quality feature pairs. A relative image quality index for the feature pair's adjacent area is defined by comparing the feature pair's adjacent area with the overall image. A point cloud accuracy index is defined by comparing the feature pair's neighborhood with the overall point cloud data. The larger the value of both indicators, the better the quality of the feature pair.
[0071] It should be noted that the relative image quality index is calculated for the feature points on the image of the feature pairs, and the point cloud accuracy index is calculated for the feature points on the point cloud of the feature pairs, thereby constructing the first feature pair set and the second feature pair set. For example, the feature pairs include (s1, s2), (s3, s4), and (s5, s6), where s1, s3, and s5 are all feature points on the image, and s2, s4, and s6 are all feature points on the point cloud. These three feature pairs each correspond to a relative image quality index and a point cloud accuracy index. The relative image quality index is calculated for points s1, s3, and s5, and the point cloud accuracy index is calculated for points s2, s4, and s6.
[0072] In some embodiments of the present application, a relative image quality index of a feature pair's adjacent region is defined based on an image of the feature pair's adjacent region and an image of the object to be modeled, including: ;
[0073] in, is the relative image quality index of the feature to the adjacent area, 3 is the three indicators of resolution, noise level and contrast in the image, For the image The quality weight of the indicator, For the image The size of the indicator, is the first The quality weight of the indicator, is the first The size of the index, n is the number of shadow areas in the adjacent area of the feature pair in the image, The first The reflection weight of the shadow area is The first The comprehensive shadow characteristic index of the shadow area.
[0074] In this embodiment, the relative image quality index is determined by three indicators: resolution, noise level and contrast. The class average of the comprehensive shadow feature index representing multiple shadow regions corrects the image quality of the adjacent regions. Shadow regions often reflect low-contrast areas in the image and can, to a certain extent, characterize image quality. The comprehensive shadow feature index is derived from the weighted sum of multiple shadow features to represent the shadow region.
[0075] In some embodiments of the present application, point cloud accuracy indicators are defined based on point cloud data and feature pairs, including:
[0076] Determine the location of the feature pair in the point cloud data and the neighborhood of the location; ;
[0077] in, is the point cloud accuracy index of the feature pair, 、 are the weights corresponding to the point cloud density and noise level in the feature pair neighborhood, 、 are the point cloud density and noise level in the neighborhood of the feature pair, 、 are the weights corresponding to the overall point cloud density and noise level of the point cloud data, 、 are the point cloud density and noise level of the entire point cloud data respectively.
[0078] In this embodiment, the point cloud accuracy index is determined by the ratio of the point cloud density and noise level in the neighborhood of the feature point of the feature pair to the point cloud density and noise level of the entire point cloud data.
[0079] In some embodiments of the present application, feature pairs are selected according to the relative image quality index and the point cloud accuracy index respectively to construct a first feature pair set and a second feature pair set, including:
[0080] Determine the relative image quality index and point cloud accuracy index of each feature pair, filter out the feature pairs that meet the relative image quality index threshold, and construct a first feature pair set. Filter out the feature pairs that meet the point cloud accuracy index threshold, and construct a second feature pair set.
[0081] In this embodiment, for example, the feature pairs include (s1, s2), (s3, s4), and (s5, s6), s1, s3, and s5 are all feature points on the image, and s2, s4, and s6 are all feature points on the point cloud. As long as one of the feature points in the feature pair meets the requirements, the feature pair can be divided into the first feature pair set or the second feature pair set.
[0082] Step S104, determine the quality feature pairs through the first feature pair set and the second feature pair set, and construct a coordinate system transformation matrix based on the quality feature pairs. The coordinate system transformation matrix converts the two-dimensional coordinates of the image pixel points of the object to be modeled into the three-dimensional coordinates of the point cloud of the object to be modeled, and merges the point cloud coordinate data.
[0083] In this embodiment, the first feature pair set and the second feature pair set are used to screen out feature pairs with relatively high relative image quality indicators and point cloud accuracy indicators, thereby constructing a coordinate system transformation matrix. The successfully matched feature point pairs are recorded, and their image coordinates (two-dimensional) and point cloud coordinates (three-dimensional) are recorded to obtain the rotation and translation conditions. The rotation matrix and the translation vector are combined to form a coordinate system transformation matrix. This matrix can convert the two-dimensional coordinates of the image to the three-dimensional coordinates of the point cloud. Because the point cloud is three-dimensional data and the spatial coordinates provided are more accurate, the image coordinates are transferred to the point cloud. The point cloud coordinate data is merged to merge the converted image data (usually in the form of points) into the original point cloud. This may involve creating new points or updating the positions of existing points. In this way, the image position data is combined with the point cloud position data to obtain a more accurate spatial position structure of the object to be modeled.
[0084] It should be noted that the method of calculating the coordinate system transformation matrix that converts the two-dimensional coordinates of the image to the three-dimensional coordinates of the point cloud is not the focus of protection of this scheme. As long as the scheme can calculate the coordinate system transformation matrix based on the quality characteristics, it falls within the scope of protection of this application.
[0085] In some embodiments of the present application, determining the quality feature pair by using the first feature pair set and the second feature pair set includes:
[0086] Select the feature pairs that intersect the first feature pair set and the second feature pair set as quality feature pairs;
[0087] If there are no overlapping or common feature pairs between the first feature pair set and the second feature pair set, a comprehensive quality index is defined by the relative image quality index and the point cloud accuracy index. Each feature pair in the first feature pair set and the second feature pair set is screened one by one based on the comprehensive quality index, and the feature pairs that meet the requirements are regarded as quality feature pairs.
[0088] In this embodiment, intersection refers to the presence of common feature pairs in the two sets, indicating that both the relative image quality index and the point cloud accuracy index are high. Such feature pairs are recorded as quality feature pairs. If there is no intersection between the two sets, a comprehensive quality index is defined by the relative image quality index and the point cloud accuracy index (weighted summation, weighted averaging, or any method that balances both qualities).
[0089] In step S105 , the gamma-corrected image of the object to be modeled and the merged point cloud coordinate data are input into a preset machine learning model, model parameters are output, and three-dimensional modeling is performed according to the model parameters.
[0090] In this embodiment, the appearance and shape structure of the object to be modeled is constructed using the merged point cloud coordinate data. Each part of the appearance and shape structure is then mapped to each part of the image. The color and texture features of the image are then mapped to the corresponding parts of the appearance and shape structure. This generates model parameters and allows for 3D modeling.
[0091] It is understandable that not only the color features and texture features of the image can be used here, but also some other features can be used to help model building.
[0092] By applying the above technical solution, the image and point cloud data of the object to be modeled are obtained, the image of the object to be modeled is split into multiple sub-images according to the illumination information of the image of the object to be modeled, the illumination intensity of each sub-image is evaluated by the illumination information, the target gamma value of each sub-image is determined based on the illumination intensity, and gamma correction is performed on each sub-image according to the target gamma value, so as to obtain the image of the object to be modeled after gamma correction; the first-class feature points and the second-class feature points are respectively screened out from the image and point cloud data of the object to be modeled, and a preset matching algorithm is used to determine whether the first-class feature points and the second-class feature points match, and the mutually matching first-class feature points and the second-class feature points are recorded as feature pairs, and the feature pairs are marked in the image to obtain the adjacent areas of the feature pairs; according to the feature pairs, the adjacent areas are obtained. The image of the nearby area and the object to be modeled is used to define the relative image quality index of the feature pair in the adjacent area, the point cloud accuracy index is defined according to the point cloud data and the feature pair, and the feature pairs are screened according to the relative image quality index and the point cloud accuracy index respectively to construct a first feature pair set and a second feature pair set; the quality feature pairs are determined by the first feature pair set and the second feature pair set, and the coordinate system transformation matrix is constructed based on the quality feature pairs. The coordinate system transformation matrix converts the two-dimensional coordinates of the image pixel points of the object to be modeled to the three-dimensional coordinates of the point cloud of the object to be modeled, and merges the point cloud coordinate data; the gamma-corrected image of the object to be modeled and the merged point cloud coordinate data are input into a preset machine learning model, the model parameters are output, and three-dimensional modeling is performed according to the model parameters. The present application performs gamma correction on each sub-image by using the target gamma value to ensure that the contrast of the image is within a reasonable range and improve the image quality. Feature pairs are selected based on relative image quality and point cloud accuracy metrics. A coordinate system transformation matrix is constructed based on these quality feature pairs. This transforms the position coordinates of the object to be modeled in the image into 3D coordinates on the point cloud. The point cloud data is then merged, combining the position coordinates of the object to be modeled in the image and point cloud. This improves the precision of the model parameters for the object's appearance and structure, ensuring the accuracy of 3D modeling. The gamma-corrected image of the object to be modeled and the merged point cloud coordinate data are input into a pre-set machine learning model, which outputs the model parameters. Other image features can be combined with the point cloud coordinate positions, for example, mapping the image's texture features to corresponding parts of the 3D model constructed from the point cloud, thereby improving the adaptability of 3D modeling.
[0093] Through the above description of the embodiments, those skilled in the art will clearly understand that the present invention can be implemented via hardware or via software combined with a necessary general-purpose hardware platform. Based on this understanding, the technical solution of the present invention can be embodied in the form of a software product. This software product can be stored on a non-volatile storage medium (such as a CD-ROM, USB flash drive, or external hard drive) and includes instructions for enabling a computer device (such as a personal computer, server, or network device) to execute the methods described in various implementation scenarios of the present invention.
[0094] In order to further illustrate the technical idea of the present invention, the technical solution of the present invention is now described in combination with specific application scenarios.
[0095] Correspondingly, this application also provides an intelligent three-dimensional modeling device based on machine learning, such as Figure 2 Shown, including:
[0096] a correction module, configured to obtain an image and point cloud data of the object to be modeled, split the image of the object to be modeled into multiple sub-images based on illumination information of the image of the object to be modeled, evaluate illumination intensity of each sub-image based on the illumination information, determine a target gamma value for each sub-image based on the illumination intensity, and perform gamma correction on each sub-image based on the target gamma value, thereby obtaining a gamma-corrected image of the object to be modeled;
[0097] The matching module is used to screen out the first-class feature points and the second-class feature points from the image and point cloud data of the object to be modeled, determine whether the first-class feature points and the second-class feature points match each other through a preset matching algorithm, record the first-class feature points and the second-class feature points that match each other as feature pairs, mark the feature pairs in the image, and obtain the adjacent areas of the feature pairs;
[0098] a definition module, configured to define a relative image quality index of an adjacent area of a feature pair based on an image of the adjacent area of the feature pair and an image of the object to be modeled, define a point cloud accuracy index based on the point cloud data and the feature pair, and select the feature pairs based on the relative image quality index and the point cloud accuracy index, respectively, to construct a first feature pair set and a second feature pair set;
[0099] a merging module, configured to determine quality feature pairs using the first feature pair set and the second feature pair set, construct a coordinate system transformation matrix based on the quality feature pairs, the coordinate system transformation matrix transforming the two-dimensional coordinates of the image pixel points of the object to be modeled into the three-dimensional coordinates of the point cloud of the object to be modeled, and merging the point cloud coordinate data;
[0100] The modeling module is used to input the gamma-corrected image of the object to be modeled and the merged point cloud coordinate data into a preset machine learning model, output model parameters, and perform three-dimensional modeling based on the model parameters.
[0101] Those skilled in the art will appreciate that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the implementation scenario description, or can be modified accordingly and located in one or more devices different from the implementation scenario. The modules in the above implementation scenario can be combined into one module or further split into multiple submodules.
[0102] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An intelligent three-dimensional modeling method based on machine learning, characterized in that: include: Acquire an image and point cloud data of the object to be modeled, split the image of the object to be modeled into multiple sub-images according to illumination information of the image of the object to be modeled, evaluate illumination intensity of each sub-image according to the illumination information, determine a target gamma value of each sub-image based on the illumination intensity, and perform gamma correction on each sub-image according to the target gamma value, so as to obtain an image of the object to be modeled after gamma correction; Selecting first-class feature points and second-class feature points from the image and point cloud data of the object to be modeled respectively, judging whether the first-class feature points and the second-class feature points match by a preset matching algorithm, recording the first-class feature points and the second-class feature points that match each other as feature pairs, marking the feature pairs in the image, and obtaining the adjacent area of the feature pairs; Defining a relative image quality index of an adjacent region of a feature pair according to an image of an adjacent region of the feature pair and an object to be modeled, defining a point cloud accuracy index according to point cloud data and the feature pair, and selecting feature pairs according to the relative image quality index and the point cloud accuracy index, respectively, to construct a first feature pair set and a second feature pair set; Determine the quality feature pairs through the first feature pair set and the second feature pair set, construct a coordinate system transformation matrix based on the quality feature pairs, the coordinate system transformation matrix transforms the two-dimensional coordinates of the image pixel points of the object to be modeled into the three-dimensional coordinates of the point cloud of the object to be modeled, and merges the point cloud coordinate data; The gamma-corrected image of the object to be modeled and the merged point cloud coordinate data are input into the preset machine learning model, the model parameters are output, and three-dimensional modeling is performed based on the model parameters.
2. The intelligent three-dimensional modeling method based on machine learning according to claim 1, characterized in that: The image of the object to be modeled is split into multiple sub-images according to the illumination information of the image of the object to be modeled, including: Identify the shadow area and non-shadow area of the image of the object to be modeled, determine the shadow size in the shadow area and the brightness of the non-shadow area, the lighting information includes the shadow size and the brightness of the non-shadow area; The non-shadow area is split according to its brightness, and different labels are configured according to the different intervals to which the brightness of the non-shadow area belongs; The shadow area is split by shadow size, and different labels are configured according to the different intervals to which the shadow size belongs; The image of the object to be modeled is split into multiple sub-images according to the labels of the shadow area and the non-shadow area, and the shadow area or the non-shadow area under the same label is taken as a single sub-image.
3. The intelligent three-dimensional modeling method based on machine learning according to claim 2, characterized in that: The illumination intensity of each sub-image is evaluated through the illumination information, and the target gamma value of each sub-image is determined based on the illumination intensity, including: The lighting information also includes shadow conditions. The light source position is analyzed according to the shadow conditions and shadow size, and the light source position is mapped to obtain a surrounding distance. The ratio of the brightness of the shadow area to the brightness of the adjacent non-shadow area within the surrounding distance is defined as the density of the shadow area. For a sub-image in a shadow area, a light intensity is determined according to a density of the shadow area of the sub-image, and a target gamma value of the sub-image is determined according to a first corresponding relationship; For the sub-image in the non-shadow area, a light intensity is determined according to the brightness of the non-shadow area of the sub-image, and a target gamma value of the sub-image is determined through the second corresponding relationship.
4. The intelligent three-dimensional modeling method based on machine learning according to claim 1, characterized in that: The first type of feature points and the second type of feature points are respectively selected from the image and point cloud data of the object to be modeled, including: Extracting feature points in the image of the object to be modeled by using a feature extraction algorithm, and using the extracted feature points as a class of feature points; In the point cloud data of the object to be modeled, the density of the point cloud is determined by calculating the average spacing between the points in the point cloud, the local detail requirements of the object to be modeled are obtained, and two neighborhood intervals are determined according to the density of the point cloud and the local detail requirements respectively; The intersection interval of two neighborhood intervals is taken as the neighborhood of the point cloud, and the curvature is calculated in the neighborhood. The point whose curvature change exceeds the curvature threshold is taken as a feature point, and the feature point is taken as a second-class feature point.
5. The intelligent three-dimensional modeling method based on machine learning according to claim 3, characterized in that: The relative image quality index of the feature pair's adjacent area is defined based on the image of the feature pair's adjacent area and the object to be modeled, including: ; in, is the relative image quality index of the feature to the adjacent area, 3 is the three indicators of resolution, noise level and contrast in the image, For the image The quality weight of the indicator, For the image The size of the indicator, is the first The quality weight of the indicator, is the first The size of the index, n is the number of shadow areas in the vicinity of the feature pair in the image, The first The reflection weight of the shadow area is The first The comprehensive shadow characteristic index of the shadow area.
6. The intelligent three-dimensional modeling method based on machine learning according to claim 4, characterized in that: Point cloud accuracy indicators are defined based on point cloud data and feature pairs, including: Determine the location of the feature pair in the point cloud data and the neighborhood of the location; ; in, is the point cloud accuracy index of the feature pair, , are the weights corresponding to the point cloud density and noise level in the neighborhood of the feature pair, , are the point cloud density and noise level in the neighborhood of the feature pair, respectively. , are the weights corresponding to the point cloud density and noise level of the entire point cloud data, respectively. , They are the point cloud density and noise level of the entire point cloud data respectively.
7. The intelligent three-dimensional modeling method based on machine learning according to claim 1, characterized in that: And the feature pairs are selected according to the relative image quality index and the point cloud accuracy index respectively, and a first feature pair set and a second feature pair set are constructed, including: Determine the relative image quality index and point cloud accuracy index of each feature pair, filter out the feature pairs that meet the relative image quality index threshold, construct a first feature pair set, filter out the feature pairs that meet the point cloud accuracy index threshold, and construct a second feature pair set.
8. The intelligent three-dimensional modeling method based on machine learning according to claim 7, characterized in that: Determining the quality feature pairs by using the first feature pair set and the second feature pair set includes: Select the feature pairs that intersect the first feature pair set and the second feature pair set as quality feature pairs; If there are no overlapping or common feature pairs between the first feature pair set and the second feature pair set, a comprehensive quality index is defined by the relative image quality index and the point cloud accuracy index. Each feature pair in the first feature pair set and the second feature pair set is screened one by one based on the comprehensive quality index, and the feature pairs that meet the requirements are taken as quality feature pairs.
9. An intelligent three-dimensional modeling device based on machine learning, characterized in that: include: a correction module, used to obtain an image and point cloud data of the object to be modeled, split the image of the object to be modeled into multiple sub-images according to illumination information of the image of the object to be modeled, evaluate illumination intensity of each sub-image according to the illumination information, determine a target gamma value of each sub-image based on the illumination intensity, and perform gamma correction on each sub-image according to the target gamma value, so as to obtain an image of the object to be modeled after gamma correction; A matching module is used to select the first-class feature points and the second-class feature points from the image and point cloud data of the object to be modeled, respectively, and determine whether the first-class feature points and the second-class feature points match by using a preset matching algorithm, record the first-class feature points and the second-class feature points that match each other as feature pairs, and mark the feature pairs in the image to obtain the adjacent area of the feature pairs; A definition module, used to define a relative image quality index of an adjacent area of a feature pair according to an image of an adjacent area of the feature pair and an object to be modeled, define a point cloud accuracy index according to point cloud data and the feature pair, and select feature pairs according to the relative image quality index and the point cloud accuracy index, respectively, to construct a first feature pair set and a second feature pair set; A merging module, used to determine the quality feature pairs through the first feature pair set and the second feature pair set, and to construct a coordinate system transformation matrix based on the quality feature pairs, wherein the coordinate system transformation matrix transforms the two-dimensional coordinates of the image pixel points of the object to be modeled into the three-dimensional coordinates of the point cloud of the object to be modeled, and merges the point cloud coordinate data; The modeling module is used to input the gamma-corrected image of the object to be modeled and the merged point cloud coordinate data into a preset machine learning model, output model parameters, and perform three-dimensional modeling based on the model parameters.
Citation Information
Patent Citations
Target three-dimensional reconstruction method and system based on vision
CN117994419A
Method and Device for Processing Scan Result, Processor and Scanning System
US20230368460A1
