Edge extraction method, system and device for dual-module enhanced adaptive descriptor and medium

The dual-module enhanced adaptive descriptor method addresses edge extraction challenges by fusing global and local edge features through dynamic weighting, significantly enhancing the accuracy and robustness of edge extraction for cultural heritage fragments.

CN119723264AActive Publication Date: 2025-03-28NORTHWEST UNIV
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411767574.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-03-28
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

Existing edge extraction methods for cultural heritage fragments face challenges such as edge fuzziness, texture confusion, difficulty in integrating local and global information, handling complex 3D structures, and high noise levels, which traditional descriptors like Canny, Sobel, SIFT, and SURF struggle to address effectively.

Method used

A dual-module enhanced adaptive descriptor method that combines global and local edge features through dynamic weighting, utilizing frequency domain transformations and adaptive domain methods to extract and fuse edge features, enhancing edge extraction accuracy.

Benefits of technology

This approach integrates global and local edge features effectively, improving the precision of edge extraction and identifying intricate details in cultural heritage fragments, ensuring robustness against noise and texture complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119723264A_ABST
    Figure CN119723264A_ABST
Patent Text Reader

Abstract

The invention discloses an edge extraction method, system and device for a dual-module enhanced adaptive descriptor, and a medium, and the method comprises the steps: cleaning and numbering cultural relic fragments, scanning the cleaned and numbering cultural relic fragments, obtaining a two-dimensional image and a three-dimensional model of the cultural relic fragments, carrying out the correlation labeling of a label, and constructing an original data set; the original data set is processed, two-dimensional image data enhancement based on geometric transformation is realized through multi-angle image screenshot, and a fragment three-dimensional model is converted into a point cloud format through 3D scanning analysis software to map a corresponding two-dimensional image; corresponding two-dimensional images mapped by the enhanced two-dimensional image and the three-dimensional model jointly form a fragment two-dimensional image data set; according to the obtained fragment two-dimensional image data set, constructing a multi-modal descriptor for extracting features; edge extraction results of the cultural relic fragment two-dimensional image and the cultural relic fragment three-dimensional model are obtained according to the descriptors, and an edge extraction task is completed; the dual-module enhanced adaptive descriptor provided by the invention can comprehensively capture edge information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image processing, and relates to an edge feature extraction algorithm for a two-dimensional image and a three-dimensional point cloud mapping image, and specifically relates to an edge extraction method, system, device and medium of a dual-module enhanced adaptive descriptor. Background Art

[0002] With the development of visualization technology in the digital protection of cultural heritage, the edge extraction of cultural relic fragments has become particularly important. However, the traditional edge extraction method of Qin Terracotta Warriors has problems such as low efficiency, strong subjectivity, and lack of standardization. The three-dimensional model edge extraction method based on visualization technology can automatically extract edge features of Qin Terracotta Warriors fragments, thereby reducing the manual burden, improving efficiency and accuracy, and effectively protecting cultural relics to avoid secondary damage to them. In addition, this method can not only accurately identify the edge features of Qin Terracotta Warriors fragments, but also analyze the shape and texture information of different dimensions. For example, when digitally repairing broken Qin Terracotta Warriors, more accurate matching and splicing can be performed based on their two-dimensional or three-dimensional edge features, providing technical support for subsequent cultural relic restoration work.

[0003] In current research, some studies have been conducted that apply edge extraction methods to cultural relic fragments. For example, an algorithm for generating cultural relic lines based on explicit ridges was used to solve the problem of edge interruption in the process of extracting the contour of a three-dimensional Terracotta Warriors model; an automatic splicing algorithm for broken cultural relics based on fracture surface topological features was used to extract fracture surface feature points and construct a topological map by defining a saliency index function, ultimately achieving effective splicing of cultural relic models with damaged edges; a SLIC0 algorithm was used to segment the selected area, iterate the number of superpixels, and use the AP clustering method to merge superpixels in the cultural relic area to obtain edge information; a multi-scale generation and discrimination method based on a cycle-consistent generative adversarial network was used to achieve significant progress in edge extraction of painted cultural relics. However, due to the problems of blurred edges, complex surface textures, and subtle geometric differences between fragments of cultural relic fragments, descriptors are required to fully capture edge information, including global and local, two-dimensional and three-dimensional. However, the descriptors in the prior art cannot fully capture edge information, and the following problems exist:

[0004] (1) Blurred edges and incompleteness

[0005] The edges of artifact fragments often become blurred or incomplete due to long-term physical wear, natural corrosion or other factors. Traditional edge descriptors, such as Canny edge detection or Sobel operator, usually rely on the gradient of pixel grayscale changes to identify edges. However, for blurred edges or irregularly shaped objects, the gradient changes may not be obvious or lack clear boundaries, resulting in these algorithms being unable to effectively identify complex edges.

[0006] (2) Confusion between texture and edge

[0007] Many cultural relics have complex surface textures, such as carvings, paintings, and signs of wear and tear. These texture features may be mixed with the edges of objects, making it difficult for descriptors to distinguish between edges and surface textures. Traditional descriptors such as SIFT and SURF can extract local feature points in images, but they usually fail when the texture is complex or the edges are blurred, making it difficult to distinguish and process edges and textures.

[0008] (3) Difficulty in integrating local and global information

[0009] Existing edge descriptors often focus on extracting local information (such as edge features of a small area) when extracting features, while ignoring the global structure of the image or object.

[0010] (4) Difficulty in dealing with multi-scale, multi-angle and three-dimensional structures

[0011] The geometric structure of cultural relic fragments is usually a complex three-dimensional shape, especially with complex structures such as curved surfaces, bumps, and detailed carvings. When dealing with cultural relic fragments with curved surfaces, traditional edge detection methods (such as image-based Canny and Sobel methods) may not be able to effectively capture the changes in the edge of the object at different angles and depths.

[0012] (5) High noise and false edge problems

