A method, electronic device and medium for ultra-high definition enhancement of 3D scanning of architectural relics

By morphological analysis of the structural grayscale images of the 3D scan results of architectural cultural relics, calculating feature bias values ​​and visual priority values, and dynamically adjusting the lighting, the problem of poor lighting simulation results in the existing technology is solved, and higher quality is achieved 3D scanning enhancement effect.

CN118761946BActive Publication Date: 2024-12-10HUNAN MEICHUANG DIGITAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411222924.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2024-12-10
Estimated Expiration
2044-09-03

AI Technical Summary

Technical Problem

The existing 3D scanning technology fails to effectively consider the dynamic lighting adjustment of architectural relics in lighting simulation, resulting in poor enhancement effect of simulation results.

Method used

By obtaining the structural grayscale image of the 3D scanning results of architectural cultural relics, morphological analysis is carried out to extract the skeleton connection area, calculate the feature bias value and visual priority value, and dynamically adjust the light level to achieve ultra-high-definition enhancement of 3D scanning of architectural cultural relics.

Benefits of technology

It improves the visual authenticity and aesthetics of the 3D scanning results of architectural cultural relics, highlights the characteristics of different structural components, and meets a better visual experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118761946B_ABST
    Figure CN118761946B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image data processing technology, and specifically to an ultra-high-definition enhancement method, electronic device and medium for 3D scanning of architectural cultural relics, including: obtaining a structural grayscale image and a skeleton connected area of ​​a 3D scanning result of an architectural cultural relic at each angle of the current illumination level; obtaining a characteristic bias value of the skeleton connected area according to the position characteristic difference of edge pixels on the edge line of the skeleton connected area and the distribution of edge pixels; obtaining a visual priority value of the skeleton connected area according to the edge characteristic difference of adjacent edge pixels on the edge line of the skeleton connected area and the edge shape characteristic of the edge line; combining the characteristic bias value and the visual priority value, dynamically adjusting the illumination level of each skeleton connected area in the structural grayscale image at each angle of the current illumination level, and obtaining an ultra-high-definition enhancement result of 3D scanning of architectural cultural relics. The present invention can obtain an ultra-high-definition enhancement result of 3D scanning of architectural cultural relics with better effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image data processing, and in particular to an ultra-high-definition enhancement method, electronic equipment and medium for 3D scanning of architectural cultural relics. Background Art

[0002] 3D scanning generally refers to the use of specific techniques and equipment to collect three-dimensional spatial data of architectural relics. This process involves capturing the shape, size, and possible texture information of the relics to create an accurate three-dimensional digital model. Enhancing the results of 3D scanning of architectural relics can better build digital models. In the field of three-dimensional enhancement and visualization, lighting simulation is one of the most important factors. Lighting simulation can provide realism and visual details for 3D models of architectural relics, making the models look more realistic. By simulating light sources of different directions, intensities, and colors, the texture, subtle bumps, reflections, shadows and other details of the building surface can be accurately displayed.

[0003] At present, rendering algorithms, such as light mapping, are often used to achieve the purpose of three-dimensional enhancement and lighting simulation by estimating lighting effects and storing the estimated lighting results in maps. However, this method often uses a preset calculation method to perform lighting analysis on the lighting conditions of the 3D model, and does not consider the dynamic lighting adjustment of key areas and important areas of architectural relics, resulting in poor enhancement of the simulation results during the 3D scanning process. Summary of the invention

[0004] In order to solve the technical problem that the existing methods have poor effects on enhancing the simulation results in the 3D scanning process, the purpose of the present invention is to provide an ultra-high-definition enhancement method, electronic device and medium for 3D scanning of architectural relics. The technical solutions adopted are as follows:

[0005] In a first aspect, the present invention provides a method for enhancing ultra-high definition 3D scanning of architectural relics, comprising:

[0006] Obtain the structural grayscale image of the 3D scanning result of the architectural cultural relic at each angle of the current illumination level; perform morphological analysis on each structural grayscale image and extract the skeleton connected area of ​​each structural grayscale image;

[0007] According to the difference between the edge line distribution features at the position of each edge pixel point on the edge line of each skeleton connected area and the distribution of edge pixels, the feature bias value of each skeleton connected area is obtained;

[0008] According to the edge feature differences of adjacent edge pixels on the edge line of each skeleton connected region and the edge shape features of the edge line, the visual priority value of each skeleton connected region is obtained;

[0009] Combined with the feature bias value and visual priority value of the skeleton connected area in the structural grayscale image at all angles, the illumination level of each skeleton connected area in the structural grayscale image at each angle of the current illumination level is dynamically adjusted to obtain ultra-high-definition enhanced results of 3D scanning of architectural relics.

