Model reduction method, apparatus, medium, and electronic device
By dividing the surface of a 3D model into multiple sub-regions and performing surface reduction operations based on the brightness, contrast, and color sensitivity of each sub-region under multiple viewing angles, the contradiction between model complexity and visual experience in existing technologies is resolved, achieving efficient model surface reduction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NEUSOFT CORP
- Filing Date
- 2022-08-19
- Publication Date
- 2026-04-28
AI Technical Summary
In 3D model rendering, existing technologies struggle to effectively reduce model complexity while ensuring human visual recognition accuracy during polygon reduction operations, leading to a decreased user visual experience.
The model surface is divided into multiple sub-regions. By rendering the state information of each sub-region under multiple viewpoints, the degree of surface reduction is determined. The surface reduction operation is performed based on the human eye's sensitivity to brightness, contrast, and color to ensure the accuracy of human eye recognition.
While reducing model complexity, it improves the accuracy of model reduction and the user's visual experience, and avoids the loss of details caused by excessive reduction.
Smart Images

Figure CN115423971B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of three-dimensional modeling technology, and more specifically, to a method, apparatus, medium, and electronic device for reducing the number of surfaces in a model. Background Technology
[0002] In 3D model rendering, objects are composed of 3D triangles, and the hardware GPU (graphics processing unit) performs rendering and calculations based on each triangle facet. Therefore, the more triangle facets there are, the greater the computational load on the GPU. However, in practical applications, limitations such as storage space, network transmission speed, and client processing capabilities often necessitate a certain level of model complexity. This requires simplifying the 3D model, i.e., reducing the number of facets. Facet reduction can significantly reduce model complexity, thereby reducing the system load during model display. However, it also results in the loss of some detailed information, which can degrade the user's visual experience during model display. Summary of the Invention
[0003] The purpose of this disclosure is to provide a model reduction method, apparatus, medium, and electronic device to reduce the complexity of the model and improve the reduction quality of the 3D model while ensuring the accuracy of human visual recognition.
[0004] To achieve the above objectives, the first aspect of this disclosure provides a model surface reduction method, the method comprising:
[0005] The model surface is divided into multiple sub-regions;
[0006] Render the model and determine the state information of each sub-region under multiple views, wherein the state information includes brightness, contrast and color;
[0007] Based on the state information, determine the degree of face reduction for each sub-region;
[0008] Based on the degree of face reduction, a face reduction operation is performed in the corresponding sub-region.
[0009] Optionally, dividing the model surface into multiple sub-regions includes:
[0010] Determine several triangles on the surface of the model;
[0011] Based on the LAB color space and pixel coordinates corresponding to each triangle, determine the vector corresponding to that triangle;
[0012] The model surface is divided into multiple sub-regions based on the vector corresponding to each triangle.
[0013] Optionally, dividing the model surface into multiple sub-regions based on the vector corresponding to each triangle includes:
[0014] A seed point is randomly generated on the surface of the target model, which is initially the entire surface of the model.
[0015] Determine the vector distance between each triangle to be divided and the seed point;
[0016] The triangles to be divided whose vector distance is less than the distance threshold are divided into the same sub-region;
[0017] The model surface formed by the remaining triangles to be divided is determined as the new target model surface;
[0018] Repeat the step of randomly generating a seed point on the surface of the target model until the triangles to be divided whose vector distance is less than the distance threshold are divided into the same sub-region, until all triangles are divided into the corresponding sub-regions.
[0019] Optionally, determining the vector corresponding to each triangle based on the LAB color space and pixel coordinates includes:
[0020] Based on the LAB color space and pixel coordinates corresponding to each pixel in each triangle, determine the vector corresponding to each pixel.
[0021] The average vector value of each pixel is determined as the vector corresponding to the triangle.
[0022] Optionally, determining the surface reduction degree of each sub-region based on the state information includes:
[0023] For each sub-region, the surface reduction degree of the sub-region under each viewpoint is determined based on the state information of the sub-region under each viewpoint, and the maximum surface reduction degree of the sub-region under each viewpoint is determined as the surface reduction degree of the sub-region.
[0024] Optionally, determining the surface reduction degree of the sub-region in each viewpoint based on the state information of the sub-region in each viewpoint includes:
[0025] The degree of face reduction for this sub-region at each viewpoint is determined by the following formula:
[0026] L i =f i-bright *v i-bright +f i-cont *v i-cont +f i-colour *v i-colour
[0027] Among them, L i f represents the degree of surface reduction of the sub-region from the i-th viewpoint. i-bright f represents the human eye sensitivity corresponding to the brightness of the sub-region at the i-th viewing angle; i-cont f represents the human eye sensitivity corresponding to the contrast of the sub-region at the i-th viewpoint. i-colour v represents the human eye sensitivity corresponding to the color wavelength of the sub-region at the i-th viewing angle. i-bright v represents the brightness of the sub-region at the i-th viewing angle. i-cont v represents the contrast of the sub-region at the i-th viewpoint. i-colour Let be the color of the sub-region at the i-th viewpoint.
[0028] Optionally, the method further includes:
[0029] Based on the degree of surface reduction, determine the corresponding threshold for the number of surface reductions for the sub-region;
[0030] If the number of times the face reduction operation is performed in the sub-region reaches the face reduction threshold of the sub-region, then the face reduction operation in the sub-region is stopped.
[0031] Optionally, the threshold for the number of face reductions in the sub-region is negatively correlated with the degree of face reduction in the sub-region.
[0032] Optionally, determining the threshold for the number of face reductions for the corresponding sub-region based on the face reduction degree includes:
[0033] The threshold for the number of face reduction operations for the sub-region is determined using the following formula:
[0034]
[0035] Among them, times m Let p be the threshold for the number of face reduction operations in the m-th sub-region, q be the first empirical parameter, and L be the second empirical parameter. m The degree of surface reduction for the m-th sub-region.
[0036] Optionally, the method further includes:
[0037] During the model reduction process, if the number of triangle vertices on the model surface is less than a preset vertex count threshold, the reduction operation on the model surface will be stopped.
[0038] A second aspect of this disclosure provides a model reduction apparatus, the apparatus comprising:
[0039] The partitioning module is used to divide the model surface into multiple sub-regions;
[0040] The first determining module is used to render the model and determine the state information of each sub-region under multiple views, wherein the state information includes brightness, contrast and color;
[0041] The second determining module is used to determine the degree of face reduction for each sub-region based on the state information.
[0042] An execution module is used to perform a face reduction operation in the corresponding sub-region according to the face reduction degree.
[0043] Optionally, the partitioning module includes:
[0044] The first determining submodule is used to determine several triangles on the surface of the model;
[0045] The second determining submodule is used to determine the vector corresponding to each triangle based on the LAB color space and pixel coordinates corresponding to each triangle.
[0046] The partitioning module is used to divide the model surface into multiple sub-regions based on the vector corresponding to each triangle.
[0047] Optionally, the sub-module division includes:
[0048] A generation submodule is used to randomly generate a seed point on the surface of the target model, wherein the target model surface is initially the entire model surface;
[0049] The third determining submodule is used to determine the vector distance between each triangle to be divided and the seed point;
[0050] The classification submodule is used to divide the triangles to be divided into the same sub-region if the vector distance is less than the distance threshold.
[0051] The fourth determination submodule is used to determine the model surface formed by the remaining triangles to be divided as the new target model surface;
[0052] The generation submodule to the classification submodule is also used to re-execute the above steps until all triangles have been divided into their corresponding sub-regions.
[0053] Optionally, the second determining submodule includes:
[0054] The fifth determining submodule is used to determine the vector corresponding to each pixel point based on the LAB color space and pixel coordinates corresponding to each pixel point in each triangle.
[0055] The sixth determining submodule is used to determine the average vector value of each pixel as the vector corresponding to the triangle.
[0056] Optionally, the second determining module includes:
[0057] The seventh determining submodule is used to determine the degree of reduction of the sub-region in each view based on the state information of the sub-region in each view, and to determine the maximum of the degree of reduction of the sub-region in each view as the degree of reduction of the sub-region.
[0058] Optionally, the seventh determining submodule is used to determine the degree of surface reduction of the sub-region at each viewpoint using the following formula:
[0059] L i =f i-bright *v i-bright +f i-cont *v i-cont +f i-colour *v i-colour
[0060] Among them, L i f represents the degree of surface reduction of the sub-region from the i-th viewpoint. i-bright f represents the human eye sensitivity corresponding to the brightness of the sub-region at the i-th viewing angle; i-cont f represents the human eye sensitivity corresponding to the contrast of the sub-region at the i-th viewpoint. i-colour v represents the human eye sensitivity corresponding to the color wavelength of the sub-region at the i-th viewing angle. i-bright v represents the brightness of the sub-region at the i-th viewing angle. i-cont v represents the contrast of the sub-region at the i-th viewpoint. i-colour Let be the color of the sub-region at the i-th viewpoint.
[0061] Optionally, the device further includes:
[0062] The third determining module is used to determine the threshold number of times the surface is reduced for the corresponding sub-region based on the surface reduction degree.
[0063] The execution module is further configured to stop performing the face reduction operation in the sub-region if the number of face reduction operations performed in the sub-region reaches the face reduction number threshold of the sub-region.
[0064] Optionally, the threshold for the number of face reductions in the sub-region is negatively correlated with the degree of face reduction in the sub-region.
[0065] Optionally, the third determining module is used to determine the face reduction threshold of the sub-region using the following formula:
[0066]
[0067] Among them, times mLet p be the threshold for the number of face reduction operations in the m-th sub-region, q be the first empirical parameter, and L be the second empirical parameter. m The degree of surface reduction for the m-th sub-region.
[0068] Optionally, the execution module is further configured to stop performing the face reduction operation on the model surface if the number of triangle vertices on the model surface is less than a preset vertex number threshold during the face reduction process.
[0069] A third aspect of this disclosure provides a non-transitory computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the method provided in the first aspect of this disclosure.
[0070] A fourth aspect of this disclosure provides an electronic device, comprising:
[0071] A memory on which computer programs are stored;
[0072] A controller, when the computer program is executed by the controller, implements the steps of the method provided in the first aspect of this disclosure.
[0073] By dividing the model surface into multiple sub-regions using the above technical solution, and performing polygon reduction operations in each sub-region separately, the accuracy of polygon reduction can be improved. The model is rendered in the scene, and the state information of each sub-region under multiple viewpoints is determined. This state information includes brightness, contrast, and color. Since the human eye has different sensitivities to different brightness, contrast, and color wavelengths, the polygon reduction degree for each sub-region determined based on the state information ensures the accuracy of human visual recognition. Furthermore, by determining the state information under different viewpoints, the accuracy of the determined polygon reduction degree for each sub-region can be improved. In this way, while reducing model complexity, the user's visual experience can be guaranteed.
[0074] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description
[0075] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the following detailed description to explain the present disclosure, but do not constitute a limitation thereof. In the drawings:
[0076] Figure 1 This is a flowchart of a model surface reduction method provided in an exemplary embodiment of this disclosure;
[0077] Figure 2 This is a schematic diagram of a sub-region division provided by an exemplary embodiment of this disclosure;
[0078] Figure 3This is a block diagram of a model reduction apparatus provided in an exemplary embodiment of the present disclosure;
[0079] Figure 4 This is a block diagram of an electronic device provided in an exemplary embodiment of the present disclosure. Detailed Implementation
[0080] The specific embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit this disclosure.
[0081] It should be noted that all actions involving the acquisition of signals, information, or data in this disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the location is situated, and with authorization from the owner of the relevant device.
[0082] Figure 1 This is a flowchart of a model surface reduction method provided in an exemplary embodiment of this disclosure. For example... Figure 1 As shown, the method may include S101 to S104.
[0083] S101 divides the model surface into multiple sub-regions.
[0084] For example, a 3D model is composed of multiple triangles. To ensure the visual effect of the model, the number of triangles in a 3D model is often extremely large. Clustering algorithms can be used to divide connected and similar triangles in the model into the same sub-region (for example, two triangles of the same color and adjacent to each other can be divided into the same sub-region). In this way, performing a face reduction operation on each sub-region of the model can improve the accuracy of face reduction.
[0085] S102 renders the model in the scene and determines the state information of each sub-region under multiple perspectives.
[0086] The status information includes brightness, contrast, and color.
[0087] For example, virtual cameras can be placed at multiple positions on the model, such as top, bottom, left, right, front, back, and diagonally, to ensure that users can view the model from any angle. The brightness, contrast, and color of the model's surface are affected not only by the model's own materials and textures, but also by factors such as the light source and the user's perspective. When a user browses the scene, the angle between the model and the virtual camera, as well as the angle with the light source, varies from different perspectives; that is, the state information of the same sub-region differs from different viewpoints. Therefore, the model can be pre-rendered in the scene to obtain accurate state information of each sub-region from different viewpoints.
[0088] S103, based on the status information, determine the degree of face reduction for each sub-region.
[0089] Research shows that the human eye has different sensitivities to different wavelengths of light. For example, the human eye is most sensitive to yellow-green light, and less sensitive to red and blue-violet light. Although the human eye has different brightness and darkness adaptations to different ambient light, its sensitivity varies at different brightness levels. When the brightness is low, the difference between the maximum and minimum brightness that the human eye can distinguish is much smaller than the difference when the brightness is moderate. Higher contrast often allows people to observe details in an image more clearly. Therefore, brightness, contrast, and color can affect the accuracy of human visual perception. Determining the facet reduction degree based on brightness, contrast, and color can avoid excessive facet reduction that degrades the user's visual experience. Using state information from different viewing angles can improve the accuracy of the facet reduction degree for each determined sub-region.
[0090] S104, Perform the face reduction operation in the corresponding sub-region according to the degree of face reduction.
[0091] For example, face reduction operations can include vertex deletion (deleting a vertex in a sub-region and then triangulating the hole formed by its adjacent triangles), edge deletion (compressing an edge in a sub-region into a vertex and degenerating the two triangles adjacent to that edge), and face reduction (shrinking a triangle in a sub-region into a vertex and degenerating that triangle and the three triangles adjacent to its edge). For instance, the face reduction operation to be performed in a corresponding sub-region can be determined by comparing the face reduction degree with a face reduction degree threshold. For example, if the face reduction degree is greater than a first face reduction degree threshold, face reduction can be performed in the corresponding sub-region; if the face reduction degree is less than the first face reduction degree threshold but greater than a second face reduction degree threshold, edge reduction can be performed in the corresponding sub-region; if the face reduction degree is less than the second face reduction degree threshold but greater than a third face reduction degree threshold, vertex deletion can be performed in the corresponding sub-region; if the face reduction degree is less than the third face reduction degree threshold, no face reduction operation needs to be performed. In this way, the efficiency of face reduction in the model can be improved based on the face reduction degree. After each face reduction operation, steps S102 to S103 can be repeated until the face reduction degree of all sub-regions is less than the third face reduction degree threshold. Alternatively, the number of face reduction operations can be determined by the face reduction degree. For example, if the determined number is 5, then any of the above face reduction operations can be performed 5 times in that sub-region.
[0092] By dividing the model surface into multiple sub-regions using the above technical solution, and performing polygon reduction operations in each sub-region separately, the accuracy of polygon reduction can be improved. The model is rendered in the scene, and the state information of each sub-region under multiple viewpoints is determined. This state information includes brightness, contrast, and color. Since the human eye has different sensitivities to different brightness, contrast, and color wavelengths, the polygon reduction degree for each sub-region determined based on the state information ensures the accuracy of human visual recognition. Furthermore, by determining the state information under different viewpoints, the accuracy of the determined polygon reduction degree for each sub-region can be improved. In this way, while reducing model complexity, the user's visual experience can be guaranteed.
[0093] In an optional embodiment, in S101, dividing the model surface into multiple sub-regions may include:
[0094] Determine several triangles on the surface of the model;
[0095] Based on the LAB color space and pixel coordinates corresponding to each triangle, determine the vector corresponding to that triangle;
[0096] Based on the vector corresponding to each triangle, the model surface is divided into multiple sub-regions.
[0097] For example, the LAB color space (Lab color space) has a dimension L representing brightness, and A and B representing color opposites. x, y, and z represent the spatial coordinates of a triangle in the scene, and each triangle can correspond to a six-dimensional vector (L, A, B, x, y, z). Clustering algorithms can be used to group connected and approximate triangles in the model into the same sub-region.
[0098] The LAB color space is designed to approximate human vision, focusing on perceiving uniformity. The L component closely matches human brightness perception, thus it can be used to achieve precise color balance by modifying the output color levels of the A and B components, or to adjust brightness contrast using the L component. In this way, the vector determined by the LAB color space and pixel coordinates can accurately reflect the color and position of the triangle.
[0099] In an optional embodiment, dividing the model surface into multiple sub-regions based on the vector corresponding to each triangle may include:
[0100] A seed point is randomly generated on the surface of the target model. The initial surface of the target model is the entire surface of the model.
[0101] Determine the vector distance between each triangle to be divided and the seed point;
[0102] Triangles whose vector distance is less than the distance threshold are divided into the same sub-region;
[0103] The model surface formed by the remaining triangles to be divided is determined as the new target model surface;
[0104] Repeat the step of randomly generating a seed point on the surface of the target model until the triangles to be divided with vector distance less than the distance threshold are divided into the same sub-region, until all triangles are divided into their corresponding sub-regions.
[0105] For example, the distance threshold can be preset and can be set to d. Figure 2 This is a schematic diagram illustrating a sub-region division provided in an exemplary embodiment of this disclosure. Figure 2 The image shown is an example of the entire model surface. s1 is a randomly generated seed point. Figure 2 The vector distance between each triangle to be divided and s1 is used to divide triangles whose vector distance is less than a distance threshold into the same sub-region, such as... Figure 2 If the vector distance between each triangle within the first dashed frame 201 containing s1 and s1 is less than d, and the vector distance between each triangle outside the first dashed frame 201 and s1 is not less than d, then the triangles within the first dashed frame 201 can be divided into a sub-region. The model surface formed by the remaining triangles to be divided is determined as the new target model surface to continue sub-region division. A sub-point s2 is randomly generated, and the vector distance between the triangles on the new target model surface and s2 is determined. Triangles whose vector distance is less than a distance threshold are divided into the same sub-region, such as... Figure 2 If the vector distance between each triangle within the second dashed box 202 containing s2 and s2 is less than d, and the vector distance between each triangle outside the second dashed box 202 and s2 is not less than d, then the triangles within the second dashed box 202 can be divided into a sub-region. Repeat the above steps to generate a seed point s3, and then determine the vector distance and distance threshold. Figure 2 If the vector distance between each triangle within the third dashed box 203 containing s3 and s3 is less than d, then the triangles within the third dashed box 203 can be divided into a sub-region. Figure 2 All triangles in the diagram are assigned to their corresponding sub-regions, completing the sub-region division. If the above steps are repeated continuously, and after the nth time, some triangles are still not assigned to a sub-region, then the above steps are repeated for the (n+1)th time to continue sub-region division until all triangles are assigned to their corresponding sub-regions. If one triangle remains, it can be treated as a separate sub-region.
[0106] In an optional embodiment, determining the vector corresponding to each triangle based on the LAB color space and pixel coordinates can include:
[0107] Based on the LAB color space and pixel coordinates corresponding to each pixel in each triangle, determine the vector corresponding to each pixel.
[0108] The vector corresponding to any pixel in each triangle is determined as the vector corresponding to that triangle.
[0109] For example, the more detailed the 3D model, the more triangles there are, and the smaller each triangle is. The multiple pixels contained within each triangle often have very similar color values, meaning their LAB color space values are similar. Smaller triangles result in similar x and y coordinates for each pixel, leading to similar vectors for each pixel. Therefore, the vector corresponding to any pixel within a triangle can be defined as the vector corresponding to that triangle.
[0110] In a preferred embodiment, determining the vector corresponding to each triangle based on the LAB color space and pixel coordinates can include:
[0111] Based on the LAB color space and pixel coordinates corresponding to each pixel in each triangle, determine the vector corresponding to each pixel.
[0112] The average value of the vector of each pixel is used to determine the vector corresponding to the triangle.
[0113] For example, each triangle often contains multiple pixels, and each pixel has a different LAB color space and pixel coordinates. The average value of the vector of each pixel in the triangle can be determined as the vector corresponding to the triangle to ensure the accuracy of the determined vector corresponding to the triangle.
[0114] Optionally, based on the status information, the degree of face reduction for each sub-region is determined, including:
[0115] For each sub-region, the degree of face reduction of the sub-region under each viewpoint is determined based on the state information of the sub-region under each viewpoint, and the maximum of the face reduction degrees of the sub-region under each viewpoint is determined as the face reduction degree of the sub-region.
[0116] For example, the degree of face reduction of the sub-region at each viewpoint can be determined by the following formula:
[0117] L i =f i-bright *v i-bright +f i-cont *v i-cont +f i-colour *v i-colour
[0118] Among them, L if represents the degree of surface reduction of the subregion from the i-th viewpoint. i-bright f represents the human eye sensitivity corresponding to the brightness of the sub-region at the i-th viewpoint; i-cont f represents the human eye sensitivity corresponding to the contrast of the sub-region at the i-th viewpoint. i-colour Let v be the human eye sensitivity corresponding to the color wavelength of the sub-region at the i-th viewpoint. i-bright v represents the brightness of the sub-region at the i-th viewpoint. i-cont v represents the contrast of the sub-region at the i-th viewpoint. i-colour Let i be the color of the sub-region at the i-th viewpoint, where i ranges from 1 to I, and I is the total number of viewpoints.
[0119] For example, the total number of viewpoints can be preset according to the number of virtual cameras. Virtual cameras can be set in multiple positions such as top, bottom, left, right, front, and back of the model. For example, a virtual camera set above the model can correspond to the first viewpoint, a virtual camera set below the model can correspond to the second viewpoint, a virtual camera set to the left of the model can correspond to the third viewpoint, a virtual camera set to the right of the model can correspond to the fourth viewpoint, a virtual camera set in front of the model can correspond to the fifth viewpoint, and a virtual camera set behind the model can correspond to the sixth viewpoint.
[0120] For example, the relationships between brightness and its corresponding human eye sensitivity, contrast and its corresponding human eye sensitivity, and color wavelength and its corresponding human eye sensitivity can all be pre-defined through human visual experiments. For instance, the relationship between color wavelength and human eye sensitivity can be determined using a spectral luminous efficiency function; thus, the color wavelength and its corresponding human eye sensitivity can be determined simultaneously with the color. Similarly, the human eye sensitivity corresponding to that contrast ratio can be determined simultaneously with the contrast ratio. Likewise, the human eye sensitivity corresponding to that brightness can be determined simultaneously with the brightness ratio.
[0121] If the reduction in surface area of sub-region A is L1 from the first viewpoint, L2 from the second viewpoint, and L3 from the third viewpoint, and L1 > L3 > L2, then L1 can be determined as the reduction in surface area of sub-region A. Determining the reduction in surface area of a sub-region under different viewpoints allows us to determine the optimal viewing angle for that sub-region. The optimal viewing angle allows for the maximum clarity of the region's details, and this angle determines the upper limit of the reduction in surface area. Therefore, defining the maximum reduction in surface area of a sub-region under each viewpoint as the reduction in surface area allows us to minimize model complexity while ensuring the accuracy of human visual recognition.
[0122] For example, the average reduction level of a sub-region under each viewpoint can be determined as the reduction level of that sub-region. In this way, for each sub-region, the reduction level under each viewpoint can be combined to ensure that the model is not excessively reduced in polygons when viewed by the user from any viewpoint, thus ensuring the user's visual experience.
[0123] Optionally, the model reduction method provided in this disclosure may further include:
[0124] Based on the degree of face reduction, determine the threshold for the number of face reductions for the corresponding sub-region;
[0125] If the number of times the face reduction operation is performed in a sub-region reaches the face reduction threshold for that sub-region, then the face reduction operation in the sub-region will be stopped.
[0126] For example, the correspondence between the degree of face reduction and the face reduction threshold can be preset through experimental results. This correspondence can be represented, for example, by a function, mapping table, etc. For instance, experiments show that the face reduction threshold of a sub-region is negatively correlated with the face reduction degree of the sub-region. The face reduction threshold of a sub-region can be determined by the following formula:
[0127]
[0128] Among them, times m Let p be the threshold for the number of face reduction operations in the m-th sub-region, q be the first empirical parameter, and L be the second empirical parameter. m represents the reduction degree of the m-th sub-region. Here, m ranges from 1 to M, and M is the total number of sub-regions divided.
[0129] For example, the first empirical parameter and the second empirical parameter can be pre-calibrated through experimentation; for instance, p can be set to 0 to 1 and q can be set to 1 to 10.
[0130] The defined threshold for the number of face reduction operations is the maximum number of face reduction operations allowed to be performed in this sub-region. For example, if the threshold for the number of face reduction operations is 5, a fourth face reduction operation can still be performed after the third face reduction operation. If five face reduction operations have already been performed, face reduction operations will stop in this sub-region to avoid excessive face reduction in this sub-region, thereby preventing too many details from being deleted from this sub-region and affecting the user's visual experience.
[0131] Optionally, the model reduction method provided in this disclosure may further include:
[0132] During the model reduction process, if the number of triangle vertices on the model surface is less than the preset vertex count threshold, the reduction operation on the model surface will be stopped.
[0133] For example, the vertex count threshold can be preset, such as 70% of the number of triangle vertices on the original model surface. If the original model surface has 10,000 triangle vertices, the vertex count threshold would be 7,000. The model surface is divided into multiple sub-regions, and multiple sub-regions can simultaneously undergo face reduction operations. Setting the vertex count threshold from the perspective of the model as a whole can prevent excessive face reduction on the model surface, avoiding the removal of too many details and negatively impacting the user's visual experience.
[0134] Based on the same inventive concept, this disclosure also provides a model reduction device. Figure 3 This is a block diagram of a model reduction apparatus 300 provided in an exemplary embodiment of this disclosure. (Refer to...) Figure 3 The model reduction device 300 may include:
[0135] The partitioning module 301 is used to divide the model surface into multiple sub-regions;
[0136] The first determining module 302 is used to render the model and determine the state information of each sub-region under multiple views, wherein the state information includes brightness, contrast and color;
[0137] The second determining module 303 is used to determine the degree of face reduction for each sub-region based on the state information.
[0138] The execution module 304 is used to perform a face reduction operation in the corresponding sub-region according to the face reduction degree.
[0139] By dividing the model surface into multiple sub-regions using the above technical solution, and performing polygon reduction operations in each sub-region separately, the accuracy of polygon reduction can be improved. The model is rendered in the scene, and the state information of each sub-region under multiple viewpoints is determined. This state information includes brightness, contrast, and color. Since the human eye has different sensitivities to different brightness, contrast, and color wavelengths, the polygon reduction degree for each sub-region determined based on the state information ensures the accuracy of human visual recognition. Furthermore, by determining the state information under different viewpoints, the accuracy of the determined polygon reduction degree for each sub-region can be improved. In this way, while reducing model complexity, the user's visual experience can be guaranteed.
[0140] Optionally, the partitioning module 301 includes:
[0141] The first determining submodule is used to determine several triangles on the surface of the model;
[0142] The second determining submodule is used to determine the vector corresponding to each triangle based on the LAB color space and pixel coordinates corresponding to each triangle.
[0143] The partitioning module is used to divide the model surface into multiple sub-regions based on the vector corresponding to each triangle.
[0144] Optionally, the sub-module division includes:
[0145] A generation submodule is used to randomly generate a seed point on the surface of the target model, wherein the target model surface is initially the entire model surface;
[0146] The third determining submodule is used to determine the vector distance between each triangle to be divided and the seed point;
[0147] The classification submodule is used to divide the triangles to be divided into the same sub-region if the vector distance is less than the distance threshold.
[0148] The fourth determination submodule is used to determine the model surface formed by the remaining triangles to be divided as the new target model surface;
[0149] The generation submodule to the classification submodule is also used to re-execute the above steps until all triangles have been divided into their corresponding sub-regions.
[0150] Optionally, the second determining submodule includes:
[0151] The fifth determining submodule is used to determine the vector corresponding to each pixel point based on the LAB color space and pixel coordinates corresponding to each pixel point in each triangle.
[0152] The sixth determining submodule is used to determine the average vector value of each pixel as the vector corresponding to the triangle.
[0153] Optionally, the second determining module 303 includes:
[0154] The seventh determining submodule is used to determine the degree of reduction of the sub-region in each view based on the state information of the sub-region in each view, and to determine the maximum of the degree of reduction of the sub-region in each view as the degree of reduction of the sub-region.
[0155] Optionally, the seventh determining submodule is used to determine the degree of surface reduction of the sub-region at each viewpoint using the following formula:
[0156] L i =f i-bright *v i-bright +f i-cont *v i-cont +f i-colour *v i-colour
[0157] Among them, L if represents the degree of surface reduction of the sub-region from the i-th viewpoint. i-bright f represents the human eye sensitivity corresponding to the brightness of the sub-region at the i-th viewing angle; i-cont f represents the human eye sensitivity corresponding to the contrast of the sub-region at the i-th viewpoint. i-colour v represents the human eye sensitivity corresponding to the color wavelength of the sub-region at the i-th viewing angle. i-bright v represents the brightness of the sub-region at the i-th viewing angle. i-cont v represents the contrast of the sub-region at the i-th viewpoint. i-colour Let be the color of the sub-region at the i-th viewpoint.
[0158] Optionally, the device 300 further includes:
[0159] The third determining module is used to determine the threshold number of times the surface is reduced for the corresponding sub-region based on the surface reduction degree.
[0160] The execution module 304 is further configured to stop performing the face reduction operation in the sub-region if the number of face reduction operations performed in the sub-region reaches the face reduction number threshold of the sub-region.
[0161] Optionally, the threshold for the number of face reductions in the sub-region is negatively correlated with the degree of face reduction in the sub-region.
[0162] Optionally, the third determining module is used to determine the face reduction threshold of the sub-region using the following formula:
[0163]
[0164] Among them, times m Let p be the threshold for the number of face reduction operations in the m-th sub-region, q be the first empirical parameter, and L be the second empirical parameter. m The degree of surface reduction for the m-th sub-region.
[0165] Optionally, the execution module 304 is further configured to stop performing the face reduction operation on the model surface if the number of triangle vertices on the model surface is less than a preset vertex number threshold during the face reduction process.
[0166] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0167] Figure 4 This is a block diagram illustrating an electronic device 700 according to an exemplary embodiment. Figure 4As shown, the electronic device 700 may include a processor 701 and a memory 702. The electronic device 700 may also include one or more of a multimedia component 703, an input / output (I / O) interface 704, and a communication component 705.
[0168] The processor 701 controls the overall operation of the electronic device 700 to complete all or part of the steps in the model reduction method described above. The memory 702 stores various types of data to support the operation of the electronic device 700. This data may include, for example, instructions for any application or method operating on the electronic device 700, and application-related data such as contact data, sent and received messages, pictures, audio, video, etc. The memory 702 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. Multimedia component 703 may include a screen and an audio component. The screen may be, for example, a touchscreen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in memory 702 or transmitted via communication component 705. The audio component also includes at least one speaker for outputting audio signals. I / O interface 704 provides an interface between processor 701 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual or physical buttons. Communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IoT, eMTC, or other 5G technologies, or combinations thereof, is not limited here. Therefore, the corresponding communication component 705 may include: a Wi-Fi module, a Bluetooth module, an NFC module, etc.
[0169] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the model reduction method described above.
[0170] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the model reduction method described above. For example, the computer-readable storage medium may be the memory 702 including the program instructions described above, which may be executed by the processor 701 of the electronic device 700 to complete the model reduction method described above.
[0171] In another exemplary embodiment, a computer program product is also provided, the computer program product comprising a computer program executable by a programmable device, the computer program having a code portion for performing the model reduction method described above when executed by the programmable device.
[0172] The preferred embodiments of this disclosure have been described in detail above with reference to the accompanying drawings. However, this disclosure is not limited to the specific details of the above embodiments. Within the scope of the technical concept of this disclosure, various simple modifications can be made to the technical solutions of this disclosure, and these simple modifications all fall within the protection scope of this disclosure.
[0173] It should also be noted that the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, this disclosure will not describe the various possible combinations separately.
[0174] Furthermore, various different embodiments of this disclosure can be combined in any way, as long as they do not violate the spirit of this disclosure, they should also be regarded as the content disclosed in this disclosure.
Claims
1. A method for reducing the surface area of a model, characterized in that, The method includes: The model surface is divided into multiple sub-regions; Render the model and determine the state information of each sub-region under multiple views, wherein the state information includes brightness, contrast and color; Based on the state information, the polygon reduction degree of each sub-region is determined; wherein, the polygon reduction degree of a sub-region is determined according to the polygon reduction degree of that sub-region in each of the multiple views; a sub-region in the... i The degree of surface reduction from each perspective is based on the sub-region's position in the [number]th [perspective]. i The brightness corresponding to the human eye sensitivity at each viewing angle, and the brightness of this sub-region at the [number]th [perspective]. i Brightness at a certain viewing angle, and the sub-region in the [missing information]. i The contrast ratio corresponding to the human eye sensitivity at each viewing angle, and the sub-region at the [missing information]. i Contrast at each viewpoint, the sub-region at the [number]th viewpoint i The human eye sensitivity corresponding to the color wavelength at each viewing angle and the color wavelength of that sub-region at the [missing information]. i The color is calculated from the perspective of the first viewpoint; the first... i The viewpoint is one of the multiple viewpoints; Based on the degree of face reduction, a face reduction operation is performed in the corresponding sub-region.
2. The method according to claim 1, characterized in that, The process of dividing the model surface into multiple sub-regions includes: Determine several triangles on the surface of the model; Based on the LAB color space and pixel coordinates corresponding to each triangle, determine the vector corresponding to that triangle; The model surface is divided into multiple sub-regions based on the vector corresponding to each triangle.
3. The method according to claim 2, characterized in that, The step of dividing the model surface into multiple sub-regions based on the vector corresponding to each triangle includes: A seed point is randomly generated on the surface of the target model, which is initially the entire surface of the model. Determine the vector distance between each triangle to be divided and the seed point; The triangles to be divided whose vector distance is less than the distance threshold are divided into the same sub-region; The model surface formed by the remaining triangles to be divided is determined as the new target model surface; Repeat the step of randomly generating a seed point on the surface of the target model until the triangles to be divided whose vector distance is less than the distance threshold are divided into the same sub-region, until all triangles are divided into the corresponding sub-regions.
4. The method according to claim 2, characterized in that, The step of determining the vector corresponding to each triangle based on the LAB color space and pixel coordinates includes: Based on the LAB color space and pixel coordinates corresponding to each pixel in each triangle, determine the vector corresponding to each pixel. The average vector value of each pixel is determined as the vector corresponding to the triangle.
5. The method according to claim 1, characterized in that, Determining the face reduction degree of each sub-region based on the state information includes: For each sub-region, the surface reduction degree of the sub-region under each viewpoint is determined based on the state information of the sub-region under each viewpoint, and the maximum surface reduction degree of the sub-region under each viewpoint is determined as the surface reduction degree of the sub-region.
6. The method according to claim 5, characterized in that, The step of determining the surface reduction degree of the sub-region in each viewpoint based on the state information of the sub-region in each viewpoint includes: The degree of face reduction for this sub-region at each viewpoint is determined by the following formula: in, For the sub-region in the th i The degree of surface reduction from each perspective For the sub-region in the th i Brightness at each viewing angle corresponds to human eye sensitivity; For the sub-region in the th i The contrast ratio of each viewpoint corresponds to the sensitivity of the human eye. For the sub-region in the th i The human eye's sensitivity to color wavelengths at different viewing angles For the sub-region in the th i Brightness at various viewing angles For the sub-region in the th i Contrast at different angles For the sub-region in the th i Color from a different perspective.
7. The method according to claim 1, characterized in that, The method further includes: Based on the degree of surface reduction, determine the corresponding threshold for the number of surface reductions for the sub-region; If the number of times the face reduction operation is performed in the sub-region reaches the face reduction threshold of the sub-region, then the face reduction operation in the sub-region is stopped.
8. The method according to claim 7, characterized in that, The threshold for the number of times the surface is reduced in a sub-region is negatively correlated with the degree of surface reduction in the sub-region.
9. The method according to claim 7, characterized in that, The step of determining the threshold number of face reduction times for the corresponding sub-region based on the face reduction degree includes: The threshold for the number of face reduction operations for the sub-region is determined using the following formula: in, The threshold for the number of face reduction operations in the m-th sub-region. As the first empirical parameter, As the second empirical parameter, The degree of surface reduction for the m-th sub-region.
10. The method according to claim 1, characterized in that, The method further includes: During the model reduction process, if the number of triangle vertices on the model surface is less than a preset vertex count threshold, the reduction operation on the model surface will be stopped.
11. A model surface reduction device, characterized in that, The device includes: The partitioning module is used to divide the model surface into multiple sub-regions; The first determining module is used to render the model and determine the state information of each sub-region under multiple views, wherein the state information includes brightness, contrast and color; The second determining module is used to determine the polygon reduction degree of each sub-region based on the state information; wherein, the polygon reduction degree of a sub-region is determined based on the polygon reduction degree of that sub-region in each of the multiple views; a sub-region in the... i The degree of surface reduction from each perspective is based on the sub-region's position in the [number]th [perspective]. i The brightness corresponding to the human eye sensitivity at each viewing angle, and the brightness of this sub-region at the [number]th [perspective]. i Brightness at a certain viewing angle, and the sub-region in the [missing information]. i The contrast ratio corresponding to the human eye sensitivity at each viewing angle, and the sub-region at the [missing information]. i Contrast at each viewpoint, the sub-region at the [number]th viewpoint i The human eye sensitivity corresponding to the color wavelength at each viewing angle and the color wavelength of that sub-region at the [missing information]. i The color is calculated from the perspective of the first viewpoint; the first... i The viewpoint is one of the multiple viewpoints; An execution module is used to perform a face reduction operation in the corresponding sub-region according to the face reduction degree.
12. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method described in any one of claims 1-10.
13. An electronic device, characterized in that, include: A memory on which computer programs are stored; A processor for executing the computer program in the memory to implement the steps of the method according to any one of claims 1-10.
Citation Information
Patent Citations
Model simplification processing method and device, electronic equipment and storage medium
CN111080792A
Interaction method and apparatus based on multi-feature recognition, and computer device
WO2022116545A1