[0013] Cultural relic fragments may have high noise, especially after long-term preservation or restoration. The noise and false edges in the image may affect the effect of the edge extraction algorithm. Summary of the invention

[0014] In order to overcome the shortcomings of the above-mentioned prior art, the purpose of the present invention is to propose an edge extraction method, system, device and medium of a dual-module enhanced adaptive descriptor, which improves the accuracy of cultural relic edge extraction by extracting global edge features and local edge features and using a dynamic weight fusion strategy to perform feature fusion of global edge features and local edge features.

[0015] The technical solution adopted by the present invention is:

[0016] A dual-module enhanced adaptive descriptor edge extraction method comprises the following steps:

[0017] Step 1: After cleaning and numbering the cultural relic fragments, scan them to obtain the 2D image and 3D model of the cultural relic fragments, and perform label association annotation to construct the original data set;

[0018] Step 2, processing the original data set, wherein the two-dimensional image data enhancement based on geometric transformation is realized by multi-angle image screenshots; the three-dimensional model is converted into a point cloud format and mapped by 3D scanning analysis software to map out the corresponding two-dimensional image; the enhanced two-dimensional image and the corresponding two-dimensional image mapped out by the three-dimensional model together constitute the fragmented two-dimensional image data set;

[0019] Step 3: Based on the fragmented two-dimensional image dataset obtained in step 2, a dual-module enhanced adaptive descriptor GLSoble for extracting features is constructed, specifically:

[0020] Step 3.1, extract global edge features through frequency domain transformation enhancement method;

[0021] Step 3.2, extract local edge features through adaptive field method;

[0022] Step 3.3, the global edge features and local edge features are fused through a dynamic weight fusion strategy to obtain a dual-module enhanced adaptive descriptor;

[0023] Step 4, according to the dual-module enhanced adaptive descriptor obtained in step 3, the edge extraction results of the two-dimensional image of the cultural relic fragment and the three-dimensional model of the cultural relic fragment are obtained respectively, and the edge extraction based on the dual-module enhanced adaptive descriptor is completed.

[0024] In step 1, the direction, height and distance of the light source are adjusted to determine the best light source angle, reduce reflection, and obtain a two-dimensional image of the cultural relic fragment; and a three-dimensional model of the cultural relic fragment is obtained by performing three-dimensional scanning using the laboratory's EVA scanner.

[0025] The step 2 converts the three-dimensional model into a point cloud format and maps it using 3D scanning analysis software, specifically:

[0026] Step 2.1, using Geomagic Studio software, flip and rotate the 3D model at different angles and then take plane screenshots to obtain 2D images corresponding to different angles of the 3D model;

[0027] Step 2.2, traverse each three-dimensional coordinate (x, y, z), use the minimum and maximum values ​​of the point cloud to normalize x and y to the image pixel range (a, b), if the image pixel range (a, b) is within the valid pixel range of the image, then normalize the z value to the brightness value, update the corresponding pixel position to ensure that the highest brightness value is stored, and map the corresponding two-dimensional image; if the image pixel range (a, b) exceeds the valid pixel range of the image, then discard the point.

[0028] In step 3.1, global edge feature extraction is performed by frequency domain transformation enhancement method, specifically:

[0029] Step 3.11, input the processed fragmented two-dimensional image data set obtained in step 2, calculate the Fourier transform, convert the image from the spatial domain to the frequency domain; perform transformation displacement, move the zero-frequency component to the frequency harmonic center, and after the shift, the center of the spectrum is low-frequency information and the edge is high-frequency information. The calculation process is as follows:

[0030] F(u,v)=∫∫f(x,y)e -2πi(ux+vy) dxdy

[0031]

[0032] Among them, x is the horizontal coordinate of the image, y is the vertical coordinate of the image; u is the horizontal frequency in the frequency domain, which represents the frequency component in the x direction; v is the vertical frequency in the frequency domain, which represents the frequency component in the y direction; i is an imaginary unit; f(x, y) represents the pixel value of the image at the coordinate (x, y); F(u, v) represents the frequency domain image, that is, the complex value of the frequency component;

[0033] Step 3.12, according to the change displacement F obtained in step 3.11 shift (u, v), calculate the amplitude spectrum to obtain the image frequency information, and perform logarithmic transformation to enhance the contrast;

[0034]

[0035] M(u,v)=log(1+S(u,v))

[0036] Among them, Re is the real part of the Fourier transform result, and Im is the imaginary part of the Fourier transform result;

[0037] Step 3.13, applying a Gaussian low-pass filter to the logarithmically transformed amplitude spectrum M(u, v) obtained in step 3.12 to smooth the image to reduce high-frequency noise;

[0038]

[0039] F filtered =M(u,v)·G(c,d)

[0040] Among them, σ is the standard deviation of the control filter width; c is the horizontal distance from the center of the frequency domain to the current frequency u; d is the vertical distance from the center of the frequency domain to the current frequency v; G is the value of the Gaussian filter;

[0041] Step 3.14: The amplitude spectrum F obtained in step 3.13 after passing through the Gaussian filter filtered Perform an inverse Fourier transform to convert the frequency domain image back to the spatial domain;

[0042]

[0043] Step 3.15, for the f obtained in step 3.14 back (x, y) uses the Sobel operator to extract global edge features and output the global edge feature F global ;

[0044]

[0045]

[0046]

[0047] F global =normalize(S)

[0048] Among them, S x , S y are the edge detection results of the image in the x and y directions, S x The matrix contained in is the convolution kernel used to detect horizontal edges, S y The matrix contained in is the convolution kernel used to detect vertical edges; * represents the convolution operation, and normalize represents the normalization operation.

[0049] In step 3.2, local edge feature extraction is performed by using an adaptive domain method, specifically:

[0050] Step 3.21, input the processed fragmented 2D image dataset obtained in step 2, set the sliding window size and step size, traverse the image through the sliding window, and apply Gaussian blur in each sliding window;