[0010] Preferably, obtaining the feature bias value of each skeleton connected region according to the difference between the edge line distribution features at the position of each edge pixel point on the edge line of each skeleton connected region and the distribution of the edge pixels specifically includes:

[0011] For any skeleton connected region in any structural grayscale image, the edge regularity factor of the skeleton connected region is obtained according to the difference between the edge features of each edge pixel point on the edge line of the skeleton connected region and the corresponding position of the adjacent edge pixel point;

[0012] The characteristic bias value of the skeleton connected area is obtained according to the total number of all edge pixel points in the skeleton connected area and the edge regularity factor; the total number of all edge pixel points and the edge regularity factor are positively correlated with the characteristic bias value.

[0013] Preferably, the step of obtaining the edge regularity factor of the skeleton connected region according to the difference between the edge features of each edge pixel point and the corresponding position of the adjacent edge pixel point on the edge line in the skeleton connected region specifically includes:

[0014] For any edge line in the skeleton connected area, the angle between each edge pixel point on the edge line and the line connecting the adjacent edge pixel points is recorded as the inclination angle value of each edge pixel point on the edge line;

[0015] The negative correlation coefficient of the difference between the inclination angle values ​​of each edge pixel point on the edge line in the skeleton connected region and the adjacent edge pixel point is calculated, and the mean of all negative correlation coefficients in the skeleton connected region is taken as the edge regularity factor of the skeleton connected region.

[0016] Preferably, obtaining the visual priority value of each skeleton connected region according to the edge feature difference of adjacent edge pixels on the edge line of each skeleton connected region and the edge shape feature of the edge line specifically includes:

[0017] Obtaining a shape characteristic factor of the skeleton connected region according to the distribution of the straight line fitting results of the edge lines of any one of the skeleton connected regions;

[0018] The visual priority value of the skeleton connected region is obtained by calculating the product of the cumulative sum of the differences between the inclination angle values ​​of each edge pixel point and the adjacent edge pixel points on the edge line of the skeleton connected region and the shape feature factor.

[0019] Preferably, the obtaining of the shape characteristic factor of the skeleton connected region according to the distribution of the straight line fitting result of the edge line of any skeleton connected region specifically includes:

[0020] Hough line detection is performed on the skeleton connected area, and the negative correlation coefficient of the cumulative sum of the voting values ​​of all highlight points in the Hough space is used as the shape feature factor of the skeleton connected area.

[0021] Preferably, the characteristic bias value and visual priority value of the skeleton connected area in the structural grayscale image at all angles are combined to dynamically adjust the illumination level of each skeleton connected area in the structural grayscale image at each angle of the current illumination level to obtain the ultra-high-definition enhancement result of the 3D scanning of architectural relics, specifically including:

[0022] For any skeleton connected region in any structural grayscale image, the product of the feature bias value and the visual priority value of the skeleton connected region is taken as the skeleton structure quantity of the skeleton connected region;

[0023] Based on the skeleton structure quantity, the illumination level of each skeleton connected area in any structural grayscale image of the current illumination level is dynamically adjusted to obtain an ultra-high-definition enhanced result of the 3D scanning of the architectural cultural relics.

[0024] Preferably, the illumination level of each skeleton connected area in any one of the structural grayscale images is dynamically adjusted based on the skeleton structure quantity to obtain an ultra-high definition enhancement result of the 3D scanning of architectural relics, specifically including:

[0025] For any one of the structural grayscale images under the current illumination level, illumination values ​​are respectively allocated based on the skeleton structure amount of each skeleton connected area using the illumination mapping method to obtain an illumination enhancement result of the any one of the structural grayscale images.

[0026] Preferably, the step of performing morphological analysis on each structural grayscale image to extract the skeleton connected region of each structural grayscale image specifically includes:

[0027] Skeleton extraction is performed on each structural grayscale image, and connected domain analysis is performed based on the extraction results. Each connected domain in each structural grayscale image in the connected domain analysis results is recorded as a skeleton connected area.

[0028] In a second aspect, the present invention provides an electronic device for ultra-high-definition enhancement of 3D scanning of architectural relics, the device comprising a memory and a processor, wherein:

[0029] The memory is used to store program codes;

[0030] The processor is used to read the program code stored in the memory and execute a method for ultra-high-definition enhancement of 3D scanning of architectural relics.

[0031] In a third aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon; the computer program is executed by a processor to implement a method for ultra-high definition enhancement of 3D scanning of architectural relics.

[0032] The embodiments of the present invention have at least the following beneficial effects:

