Cultural relic crack monitoring system and method based on image processing
By combining multispectral imaging and deep learning technologies with environmental calibration, Retinex edge enhancement, and improved Canny contour extraction, we have achieved full-process digital monitoring of cracks in cultural relics, solving the problem of high false detection rate in crack monitoring and improving the accuracy and real-time performance of monitoring.
Patent Information
- Application Number
- CN202511054208.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-11-07
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies have a high false detection rate in monitoring cracks in cultural relics, making it difficult to distinguish between the texture of the cultural relic itself and the actual cracks. Furthermore, they are not compatible with different materials and changes in lighting conditions, and traditional image algorithms cannot achieve high-frequency monitoring.
Image data is acquired using a multispectral imaging device, and reflectivity normalization and specular reflection suppression are performed using an environmental calibration module. The multi-scale Retinex algorithm is used to enhance edge contrast, and the improved Canny edge detection algorithm is used to extract candidate crack contours. Texture analysis is performed using a lightweight convolutional neural network, and crack morphology change parameters are calculated using a temporal evolution analysis module to generate a monitoring report.
It enables digital and objective monitoring of cracks in cultural relics, improving the accuracy, real-time nature, and traceability of monitoring, and meeting the needs of non-contact, low-loss, and high-precision monitoring for cultural relic protection.
Smart Images