[0051]

[0052] in, is the Gaussian blur operation, W is the image block in the current sliding window, and σ is the sliding window step size;

[0053] Step 3.22, after Gaussian blurring, the W obtained in step 3.21 blurred , use the Sobel operator to extract local edge features and perform threshold processing to filter out insignificant edges and retain important edge features;

[0054] Local edge feature E local The calculation process of extraction is as follows:

[0055]

[0056]

[0057]

[0058] The calculation process of threshold processing is as follows:

[0059] E local (E local <threshold)=0

[0060] Among them, threshold is the threshold value, which is located in the transition zone between low grayscale value and high grayscale value;

[0061] Step 3.23, the edge features in the window are combined with the local edge features E local Compare, retain the maximum value, and output as the local edge feature F local :

[0062] L(y,x)=max(L(y,x),E local )

[0063] F local =normalize(L)

[0064] Among them, L(y, x) represents the local maximum matrix, which indicates the edge strength of each window. The edge information of multiple local windows can be combined to capture the global edge features. local is the normalized local edge feature F local .

[0065] The specific process of step 3.3 is as follows:

[0066] Step 3.31, calculate the global feature dynamic weight W global and local feature dynamic weight W local , the calculation process is as follows:

[0067]

[0068]

[0069] Where ∈ is a small constant used to prevent the denominator from being zero;

[0070] Step 3.32, normalize the global feature dynamic weight and the local feature dynamic weight obtained in step 3.31, and the calculation process is as follows;

[0071]

[0072] Step 3.33, according to the normalized weight W obtained in step 3.32 norm To perform feature fusion of global edge features and local edge features, we obtain the dual-module enhanced adaptive descriptor F fused :

[0073] F fused=W norm ·F global +(1-W norm )·F local .

[0074] The step length of the sliding window is half of the sliding window size. A double loop is used to traverse each area of ​​the image. The outer loop traverses the height of the image and the inner loop traverses the width of the image. In each loop, a window of a specified size is extracted.

[0075] A dual-module enhanced adaptive descriptor edge extraction system, comprising:

[0076] Original data set acquisition module: After cleaning and numbering the cultural relic fragments, scan them to obtain the two-dimensional image and three-dimensional model of the cultural relic fragments, and perform label association annotation to construct the original data set;

[0077] Original data set processing module: Process the original data set, wherein the two-dimensional image data enhancement based on geometric transformation is realized through multi-angle image screenshots; the three-dimensional model is converted into a point cloud format and mapped through 3D scanning analysis software to map out the corresponding two-dimensional image; the enhanced two-dimensional image and the three-dimensional model map out the corresponding two-dimensional image to form a fragmented two-dimensional image data set;

[0078] Dual-module enhanced adaptive descriptor construction module: Based on the obtained fragmented two-dimensional image dataset, a dual-module enhanced adaptive descriptor GLSoble for extracting features is constructed, specifically:

[0079] Global edge feature extraction is performed through frequency domain transformation enhancement method;

[0080] Local edge feature extraction through adaptive domain method;

[0081] The dynamic weight fusion strategy is used to fuse the global edge features and local edge features, and a dual-module enhanced adaptive descriptor is obtained.

[0082] Edge extraction module: According to the dual-module enhanced adaptive descriptor, the edge extraction results of the two-dimensional image of the cultural relic fragment and the three-dimensional model of the cultural relic fragment are obtained respectively, and the edge extraction based on the dual-module enhanced adaptive descriptor is completed.

[0083] An edge extraction device of a dual-module enhanced adaptive descriptor, comprising:

[0084] Memory: a computer program storing a method for edge extraction of a dual-module enhanced adaptive descriptor, which is a computer-readable device;

[0085] Processor: used to implement an edge extraction method of a dual-module enhanced adaptive descriptor when executing the computer program.

[0086] A computer-readable storage medium stores a computer program, which can implement an edge extraction method of a dual-module enhanced adaptive descriptor when executed by a processor.

[0087] The beneficial effects of the present invention are:

[0088] The present invention integrates global and local edge features, retains the maximum edge value at each pixel position, forms a more comprehensive feature description, effectively integrates information of different scales and directions, improves the accuracy of reconstruction of cultural relic fragments, and ensures the recognition and preservation of important features of cultural relic fragments in archaeological analysis.

[0089] The present invention applies an adaptive Gaussian low-pass filter to dynamically adjust the standard deviation according to image features, more accurately smooths the image and retains important low-frequency information, so that global feature extraction can capture image information more comprehensively, thereby improving the overall image quality and analysis accuracy. The Sobel operator is applied at different scales through an adaptive threshold strategy to effectively detect tiny edge changes in damaged and blurred areas, ensuring that each local feature is fully exploited, thereby improving the ability to recognize detailed carvings and decorations on cultural relic fragments. BRIEF DESCRIPTION OF THE DRAWINGS

[0090] Figure 1 is a flow chart of the method of the present invention;

[0091] Figure 2 The two-dimensional image data set of the Qin Terracotta Warriors fragments used in the present invention;

[0092] Figure 3 The three-dimensional point cloud data set of the Qin Terracotta Warriors fragments used in the present invention;

[0093] Figure 4 It is a structural diagram of the algorithm in the present invention;

[0094] Figure 5 This is a result diagram of feature extraction of real cultural relics scene in the present invention;

[0095] Figure 6 It is a two-dimensional edge feature extraction result diagram in the present invention;

[0096] Figure 7 This is the result diagram of three-dimensional edge feature extraction in the present invention. DETAILED DESCRIPTION

[0097] The specific contents of the present invention are further explained in detail below in conjunction with embodiments.

[0098] A dual-module enhanced adaptive descriptor edge extraction method comprises the following steps:

[0099] Step 1: After cleaning and numbering the cultural relic fragments, scan them to obtain the two-dimensional image and three-dimensional model of the cultural relic fragments, and perform label association annotation to construct the original data set;