[0033] The present invention first obtains 3D scanning results at different angles under the current lighting environment, and performs preliminary regional division of skeleton morphological analysis to determine the skeleton connected area, which provides a data basis for the subsequent feature analysis of key components of different skeleton structures in 3D scanning results at different angles. Then, the feature distribution difference of edge pixel points on the edge line in each skeleton connected area is analyzed, and the feature bias value is quantified in combination with the distribution of edge pixel points, that is, the feature bias value is used to characterize the feature bias characterization of the key skeleton structure of the architectural cultural relic model in the skeleton connected area. Further, according to the adjacent edge difference and edge shape characteristics of the edge line in the skeleton connected area, different visual priority values ​​are given to different key skeleton structure components, and the visual priority value is used to characterize the degree of visual effect demand of the local area where the skeleton structure component is located. Finally, in combination with the feature bias value and the visual priority value, the illumination level is dynamically adjusted, and different enhancement results can be provided for the key skeleton structure components in the architectural cultural relic model at different angles, and the feature structure of different structural components in the architectural cultural relic can be better highlighted, the visual experience is enhanced, and a better visual experience is satisfied, which also makes the enhancement effect of the 3D scanning results of the architectural cultural relic model better. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0035] Figure 1This is a flowchart of the steps of a method for ultra-high definition enhancement of 3D scanning of architectural relics provided by the present invention;

[0036] Figure 2 is a schematic diagram of a structural grayscale image provided by the present invention;

[0037] Figure 3 It is a schematic diagram of the results of skeleton extraction and connected domain analysis of the structural grayscale image provided by the present invention;

[0038] Figure 4 It is a flowchart of the steps of the method for obtaining the characteristic bias value of the skeleton connected area provided by the present invention;

[0039] Figure 5 This is a system block diagram of an ultra-high-definition enhancement system for 3D scanning of architectural cultural relics provided by the present invention. DETAILED DESCRIPTION

[0040] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the ultra-high-definition enhancement method, electronic device and medium for 3D scanning of architectural relics proposed by the present invention, its specific implementation, structure, features and effects in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0041] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0042] The following is a detailed description of a method for ultra-high-definition enhancement of 3D scanning of architectural relics, a specific solution of an electronic device and a medium provided by the present invention in conjunction with the accompanying drawings.

[0043] See also Figure 1 , which shows a flowchart of a method for ultra-high definition enhancement of 3D scanning of architectural relics provided by an embodiment of the present invention, the method comprising the following steps:

[0044] Step S100, obtaining a structural grayscale image of the 3D scanning result of the architectural cultural relic at each angle of the current illumination level; performing morphological analysis on each structural grayscale image, and extracting the skeleton connected area of ​​each structural grayscale image.

[0045] This implementation analyzes the distribution of two-dimensional images of 3D scanning results of architectural relics at different angles under certain lighting conditions, and according to the importance and criticality analysis results of different structural parts in the architectural relics, adaptively and dynamically adjusts different lighting conditions, and performs dynamic mapping through ray tracing to achieve ultra-high-definition enhancement of 3D scanning of architectural relics.

[0046] Based on this, first, a 3D scan is performed on the constructed 3D model of the architectural cultural relic to obtain two-dimensional images of the 3D model at different viewing angles under the current lighting environment. Specifically, under the current actual lighting intensity, at each different angle, a camera is used to capture the two-dimensional surface image of the 3D model of the architectural cultural relic. The location of the captured image can be the location of the light source at different angles for lighting the current architectural cultural relic model. The implementer can set it according to the specific implementation scenario. As a specific example, taking the perspective of the front view as the initial perspective, an image capture operation is performed every 1° from the initial perspective, and a two-dimensional image of the architectural cultural relic model at each angle can be obtained. Furthermore, the captured two-dimensional image can be preprocessed, such as grayscale, equalization, etc., to improve the quality of image acquisition, and the preprocessed two-dimensional image is recorded as each structural grayscale image at each angle, such as Figure 2 As shown, it is a structural grayscale image of the architectural cultural relic model at any viewing angle in this embodiment. Among them, the preprocessing operation is a well-known technology and will not be introduced in detail here.

[0047] It can be understood that at the current moment, the light intensity in the environment is certain, and then by collecting structural grayscale images at different angles, feature analysis is performed. In subsequent steps, ray tracing-style dynamic mapping can be performed in combination with the analysis results, so as to achieve the effect of ultra-high-definition enhancement after the current ambient lighting is adjusted. That is, this embodiment takes the ambient lighting conditions in the current scene as an example for explanation. Whenever the ambient lighting conditions change, the method described in this embodiment can be used for dynamic adjustment to achieve the purpose of ultra-high-definition dynamic enhancement.

[0048] In the 3D model of architectural relics, lighting simulation greatly affects the authenticity and aesthetics of the model's 3D scanning visual output. As time changes, the cultural relics have different degrees of lighting conditions at different time periods, such as dawn, noon, and dusk. At the same time, when the scanning angle changes, there are also different degrees of lighting conditions.