Figure CN120912559A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to a cultural relic crack monitoring system and method based on image processing. BACKGROUND
[0002] Current cultural relic crack monitoring mainly relies on manual visual inspection or contact sensors (such as strain gauges). Some technologies use basic image processing (such as threshold segmentation) for crack identification, but are mostly aimed at concrete structures and do not consider the interference of complex textures on cultural relics surfaces (such as painted patterns, rust, and weathering marks). Existing non-contact solutions (such as laser scanning) are costly and difficult to implement high-frequency monitoring.
[0003] With the advancement of computer vision technology, crack detection methods based on deep learning have gradually been applied. Multispectral imaging, high-resolution digital photography, and three-dimensional reconstruction technology have begun to be integrated to improve the identification accuracy of small cracks. The industry tends to develop intelligent and automated real-time monitoring systems.
[0004] However, traditional image algorithms cannot distinguish between cultural relic textures and real cracks, and are difficult to adapt to different materials and changes in lighting conditions, resulting in high false detection rates. SUMMARY
[0005] To overcome the shortcomings of the prior art, the present application aims to provide a cultural relic crack monitoring system and method based on image processing, which solves the problem of high false detection rate of traditional image algorithms for cultural relic crack monitoring in the prior art.
[0006] To achieve the above-mentioned purpose, the present application provides the following solutions:
[0007] A cultural relic crack monitoring system based on image processing, comprising:
[0008] An image acquisition module for acquiring digital image data of the surface of a cultural relic to be tested by a multispectral imaging device;
[0009] An environment calibration module connected to the image acquisition module for performing reflectivity normalization and specular reflection suppression on the digital image data according to a material spectral response model of the cultural relic to be tested and the real-time measured environmental light intensity and spectral distribution, to obtain calibrated image data;
[0010] An image processing module connected to the environment calibration module for pre-processing the calibrated image data and using a multi-scale Retinex algorithm to enhance the edge contrast of the crack area, to obtain enhanced image data;
[0011] A contour recognition module connected to the image processing module for extracting candidate crack contours using an improved Canny edge detection algorithm, to obtain crack contour data;
[0012] a crack identification module, connected with the contour identification module, configured to perform texture analysis on the crack contour data by using a lightweight convolutional neural network to obtain crack data and texture data;
[0013] a time evolution analysis module, connected with the crack identification module, configured to perform spatial registration and time series comparison on the crack data at different time points and calculate crack morphology change parameters to obtain crack evolution data;
[0014] an output module, connected with the time evolution analysis module, configured to generate a monitoring report according to the crack evolution data and the texture data.
[0015] Preferably, the monitoring report comprises:
[0016] crack length, average width, maximum opening and expansion rate.
[0017] Preferably, the image acquisition module comprises:
[0018] a positioning and focusing submodule, configured to fix the multispectral imaging device on an optical axis substantially perpendicular to the surface of the artifact to be measured, and complete automatic focusing within a preset working distance range;
[0019] a waveband selection submodule, configured to determine a plurality of center wavelengths according to the material of the artifact to be measured;
[0020] an exposure control submodule, configured to set exposure time and gain under each target center wavelength;
[0021] a reference acquisition submodule, configured to acquire a dark field image and a standard white plate image under each target center wavelength, respectively;
[0022] a data packaging submodule, configured to combine the measured images, the dark field images and the white plate images corresponding to each target center wavelength into a multispectral data cube in time sequence, and output the multispectral data cube as digital image data.
[0023] Preferably, the environmental calibration module comprises:
[0024] an ambient light measurement submodule, configured to acquire ambient light intensity and spectral distribution data in real time by a micro spectrometer coaxially arranged with the multispectral imaging device;
[0025] a material spectral model calling submodule, configured to call a corresponding material spectral response model according to the material identification of the artifact to be measured;
[0026] a normalization coefficient calculation submodule, configured to calculate a reflectivity normalization coefficient matrix by waveband based on the ambient light intensity and spectral distribution data and the material spectral response model.
[0027] a reflectance normalization execution submodule for pixel-by-pixel and band-by-band applying the reflectance normalization coefficient matrix to the digital image data to obtain reflectance image data;
[0028] a specular reflection suppression submodule for performing highlight region detection on the reflectance image data and adopting bilateral filtering and re-interpolation processing to suppress the specular reflection component and output calibrated image data;
[0029] The expression of the material spectral response model is:
[0030]
[0031] wherein, is the normalized reflectance of the material at wavelength is the real refractive index of the material at wavelength is the extinction coefficient of the material at wavelength is the average thickness of the surface layer weathering or oxidation film of the cultural relic; is the root mean square slope of the micro-roughness of the surface of the cultural relic. Preferably, the image processing module comprises: a noise suppression submodule for performing wavelet soft threshold denoising on the calibrated image data to obtain low-noise image data;
[0032] a distortion correction submodule for performing radial and perspective distortion correction on the low-noise image data by using pre-stored camera internal and external parameters to obtain geometrically corrected image data;
[0033] a multi-scale Retinex processing submodule for calculating the logarithmic reflectance of the geometrically corrected image data at at least three Gaussian scales respectively and fusing according to a pre-set weight to obtain preliminary Retinex image data;
[0034] a dynamic range compression submodule for performing gamma compensation and linear mapping on the preliminary Retinex image data to obtain final Retinex image data;
[0035] a local contrast enhancement submodule for obtaining enhanced image data based on adaptive histogram and final Retinex image data.
[0036] Preferably, the contour identification module comprises:
[0037]
[0038]
[0039] a multi-directional gradient calculation submodule, configured to calculate gradients in horizontal, vertical and two diagonal directions respectively by using a fifth-order difference operator on the enhanced image data, to obtain gradient amplitude data and gradient direction data;
[0040] a double-scale noise estimation submodule, configured to estimate local noise variance of the gradient amplitude data under three-by-three and seven-by-seven window scales, to obtain a noise weight map;
[0041] an adaptive threshold generation submodule, configured to generate a corresponding pair of high and low thresholds by linear weighting according to the gradient amplitude data and the noise weight map;
[0042] a non-maximum suppression submodule, configured to perform non-maximum suppression on the gradient amplitude data according to the gradient direction data, to obtain a refined edge image;
[0043] a connected component tracking submodule, configured to perform double-threshold hysteresis connection on the refined edge image according to the pair of high and low thresholds, and to generate a candidate crack connected component by using eight-neighborhood tracking;
[0044] a morphology refinement submodule, configured to perform skeletonization and single-pixel thinning on the candidate crack connected component, to obtain crack contour data.
[0045] Preferably, the crack identification module comprises:
[0046] a crack candidate region cropping submodule, configured to extract a minimum bounding rectangle in the enhanced image data according to the crack contour data, and to generate a crack candidate image block;
[0047] a feature normalization submodule, configured to perform zero-mean unit-variance normalization on the crack candidate image block, and to align by waveband, to obtain a normalized image block;
[0048] a convolutional neural network inference submodule, configured to input the normalized image block into a pre-trained MobileNetV3-Small network to obtain a pixel-level crack probability map;
[0049] a crack binarization submodule, configured to segment the crack probability map by using a fixed threshold, to obtain a crack binary image;
[0050] a geometric parameter calculation submodule, configured to extract a connected component in the crack binary image, and to calculate crack length, average width and maximum opening, to obtain crack data;
[0051] a texture feature statistics submodule, configured to calculate gray level co-occurrence matrix energy, entropy and contrast in crack regions and non-crack regions respectively for the crack candidate image block, to obtain texture data;
[0052] an expression of the crack data is:
[0053] ;
[0054] The expression of the texture data is:
[0055] ;
[0056] Wherein, is the total length of the fracture skeleton; is the average value of the square of the fracture width sampled along the skeleton at equal intervals; is the Shannon entropy of the fracture pixel direction distribution; is the energy of the gray level co-occurrence matrix; is the contrast of the gray level co-occurrence matrix; is the entropy of the gray level co-occurrence matrix.
[0057] Preferably, the time evolution analysis module comprises:
[0058] a time series arrangement submodule for unifying the resolution and coordinate system of the fracture data according to the observation time to obtain a time series of fractures;
[0059] a spatial registration submodule for calculating a similarity transformation based on the matching of feature points of the fracture skeletons at adjacent observation times and completing the geometric registration of the time series of fractures to obtain registration data;
[0060] a time series difference submodule for performing a difference operation on the registration data under a unified reference system to generate a fracture change mask;
[0061] a morphological parameter extraction submodule for calculating the length increment, average width increment, and opening angle change rate according to the fracture change mask to obtain fracture evolution data.
[0062] Preferably, the output module comprises:
[0063] a data compilation submodule for receiving the fracture evolution data and texture data and unifying the time label and unit format to generate a monitoring raw data table;
[0064] an index calculation submodule for calculating the maximum fracture growth rate, texture complexity average, and risk comprehensive index in the monitoring raw data table to obtain an evaluation index set;
[0065] a visualization generation submodule for drawing a fracture length-time curve, texture complexity heat map, and risk level column chart according to the evaluation index set to obtain a chart file;
[0066] a report layout submodule for filling the chart file and evaluation index set into a chapter structure according to a preset document template to generate an editable monitoring report draft;
[0067] A format export sub-module is configured to convert the monitoring report draft into both PDF and HTML formats and store them in a designated directory, and output a monitoring report completion identifier.
[0068] A cultural relic crack monitoring method based on image processing, comprising:
[0069] Obtain digital image data of a surface of a cultural relic to be measured by a multispectral imaging device;
[0070] According to a material spectral response model of the cultural relic to be measured and a real-time measured environmental light intensity and spectral distribution, perform reflectivity normalization and specular reflection suppression on the digital image data to obtain calibrated image data;
[0071] Preprocess the calibrated image data and enhance edge contrast of a crack region by using a multi-scale Retinex algorithm to obtain enhanced image data;
[0072] Extract a candidate crack contour by using an improved Canny edge detection algorithm to obtain crack contour data;
[0073] Perform texture analysis on the crack contour data by using a lightweight convolutional neural network to obtain crack data and texture data;
[0074] Perform spatial registration and time sequence comparison on the crack data at different moments and calculate a crack morphology change parameter to obtain crack evolution data;
[0075] Generate a monitoring report according to the crack evolution data and the texture data.
[0076] The present application discloses the following technical effects:
[0077] The application provides a cultural relic crack monitoring system and method based on image processing, and the system comprises an image acquisition module, which is used for acquiring digital image data of a surface of a cultural relic to be measured through a multispectral imaging device; an environment calibration module, which is connected with the image acquisition module and is used for performing reflectivity normalization and specular reflection suppression on the digital image data according to a material spectral response model of the cultural relic to be measured and real-time measured environmental illumination intensity and spectral distribution, so as to obtain calibrated image data; an image processing module, which is connected with the environment calibration module and is used for pre-processing the calibrated image data and enhancing edge contrast of a crack region by using a multiscale Retinex algorithm, so as to obtain enhanced image data; a contour identification module, which is connected with the image processing module and is used for extracting a candidate crack contour by using an improved Canny edge detection algorithm, so as to obtain crack contour data; a crack identification module, which is connected with the contour identification module and is used for performing texture analysis on the crack contour data by using a lightweight convolutional neural network, so as to obtain crack data and texture data; a time sequence evolution analysis module, which is connected with the crack identification module and is used for performing spatial registration and time sequence comparison on the crack data at different moments and calculating crack morphology change parameters, so as to obtain crack evolution data; and an output module, which is connected with the time sequence evolution analysis module and is used for generating a monitoring report according to the crack evolution data and the texture data. The application realizes digital and objective monitoring of the whole process from the appearance to the evolution of cultural relic cracks by sequentially introducing material-environment joint calibration, Retinex edge enhancement, improved Canny contour extraction, lightweight convolutional network identification and time sequence registration difference and other continuous processing links after multispectral acquisition. The environment calibration module eliminates reflectivity deviation caused by illumination and material differences, so as to ensure consistency of subsequent operations. The multiscale Retinex significantly improves crack edge contrast, so as to provide clear input for algorithm-level detection. The improved Canny is combined with the lightweight CNN, so as to improve crack detection accuracy and control operation amount, so as to adapt to on-site device computing power. The time sequence evolution analysis outputs crack geometric increment in the same reference system, so as to realize quantization of crack expansion rate. The output module automatically summarizes crack data and texture data to generate a report, so as to replace previous manual inspection and manual measurement which depend on experience, are low in efficiency and are subjective. Overall, the application significantly improves accuracy, real-time performance and traceability of cultural relic crack monitoring, so as to meet urgent needs of cultural relic protection for non-contact, low-loss and high-precision monitoring. BRIEF DESCRIPTION OF DRAWINGS
[0078] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed in the embodiments. Obviously, the drawings described in the following only constitute some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative labor.
[0079] Figure 1 A structure schematic diagram of a cultural relic crack monitoring system based on image processing provided by an embodiment of the present application is provided.
[0080] Figure 2 A flow chart of a cultural relic crack monitoring method based on image processing provided by an embodiment of the present application is provided.
[0081] Explanation of reference signs:
[0082] 1-image acquisition module, 2-environment calibration module, 3-image processing module, 4-contour identification module, 5-crack identification module, 6-time evolution analysis module, 7-output module. DETAILED DESCRIPTION
[0083] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0084] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0085] As shown in the drawings, Figure 1 The present application provides a cultural relic crack monitoring system based on image processing, comprising:
[0086] An image acquisition module 1 is used to acquire digital image data of a surface of a cultural relic to be measured by a multi-spectral imaging device;
[0087] An environment calibration module 2 is connected with the image acquisition module and is used to perform reflectivity normalization and specular reflection suppression on the digital image data according to a material spectral response model of the cultural relic to be measured and a real-time measured environmental illumination intensity and spectral distribution, so as to obtain calibrated image data;
[0088] An image processing module 3 is connected with the environment calibration module and is used to pre-process the calibrated image data and enhance the edge contrast of a crack area by using a multi-scale Retinex algorithm, so as to obtain enhanced image data;
[0089] A contour identification module 4 is connected with the image processing module and is used to extract a candidate crack contour by using an improved Canny edge detection algorithm, so as to obtain crack contour data;
[0090] The crack identification module 5 is connected with the contour identification module, and is configured to perform texture analysis on the crack contour data by using a lightweight convolutional neural network to obtain crack data and texture data.
[0091] The time sequence evolution analysis module 6 is connected with the crack identification module, and is configured to perform spatial registration and time sequence comparison on the crack data at different time points and calculate crack morphology change parameters to obtain crack evolution data.
[0092] The output module 7 is connected with the time sequence evolution analysis module, and is configured to generate a monitoring report according to the crack evolution data and the texture data.
[0093] Specifically, the working process of the relic crack monitoring system based on image processing is as follows:
[0094] Firstly, the image acquisition module 1 acquires original digital image data of the surface of the relic by using a multi-spectral imaging device. Then, the environment calibration module 2 performs reflectivity normalization and specular reflection suppression on the original data according to a spectral response model of the relic material and the real-time measured illumination intensity and spectral distribution, and outputs calibrated images. The image processing module 3 performs noise reduction, distortion correction, and crack edge contrast enhancement on the calibrated images by using a multi-scale Retinex algorithm to obtain enhanced images. The contour identification module 4 extracts candidate crack contours from the enhanced images by using an improved Canny algorithm to generate crack contour data. Then, the crack identification module 5 inputs the contour data into a lightweight convolutional neural network to perform texture analysis and output quantitative crack features and texture features. The time sequence evolution analysis module 6 performs spatial registration and comparison on the crack data obtained at different time points, calculates crack morphology change parameters, and forms crack evolution data. Finally, the output module 7 automatically generates a complete monitoring report including a crack growth curve and risk assessment by combining the crack evolution data and the texture data, thereby realizing continuous, quantitative, and visualized monitoring of the cracks of the relic.
[0095] Further, the monitoring report includes:
[0096] Crack length, average width, maximum opening, and expansion rate.
[0097] Further, the image acquisition module 1 includes:
[0098] A positioning and focusing submodule is configured to fix the multi-spectral imaging device on an optical axis that is substantially perpendicular to the surface of the relic to be measured, and to complete automatic focusing within a preset working distance range.
[0099] Specifically, the multi-spectral imaging device includes:
[0100] Multi-plate achromatic lens, dichroic prism, imaging sensor (area array CMOS), motorized focus ring, stepper motor, small laser ranging module, MEMS tilt sensor, rigid mounting bracket, image acquisition board and MCU control board;
[0101] The rigid mounting bracket is fixed in front of the cultural relic as a whole machine reference, ensuring that the initial included angle between the optical axis of the device and the normal line of the surface of the cultural relic is ≤2°. The multi-plate achromatic lens is mounted at the front end of the bracket; the dichroic prism and the imaging sensor are sequentially arranged behind the multi-plate achromatic lens, and are coaxial to form a continuous light path. The motorized focus ring is sleeved on the outer cylinder of the lens, and is directly coupled and driven by the stepper motor to realize fine adjustment of the focal length. The small laser ranging module is coaxially or nearly coaxially mounted with the lens to measure the real-time distance from the principal point in front of the lens to the surface of the cultural relic. The MEMS tilt sensor is fixed to the bracket to detect and assist in correcting the pitch and roll angles of the bracket relative to the horizontal plane. The distance data output by the laser ranging is sent to the MCU; the MCU generates the target pulse number of the stepper motor according to the focal length-distance lookup table algorithm to adjust the motorized focus ring in a closed loop, thereby realizing automatic focusing within the preset working distance. The MEMS tilt data is also sent to the MCU to prompt the installer to adjust the bracket or to compensate for the influence of slight tilt on ranging in the software. The LVDS data of the imaging sensor is connected to the image acquisition board through a flexible flat cable; the acquisition board outputs the multi-band image stream to the upper computer through USB3.0 / GigE. The MCU is responsible for the synchronous control of the wavelength switching of the dichroic prism and outputs the frame synchronization signal to the image acquisition board to ensure that the frames corresponding to each center wavelength are collected in the predetermined order.
[0102] The wavelength selection sub-module is configured to determine a plurality of center wavelengths according to the material of the cultural relic to be measured.
[0103] Specifically, the plurality of center wavelengths include 450nm, 550nm, 650nm, 750nm and 900nm, which correspond to the blue light region, the green light region, the red light region, the start of the near-infrared region and the high-reflection segment of the near-infrared region, respectively.
[0104] The exposure control sub-module is configured to set the exposure time and the gain under each target center wavelength.
[0105] The reference acquisition sub-module is configured to acquire a dark field image and a standard white board image under each target center wavelength, respectively.
[0106] The data packaging sub-module is configured to combine the measured images, the dark field images and the white board images corresponding to each target center wavelength into a multi-spectral data cube in chronological order, and output the multi-spectral data cube as digital image data.
[0107] Further, the environment calibration module 2 comprises:
[0108] An ambient light measurement submodule is configured to acquire ambient light intensity and spectral distribution data in real time by a micro spectrometer coaxially arranged with the multi-spectral imaging device;
[0109] Specifically, the probe of the micro spectrometer is coaxial with the imaging optical axis through a 1mm aperture pinhole, ensuring that the measured spectrum is consistent with the illumination of the imaging field of view; spectral sampling: waveband 350-1050nm, 1nm interval; fast integration mode is adopted, and the single sampling time is less than or equal to 10ms, avoiding the inconsistency of the scan motion on the illumination sampling.
[0110] A material spectral model calling submodule is configured to call a corresponding material spectral response model according to the material identification of the artifact to be measured;
[0111] Specifically, the material of the artifact to be measured is determined by scanning the RFID tag.
[0112] A normalization coefficient calculation submodule is configured to calculate a reflectance normalization coefficient matrix according to waveband based on the ambient light intensity and spectral distribution data and the material spectral response model;
[0113] Specifically, the calculation process of the reflectance normalization coefficient matrix is as follows:
[0114] The original spectral irradiance data in the warehouse is synchronously collected by the coaxial micro spectrometer, and dark field subtraction and standard white plate normalization processing are sequentially performed to obtain the corrected spectral power density curve of the ambient light;
[0115] The complete system response curve has been measured when the multi-spectral imaging device is factory calibrated, and the curve is stored in the read-only memory of the device and automatically loaded into the host computer cache after starting;
[0116] According to the material identification of the artifact to be measured, a corresponding material spectral reflectance model is called from the local database;
[0117] For each center wavelength (e.g. four hundred and fifty nanometers, five hundred and fifty nanometers, etc.), the arithmetic mean values of the ambient spectral curve, the system response curve, and the material spectral reflectance model in the range of plus or minus five nanometers of the center value are calculated, and the obtained results are sequentially referred to as the ambient spectral average value, the system response average value, and the material reflectance average value;
[0118] For each center wavelength, the normalization coefficient of the waveband is obtained by using the method of "material reflectance average value ÷ (ambient spectral average value × system response average value)"; the normalization coefficients of the five wavebands are arranged in order of wavelength and written into the diagonal to form a five-order normalization coefficient matrix;
[0119] The normalization coefficient matrix is written to the graphics card memory in 32-bit floating-point format, with a timestamp and material number appended, so that the subsequent pixel-level reflectivity normalization kernel function can directly call it.
[0120] The reflectance normalization execution submodule is used to apply the reflectance normalization coefficient matrix to the digital image data pixel by pixel and band by band to obtain reflectance image data.
[0121] The specular reflection suppression submodule is used to perform highlight region detection on the reflectivity image data and apply bilateral filtering and reinterpolation to suppress specular reflection components and output calibration image data.
[0122] The expression for the material's spectral response model is:
[0123] ;
[0124] in, For materials at wavelength Normalized reflectance; For materials at wavelength The real refractive index at that point; For materials at wavelength Extinction coefficient at; The average thickness of the weathered or oxidized film on the surface of the cultural relic; denoted as the root mean square slope of the surface roughness of the cultural relic.
[0125] Furthermore, the image processing module 3 includes:
[0126] The noise suppression submodule is used to perform wavelet soft thresholding noise reduction on the calibration image data to obtain low-noise image data.
[0127] Specifically, the noise reduction process of the noise suppression submodule includes:
[0128] Wavelet domain decomposition: For each calibration image, a three-level discrete wavelet orthogonal decomposition is used to divide the image into one approximate component and three detail components.
[0129] Adaptive soft threshold: The threshold value is not a fixed constant, but is determined by the median global brightness of the image and the real-time illuminance output by the ambient light measurement submodule.
[0130] Soft threshold shrinkage: Soft threshold shrinkage is performed independently on each channel for detail components, preserving coefficient continuity and reducing boundary ringing.
[0131] Reconstruction: The three-layer coefficients are restored to low-noise image data through inverse wavelet transform.
[0132] a distortion correction sub-module, configured to perform radial and perspective distortion correction on the low-noise image data by using pre-stored camera internal and external parameters to obtain geometrically corrected image data;
[0133] Specifically, the working process of the distortion correction sub-module is as follows:
[0134] Parameter calling: the radial distortion coefficient, the tangential distortion coefficient and the three-dimensional external parameter are uniformly encoded and stored in the read-only memory when the device is manufactured; and the parameters are read in sequence after power-on.
[0135] Reverse mapping: the ideal position of the corrected pixel in the sensor coordinate system is calculated first, and then the pixel value is backfilled through bicubic interpolation to ensure that the distortion correction and the resolution are consistent.
[0136] Temperature drift compensation: the distortion coefficient is multiplied by a compensation factor proportional to the current sensor temperature before correction, which is used to offset the optical axis drift caused by slight thermal expansion and contraction. If the compensation is missing, sub-pixel level misalignment will occur during high-precision splicing.
[0137] A multi-scale Retinex processing sub-module is configured to calculate the logarithmic reflectance of the geometrically corrected image data under at least three Gaussian scales and fuse the logarithmic reflectance according to a preset weight to obtain preliminary Retinex image data.
[0138] Specifically, the working process of the multi-scale Retinex processing sub-module is as follows:
[0139] Gaussian scale setting: three Gaussian kernels of small, medium and large are selected, and the standard deviations of the three Gaussian kernels are set to one percent, three percent and six percent of the diagonal length of the image, respectively.
[0140] Logarithmic mapping: the logarithmic values of the ratio of the image to the blurred background are calculated at the three scales, respectively, to enhance the weak texture.
[0141] Weight fusion: the weights of the three scales are no longer fixed, but are dynamically adjusted according to the local edge density; the small-scale weight is increased in the edge-rich area, and the large-scale weight is increased in the texture-flat area, so as to balance the details and the global balance.
[0142] Output: the fusion result is the preliminary Retinex image data. The dynamic weight is the innovation point of the embodiment, which can strengthen the crack details without introducing halos.
[0143] A dynamic range compression sub-module is configured to perform gamma compensation and linear mapping on the preliminary Retinex image data to obtain final Retinex image data.
[0144] Specifically, the working process of the dynamic range compression sub-module is as follows:
[0145] Gamma compensation: adaptively set gamma index based on global average luminance of image;
[0146] Linear mapping: using piecewise linear stretch to map the gamma corrected pixel value to the range of zero to one floating point, while reserving five percent of the uplink space for the local contrast enhancement stage ladder promotion;
[0147] Color preservation: after independent compression of each band, a color gamut correction is performed according to the device white balance matrix to ensure that the cross-band brightness relationship is not destroyed.
[0148] Local contrast enhancement sub-module, for obtaining enhanced image data based on adaptive histogram and final Retinex image data.
[0149] Specifically, the image after dynamic range compression is subjected to limited contrast histogram equalization, and the local window size is automatically scaled to about five percent of the short side length of the image resolution. The limiting factor is automatically calculated according to the uplink space reserved in the dynamic range compression stage. Before equalization output, the gradient amplitude of the pixels in the window is weighted to ensure that the crack edge will not be overexposed due to histogram stretching.
[0150] Obtain enhanced image data, and generate contrast enhancement record at the same time.
[0151] Further, the contour identification module 4 comprises:
[0152] Multi-directional gradient calculation sub-module, for calculating the gradients in horizontal, vertical and two diagonal directions of the enhanced image data using a fifth-order difference operator, to obtain gradient amplitude data and gradient direction data;
[0153] Specifically, the fifth-order difference method is used to derive in four main directions: five consecutive pixel gray values are subtracted and weighted in the horizontal direction, and five-point oblique neighborhoods are used in the vertical and two forty-five-degree diagonal directions.
[0154] The difference results are squared and summed, and then squared to obtain the gradient amplitude, and are quantized to eight discrete directions in the inverse tangent manner.
[0155] The fifth-order template can cross small-scale noise particles while maintaining response to crack edges, improving the completeness of subsequent connected domains.
[0156] Dual-scale noise estimation sub-module, for local noise variance estimation of the gradient amplitude data under three-by-three and seven-by-seven window scales, to obtain a noise weight map;
[0157] Specifically, the variance of the gradient amplitude is calculated in a three-by-three sliding window and recorded as a fine-scale noise map. Meanwhile, this operation is repeated in a seven-by-seven window to obtain a coarse-scale noise map.
[0158] The two noise maps are taken maximum value by pixel to form a noise weight map, which suppresses isolated noise peaks and avoids misjudgment of wide slit edges as noise.
[0159] The adaptive threshold generation submodule is configured to generate a corresponding high threshold and low threshold pair by linear weighting of the gradient amplitude data and the noise weight map;
[0160] Specifically, a threshold reference map is obtained by linear ratio mapping of the gradient amplitude at the same position as the denominator and the noise weight map as the numerator; the pixel value at 85% of the reference map is set as the high threshold, and the pixel value at 30% of the reference map is set as the low threshold, to realize automatic drift with the scene.
[0161] The non-maximum suppression submodule is configured to perform non-maximum suppression on the gradient amplitude data according to the gradient direction data to obtain a refined edge image;
[0162] Specifically, one-dimensional interpolation comparison is performed on the gradient amplitude according to the eight directions previously discretized, and only the local maximum pixel is retained, and the rest is set to zero; after suppression, the edge line is thinned to one to two pixels wide, to reduce false connection interference for double-threshold connection.
[0163] The connected component tracking submodule is configured to perform double-threshold hysteresis connection on the refined edge image according to the high threshold and low threshold pair, and generate a candidate crack connected component by eight-neighborhood tracking;
[0164] Specifically, the high threshold pixel is taken as the growth seed, and the low threshold pixel is diffused in an eight-neighborhood manner to form a candidate crack connected component; if the length of the connected component is less than fifteen pixels or the area is too small, the connected component is directly removed to avoid mistaking random textures as cracks.
[0165] The morphological thinning submodule is configured to perform skeletonization and single-pixel thinning processing on the candidate crack connected component to obtain crack contour data.
[0166] Specifically, first, the connected component is subjected to three morphological opening operations to remove small neoplastic branches, and then subjected to a closing operation to fill single-pixel holes, to ensure that the skeletonization input is connected; subsequently, iterative skeletonization is performed in an alternating overlapping manner row by row and column by column, until all connected components are shrunk to a single-pixel width and the topological relationship remains unchanged; finally, single-pixel endpoint pruning is performed to remove isolated branches with a length of less than five pixels, and the crack contour data is output.
[0167] Further, the crack identification module 5 comprises:
[0168] The crack candidate region pruning submodule is configured to extract a minimum bounding rectangle from the enhanced image data according to the crack contour data and generate a crack candidate image block.
[0169] The feature normalization submodule is configured to perform zero-mean unit-variance normalization on the crack candidate image block and align the normalized image block by waveband.
[0170] The convolutional neural network inference submodule is configured to input the normalized image block into a pre-trained MobileNetV3-Small network to obtain a pixel-level crack probability map.
[0171] Specifically, first, the system reorganizes the multispectral normalized image block into a three-channel tensor in the order of red, green, and near-infrared center wavebands with the highest signal-to-noise ratio, and stores the tensor continuously in the GPU memory in a row-major manner to ensure data access continuity. Subsequently, the system calls a convolutional neural network "Mobile Network Third Edition-Small" that has been pre-trained offline and whose parameters are frozen. The network is composed of six depthwise separable convolution modules, two levels of feature pyramid fusion layers, and a fully convolutional upsampling branch: the first four convolution modules are responsible for extracting multi-scale spatial textures, the fifth module expands the number of channels to two hundred and fifty-six to enhance expression, and the sixth module maintains the spatial resolution through convolution with a stride of one. At the end of the network, the feature pyramid upsamples and adds different scale features level by level to obtain a fused feature map with the same size as the input; then, a single-channel one-by-one convolution is used to generate a raw crack score map, and an element-wise logistic function is used to map the score to between zero and one to form a pixel-level crack probability map. The entire inference process is performed on the GPU with sixteen-bit floating-point precision, and the processing delay of a single block is less than twenty milliseconds; the network weights are frozen in the pre-training phase using the batch normalization momentum accumulation method, so different batches of image blocks share the same statistical parameters during inference, ensuring that the probability output is comparable across different acquisition batches.
[0172] The crack binarization submodule is configured to segment the crack probability map using a fixed threshold to obtain a crack binary image.
[0173] The geometric parameter calculation submodule is configured to extract connected domains in the crack binary image and calculate the crack length, average width, and maximum opening to obtain crack data.
[0174] The texture feature statistics submodule is configured to calculate the gray level co-occurrence matrix energy, entropy, and contrast of the crack candidate image block in the crack region and the non-crack region, respectively, to obtain texture data.
[0175] The expression of the crack data is:
[0176] ;
[0177] The expression of the texture data is:
[0178] ;
[0179] wherein, is the total length of the crack skeleton; is the average of the square of the crack width sampled equidistantly along the skeleton; is the Shannon entropy of the crack pixel directional distribution; is the energy of the gray level co-occurrence matrix; is the contrast of the gray level co-occurrence matrix; is the entropy of the gray level co-occurrence matrix.
[0180] Further, the time series evolution analysis module 6 comprises:
[0181] a time series arrangement sub-module, configured to unify the resolution and coordinate system of the crack data according to the observation time, to obtain a time series crack sequence;
[0182] a spatial registration sub-module, configured to calculate a similarity transformation based on the matching of feature points of the crack skeletons at adjacent observation times, and complete geometric registration of the time series crack sequence, to obtain registration data;
[0183] Specifically, the curvature of each crack skeleton is calculated point by point after refinement, and the extreme points of the curvature and the end points of the skeleton are regarded as candidate feature points; then, non-maximum suppression is performed according to the principle that the distance between adjacent extreme values is not less than ten pixels, and finally, not less than five and not more than twenty feature points are reserved for each skeleton;
[0184] nearest neighbor search with double constraints of Euclidean distance and angle is adopted to establish one-to-one candidate point pairs between adjacent observation times; if the same feature point has a second nearest neighbor in distance or angle, and the difference between the second nearest neighbor and the nearest neighbor is less than 20%, it is regarded as an ambiguous pairing and directly excluded;
[0185] based on a random consistency sampling algorithm, three pairs of candidate points are randomly selected for similarity transformation estimation, and the number of consistent points is counted; after two hundred cycles, the transformation with the highest number of consistent points is taken as the initial value, and the inconsistent point pairs are removed;
[0186] on the basis of the initial value, an iterative nearest point algorithm is used to minimize the registration error of all reserved point pairs until the error reduction amplitude is less than 1%; the process simultaneously outputs three parameters of translation, rotation angle and uniform scaling coefficient;
[0187] the final similarity transformation parameters are applied to the current time crack contour map and texture auxiliary map, a bicubic interpolation is adopted to generate a registration image with the same size as the previous time, and the coordinate field in the crack data is updated synchronously.
[0188] the mean square error of all feature points after registration is calculated; if the error is greater than 0.5 pixels, it is automatically rolled back to the last effective parameter and an alarm is prompted for manual review; otherwise, the registration image is written into the registration data file together with the transformation parameters, error index and time stamp.
[0189] a time-difference sub-module configured to perform a difference operation on the registration data in a unified reference system to generate a crack change mask;
[0190] a morphology parameter extraction sub-module configured to calculate a length increment, an average width increment, and an opening angle change rate according to the crack change mask to obtain crack evolution data.
[0191] Specifically, in the crack change mask, the connected domain is marked with an eight-neighborhood, and the false change area with an area less than ten pixels or a longest axis shorter than three pixels is removed to ensure that only the real crack evolution area is retained.
[0192] The current time skeleton is projected to the reference skeleton coordinate system, and if new skeleton pixels appear outside the projected coordinates, the length of the actual distance between the pixels is added as the length increment;
[0193] The width field is obtained by using the Euclidean distance transformation at the reference time and the current time, the width difference of the changed skeleton pixels at the two times is taken, and the average width increment is obtained by averaging the width difference in the entire crack range;
[0194] The opening angle is formed by connecting the two ends of the skeleton with the crack center as the vertex; the opening angle change rate is obtained by comparing the difference between the reference time and the current time and dividing by the time interval;
[0195] The length increment, average width increment, opening angle change rate, and corresponding time stamp are integrated into crack evolution data; and the change mask hash check value is recorded.
[0196] Further, the output module 7 includes:
[0197] a data assembly sub-module configured to receive the crack evolution data and texture data and unify the time label and unit format to generate a monitoring raw data table;
[0198] an index calculation sub-module configured to calculate the maximum crack growth rate, the average texture complexity, and the risk comprehensive index in the monitoring raw data table to obtain an evaluation index set;
[0199] a visualization generation sub-module configured to draw a crack length-time curve, a texture complexity heat map, and a risk level column chart according to the evaluation index set to obtain a chart file;
[0200] a report layout sub-module configured to fill the chart file and the evaluation index set into a chapter structure according to a preset document template to generate an editable monitoring report draft;
[0201] a format export sub-module configured to convert the monitoring report draft into two formats of PDF and HTML and store them in a specified directory, and output a monitoring report completion identifier.
[0202] Specifically, the data assembly submodule first unifies the crack evolution data and texture data with millisecond-level timestamps, converts them to standardized units such as millimeters, and writes them into a two-dimensional raw data table. Next, the indicator calculation submodule calculates three core indicators: the maximum crack growth rate, the average texture complexity, and a weighted risk composite index. The growth rate highlights sudden increases in crack length, while texture complexity reflects material weathering. These two indicators are weighted at a 7:3 ratio based on expert experience to synthesize a risk value. Subsequently, the visualization generation submodule generates three SVG charts based on the indicators: a crack length-time line graph (supporting large sample thinning), a texture complexity heatmap (blue-red gradient with numerical values), and a risk level bar chart (green, orange, and red color grading). All charts have unique fingerprints to avoid version confusion. Finally, the report layout submodule embeds the charts and indicators into a seven-chapter template to generate an editable draft. The format export submodule then outputs two types of files: a text-embedded two-layer PDF and an offline HTML file, writing them to a specified directory. Upon successful generation of both files, a "Monitoring Report Completed" indicator is returned; if it fails, the report is rolled back and logged.
[0203] like Figure 2 As shown, this embodiment also discloses a method for monitoring cracks in cultural relics based on image processing, including:
[0204] Step 100: Acquire digital image data of the surface of the artifact under test using a multispectral imaging device;
[0205] Step 200: Based on the material spectral response model of the artifact to be tested and the real-time measured ambient light intensity and spectral distribution, reflectivity normalization and specular reflection suppression are performed on the digital image data to obtain calibrated image data.
[0206] Step 300: Preprocess the calibration image data and use the multi-scale Retinex algorithm to enhance the edge contrast of the crack region to obtain enhanced image data;
[0207] Step 400: Extract candidate crack contours using the improved Canny edge detection algorithm to obtain crack contour data;
[0208] Step 500: Use a lightweight convolutional neural network to perform texture analysis on the crack contour data to obtain crack data and texture data;
[0209] Step 600: Spatial registration and temporal comparison of the crack data at different times are performed, and crack morphology change parameters are calculated to obtain crack evolution data;
[0210] Step 700: Generate a monitoring report based on the crack evolution data and texture data.
[0211] The various embodiments described in this specification are presented for the purpose of illustrating the principles of the present application and its best mode of operation. Each of the embodiments described in this specification has been provided for the purpose of illustration and is not intended to limit the application.
[0212] The principles and implementations of the present application have been described in the specification with reference to specific examples. The above description of the embodiments is only intended to help understand the method of the present application and its core idea. Meanwhile, for those skilled in the art, the specific implementation and application scope of the present application can be changed according to the idea of the present application. In summary, the content of the specification should not be understood as a limitation of the present application.
Claims
1. An image processing-based cultural relic crack monitoring system, characterized in that, The application relates to a kind of monitoring system and method of cultural relics crack, which can realize the real-time monitoring of cultural relics crack. The system comprises: An image acquisition module for acquiring digital image data of the surface of the cultural relics to be measured by a multispectral imaging device; An environment calibration module connected to the image acquisition module for performing reflectivity normalization and specular reflection suppression on the digital image data according to the material spectral response model of the cultural relics to be measured and the real-time measured ambient light intensity and spectral distribution, to obtain calibrated image data; An image processing module connected to the environment calibration module for pre-processing the calibrated image data and enhancing the edge contrast of the crack area by using a multiscale Retinex algorithm, to obtain enhanced image data; A contour recognition module connected to the image processing module for extracting candidate crack contours by using an improved Canny edge detection algorithm, to obtain crack contour data; A crack recognition module connected to the contour recognition module for performing texture analysis on the crack contour data by using a lightweight convolutional neural network, to obtain crack data and texture data; A time sequence evolution analysis module connected to the crack recognition module for performing spatial registration and time sequence comparison on the crack data at different times and calculating crack morphology change parameters, to obtain crack evolution data; 2. The image processing-based cultural relic crack monitoring system according to claim 1, characterized in that, An output module connected to the time sequence evolution analysis module for generating a monitoring report according to the crack evolution data and texture data. The monitoring report comprises:
3. The image processing based cultural relic crack monitoring system according to claim 1, characterized in that, Crack length, average width, maximum opening and expansion rate. The image acquisition module comprises: A positioning and focusing submodule for fixing the multispectral imaging device on an optical axis substantially perpendicular to the surface of the cultural relics to be measured and completing automatic focusing within a preset working distance range; A waveband selection submodule for determining a plurality of center wavelengths according to the material of the cultural relics to be measured; An exposure control submodule for setting exposure time and gain under each target center wavelength; A reference acquisition submodule for acquiring dark field images and standard whiteboard images under each target center wavelength, respectively; 4. The image processing-based cultural relic crack monitoring system according to claim 1, characterized in that, A data packaging submodule for combining the measured images, dark field images and whiteboard images corresponding to each target center wavelength into a multispectral data cube in time sequence, and outputting the multispectral data cube as digital image data. The environment calibration module comprises: An ambient light measurement submodule for acquiring ambient light intensity and spectral distribution data in real time by a microspectrometer coaxially arranged with the multispectral imaging device; A material spectral model calling submodule for calling a corresponding material spectral response model according to the material identification of the cultural relics to be measured; A normalization coefficient calculation submodule for calculating a reflectivity normalization coefficient matrix by waveband based on the ambient light intensity and spectral distribution data and the material spectral response model; A reflectivity normalization execution submodule for applying the reflectivity normalization coefficient matrix to the digital image data pixel by pixel and waveband by waveband, to obtain reflectivity image data; A specular reflection suppression submodule for performing highlight area detection on the reflectivity image data and using bilateral filtering and re-interpolation processing to suppress the specular reflection component and output calibrated image data; ; wherein, is the normalized reflectance of the material at wavelength ; is the real refractive index of the material at wavelength ; is the extinction coefficient of the material at wavelength ; is the average thickness of the weathering or oxidation film on the surface of the cultural relic; is the root mean square slope of the micro-roughness of the surface of the cultural relic.
5. The image processing based cultural relic crack monitoring system according to claim 1, characterized in that, The expression of the material spectral response model is: The image processing module comprises: The noise suppression submodule is configured to perform wavelet soft threshold denoising on the calibration image data to obtain low-noise image data; The distortion correction submodule is configured to perform radial and perspective distortion correction on the low-noise image data by using pre-stored camera internal and external parameters to obtain geometric correction image data; The multi-scale Retinex processing submodule is configured to calculate the logarithmic reflectance of the geometric correction image data under at least three Gaussian scales respectively and fuse the logarithmic reflectance according to a preset weight to obtain preliminary Retinex image data; The dynamic range compression submodule is configured to perform gamma compensation and linear mapping on the preliminary Retinex image data to obtain final Retinex image data; The local contrast enhancement submodule is configured to obtain enhanced image data based on adaptive histogram and the final Retinex image data.
6. The image processing-based cultural relic crack monitoring system according to claim 1, characterized in that, The contour identification module comprises: The multi-directional gradient calculation submodule is configured to calculate the gradients of the enhanced image data in horizontal, vertical and two diagonal directions respectively by using a fifth-order difference operator to obtain gradient amplitude data and gradient direction data; The double-scale noise estimation submodule is configured to estimate the local noise variance of the gradient amplitude data under three-by-three and seven-by-seven window scales to obtain a noise weight map; The adaptive threshold generation submodule is configured to generate a corresponding pair of high threshold and low threshold according to the gradient amplitude data and the noise weight map; The non-maximum suppression submodule is configured to perform non-maximum suppression on the gradient amplitude data according to the gradient direction data to obtain a refined edge image; The connected domain tracking submodule is configured to perform double-threshold hysteresis connection on the refined edge image according to the pair of high threshold and low threshold, and generate a candidate crack connected domain by using eight-neighborhood tracking; The morphological thinning submodule is configured to perform skeletonization and single-pixel thinning processing on the candidate crack connected domain to obtain crack contour data.
7. The image processing based cultural relic crack monitoring system according to claim 1, characterized in that, The crack identification module comprises: The crack candidate region cropping submodule is configured to extract a minimum bounding rectangle in the enhanced image data according to the crack contour data and generate a crack candidate image block; The feature normalization submodule is configured to perform zero-mean unit-variance normalization on the crack candidate image block and align the normalized image block by waveband; The convolutional neural network inference submodule is configured to input the normalized image block into a pre-trained MobileNetV3-Small network to obtain a pixel-level crack probability map; The crack binarization submodule is configured to perform fixed threshold segmentation on the crack probability map to obtain a crack binary image; The geometric parameter calculation submodule is configured to extract a connected domain in the crack binary image and calculate a crack length, an average width and a maximum opening to obtain crack data; The texture feature statistics submodule is configured to calculate a gray level co-occurrence matrix energy, an entropy and a contrast in a crack region and a non-crack region of the crack candidate image block respectively to obtain texture data; An expression of the crack data is: ; An expression of the texture data is: ; wherein, is the total length of the fracture skeleton; is the average of the square of the fracture width sampled at equal distances along the skeleton; is the Shannon entropy of the fracture pixel directional distribution; is the energy of the gray level co-occurrence matrix; is the contrast of the gray level co-occurrence matrix; is the entropy of the gray level co-occurrence matrix. 8.The image processing-based cultural relic crack monitoring system according to claim 1, characterized in that, The time series evolution analysis module comprises: The time series arrangement submodule is configured to unify the resolution and coordinate system of the crack data according to observation time to obtain a time series crack sequence; The spatial registration sub-module is configured to calculate a similarity transformation based on matching of feature points of crack skeletons at adjacent observation time points and complete geometric registration of the crack sequence at the time sequence to obtain registration data; The time-difference sub-module is configured to perform a difference operation on the registration data in a unified reference system to generate a crack change mask; The morphological parameter extraction sub-module is configured to calculate a length increment, an average width increment, and an opening angle change rate according to the crack change mask to obtain crack evolution data.
9. The image processing-based cultural relic crack monitoring system according to claim 1, characterized in that, The output module includes: The data compilation sub-module is configured to receive the crack evolution data and the texture data, unify time labels and unit formats, and generate a monitoring raw data table; The index calculation sub-module is configured to calculate a maximum crack growth rate, a texture complexity average, and a risk comprehensive index in the monitoring raw data table to obtain an evaluation index set; The visualization generation sub-module is configured to draw a crack length-time curve, a texture complexity heat map, and a risk level column chart according to the evaluation index set to obtain a chart file; The report layout sub-module is configured to fill the chart file and the evaluation index set into a chapter structure according to a preset document template to generate an editable monitoring report draft; The format export sub-module is configured to convert the monitoring report draft into two formats of PDF and HTML, store the monitoring report draft in a specified directory, and output a monitoring report completion identifier.
10. An image processing-based method for monitoring cracks in cultural relics, characterized in that, The method includes: acquiring digital image data of a surface of an artifact to be measured by a multispectral imaging device; performing reflectivity normalization and specular reflection suppression on the digital image data according to a material spectral response model of the artifact to be measured and real-time measured environmental light intensity and spectral distribution to obtain calibrated image data; performing preprocessing on the calibrated image data and enhancing edge contrast of a crack region by using a multi-scale Retinex algorithm to obtain enhanced image data; extracting a candidate crack contour by using an improved Canny edge detection algorithm to obtain crack contour data; performing texture analysis on the crack contour data by using a lightweight convolutional neural network to obtain crack data and texture data; performing spatial registration and time sequence comparison on the crack data at different time points and calculating crack morphological change parameters to obtain crack evolution data; generating a monitoring report according to the crack evolution data and the texture data.
Citation Information
Cited By
Meat product texture evaluation method and system based on digital image processing
CN121190482A
Concrete surface micro-crack identification method and system based on machine vision
CN121682306A
A machine vision-based method and system for identifying microcracks on concrete surfaces
CN121682306B