[0100] In step 1, the direction, height and distance of the light source are adjusted to determine the best light source angle, reduce reflection, and obtain a two-dimensional image of the cultural relic fragment; and a three-dimensional model of the cultural relic fragment is obtained by performing three-dimensional scanning using the laboratory's EVA scanner.

[0101] Step 2, processing the original data set, wherein the two-dimensional image data enhancement based on geometric transformation is realized by multi-angle image screenshots; the three-dimensional model is converted into a point cloud format and mapped by 3D scanning analysis software to map out the corresponding two-dimensional image; the enhanced two-dimensional image and the corresponding two-dimensional image mapped out by the three-dimensional model together constitute the fragmented two-dimensional image data set;

[0102] The step 2 converts the three-dimensional model into a point cloud format and maps it using 3D scanning analysis software, specifically:

[0103] Step 2.1, using Geomagic Studio software, flip and rotate the 3D model at different angles and then take plane screenshots to obtain 2D images corresponding to different angles of the 3D model;

[0104] Step 2.2, traverse each three-dimensional coordinate (x, y, z), use the minimum and maximum values ​​of the point cloud to normalize x and y to the image pixel range (a, b), if the image pixel range (a, b) is within the valid pixel range of the image, then normalize the z value to the brightness value, update the corresponding pixel position to ensure that the highest brightness value is stored, and map the corresponding two-dimensional image; if the image pixel range (a, b) exceeds the valid pixel range of the image, then discard the point.

[0105] Step 3: Based on the fragmented two-dimensional image dataset obtained in step 2, a dual-module enhanced adaptive descriptor GLSoble for extracting features is constructed, specifically:

[0106] Step 3.1, extract global edge features through frequency domain transformation enhancement method;

[0107] Step 3.2, extract local edge features through adaptive field method;

[0108] Step 3.3, the feature fusion of global edge features and local edge features is performed through a dynamic weight fusion strategy to obtain a dual-module enhanced adaptive descriptor;

[0109] In step 3.1, global edge feature extraction is performed by frequency domain transformation enhancement method, specifically:

[0110] Step 3.11, input the processed fragmented two-dimensional image data set obtained in step 2, calculate the Fourier transform, convert the image from the spatial domain to the frequency domain; perform transformation displacement, move the zero-frequency component to the frequency harmonic center, and after the shift, the center of the spectrum is low-frequency information and the edge is high-frequency information. The calculation process is as follows:

[0111] F(u,v)=∫∫f(x,y)e -2πi(ux+vy) dxdy

[0112]

[0113] Among them, x is the horizontal coordinate of the image, y is the vertical coordinate of the image; u is the horizontal frequency in the frequency domain, which represents the frequency component in the x direction; v is the vertical frequency in the frequency domain, which represents the frequency component in the y direction; i is an imaginary unit; f(x, y) represents the pixel value of the image at the coordinate (x, y); F(u, v) represents the frequency domain image, that is, the complex value of the frequency component;

[0114] Step 3.12, according to the change displacement F obtained in step 3.11 shift (u, v), calculate the amplitude spectrum to obtain the image frequency information, and perform logarithmic transformation to enhance the contrast;

[0115]

[0116] M(u,v)=log(1+S(u,v))

[0117] Among them, Re is the real part of the Fourier transform result, and Im is the imaginary part of the Fourier transform result;

[0118] Step 3.13, applying a Gaussian low-pass filter to the logarithmically transformed amplitude spectrum M(u, v) obtained in step 3.12 to smooth the image to reduce high-frequency noise;

[0119]

[0120] F filtered =M(u,v)·G(c,d)

[0121] Among them, σ is the standard deviation of the control filter width; c is the horizontal distance from the center of the frequency domain to the current frequency u; d is the vertical distance from the center of the frequency domain to the current frequency v; G is the value of the Gaussian filter;

[0122] Step 3.14: The amplitude spectrum F obtained in step 3.13 after passing through the Gaussian filter filtered Perform an inverse Fourier transform to convert the frequency domain image back to the spatial domain;

[0123]

[0124] Step 3.15, for the f obtained in step 3.14 back (x, y) uses the Sobel operator to extract global edge features and output the global edge feature F global ;

[0125]

[0126]

[0127]

[0128] F global =normalize(S)

[0129] Among them, S x , S y are the edge detection results of the image in the x and y directions, S x The matrix contained in is the convolution kernel used to detect horizontal edges, S y The matrix contained in is the convolution kernel used to detect vertical edges; * represents the convolution operation, and normalize represents the normalization operation.

[0130] In step 3.2, local edge feature extraction is performed by using an adaptive domain method, specifically:

[0131] Step 3.21, input the processed fragmented 2D image dataset obtained in step 2, set the sliding window size and step size, traverse the image through the sliding window, and apply Gaussian blur in each sliding window;

[0132]

[0133] in, is a Gaussian blur operation, W is the image block in the current sliding window, σ is the sliding window step size; the sliding window step size is half of the sliding window size, and a double loop is used to traverse each area of ​​the image, the outer loop traverses the height of the image, and the inner loop traverses the width of the image. In each loop, a window of a specified size is extracted;

[0134] Step 3.22, after Gaussian blurring, the W obtained in step 3.21 blurred , use the Sobel operator to extract local edge features and perform threshold processing to filter out insignificant edges and retain important edge features;

[0135] Local edge feature E local The calculation process of extraction is as follows:

[0136]

[0137]

[0138]

[0139] The calculation process of threshold processing is as follows:

[0140] E local (E local <threshold)=0

[0141] Among them, threshold is the threshold value, which is located in the transition zone between low grayscale value and high grayscale value;

[0142] Step 3.23, the edge features in the window are combined with the local edge features E local Compare, retain the maximum value, and output as the local edge feature F local :

[0143] L(y,x)=max(L(y,x),E local )