[0049] In order to enhance the 3D scanning results, the lighting conditions of the lighting simulation are dynamically adjusted to enhance the visual effects of the key or important parts of the cultural relics at different times and different perspectives. The key and important parts of the architectural relics, such as facade decoration, sculpture details, stone textures, windows and door frames, etc., have a decisive influence on the overall appearance of the architectural relics. The structural characteristics of these important visual elements of the architectural relics show a strong skeleton.

[0050] Based on this, we can extract the skeleton local area of ​​each structural grayscale image by performing skeleton analysis on the structural grayscale image, which provides a data basis for the subsequent adaptive allocation of different illumination levels according to the skeleton distribution conditions of different local areas. That is, we perform morphological analysis on each structural grayscale image and extract the skeleton connected area of ​​each structural grayscale image.

[0051] Specifically, skeleton extraction is performed on each structural grayscale image, and connected domain analysis is performed based on the extraction results. Each connected domain in each structural grayscale image in the connected domain analysis results is recorded as a skeleton connected region. Figure 3 As shown in the figure, the white part is the edge of each connected area after the skeleton extraction result is analyzed for the connected domain, that is, Figure 3 This is a schematic diagram of a structural grayscale image after skeleton extraction and connected domain analysis. Since the skeleton extraction operation is based on a binary image, the analysis results need to be mapped to the structural grayscale image, that is, the structural grayscale image is marked in the same way according to the same position divided by the edge part of the image. Each connected area in the structural grayscale image is the skeleton connected area.

[0052] It should be noted that the methods of skeleton extraction and connected domain analysis are well-known technologies and will not be introduced in detail here. Then, each structural grayscale image at each angle can obtain each skeleton connected region in each structural grayscale image according to the same method as above.

[0053] Step S200, obtaining a feature bias value of each skeleton connected region according to the difference between edge line distribution features at each edge pixel point on the edge line of each skeleton connected region and the distribution of edge pixels.

[0054] When analyzing the skeleton features of architectural relics, the importance of visual elements is reflected in different important areas and key areas, such as facade decoration, sculpture details, stone texture, windows and door frames. These visual elements have a certain decisive influence on improving the overall appearance of architectural relics, and the details are more vivid and prominent. For example, enhancing the texture depth of the facade can make the sculpture more three-dimensional. Under the condition of meeting certain visual needs, by adjusting the lighting conditions, the structural strength and structural details of key parts can be highlighted. For example, relatively strong lighting is used for the main architectural skeleton parts in the architectural relic model, namely arches, columns, etc., to highlight their structural details.

[0055] Furthermore, combined with the edge distribution characteristics of each different local area in the architectural cultural relics, the feature bias of each local area can be quantified. For example, when the local area where the skeleton part is located has relatively regular straight lines, it corresponds to different frame line edges in the architectural cultural relic model. When the local area where the skeleton part is located has curves, it corresponds to different columns or arch edges in the architectural cultural relics. When there are certain texture edges, it corresponds to the detailed texture part of the sculpture surface of the architectural cultural relic model. Therefore, this part is the key visual element part, and the higher the degree of feature bias during quantitative analysis.

[0056] Specifically, Figure 4 As shown, the method for obtaining the characteristic bias value of the skeleton connected area can be implemented by steps S201 to S203.

[0057] Step S201, edge detection is performed on the edge regions of the skeleton respectively.

[0058] In this embodiment, the Canny edge detection algorithm is used to perform edge detection on each skeleton edge area in each structural grayscale image, so that each edge line in each skeleton edge area can be obtained. Different edge lines reflect the edge distribution or texture distribution in the local area where the skeleton part is located, providing a data basis for further analysis of the feature bias of the edge conformity.

[0059] Step S202, obtaining an edge regularity factor of the skeleton connected region according to the difference between the edge features of each edge pixel point on the edge line in the skeleton connected region and the corresponding position of the adjacent edge pixel point.

[0060] When the skeleton connected area contains the door frame part, the edge of the skeleton connected area presents a relatively regular straight line distribution. When the skeleton connected area contains the column or arch, the edge of the skeleton connected area presents a curved distribution feature. When the skeleton connected area contains the sculpture surface part, the edge of the skeleton connected area belongs to the detail texture edge, so it is generally not regular in the image and the distribution is more random. Based on this, the edge regularity characteristics of each skeleton connected area can be quantitatively characterized by analyzing the change law of the edge feature difference in each skeleton connected area.

[0061] Specifically, taking any skeleton connected area in any structural grayscale image as an example, for any edge line in the skeleton connected area, the angle between each edge pixel point on the edge line and the connecting line between the adjacent edge pixel points is recorded as the inclination angle value of each edge pixel point on the edge line.

[0062] In this embodiment, the ith edge pixel point on the edge line is first connected to the next adjacent edge pixel point, i.e., the i+1th edge pixel point, and then the angle between the connecting line and the horizontal right direction is recorded as the inclination angle value of the ith edge pixel point on the edge line. It should be noted that when the next adjacent edge pixel point cannot be obtained on the edge line, the distribution of the inclination angle value is not calculated.