[0144] F local =normalize(L)

[0145] Among them, L(y, x) represents the local maximum matrix, which indicates the edge strength of each window. The edge information of multiple local windows can be combined to capture the global edge features. local is the normalized local edge feature F local .

[0146] The specific process of step 3.3 is as follows:

[0147] Step 3.31, calculate the global feature dynamic weight W global and local feature dynamic weight W local , the calculation process is as follows:

[0148]

[0149]

[0150] Where ∈ is a small constant used to prevent the denominator from being zero;

[0151] Step 3.32, normalize the global feature dynamic weight and the local feature dynamic weight obtained in step 3.31, and the calculation process is as follows;

[0152]

[0153] Step 3.33, according to the normalized weight W obtained in step 3.32 normTo perform feature fusion of global edge features and local edge features, we obtain the dual-module enhanced adaptive descriptor F fused :

[0154] F fused =W norm ·F global +(1-W norm )·F local .

[0155] Step 4, according to the dual-module enhanced adaptive descriptor obtained in step 3, the edge extraction results of the two-dimensional image of the cultural relic fragment and the three-dimensional model of the cultural relic fragment are obtained respectively, and the edge extraction based on the dual-module enhanced adaptive descriptor is completed.

[0156] A dual-module enhanced adaptive descriptor edge extraction system, comprising:

[0157] Original data set acquisition module: After cleaning and numbering the cultural relic fragments, scan them to obtain the two-dimensional image and three-dimensional model of the cultural relic fragments, and perform label association annotation to construct the original data set;

[0158] Original data set processing module: Process the original data set, wherein the two-dimensional image data enhancement based on geometric transformation is realized through multi-angle image screenshots; the three-dimensional model is converted into a point cloud format and mapped through 3D scanning analysis software to map out the corresponding two-dimensional image; the enhanced two-dimensional image and the three-dimensional model map out the corresponding two-dimensional image to form a fragmented two-dimensional image data set;

[0159] Dual-module enhanced adaptive descriptor construction module: Based on the obtained fragmented two-dimensional image dataset, a dual-module enhanced adaptive descriptor GLSoble for extracting features is constructed, specifically:

[0160] Global edge feature extraction is performed through frequency domain transformation enhancement method;

[0161] Local edge feature extraction through adaptive domain method;

[0162] The dynamic weight fusion strategy is used to fuse the global edge features and local edge features, and a dual-module enhanced adaptive descriptor is obtained.

[0163] Edge extraction module: According to the dual-module enhanced adaptive descriptor, the edge extraction results of the two-dimensional image of the cultural relic fragment and the three-dimensional model of the cultural relic fragment are obtained respectively, and the edge extraction based on the dual-module enhanced adaptive descriptor is completed.

[0164] An edge extraction device of a dual-module enhanced adaptive descriptor, comprising:

[0165] Memory: a computer program storing a method for edge extraction of a dual-module enhanced adaptive descriptor, which is a computer-readable device;

[0166] Processor: used to implement an edge extraction method of a dual-module enhanced adaptive descriptor when executing the computer program.

[0167] A computer-readable storage medium stores a computer program, which can implement an edge extraction method of a dual-module enhanced adaptive descriptor when executed by a processor.

[0168] Example

[0169] Reference Figure 1 , an edge extraction method of a dual-module enhanced adaptive descriptor, comprising the following steps:

[0170] Step 1: After cleaning and numbering the unearthed Qin Shi Huang Terracotta Warriors and Horses fragments, scan them to obtain fragment images and partial models. During the shooting process, the direction, height and distance of the light source are adjusted to determine the best light source angle, reduce reflection, and construct the original data set of the Qin Terracotta Warriors and Horses samples;

[0171] The process of constructing the original data set of the Qin Terracotta Warriors sample in step 1 specifically includes: fragment cleaning, manual classification and numbering, light source adjustment, three-dimensional scanning using the laboratory's EVA scanner, label association and annotation, etc.

[0172] like Figure 2 and Figure 3 As shown, step 2 is to process the two-dimensional and three-dimensional data in effective formats, including: implementing geometric transformation-based fragment image data enhancement through multi-angle image capture, and converting the model into a point cloud format and mapping it through 3D scanning analysis software;

[0173] The data enhancement of the fragment image based on geometric transformation in step 2, converting the model into point cloud format and mapping it include: ① Using Geomagic Studio software, flip and rotate the fragment 3D model at different angles and then take a plane screenshot to obtain the 2D images corresponding to different angles in the 3D model of the Qin Terracotta Warriors fragments; ② traverse each 3D coordinate (x, y, z), and use the minimum and maximum values ​​of the point cloud to normalize x and y to the image pixel range (a, b). Check whether (a, b) is within the valid range:

[0174] If it is within the valid range, the processing is: keep. If the (a, b) coordinate value after checking is within the valid pixel range of the image, then the brightness value (z value) of the corresponding three-dimensional point can be mapped to the image position corresponding to (a, b), and the brightness value of the pixel is updated to ensure that only the maximum brightness value is retained at the same pixel position. That is, the corresponding pixel position is updated to ensure that the highest brightness value is stored, and the corresponding two-dimensional image is mapped.

[0175] Processing that is not within the valid range: discard. If the (a, b) coordinates exceed the valid range of the image, that is, (a, b) is not between the width and height of the image (usually (0, 0) to (W-1, H-1), where W and H are the width and height of the image respectively), then discard the point and skip it directly without any mapping.

[0176] like Figure 4 As shown, step 3, constructing a multimodal descriptor GLSoble (Global-local sobel descriptor) for extracting edge features of the Qin Terracotta Warriors, which includes: extracting global features through a frequency domain transformation enhancement method; extracting local features through an adaptive domain method; and fusing features through a dynamic weight fusion strategy to obtain the final result;