[0063] Furthermore, the negative correlation coefficient of the difference between the inclination angle values ​​of each edge pixel point on the edge line in the skeleton connected region and the adjacent edge pixel point is calculated, and the average of all negative correlation coefficients in the skeleton connected region is taken as the edge regularity factor of the skeleton connected region.

[0064] As a specific example, this embodiment takes any skeleton connected region in any structural grayscale image as an example for explanation, then the edge regularity factor of the skeleton connected region is It can be expressed as: ,in, Represents the total number of all edge pixels contained in the skeleton connected area. Represents the total number of edge lines contained in the skeleton connected area, Represents the total number of edge pixels on the nth edge line in the skeleton connected area. Represents the inclination angle value of the i-th edge pixel point on the n-th edge line in the skeleton connected area. Represents the inclination angle value of the i+1th edge pixel point on the nth edge line in the skeleton connected area. It represents the preset hyperparameter with a value of 0.1. To prevent the denominator from being 0, implementers can set it according to the specific implementation scenario.

[0065] It reflects the difference in the inclination angle between the edge pixel and the adjacent edge pixel on the same edge line. The smaller the difference, the more the edge line presents a distribution characteristic that is close to a straight line, that is, the distribution of edge features is more regular, and then through the negative correlation coefficient Perform negative correlation mapping, The larger the value of , the larger the value of the corresponding edge regularity factor.

[0066] The edge regularity factor of the skeleton connected region characterizes the regularity of the distribution of edge features in the skeleton connected region. The larger the value of the edge regularity factor, the more regular the change of adjacent angles on the edges in the skeleton connected region, and the smaller the difference. It is more consistent with the edge morphological characteristics of a series of key building components in the architectural cultural relics scene, and the corresponding lighting conditions need more attention. The smaller the value of the edge regularity factor, the less regular the change of adjacent angles on the edges in the skeleton connected region, that is, the more chaotic and the greater the difference. At this time, the probability of the existence of the morphological characteristics of the key building components in the architectural cultural relics scene is smaller, and the degree of attention to lighting adjustment is less.

[0067] Step S203, obtaining a characteristic bias value of the skeleton connected area according to the total number of all edge pixels in the skeleton connected area and the edge regularity factor; the total number of all edge pixels and the edge regularity factor are positively correlated with the characteristic bias value.

[0068] The degree of edge regularity reflects the regularity of the skeleton connected region from the difference in the inclination angle values ​​of the edge pixels. The number of edges contained in the skeleton connected region can also reflect the distribution of morphological characteristics of the location of the skeleton connected region to a certain extent. For example, the more edges contained in the skeleton connected region, the higher the degree of corresponding feature expression of the location of the skeleton connected region. At the same time, the larger the value of the edge regularity, the stronger the regularity of the skeleton connected region, and the higher the degree of corresponding feature expression of the region.

[0069] In this embodiment, for any skeleton connected region in any structural grayscale image, the product of the edge regularity factor of the skeleton connected region and the total number of all edge pixels in the skeleton connected region is used as the characteristic bias value of the skeleton connected region. The edge regularity factor of the skeleton connected region is positively correlated with the characteristic bias value, and at the same time, the total number of all edge pixels in the skeleton connected region is also positively correlated with the characteristic bias value.

[0070] Step S300 , obtaining a visual priority value of each skeleton connected region according to edge feature differences of adjacent edge pixels on the edge line of each skeleton connected region and edge shape features of the edge line.

[0071] The morphological characteristics of the skeleton structure corresponding to the skeleton connected area reflect whether the skeleton connected area needs to pay more attention to the lighting conditions. The more attention is needed to the lighting conditions of the area where the part is located, the more the visual effect needs to be enhanced under the current light intensity. Furthermore, the various architectural components of the architectural cultural relics have different visual priorities in the architectural cultural relics model. The more the proportion of different architectural components is, the higher the corresponding skeleton structure characteristics are, and the higher the visual priority is given accordingly, and the higher the proportion is in the subsequent adaptive adjustment of the light intensity. Based on this, the visual priority of the local area of ​​each skeleton structure can be quantified by further analyzing the feature differences of adjacent edge pixels and the distribution of pixel edge features.

[0072] Specifically, the shape characteristic factor of the skeleton connected area is obtained according to the distribution of the straight line fitting results of the edge line of any skeleton connected area. That is, the skeleton connected area is subjected to Hough line detection, and the negative correlation coefficient of the cumulative sum of the voting values ​​of all the highlight points in the Hough space is used as the shape characteristic factor of the skeleton connected area. It should be noted that Hough line detection is a well-known technology and will not be introduced in detail here. In the Hough line detection algorithm, the points that exceed the algorithm threshold are generally considered as highlight points, and after Hough line detection, each highlight point in the Hough space corresponds to a voting value, and the size of the voting value reflects the degree to which the edge corresponding to the highlight point conforms to the straight line.

[0073] Then, the product of the cumulative sum of the differences between the inclination angle values ​​of each edge pixel point and the adjacent edge pixel point on the edge line of the skeleton connected region and the shape feature factor is calculated to obtain the visual priority value of the skeleton connected region.

[0074] In this embodiment, any skeleton connected region in any structural grayscale image is still used as an example for explanation. The visual priority value of the skeleton connected region is It can be expressed as: ,in, Represents the sum of the voting values ​​of all the highlights of the skeleton connected area in the Hough space, Represents the total number of all edge pixels contained in the skeleton connected area. Represents the total number of edge lines contained in the skeleton connected area, Represents the total number of edge pixels on the nth edge line in the skeleton connected area. Represents the inclination angle value of the i-th edge pixel point on the n-th edge line in the skeleton connected area. Represents the inclination angle value of the i+1th edge pixel point on the nth edge line in the skeleton connected area.

[0075] It is the negative correlation coefficient of the sum of the voting values ​​of all the highlight points of the skeleton connected area in the Hough space, that is, the shape characteristic factor of the skeleton connected area, which represents the key indicator affecting the visual priority of the local area. The larger the voting result of the Hough line detection, the more consistent the angles on the edges of the corresponding skeleton connected area, that is, the scene content in the skeleton corresponding to the skeleton connected area is the window frame, door frame and other components of the building, and the smaller the visual priority value is, that is, the straight line structure with a more regular distribution has a lower visual priority than other key parts.

[0076] It indicates the difference in the tilt angle between two adjacent edge pixels on the edge line in the skeleton connected area. It represents the cumulative sum of all differences. The smaller the value, the smaller the feature angle difference on the edge. The connected skeleton area is more likely to be the border and door frame. The smaller the corresponding visual priority value, the lower the visual priority.

[0077] When the value of the shape feature factor is larger, it means that the voting value of the skeleton connected area in the Hough line detection is smaller, which means that the edge line is less consistent with the straight line distribution. At the same time, the greater the cumulative difference in the inclination angle values ​​between adjacent edge pixels, the greater the angle change on the edge line in the skeleton connected area. Therefore, the skeleton scene content corresponding to the skeleton connected area is more likely to be composed of special shapes such as arcs, such as arches. The higher the visual priority of this key structural component compared to the straight line structure, the larger the corresponding visual priority value.

[0078] Step S400, combining the feature bias value and visual priority value of the skeleton connected area in the structural grayscale image at all angles, dynamically adjusts the illumination level of each skeleton connected area in the structural grayscale image at each angle of the current illumination level to obtain an ultra-high-definition enhanced result of the 3D scanning of architectural relics.

[0079] The characteristic bias value of the skeleton connected area represents the characteristic performance of the key structural components contained in the skeleton connected area. The higher the characteristic bias value, the more architectural structures that affect visual perception exist in the corresponding skeleton area, such as facade decoration, sculpture details, stone texture, windows and door frames, etc., and the higher the content of the corresponding skeleton structure. The visual priority value of the skeleton connected area represents the priority of the skeleton scene structure corresponding to the skeleton connected area that needs to be adjusted visually. The greater the priority, the greater the demand for corresponding visual effects. Furthermore, the two aspects are combined to characterize the degree of adaptation demand for the light intensity of the skeleton connected area. In the time change, the scanning results of different time periods, in order to increase their corresponding authenticity, can more comprehensively display the enhanced effect of the scanning of architectural cultural relics models by simulating the lighting of different time periods.

[0080] Specifically, first, the skeleton structure representation content of each skeleton connected area is quantified by combining the feature bias value and visual priority value of each skeleton connected area. For any skeleton connected area in any structural grayscale image, the product of the feature bias value and the visual priority value of the skeleton connected area is taken as the skeleton structure quantity of the skeleton connected area. The larger the value of the feature bias value, the more architectural structures that affect visual perception exist in the local area, the larger the value of the visual priority value, the greater the demand for visual performance effects in the local area, and thus the larger the value of the skeleton structure quantity of the quantified result.

[0081] The skeleton structure quantity of the skeleton connected area reflects the degree of demand for visual perception in the current local area from the perspective of the key structural components contained in the local area. The larger the value, the greater the demand for visual perception, and thus the need to set relatively strong lighting in the local area. Based on this, the illumination level of each skeleton connected area in any structural grayscale image is dynamically adjusted based on the skeleton structure quantity to obtain the ultra-high-definition enhancement result of the 3D scanning of architectural relics.