[0177] The process of extracting global features by frequency domain transformation enhancement method in step 3 includes: ① inputting Qin Terracotta Warriors data; ② calculating Fourier transform to convert the image from spatial domain to frequency domain; performing transformation displacement to move the zero frequency component to the frequency harmonic center, and after the shift, the center of the spectrum is low-frequency information and the edge is high-frequency information, so that the visualization of the frequency domain is more intuitive; ③ calculating the amplitude spectrum to obtain the image frequency information, and performing logarithmic transformation to enhance the contrast; ④ applying a Gaussian low-pass filter to smooth the image to reduce high-frequency noise; ⑤ performing inverse Fourier transform to convert the frequency domain image back to the spatial domain; ⑥ using the Sobel operator to extract global features; ⑦ outputting global edge features.

[0178] The calculation process of Fourier transform and displacement is as follows:

[0179] F(u,v)=∫∫f(x,y)e -2πi(ux+vy) dxdy

[0180]

[0181] Where x is the horizontal coordinate (column) of the image, y is the vertical coordinate (row) of the image; u is the horizontal frequency in the frequency domain, which represents the frequency component in the x direction; v is the vertical frequency in the frequency domain, which represents the frequency component in the y direction; i is an imaginary unit; f(x, y) represents the pixel value of the image at the coordinate (x, y); F(u, v) represents the frequency domain image, that is, the complex value of the frequency component.

[0182] The calculation process of amplitude spectrum and enhancement contrast is as follows:

[0183]

[0184] M(u,v)=log(1+S(u,v))

[0185] Where Re is the real part of the Fourier transform result, and Im is the imaginary part of the Fourier transform result.

[0186] The calculation process of applying a Gaussian low-pass filter is as follows:

[0187]

[0188] F filtered =M(u,v)·G(c,d)

[0189] Where σ is the standard deviation of the control filter width, and the larger its value, the stronger the filtering effect; c is the horizontal distance from the center of the frequency domain to the current frequency u; d is the vertical distance from the center of the frequency domain to the current frequency v; G is the value of the Gaussian filter.

[0190] The calculation process of inverse Fourier transform is as follows:

[0191]

[0192] Among them, x and y are coordinates in the spatial domain; X and Y are the sizes or scales of the time domain signal F(x, y) in the x-direction and y-direction, respectively, and usually represent the spatial size of the image or signal.

[0193] After adding the normalization coefficient 1 / XY, the Fourier transform and inverse Fourier transform are symmetrical, that is, the signal size before and after the transformation is equal.

[0194] The calculation process of global edge features is as follows:

[0195]

[0196]

[0197]

[0198] F global=normalize(S)

[0199] Where S x , S y are the edge detection results of the image in the x and y directions, S x The matrix contained in is the convolution kernel used to detect horizontal edges, S y The matrix contained in is the convolution kernel used to detect vertical edges; * represents the convolution operation, and normalize represents the normalization operation.

[0200] The process of extracting local features by the adaptive domain method in step 3 includes: ① inputting the Qin Terracotta Warriors data; ② setting the domain, i.e., the sliding window size and step size, and performing Gaussian blur within the window; ③ using the Sobel operator to extract local features; ④ performing threshold processing to filter out insignificant edges and retain important edge features; ⑤ retaining the local maximum value: comparing the edge in the window with the previous local edge and retaining the maximum value; ⑥ outputting the local edge feature.

[0201] The processing process of Gaussian blur in the sliding window is as follows:

[0202]

[0203] in is the Gaussian blur operation, W is the image block in the current sliding window, and σ is the sliding window step size.

[0204] The calculation process of local feature extraction is as follows:

[0205]

[0206]

[0207]

[0208] The calculation process of threshold processing is as follows:

[0209] E local (E local <threshold)=0

[0210] Threshold is a threshold value, which is set according to the characteristics of the data set. For example, after multiple rounds of testing, threshold is set to 30 in this experiment, which can basically determine that it is in the transition zone between low grayscale values ​​and high grayscale values; it can preserve most of the important texture details of the Qin Terracotta Warriors fragments while avoiding the loss or omission of edge information or misjudgment of noise.

[0211] The local maximum retention and normalization process is as follows:

[0212] L(y,x)=max(L(y,x),E local )

[0213] F local =normalize(L)

[0214] The specific process corresponding to the adaptive domain is as follows: ① setting the window size and step length, with the step length being half the window size, to ensure a certain overlap between windows and enhance the continuity and integrity of edge information; ② sliding the window to traverse the image

[0215] Use a double loop to traverse each area of ​​the image, the outer loop traverses the height of the image, and the inner loop traverses the width. In each iteration, a window of a specified size is extracted. In this way, the entire image is divided into multiple overlapping small blocks, each of which will be processed independently to extract local features; ③ Apply Gaussian blur in each window to reduce noise in the image; ④ For each blurred window, use the Sobel operator for edge detection; ⑤ Set a window threshold, and set the edge strength below this value to zero to retain significant edge information.

[0216] The process of feature fusion through the dynamic weight fusion strategy in step 3 includes: ① dynamic weight calculation, including the weights of global features and local features; ② weight normalization, calculating the comprehensive weight to represent the proportion of global features in the final fusion, reflecting the relative importance of global and local features; ③ feature fusion.

[0217] The calculation process of dynamic weight is as follows:

[0218]

[0219]

[0220]

[0221] where ∈ is a small constant used to prevent the denominator from being zero.

[0222] The calculation process of fusion features is as follows:

[0223] F fused =W norm ·F global +(1-W norm )·F local

[0224] like Figure 6 and Figure 7As shown, step 4 obtains the edge extraction results for the two-dimensional and three-dimensional data respectively, and completes the edge extraction task of the Qin Terracotta Warriors fragments based on the dual-module enhanced adaptive descriptor. It can be seen from the figure that the Qin Terracotta Warriors fragments restored by the method of the present invention have high overall image quality and analysis accuracy, and have strong recognition capabilities for the detailed carvings and decorations of the Qin Terracotta Warriors, thereby improving the accuracy of the reconstruction of cultural relics fragments.