[0082] Specifically, based on the skeleton structure amount of each skeleton connected area, the illumination value is respectively allocated using the light mapping method to obtain the illumination enhancement result of any one of the structural grayscale images. In this embodiment, specific light map illumination values ​​are allocated according to the values ​​of the skeleton structure amount corresponding to different skeleton connected areas, that is, the light map result reflects the illumination level value of the corresponding local area.

[0083] Using ray tracing technology, after the corresponding lighting value is allocated to each skeleton area, it is iteratively updated according to the change in time, that is, the reflection situation corresponding to the light intensity at different times, and ray tracing is performed at different times, that is, the corresponding light intensity is dynamically iterated.

[0084] It should be noted that light mapping technology is a well-known technology. This method usually pre-calculates the lighting effects and stores them in a two-dimensional map. In this embodiment, the pre-calculated lighting effects can be represented by skeleton structure quantities, that is, the skeleton structure quantities are used to characterize the lighting values, and then mapping, ray tracing and other processing steps are performed to achieve the purpose of dynamically adjusting the lighting intensity in the current lighting scene.

[0085] In summary, the first aspect of this embodiment dynamically adjusts the illumination intensity corresponding to the 3D scanning results of architectural relics through initial illumination intensity optimization and dynamic adaptation. Compared with the prior art, it provides a method of initial intensity and dynamic adaptation, which can adjust the illumination in real time to adapt to different observation angles or changes in illumination conditions. The second aspect is highly targeted, that is, adjusting the illumination intensity and direction according to the characteristics of the object (such as key components of the building structure) can better highlight these features and provide a more personalized and optimized visual experience. The third aspect is that by intelligently adjusting the illumination intensity of key areas, the lighting requirements for the overall scene can be reduced, thereby reducing computing resource consumption, especially when using high-cost technologies such as ray tracing. The fourth aspect is to enhance the performance of details, that is, the enhanced illumination of specific areas can make the details more obvious, especially in complex or delicate architectural elements, which helps to enhance the overall aesthetic and information communication effects.

[0086] like Figure 5 As shown, a 3D scanning ultra-high definition enhancement system for architectural relics is provided, the system comprising:

[0087] The image preprocessing module is used to obtain the structural grayscale image of the 3D scanning results of the architectural cultural relics at each angle of the current illumination level; perform morphological analysis on each structural grayscale image and extract the skeleton connected area of ​​each structural grayscale image;

[0088] A bias analysis module is used to obtain a feature bias value of each skeleton connected region based on the difference between edge line distribution features at the position of each edge pixel point on the edge line of each skeleton connected region and the distribution of edge pixels;

[0089] A visual analysis module is used to obtain a visual priority value of each skeleton connected region based on edge feature differences of adjacent edge pixels on the edge line of each skeleton connected region and edge shape features of the edge line;

[0090] The data adjustment module is used to dynamically adjust the illumination level of each skeleton connected area in the structural grayscale image at each angle of the current illumination level by combining the feature bias value and visual priority value of the skeleton connected area in the structural grayscale image at all angles to obtain ultra-high-definition enhanced results of 3D scanning of architectural relics.

[0091] The system provided in the above embodiment is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the ultra-high-definition enhancement system for 3D scanning of architectural relics and the ultra-high-definition enhancement method for 3D scanning of architectural relics provided in the above embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0092] Based on the same inventive concept as the above method, this embodiment also provides an electronic device for ultra-high definition enhancement of 3D scanning of architectural relics, the device comprising: the device comprises a memory and a processor, wherein: the memory is used to store program code; the processor is used to read the program code stored in the memory and execute the steps of a method for ultra-high definition enhancement of 3D scanning of architectural relics.

[0093] Based on the same inventive concept as the above method, this embodiment also provides a computer-readable storage medium on which a computer program is stored; the computer program is executed by a processor to implement the steps of a method for ultra-high-definition enhancement of 3D scanning of architectural relics.

[0094] The embodiments described above 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, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for enhancing ultra-high definition 3D scanning of architectural relics, characterized in that: The method comprises the following steps: Obtain the structural grayscale image of the 3D scanning result of the architectural cultural relic at each angle of the current illumination level; perform morphological analysis on each structural grayscale image and extract the skeleton connected area of ​​each structural grayscale image; According to the difference between the edge line distribution features at the position of each edge pixel point on the edge line of each skeleton connected area and the distribution of edge pixels, the feature bias value of each skeleton connected area is obtained; According to the edge feature differences of adjacent edge pixels on the edge line of each skeleton connected region and the edge shape features of the edge line, the visual priority value of each skeleton connected region is obtained; Combined with the feature bias value and visual priority value of the skeleton connected area in the structural grayscale image at all angles, the illumination level of each skeleton connected area in the structural grayscale image at each angle of the current illumination level is dynamically adjusted to obtain an ultra-high-definition enhanced result of the 3D scanning of architectural relics; The method of obtaining the feature bias value of each skeleton connected region according to the difference between the edge line distribution features at the position of each edge pixel point on the edge line of each skeleton connected region and the distribution of the edge pixels specifically includes: For any skeleton connected region in any structural grayscale image, the edge regularity factor of the skeleton connected region is obtained according to the difference between the edge features of each edge pixel point on the edge line of the skeleton connected region and the corresponding position of the adjacent edge pixel point; Obtaining a characteristic bias value of the skeleton connected region according to the total number of all edge pixels in the skeleton connected region and the edge regularity factor; the total number of all edge pixels and the edge regularity factor are both positively correlated with the characteristic bias value; The edge regularity factor of the skeleton connected region is obtained according to the difference between the edge features of each edge pixel point and the corresponding position of the adjacent edge pixel point on the edge line of the skeleton connected region, specifically including: For any edge line in the skeleton connected area, the angle between each edge pixel point on the edge line and the line connecting the adjacent edge pixel points is recorded as the inclination angle value of each edge pixel point on the edge line; Calculate the negative correlation coefficient of the difference between the inclination angle value of each edge pixel point on the edge line of the skeleton connected region and the adjacent edge pixel point, and take the average of all negative correlation coefficients in the skeleton connected region as the edge regularity factor of the skeleton connected region; The obtaining of the visual priority value of each skeleton connected region according to the edge feature difference of adjacent edge pixels on the edge line of each skeleton connected region and the edge shape feature of the edge line specifically includes: Obtaining a shape characteristic factor of the skeleton connected region according to the distribution of the straight line fitting results of the edge lines of any one of the skeleton connected regions; Calculate the product of the cumulative sum of the differences between the inclination angle values ​​of each edge pixel point and the adjacent edge pixel point on the edge line of the skeleton connected region and the shape feature factor to obtain the visual priority value of the skeleton connected region; The step of obtaining the shape characteristic factor of the skeleton connected region according to the distribution of the straight line fitting result of the edge line of any skeleton connected region specifically includes: Hough line detection is performed on the skeleton connected area, and the negative correlation coefficient of the cumulative sum of the voting values ​​of all highlight points in the Hough space is used as the shape feature factor of the skeleton connected area.

2. The method for ultra-high definition enhancement of 3D scanning of architectural relics according to claim 1, characterized in that: The characteristic bias value and visual priority value of the skeleton connected area in the structural grayscale image at all angles are combined to dynamically adjust the illumination level of each skeleton connected area in the structural grayscale image at each angle of the current illumination level to obtain the ultra-high-definition enhancement result of the 3D scanning of the architectural cultural relics, specifically including: For any skeleton connected region in any structural grayscale image, the product of the feature bias value and the visual priority value of the skeleton connected region is taken as the skeleton structure quantity of the skeleton connected region; Based on the skeleton structure quantity, the illumination level of each skeleton connected area in any structural grayscale image of the current illumination level is dynamically adjusted to obtain an ultra-high-definition enhanced result of the 3D scanning of the architectural cultural relics.

3. The method for enhancing 3D scanning of architectural relics by ultra-high definition according to claim 2, characterized in that: The step of dynamically adjusting the illumination level of each skeleton connected area in any one of the structural grayscale images according to the current illumination level based on the skeleton structure quantity to obtain an ultra-high-definition enhancement result of the 3D scanning of the architectural cultural relics specifically includes: For any one of the structural grayscale images under the current illumination level, illumination values ​​are respectively allocated based on the skeleton structure amount of each skeleton connected area using the illumination mapping method to obtain an illumination enhancement result of the any one of the structural grayscale images.

4. The method for ultra-high definition enhancement of 3D scanning of architectural relics according to claim 1, characterized in that: The morphological analysis is performed on each structural grayscale image to extract the skeleton connected area of ​​each structural grayscale image, specifically including: Skeleton extraction is performed on each structural grayscale image, and connected domain analysis is performed based on the extraction results. Each connected domain in each structural grayscale image in the connected domain analysis results is recorded as a skeleton connected area.

5. An electronic device for ultra-high-definition enhancement of 3D scanning of architectural relics, characterized in that: The device comprises a memory and a processor, wherein: The memory is used to store program codes; The processor is used to read the program code stored in the memory and execute the ultra-high-definition enhancement method for 3D scanning of architectural relics as described in any one of claims 1 to 4.

6. A computer-readable storage medium, characterized in that: A computer program is stored thereon; the computer program is executed by a processor to implement a method for ultra-high definition enhancement of 3D scanning of architectural relics as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Visual image enhancement processing method for construction waste

    CN116029941A

  • Metal washbasin defect rapid detection method based on computer vision

    CN116758083A