[0225] like Figure 5 As shown, the edge of an actual scene in a network picture is extracted and displayed, and the overall edge and details of the image are restored by the method of the present invention, which proves the applicability of the method of the present invention.

[0226] In summary, the present invention constructs a laboratory cultural relic fragment data set based on the Terracotta Warriors and Horses of Qin Shi Huang, providing a training basis for subsequent edge extraction experiments; and designs a global feature extraction module based on frequency domain transformation enhancement, a local feature extraction module based on adaptive fields, and an edge feature fusion module based on a dynamic weight fusion strategy; by applying an adaptive Gaussian low-pass filter, the standard deviation is dynamically adjusted according to image features, and the image is smoothed more accurately and important low-frequency information is retained. This improvement enables global feature extraction to capture image information more comprehensively, improves overall image quality and analysis accuracy; through the adaptive threshold strategy, the Sobel operator is applied at different scales, and tiny edge changes are effectively detected in damaged and blurred areas, ensuring that each local feature is fully mined, thereby improving the recognition ability of the detailed carvings and decorations of the Terracotta Warriors; the global and local edge features are integrated, and the maximum edge value at each pixel position is retained to form a more comprehensive feature description. Effectively integrate information of different scales and directions, improve the accuracy of cultural relic fragment reconstruction, and ensure the recognition and preservation of important features in archaeological analysis.

[0227] The present invention proposes a dual-module enhanced adaptive descriptor for edge extraction of cultural relic fragments, which is superior to traditional edge extraction operators in data sets containing objects with special materials, textures, fracture surfaces, etc., and provides technical support for edge extraction of Qin Terracotta Warriors cultural relic fragments, and plays a strong role in promoting the digital protection of cultural heritage.

[0228] The above is a detailed introduction to the operation flow of a three-dimensional model edge extraction method of a cross-dimensional global local descriptor provided by the present invention. In this application, a dataset of Qin Terracotta Warriors and Horses constructed by the Qin Shi Huang Terracotta Warriors in the laboratory is used to demonstrate the technology of the present invention. The description of the above embodiments is only used to help understand the core idea of ​​the present invention, and the method can be extended to image edge extraction public datasets.

Claims

1. A dual-module enhanced adaptive descriptor edge extraction method, characterized in that: The following steps are involved: Step 1: After cleaning and numbering the cultural relic fragments, scan them to obtain the two-dimensional image and three-dimensional model of the cultural relic fragments, and perform label association annotation to construct the original data set; Step 2, processing the original data set, wherein the two-dimensional image data enhancement based on geometric transformation is realized by multi-angle image screenshots; the three-dimensional model is converted into a point cloud format and mapped by 3D scanning analysis software to map out the corresponding two-dimensional image; the enhanced two-dimensional image and the corresponding two-dimensional image mapped out by the three-dimensional model together constitute the fragmented two-dimensional image data set; Step 3: Based on the fragmented two-dimensional image dataset obtained in step 2, a dual-module enhanced adaptive descriptor GLSoble for extracting features is constructed, specifically: Step 3.1, extract global edge features through frequency domain transformation enhancement method; Step 3.2, extract local edge features through adaptive field method; Step 3.3, the global edge features and local edge features are fused through a dynamic weight fusion strategy to obtain a dual-module enhanced adaptive descriptor; Step 4, according to the dual-module enhanced adaptive descriptor obtained in step 3, the edge extraction results of the two-dimensional image of the cultural relic fragment and the three-dimensional model of the cultural relic fragment are obtained respectively, and the edge extraction based on the dual-module enhanced adaptive descriptor is completed.

2. The edge extraction method of the dual-module enhanced adaptive descriptor according to claim 1 is characterized in that: In step 1, the direction, height and distance of the light source are adjusted to determine the best light source angle, reduce reflection, and obtain a two-dimensional image of the cultural relic fragment; and a three-dimensional model of the cultural relic fragment is obtained by performing three-dimensional scanning using the laboratory's EVA scanner.

3. The edge extraction method of the dual-module enhanced adaptive descriptor according to claim 1, characterized in that: The step 2 converts the three-dimensional model into a point cloud format and maps it using 3D scanning analysis software, specifically: Step 2.1, using Geomagic Studio software, flip and rotate the 3D model at different angles and then take plane screenshots to obtain 2D images corresponding to different angles of the 3D model; Step 2.2, traverse each three-dimensional coordinate (x, y, z), use the minimum and maximum values ​​of the point cloud to normalize x and y to the image pixel range (a, b), if the image pixel range (a, b) is within the valid pixel range of the image, then normalize the z value to the brightness value, update the corresponding pixel position to ensure that the highest brightness value is stored, and map the corresponding two-dimensional image; if the image pixel range (a, b) exceeds the valid pixel range of the image, then discard the point.

4. The edge extraction method of the dual-module enhanced adaptive descriptor according to claim 1, characterized in that: In step 3.1, global edge feature extraction is performed by frequency domain transformation enhancement method, specifically: Step 3.11, input the processed fragmented two-dimensional image data set obtained in step 2, calculate the Fourier transform, convert the image from the spatial domain to the frequency domain; perform transformation displacement, move the zero-frequency component to the frequency harmonic center, and after the shift, the center of the spectrum is low-frequency information and the edge is high-frequency information. The calculation process is as follows: F(u,v)=∫∫f(x,y)e -2πi(ux+vy) dxdy Among them, x is the horizontal coordinate of the image, y is the vertical coordinate of the image; u is the horizontal frequency in the frequency domain, which represents the frequency component in the x direction; v is the vertical frequency in the frequency domain, which represents the frequency component in the y direction; i is an imaginary unit; f(x,y) represents the pixel value of the image at the coordinate (x,y); F(u,v) represents the frequency domain image, that is, the complex value of the frequency component; Step 3.12, according to the change displacement F obtained in step 3.11 shift (u,v), calculate the amplitude spectrum to obtain the image frequency information, and perform logarithmic transformation to enhance the contrast; M(u,v)=log(1+S(u,v)) Among them, Re is the real part of the Fourier transform result, and Im is the imaginary part of the Fourier transform result; Step 3.13, applying a Gaussian low-pass filter to the logarithmically transformed amplitude spectrum M(u,v) obtained in step 3.12 to smooth the image to reduce high-frequency noise; F filtered =M(u,v)·G(c,d) Among them, σ is the standard deviation of the control filter width; c is the horizontal distance from the center of the frequency domain to the current frequency u; d is the vertical distance from the center of the frequency domain to the current frequency v; G is the value of the Gaussian filter; Step 3.14: The amplitude spectrum F obtained in step 3.13 after passing through the Gaussian filter filtered Perform an inverse Fourier transform to convert the frequency domain image back to the spatial domain; Step 3.15, for the f obtained in step 3.14 back (x, y) uses the Sobel operator to extract global edge features and output the global edge feature F global ; F global =normalize(S) Among them, S x , S y are the edge detection results of the image in the x and y directions, S x The matrix contained in is the convolution kernel used to detect horizontal edges, S y The matrix contained in is the convolution kernel used to detect vertical edges; * represents the convolution operation, and normalize represents the normalization operation.

5. The edge extraction method of the dual-module enhanced adaptive descriptor according to claim 1, characterized in that: In step 3.2, local edge feature extraction is performed by using an adaptive domain method, specifically: Step 3.21, input the processed fragmented 2D image dataset obtained in step 2, set the sliding window size and step size, traverse the image through the sliding window, and apply Gaussian blur in each sliding window; in, is the Gaussian blur operation, W is the image block in the current sliding window, and σ is the sliding window step size; Step 3.22, after Gaussian blurring, w obtained in step 3.21 blurred , use the Sobel operator to extract local edge features and perform threshold processing to filter out insignificant edges and retain important edge features; Local edge feature E local The calculation process of extraction is as follows: The calculation process of threshold processing is as follows: AND lical (AND local <threshold)=0 Among them, threshold is the threshold value, which is located in the transition zone between low grayscale value and high grayscale value; Step 3.23, the edge features in the window are combined with the local edge features E local Compare, retain the maximum value, and output as the local edge feature F local : L(y,x)=max(L(y,x),E local ) F local =normalize(L) Among them, L(y,x) represents the local maximum matrix, which indicates the edge strength of each window. The edge information of multiple local windows can be combined to capture the global edge features. local is the normalized local edge feature F local .

6. The edge extraction method of the dual-module enhanced adaptive descriptor according to claim 1, characterized in that: The specific process of step 3.3 is as follows: Step 3.31, calculate the global feature dynamic weight W global and local feature dynamic weight W local , the calculation process is as follows: Where ∈ is a small constant used to prevent the denominator from being zero; Step 3.32, normalize the global feature dynamic weight and the local feature dynamic weight obtained in step 3.31, and the calculation process is as follows; Step 3.33, according to the normalized weight W obtained in step 3.32 norm To perform feature fusion of global edge features and local edge features, we obtain the dual-module enhanced adaptive descriptor F fused : F fused =W norm ·F global +(1-W norm )·F local 。 7. The edge extraction method of the dual-module enhanced adaptive descriptor according to claim 5, characterized in that: The step length of the sliding window is half of the sliding window size. A double loop is used to traverse each area of ​​the image. The outer loop traverses the height of the image and the inner loop traverses the width of the image. In each loop, a window of a specified size is extracted.

8. A dual-module enhanced adaptive descriptor edge extraction system, characterized in that: include: Original data set acquisition module: After cleaning and numbering the cultural relic fragments, scan them to obtain the two-dimensional image and three-dimensional model of the cultural relic fragments, and perform label association annotation to construct the original data set; Original data set processing module: Process the original data set, wherein the two-dimensional image data enhancement based on geometric transformation is realized through multi-angle image screenshots; the three-dimensional model is converted into a point cloud format and mapped through 3D scanning analysis software to map out the corresponding two-dimensional image; the enhanced two-dimensional image and the three-dimensional model map out the corresponding two-dimensional image to form a fragmented two-dimensional image data set; Dual-module enhanced adaptive descriptor construction module: Based on the obtained fragmented two-dimensional image dataset, a dual-module enhanced adaptive descriptor GLSoble for extracting features is constructed, specifically: Global edge feature extraction is performed through frequency domain transformation enhancement method; Local edge feature extraction through adaptive domain method; The dynamic weight fusion strategy is used to fuse the global edge features and local edge features, and a dual-module enhanced adaptive descriptor is obtained. Edge extraction module: According to the dual-module enhanced adaptive descriptor, the edge extraction results of the two-dimensional image of the cultural relic fragment and the three-dimensional model of the cultural relic fragment are obtained respectively, and the edge extraction based on the dual-module enhanced adaptive descriptor is completed.

9. A dual-module enhanced adaptive descriptor edge extraction device, characterized in that: include: Memory: a computer program storing the edge extraction method of a dual-module enhanced adaptive descriptor according to any one of claims 1 to 7, which is a computer-readable device; Processor: used to implement the edge extraction method of a dual-module enhanced adaptive descriptor as described in any one of claims 1-7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it can implement the edge extraction method of a dual-module enhanced adaptive descriptor as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for detecting defects of toughened glass insulator

    CN103149215A

  • High-precision contact lens edge defect detection method and system based on machine vision

    CN117269179A

  • Multi-scale center surrounding suppression infrared photovoltaic hot spot detection method

    CN118552798A

  • Remote sensing image semantic segmentation method based on semantic adaptive edge enhancement network

    CN118781596A

  • Efficient pixel point filling method and system based on adaptive boundary detection technology

    CN119068007A