Intelligent measurement system and measurement method for marble surface whiteness
By integrating spectral sensors, color sensors, and AI vision, the limitations of marble whiteness measurement range and weak anti-interference ability have been solved, achieving more accurate, stable, and efficient whiteness evaluation that conforms to human visual perception and is suitable for large-scale production testing of marble.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUILIN UNIV OF ELECTRONIC TECH
- Filing Date
- 2026-01-29
- Publication Date
- 2026-04-28
AI Technical Summary
Existing marble whiteness measurement technologies have limitations in measurement range, weak anti-interference ability, and difficulty in online measurement, which cannot meet the needs of overall whiteness characterization, visual perception matching, and large-scale production testing of natural marble.
By integrating spectral sensors, color sensors, and AI vision, and through multi-point sampling, texture recognition, and result correction, combined with an STM32 microcontroller to achieve data processing and calibration, a whiteness calculation and fusion module is constructed to realize multi-point sampling and texture recognition of the whiteness of marble surface, and output whiteness evaluation results that conform to human visual perception.
It improves measurement accuracy and consistency, reduces the interference of natural textures and local anomalies on whiteness, ensures that the results are consistent with human visual perception, has self-calibration and adaptive control, and is suitable for long-term stable operation.
Smart Images

Figure CN121933451A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of building material testing technology, specifically relating to an intelligent measurement system and method for measuring the whiteness of marble surfaces using a microcontroller, color sensor, spectral sensor and AI vision processing platform. Background Technology
[0002] Marble, with its hard texture, warm color, and strong decorative properties, is widely used in high-end building walls, floor paving, furniture finishing, and handicrafts, making it one of the world's most widely used building and decorative stone materials. In the production and application of marble, surface whiteness directly determines the texture and grade of the decorative effect, serving as a core indicator for product grading and pricing—high-whiteness marble products can fetch 2-3 times the market price of ordinary products. Therefore, the accuracy and impartiality of its measurement are crucial to the economic benefits of enterprises and the standardized development of the industry. Currently, domestic and international marble whiteness measurement mainly follows two core standards: GB / T5950-2008 "Methods for Measuring Whiteness of Building Materials and Non-metallic Mineral Products" and GB / T23774-2009 "General Methods for Determining Whiteness of Inorganic Chemical Products." The mainstream measuring equipment is a large-scale laboratory photoelectric whiteness meter and an integrating sphere spectrometer. Among them, the photoelectric whiteness meter, based on the tristimulus principle, calculates whiteness by measuring the reflectance of the sample to the three primary colors of red, green, and blue light. It is easy to operate but relies on contact point measurement. The integrating sphere spectrometer, on the other hand, can cover the entire spectrum and has higher measurement accuracy, but the equipment is bulky and has a complex optical path, requiring professional personnel to operate it in a constant temperature and humidity laboratory environment. However, existing measurement technologies suffer from many insurmountable technical defects in actual marble production and application scenarios, severely restricting the accuracy, stability, and production efficiency of the measurement results.
[0003] Limited measurement range, unable to reflect overall whiteness uniformity: As a natural stone, marble's surface whiteness exhibits natural regional differences due to geological conditions during its formation. Furthermore, marble slabs are often large, such as 1200×2400mm and 1600×3200mm. Traditional photoelectric whiteness meters have a measurement spot diameter of only 3-10mm, and integrating sphere spectrometers have an effective measurement area of no more than 50×50mm. Both are small-area point measurement modes, only able to obtain whiteness data from a single or a few measurement points, failing to cover the entire surface of the slab. This makes it difficult to reflect the overall whiteness distribution and the unevenness caused by texture, often resulting in situations where "measurement points are qualified but the overall quality is unqualified" or "local defects are misjudged as the overall grade."
[0004] Lacking the ability to identify textures and defects, measurement results deviate significantly from visual perception: Natural marble surfaces commonly exhibit natural features or processing defects such as textures, color spots, pinholes, and microcracks. These features significantly interfere with local spectral reflectance. Existing measurement technologies calculate whiteness solely based on spectral reflectance or tristimulus values, failing to distinguish between "normal textures" and "harmful defects," and neglecting the comprehensive perceptual characteristics of human vision regarding overall whiteness. For example, marble with fine, uniform textures does not exhibit reduced visual whiteness, but traditional equipment may misjudge it as low whiteness due to localized reflectance fluctuations; conversely, slabs with localized dark spots may be misjudged as high whiteness by traditional equipment due to avoiding the spots at a single measurement point. This leads to a disconnect between measurement results and actual decorative effects, failing to meet the market's core demand for "visual consistency."
[0005] Poor online adaptability makes it difficult to meet the needs of large-scale production: Traditional measurement equipment has obvious limitations in various scenarios: photoelectric whiteness meters require manual hand-held alignment of the measurement point, which is inefficient, and the pressure and angle differences of manual operation can introduce additional errors; integrating sphere spectrometers weigh 20-50kg, need to be fixedly installed in the laboratory, cannot be moved, and the equipment purchase cost is as high as hundreds of thousands of yuan, with high maintenance costs. Both can only be used for laboratory sampling inspection after production, and the sampling rate is usually only 5%-10%, making it difficult to integrate into continuous production lines to achieve online or semi-online automatic detection. They cannot detect whiteness fluctuations during the production process (such as whiteness deviations caused by changes in polishing process parameters) in a timely manner, which can easily lead to the production of batches of non-conforming products, increasing the company's rework costs and wasting resources.
[0006] The existing measurement standards lack adaptability and specific optimization for marble: Both core standards are general-purpose, applicable to various building materials and inorganic chemical products, but lack specific optimization for the natural texture characteristics and surface polishing of marble. For example, the standards do not clearly define the rules for excluding textured areas or the correction methods for the reflectivity of polished surfaces, leading to a lack of comparability in measurement results from different companies and using different equipment. This results in frequent instances of "different grades for the same material" and "different prices for the same grade" within the industry, affecting fair market competition. In summary, existing marble whiteness measurement technologies suffer from core defects such as narrow measurement range, weak anti-interference ability, low degree of online integration, and insufficient standard adaptability, failing to meet the needs of natural marble for overall whiteness characterization, visual perception matching, and large-scale production testing.
[0007] Therefore, there is an urgent need to develop a measurement system and method that is compact, cost-controllable, easy to operate, and can combine spectral measurement and surface image analysis to achieve more realistic, stable, and efficient characterization and classification of the whiteness of marble surfaces. Summary of the Invention
[0008] To address the problems raised in the background art, the purpose of this invention is to provide an intelligent measurement system and method for the whiteness of marble surfaces, overcoming the shortcomings of existing technologies such as relying mainly on point measurements for whiteness measurement of marble surfaces, being easily affected by texture defects, and being difficult to perform online. By integrating spectral sensors, color sensors, and AI vision, multi-point sampling, texture recognition, and result correction of the whiteness of marble slab surfaces can be achieved, thereby obtaining whiteness evaluation results that are more consistent with human visual perception.
[0009] To achieve the above-mentioned technical objectives, the technical solution adopted by the present invention is as follows:
[0010] An intelligent measurement system for the whiteness of marble surfaces includes a control and communication module, a spectral measurement module, a color measurement module, a visual acquisition and processing module, a whiteness calculation and fusion module, a calibration and storage module, and a human-computer interaction and data interface module.
[0011] The control and communication module is used to coordinate data acquisition and communication between the color measurement module, the spectral measurement module, and the visual acquisition and processing module, preprocess the acquired data, and provide input to the whiteness calculation and fusion module.
[0012] The spectral measurement module includes a spectral sensor, a constant light source, and an optical structure, and is used to collect reflectance spectral data of marble surface within a predetermined wavelength range;
[0013] The color measurement module includes a color sensor, which is used to collect RGB color information of the marble surface and send the calibrated color data to the control and communication module.
[0014] The visual acquisition and processing module is used to acquire images of the marble surface, detect and segment at least one defect among the marble surface texture, color spots, cracks, holes and edge of the slab, and output the set of effective measurement areas, defect area information and comprehensive weight of the areas;
[0015] The whiteness calculation and fusion module is set in the visual acquisition and processing module. It is used to calculate the initial whiteness value based on spectral data and color data, and to remove or reduce the weight of abnormal measurement points by combining the region segmentation results output by the visual acquisition and processing module, so as to obtain the target whiteness value and whiteness level of the marble surface.
[0016] The calibration and storage module includes a standard whiteboard and a calibration algorithm, which are used to automatically calibrate changes in light source intensity and sensor response drift, and store calibration coefficients and measurement results.
[0017] The human-computer interaction and data interface module is used to set measurement parameters, display whiteness results, and interact with the host computer or cloud platform.
[0018] Furthermore, the control and communication module is implemented using an STM32 microcontroller, and the STM32 microcontroller has a built-in multinomial regression model for calibrating and linearizing the RGB color data output by the color measurement module.
[0019] The control and communication module communicates with the color sensor and the spectral sensor via the I²C bus to control the sampling start, integration time and gain switching parameters, and exchanges data with the vision acquisition and processing module via the USART serial port to receive region weight information and defect region marking information.
[0020] Further specified, the spectral measurement module covers a wavelength range of 350nm to 1000nm, distributes light of different wavelengths to multiple preset channels, each channel is equipped with a photodiode, each channel converts light intensity into current signal through the photodiode, and then the STM32 microcontroller's analog-to-digital conversion circuit converts it into reflection intensity values for each band; the constant light source adopts a D65 standard LED light source with stable color temperature.
[0021] Further specifying, the whiteness calculation and fusion module is configured to evaluate the whiteness level of the sample under test based on the mean square error model, specifically including: for each sample under test, obtaining the measured reflection intensity value Xi (i=1,2,…,N) corresponding to each channel in the wavelength range of 350nm to 1000nm, where N is the total number of effective band channels; retrieving the reference reflection intensity value Yi (i=1,2,…,N) of each whiteness level standard sample from the pre-stored standard marble database; calculating the mean square error between the sample under test and each level standard sample: The whiteness level corresponding to the smallest MSE is selected as the output level result.
[0022] Further specifying, the color measurement module selects different color filters by configuring the SCL and SDA programmable pins, counts the number of pulses within a preset timing period, multiplies the result by a white balance calibration factor to obtain the actual frequency measurement value of each color channel, forming the R, G, and B channel frequency values. These values are then calibrated using a polynomial regression model and sent to the control and communication module. The polynomial regression model is used to establish the functional relationship between the measured RGB values and the standard RGB values. For any n sets of measurement data (xi, yi) (i=1,2,…,n) of any sample, the functional relationship is: ;
[0023] Where y is the standard RGB value, These are the coefficients obtained through the least squares estimation principle. To measure the RGB values of the marble sample surface, For the error term, .
[0024] Further specifying, the visual acquisition and processing module uses the K230AI visual module as the processing platform, with a built-in image sensor interface and AI acceleration unit; the visual acquisition and processing module converts the acquired image from RGB color space to CIELAB color space, filters pixels that meet the brightness and chromaticity conditions based on a preset standard whiteness range, and clusters them into multiple connected regions, outputting the region labeling information of the connected regions;
[0025] The visual acquisition and processing module utilizes a deep learning defect recognition network to perform semantic classification on connected regions, denoted as the defect category set denoted as . Then, output the defect category label for each region. and corresponding confidence level Simultaneously, the area weight is calculated for each connected region. and the percentage of defective areas ,in:
[0026]
[0027] For the region area, For categories within the region The defect area;
[0028] The visual acquisition and processing module calculates the defect penalty coefficient based on the defect type, defect area ratio, and confidence level. And based on this, the regional comprehensive weight is obtained. Wherein, the defect penalty coefficient Defect category penalty weight With the The weighted calculation is restricted to [0,1] by a truncation function.
[0029] Further specifying, the whiteness calculation and fusion module performs cross-modal consistency fusion of color whiteness, spectral whiteness, and visual whiteness, satisfying:
[0030] The whiteness of the k-th region:
[0031]
[0032] Target whiteness value:
[0033]
[0034] in, To integrate the weighting coefficients, This represents the number of connected regions. The regional comprehensive weight is as described in claim 6.
[0035] Further specifying, the visual acquisition and processing module constructs a visual whiteness prediction network, which takes the marble surface image as input and outputs a visual whiteness prediction value or a pixel-level visual whiteness map. Its training employs supervised learning with mean squared error as the primary loss function, while introducing a regularization term to suppress overfitting; when the output is a pixel-level visual whiteness map, the regional visual whiteness satisfies the formula ;in, For the region Number of pixels within the cell;
[0036] The whiteness calculation and fusion module uses the brightness proxy of color and spectrum to apply dynamic consistency constraints to the visual screening threshold and visual whiteness output, so as to maintain the stability and consistency of whiteness measurement results under conditions of light source aging, complex texture, shadow or reflection.
[0037] A smart method for measuring the whiteness of marble surfaces includes the following steps:
[0038] S1. The intelligent measurement system measures the standard whiteboard and compensates for changes in light source intensity and sensor response drift based on the calibration algorithm, updating the calibration coefficients.
[0039] S2, the color measurement module and the spectral measurement module perform multi-point sampling to collect RGB data and reflectance spectral data on the surface of the marble to be tested, and the visual acquisition and processing module acquires surface images;
[0040] S3. Convert the image to the CIELAB color space, perform pixel filtering, connected component clustering and defect identification, and output the set of effective measurement areas, defect area information and comprehensive weight of the areas; calculate the color whiteness and spectral whiteness respectively to obtain the visual whiteness, and then remove or reduce the weight of the corresponding measurement points of the defect area according to the comprehensive weight of the areas before fusion, and output the target whiteness value and whiteness level.
[0041] S4. Display the target whiteness value and whiteness level in the human-computer interaction and data interface module, and upload it to the host computer or cloud platform.
[0042] Furthermore, after any measurement cycle ends, the system automatically triggers repeated measurements on the standard whiteboard based on changes in ambient light, stability of measurement results, or preset time intervals, in order to update calibration parameters and compensate for light source aging and sensor drift.
[0043] In S3, the whiteness level is evaluated by the mean square error (MSE) model. The MSE of the sample to be tested and the standard samples of each level in the pre-stored standard marble database are calculated, and the level corresponding to the smallest MSE is selected as the whiteness level output.
[0044] The fusion in S3 satisfies the following formula:
[0045]
[0046]
[0047] And regional comprehensive weight .
[0048] Compared with the prior art, the present invention has the following beneficial effects:
[0049] 1. Measurement accuracy and consistency are significantly improved.
[0050] This invention employs multi-source information fusion using a spectral sensor (350–1000nm), a color sensor, and K230AI vision, and samples are taken under D65 standard light source conditions. By calibrating the color channels using a multinomial regression model and comparing the mean squared error (MSE) with a standard sample library, device differences and nonlinear errors can be effectively suppressed, improving repeatability and batch-to-batch consistency.
[0051] 2. Strong anti-interference capability, results are closer to visual perception.
[0052] This invention converts images to CIELAB space and performs semantic segmentation through a vision module, automatically identifies spots, cracks, holes and edge regions, and removes or downweights defective region data, while weighting and fusing normal texture regions. This algorithmically reduces the interference of natural textures and local anomalies on whiteness, making the evaluation results more consistent with human visual perception.
[0053] 3. Self-calibration and adaptive control ensure long-term stability
[0054] This invention utilizes a built-in standard whiteboard to achieve power-on self-test and periodic calibration, adaptively adjusting key parameters such as light source intensity, integration time, and gain. Combined with dark current correction and whiteboard normalization, it can continuously compensate for light source aging and environmental changes, ensuring controllable zero drift and stable range during long-term operation. Attached Figure Description
[0055] The present invention can be further illustrated by the non-limiting embodiments given in the accompanying drawings;
[0056] Figure 1 This is a flowchart illustrating the operational steps of an embodiment of the intelligent measurement system and method for measuring the whiteness of marble surfaces according to the present invention.
[0057] Figure 2 This is a system module framework diagram of an embodiment of an intelligent measurement system and method for measuring the whiteness of marble surfaces according to the present invention;
[0058] Figure 3This is a perspective view of an embodiment of an intelligent measurement system and method for measuring the whiteness of marble surfaces according to the present invention.
[0059] Figure 4 This is a schematic diagram of the device detection surface in an embodiment of an intelligent measurement system and method for measuring the whiteness of marble surfaces according to the present invention;
[0060] Figure 5 This is a perspective view of a magnetic calibration cover, representing an embodiment of an intelligent measurement system and method for measuring the whiteness of marble surfaces according to the present invention.
[0061] Figure 6 This is a system module framework diagram of an embodiment of an intelligent measurement system and method for measuring the whiteness of marble surfaces according to the present invention;
[0062] Figure 7 This is an AI visual recognition network diagram representing an embodiment of an intelligent measurement system and method for measuring the whiteness of marble surfaces according to the present invention.
[0063] The main component symbols are explained as follows: 1. Screen; 2. Central control protective shell; 3. Optical cavity; 4. Light shield; 5. Magnetic calibration cover; 6. Power interface; 7. One-button detection switch; 8. LED beads; 9. Camera; 10. Color sensor; 11. Spectrum sensor; 12. LED beads; 13. LED beads; 14. LED beads; 15. Standard whiteness board. Detailed Implementation
[0064] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be further described below with reference to the accompanying drawings and embodiments. The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. The technical solutions of various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention. It should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.
[0065] like Figures 1-2 As shown, the present invention provides an intelligent measurement system for the whiteness of marble surfaces, comprising a control and communication module, a spectral measurement module, a color measurement module, a visual acquisition and processing module, a whiteness calculation and fusion module, a calibration and storage module, and a human-computer interaction and data interface module.
[0066] The control and communication module uses an STM32 microcontroller to coordinate data acquisition and communication between the color sensor, spectral sensor and AI vision processing module. It also has a built-in multinomial regression model for data calibration of the color measurement module.
[0067] The spectral measurement module includes a spectral sensor and a matching constant light source and optical structure. The spectral sensor is used to collect the reflectance spectral data of the marble surface within a specified wavelength range. The light source preferably uses a D65 standard LED with stable color temperature to meet the requirements of the whiteness measurement standard for the illumination light source.
[0068] The color measurement module includes a color sensor, which is used to collect RGB color information of the marble surface for rapid estimation of whiteness and cross-validation of spectral measurement results.
[0069] The visual acquisition and processing module uses the K230AI visual module as the visual processing platform. The module has a built-in image sensor interface and AI acceleration unit, which is used to acquire images of the marble surface and to detect and segment defects such as texture, color spots and cracks on the marble surface based on deep learning.
[0070] The whiteness calculation and fusion module is set in the K230AI vision module. It is used to calculate the initial whiteness value based on spectral data and color data, and combine the effective area and defect area identified by the vision module to remove abnormal points from the initial whiteness value to obtain the target whiteness value of the marble surface.
[0071] The calibration and storage module includes a standard whiteboard and a calibration algorithm, which are used to automatically calibrate the light source intensity change and sensor response drift by measuring the whiteness standard board that conforms to national standards during system installation or periodic maintenance, and store the calibration coefficients and measurement results in non-volatile memory.
[0072] The human-computer interaction and data interface module includes buttons, a display screen, and a communication interface, which are used to set measurement parameters, display whiteness results, and interact with the host computer and cloud platform.
[0073] In the practical application of this embodiment, the control and communication module communicates with the color sensor and the spectral sensor through I²C to control their sampling start, integration time, gain switching and other parameters, and then uses USART to exchange data with the K230AI vision module to receive visual analysis of the marble surface area weight information.
[0074] In the practical application of this embodiment, the spectral measurement module covers a wavelength range of 350nm to 1000nm and is configured to distribute light of different wavelengths to corresponding channels. The photodiode in each channel is used to convert the light intensity of the corresponding band into a current signal, and the current signal is converted into the reflection intensity value of each band through the built-in conversion circuit of the STM32. Based on the reflection intensity value of each band, the measurement system uses the mean square difference model to compare the actual measured value with the pre-stored standard value and outputs the corresponding rating result accordingly.
[0075] In the practical application of this embodiment, the mean square model is configured to: for each sample to be tested, obtain the measured reflection intensity values of each channel within the wavelength range of 350nm to 1000nm. Where i = 1, 2, ..., N, and N is the total number of effective band channels; retrieve the reference reflection intensity values of standard marble samples of the corresponding grade from the pre-stored standard marble database. Calculate the mean squared error between the two: The system sequentially calculates the mean squared error (MSE) between the sample to be tested and multiple preset levels, and selects the whiteness level corresponding to the smallest MSE as the level result of the sample.
[0076] In the practical application of this embodiment, the color measurement module configures and controls the two programmable pins SCL and SDA to select different filters, thereby obtaining the frequency values of the corresponding color channels. When the red filter is selected, a timing and counting method is used for measurement: the counting stops when the timing reaches 50ms, the number of frequency pulse signals passing through the red filter within this timing period is read, and the pulse count value is multiplied by the relevant scaling factor obtained through white balance calibration to obtain the actual frequency measurement value of the filter channel. Using the same method, different color filters are selected sequentially to obtain the R, G, and B channel frequency values of the marble sample under test. A multinomial regression model is used for data calibration, and finally the R, G, and B values are sent to the microcontroller for storage.
[0077] In the practical application of this embodiment, the multinomial regression model is a regression analysis method for studying the relationship between independent and dependent variables. Here, the independent variable can be one or more, but the dependent variable is unique. For any sample, the functional relationship of n sets of measurement data (xi, yi) (i=1,2,…,n) is: Where y is the standard RGB value, To obtain the coefficients using the least squares estimation principle, To measure the RGB values of the marble sample surface, This is the error term, typically... .
[0078] In the practical application of this embodiment, the visual acquisition and processing module acquires a frame of image through the camera 9 and converts it into a digital signal for processing by the built-in algorithm;
[0079] Specifically, the module converts the acquired marble images from the default RGB color space to the CIELAB color space, which is suitable for color analysis. Then, based on the preset standard whiteness range, it filters out pixels that meet the whiteness conditions. Next, it clusters spatially adjacent pixels that meet the conditions into connected regions and extracts the geometric and color features of each region. Finally, it marks the identified target regions and outputs the information of the corresponding regions.
[0080] In a preferred embodiment, the visual acquisition and processing module uses the K230AI visual module as the visual processing platform. The K230AI visual module has a built-in image sensor interface and an AI acceleration unit, which is used to acquire images, extract features and identify defects on the marble surface.
[0081] Specifically, the visual acquisition and processing module acquires several frames of images of the marble surface through camera 9. The acquired marble images were then converted into digital signals; subsequently, the default RGB color space was converted to the CIELAB color space, which is suitable for color and whiteness analysis, to obtain the values of each pixel. Three-channel values The conversion from RGB to CIELAB can be completed via RGB→XYZ→CIELAB, and the CIELAB calculation satisfies:
[0082]
[0083]
[0084]
[0085] in For the preset white point (D65), the function For piecewise functions: , .
[0086] Based on this, pixels that meet the brightness and chromaticity conditions are filtered according to a preset standard whiteness range. The filtering conditions can be expressed as follows:
[0087]
[0088] in A preset threshold is set. Subsequently, connected component analysis and clustering algorithms are used to cluster spatially adjacent pixels that meet the conditions into several connected regions. For each connected region The visual acquisition and processing module extracts the geometric and color features of the region and uses a built-in deep learning defect recognition network to perform semantic classification, dividing it into different categories such as normal texture regions, color spot regions, and crack regions. Let the set of defect categories be denoted as . Then, output the defect category label for each region. and corresponding confidence level Simultaneously, the area weight is calculated for each connected region. and the percentage of defective areas ,in:
[0089]
[0090] For the region area, For categories within the region The defect area is calculated. Based on the defect type, area proportion, and confidence level, the defect penalty coefficient is calculated. ,For example ,in Penalty weights for different defect categories (cracks, holes) (Use larger values for larger spots, medium values for blemishes, and smaller values for normal textures).
[0091] This indicates that the result is truncated to [0,1]. and Used for calculating the regional comprehensive weight in the subsequent whiteness fusion process:
[0092] To make the whiteness evaluation results closer to human visual perception, a visual whiteness prediction network was also constructed in the visual acquisition and processing module. This network uses images of marble surfaces. As input, the visual whiteness prediction value For output. Network parameters. Training is performed using supervised learning, and the training sample set is denoted as . ,in For the m-th training image, This corresponds to the standard whiteness value. During training, the mean squared error is used as the main loss function, and a regularization term is introduced to suppress overfitting. The loss function can be expressed as:
[0093]
[0094] in, The regularization coefficient is . This is a regularization term for the network weights. After training, the optimal parameters are... The image is embedded into the K230AI vision module and used to output the visual whiteness value of the region during actual measurement. This provides visual feature basis for whiteness fusion. Preferably, when the network outputs a pixel-level visual whiteness map... At that time, the visual whiteness of a region can be obtained by aggregating regions: in For the region Number of pixels within the cell.
[0095] The color measurement module and the spectral measurement module output calibrated RGB data and reflectance spectral data, respectively; the visual acquisition and processing module performs CIELAB conversion, connected component clustering, and defect identification on the image, and outputs a set of effective regions. Regional area weight and defect penalty coefficient The whiteness calculation and fusion module uses visual output as the cross-modal weighting basis to consistently fuse color whiteness, spectral whiteness, and visual whiteness, where the regional comprehensive weight satisfies... The region's whiteness meets the requirements. The final whiteness output is Meanwhile, the brightness surrogate of color and spectrum is used to dynamically correct the visual screening threshold and network output consistency constraints, thereby maintaining the stability and consistency of whiteness measurement even when the light source is aging, the texture is complex, or there are shadows and reflections.
[0096] This application provides a measurement method for whiteness measurement based on the aforementioned intelligent measurement system for marble surface whiteness, including:
[0097] S1. After the device is powered on, it automatically detects the built-in standard whiteness board, adaptively adjusts the working parameters of each sensor to adapt to the current test environment, and automatically completes the calibration of the light source intensity required for the test, as well as the necessary correction of parameters such as sensor response time, integration time, and integration gain.
[0098] S2. Place the measuring end of the device close to the surface of the marble sample to be tested. The color measurement module and the spectral measurement module respectively collect 40 sets of measurement data from the sample surface. The K230AI vision module continuously collects images of the sample surface through the camera 9 within 3 seconds. Then, the above data are packaged and sent to the control and communication module through serial communication.
[0099] S3. The control and communication module uses a built-in multinomial regression model and a mean squared difference model to process and evaluate the color data and spectral data, respectively. The AI unit built into the K230AI vision module learns and analyzes the collected sample surface images, and finally fuses the sample whiteness value obtained based on the color data and spectral data with the image analysis results to form a comprehensive evaluation result of whiteness, and summarizes the results to the human-computer interaction and data interface module.
[0100] S4. The human-computer interaction and data interface module decodes the received data and displays it on the screen, while uploading the relevant data to the host computer for users to further process and analyze the sample data.
[0101] In specific implementation, the preferred embodiment of the present invention is as follows:
[0102] The hardware device of the present invention, such as Figures 3-5 As shown, the device's overall structure is based on the central control protective shell 2, which is integrally injection molded. Pressing and holding the one-button detection switch 7 on the side of the central control protective shell 2 powers on the device. The screen 1 displays the calibration time, and the LED beads 8, 12, 13, and 14 inside the optical cavity 3 illuminate simultaneously, illuminating the standard white light onto the standard whiteness plate 15. Simultaneously, the camera 9, color sensor 10, and spectral sensor 11 perform their respective calibrations. After the screen 1 displays "calibration complete," the magnetic calibration cover 5 is opened, the light shield 4 is aligned with the test sample, and the one-button detection switch 7 is pressed lightly. The device automatically collects and analyzes various data. During testing, the LED beads 8, 12, 13, and 14 inside the optical cavity 3 emit light with the standard test wavelength and color temperature. The light is uniformly scattered inside the optical cavity 3 and projected onto the sample to be tested. The reflected light is received by the color sensor 10, the reflected spectrum is received by the spectral sensor 11, and the camera 9 acquires an image of the sample. All data are calculated and analyzed using the built-in model, and the final output is displayed on screen 1. Screen 1 displays whiteness value, whiteness level, spectral data, and RGB data. The test results can be transmitted to the host computer via an external Typec data cable connected to power interface 6, completing a single test.
[0103] Case 1:
[0104] The measurement process for offline laboratory testing and on-site sampling of marble slabs, using eight marble slabs of different shapes and grades as an example, is as follows:
[0105] S1 Self-Test and Calibration:
[0106] After powering on the device, the STM32 microcontroller completes its power-on self-test and then controls the mechanical structure to move the measuring end to the built-in standard whiteboard position. The spectral sensor 11, color sensor 10, and camera 9 sequentially collect data on the standard whiteboard. Based on the deviation between the measured results and the reference values on the standard whiteboard, the control and communication module automatically adjusts the integration time and gain of the spectral measurement module and updates the spectral response correction matrix. For the color sensor 10, it uses pre-stored multiple sets of standard color block data and calls a polynomial regression model to update the calibration coefficients of the RGB channels. Dark current compensation values are obtained through dark-field measurements, and zero-point correction is performed on subsequent measurement data. After completing the above process, the device enters the standby state.
[0107] S2 Sample Measurement Data Acquisition:
[0108] The operator places the marble slab on a relatively flat platform, ensuring the light shield is in close contact with a designated area of the slab to be tested. According to the system preset, the spectral measurement module and color measurement module each collect 40 sets of measurement data at the current location, with each set spaced 20ms apart to reduce the impact of transient noise. Simultaneously, the K230AI vision module controls the camera to continuously acquire multiple frames of images of the sample surface within 3 seconds, using either the average or the frame with the best clarity for subsequent analysis. The STM32 preprocesses the 40 sets of spectral and color data (e.g., time filtering, outlier removal) and packages the processed data. The spectral data, color data, and measurement point numbers are then sent to the K230 module via the USART interface.
[0109] S3 Whiteness Calculation and Visual Fusion:
[0110] After receiving the above data, the K230A vision module first normalizes the spectral data by wavelength channel to obtain the reflection intensity values of each channel in the range of 350nm to 1000nm. It then retrieves reference spectral curves for different whiteness levels from the built-in standard marble database and calculates the mean squared difference (MSE) value between the sample to be tested and samples of each level using the mean squared difference model. The value with the smallest MSE is selected as the spectral whiteness level of that measurement point. For ease of quantitative analysis, the deviation rate is used. ;when When the percentage is greater than 0 and less than 1%, it can be rated as Level 1; when... When the percentage is greater than 1% but less than 2%, it can be rated as Level 2; when... If the percentage is greater than 2%, it can be rated as a grade three stone.
[0111] For color data, the K230AI vision module uses a multinomial regression model to convert calibrated RGB values into approximate CIELAB* values, obtaining a whiteness estimation result. In visual analysis, the K230AI vision module converts the acquired image from RGB space to CIELAB space, and based on a preset whiteness threshold, filters out pixels that meet the conditions of high L*, low |a*|, and low |b*|, forming candidate white regions. It then uses a connected component analysis algorithm to cluster spatially adjacent candidate pixels into multiple regions and calculates the area and average color features of each region. Based on a pre-trained deep learning model, it identifies color spots, cracks, holes, and slab edge areas, marking them as defective or invalid regions. When calculating the final whiteness value, the system removes or reduces the weight of the whiteness values corresponding to defective regions, and performs a weighted average of the whiteness values in uniformly textured regions to obtain the target whiteness value at that measurement location. For the same sample, the above process is repeated at multiple measurement locations to finally obtain the comprehensive whiteness evaluation result for the entire marble slab.
[0112] S4 Results Display and Data Upload:
[0113] The human-computer interaction module displays the whiteness value and whiteness grade of the current sample on the screen. If connected to a host computer, the system uploads the whiteness results, spectral curves, color data, and area information obtained by visual segmentation via a USB virtual serial port for subsequent statistical analysis and quality tracking. All measurement records are stored in the external Flash memory in the form of number, time, whiteness value, and grade for historical traceability.
[0114] Table 1
[0115]
[0116] In this embodiment, as shown in Table 1, the influence of natural textures and local color spots on the whiteness test results is greatly reduced by multi-source data fusion and image defect removal, which is more in line with the judgment of the human eye and significantly improves repeatability and consistency.
[0117] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.
Claims
1. An intelligent measurement system for the whiteness of marble surfaces, characterized in that: It includes a control and communication module, a spectrum measurement module, a color measurement module, a vision acquisition and processing module, a whiteness calculation and fusion module, a calibration and storage module, and a human-computer interaction and data interface module; The control and communication module is used to coordinate data acquisition and communication between the color measurement module, the spectral measurement module, and the visual acquisition and processing module, preprocess the acquired data, and provide input to the whiteness calculation and fusion module. The spectral measurement module includes a spectral sensor, a constant light source, and an optical structure, and is used to collect reflectance spectral data of marble surface within a predetermined wavelength range; The color measurement module includes a color sensor, which is used to collect RGB color information of the marble surface and send the calibrated color data to the control and communication module. The visual acquisition and processing module is used to acquire images of the marble surface, detect and segment at least one defect among the marble surface texture, color spots, cracks, holes and edge of the slab, and output the set of effective measurement areas, defect area information and comprehensive weight of the areas; The whiteness calculation and fusion module is set in the visual acquisition and processing module. It is used to calculate the initial whiteness value based on spectral data and color data, and to remove or reduce the weight of abnormal measurement points by combining the region segmentation results output by the visual acquisition and processing module, so as to obtain the target whiteness value and whiteness level of the marble surface. The calibration and storage module includes a standard whiteboard and a calibration algorithm, which are used to automatically calibrate changes in light source intensity and sensor response drift, and store calibration coefficients and measurement results. The human-computer interaction and data interface module is used to set measurement parameters, display whiteness results, and interact with the host computer or cloud platform.
2. The intelligent measurement system for the whiteness of marble surfaces according to claim 1, characterized in that: The control and communication module is implemented using an STM32 microcontroller. The STM32 microcontroller has a built-in multinomial regression model for calibrating and linearizing the RGB color data output by the color measurement module. The control and communication module communicates with the color sensor and the spectral sensor via the I²C bus to control the sampling start, integration time and gain switching parameters, and exchanges data with the vision acquisition and processing module via the USART serial port to receive region weight information and defect region marking information.
3. The intelligent measurement system for the whiteness of marble surfaces according to claim 2, characterized in that: The spectral measurement module covers a wavelength range of 350nm to 1000nm, distributing light of different wavelengths to multiple preset channels. Each channel is equipped with a photodiode, which converts the light intensity into a current signal, which is then converted into a reflection intensity value for each band by the analog-to-digital converter circuit of the STM32 microcontroller. The constant light source adopts a D65 standard LED light source with stable color temperature.
4. The intelligent measurement system for the whiteness of marble surfaces according to claim 1, characterized in that: The whiteness calculation and fusion module is configured to evaluate the whiteness level of the test sample based on the mean square error model. Specifically, it includes: for each test sample, obtaining the measured reflection intensity values Xi (i=1,2,…,N) for each channel within the wavelength range of 350nm to 1000nm, where N is the total number of effective band channels; retrieving the reference reflection intensity values Yi (i=1,2,…,N) of each whiteness level standard sample from a pre-stored standard marble database; and calculating the mean square error between the test sample and each level of standard sample. The whiteness level corresponding to the smallest MSE is selected as the output level result.
5. The intelligent measurement system for the whiteness of marble surfaces according to claim 2, characterized in that: The color measurement module selects different color filters by configuring the SCL and SDA programmable pins, counts the number of pulses within a preset timing period, multiplies the result by a white balance calibration factor to obtain the actual frequency measurement value of each color channel, forming the R, G, and B channel frequency values. After calibration using a polynomial regression model, these values are sent to the control and communication module. The polynomial regression model is used to establish the functional relationship between the measured RGB values and the standard RGB values. For any n sets of measurement data (xi, yi) (i=1,2,…,n) of any sample, the functional relationship is: ; Where y is the standard RGB value, These are the coefficients obtained through the least squares estimation principle. To measure the RGB values of the marble sample surface, For the error term, .
6. The intelligent measurement system for the whiteness of marble surfaces according to claim 1, characterized in that: The visual acquisition and processing module converts the acquired image from the RGB color space to the CIELAB color space, filters pixels that meet the brightness and chromaticity conditions based on a preset standard whiteness range, and clusters them into multiple connected regions, outputting the region labeling information of the connected regions. The visual acquisition and processing module utilizes a deep learning defect recognition network to perform semantic classification on connected regions, denoted as the defect category set denoted as . Then, output the defect category label for each region. and corresponding confidence level Simultaneously, the area weight is calculated for each connected region. and the percentage of defective areas ,in: ; For the region area, For categories within the region The defect area; The visual acquisition and processing module calculates the defect penalty coefficient based on the defect type, defect area ratio, and confidence level. And based on this, the regional comprehensive weight is obtained. Wherein, the defect penalty coefficient Defect category penalty weight With the The weighted calculation is restricted to [0,1] by a truncation function.
7. The intelligent measurement system for the whiteness of marble surfaces according to claim 6, characterized in that: The whiteness calculation and fusion module performs cross-modal consistency fusion of color whiteness, spectral whiteness, and visual whiteness, satisfying the following: The whiteness of the k-th region: ; Target whiteness value: ; in, To integrate the weighting coefficients, This represents the number of connected regions. The regional comprehensive weight is as described in claim 6.
8. The intelligent measurement system for the whiteness of marble surfaces according to claim 7, characterized in that: The visual acquisition and processing module constructs a visual whiteness prediction network, which takes the marble surface image as input and outputs a visual whiteness prediction value or a pixel-level visual whiteness map. Its training employs supervised learning with mean squared error as the primary loss function, while introducing a regularization term to suppress overfitting; when the output is a pixel-level visual whiteness map, the regional visual whiteness satisfies the formula ;in, For the region Number of pixels within the cell; The whiteness calculation and fusion module uses the brightness proxy of color and spectrum to apply dynamic consistency constraints to the visual screening threshold and visual whiteness output, so as to maintain the stability and consistency of whiteness measurement results under conditions of light source aging, complex texture, shadow or reflection.
9. An intelligent measurement method for the whiteness of marble surface, used to implement the intelligent measurement system for the whiteness of marble surface as described in any one of claims 1-8, characterized in that, Includes the following steps: S1. The intelligent measurement system measures the standard whiteboard and compensates for changes in light source intensity and sensor response drift based on the calibration algorithm, updating the calibration coefficients. S2, the color measurement module and the spectral measurement module perform multi-point sampling to collect RGB data and reflectance spectral data on the surface of the marble to be tested, and the visual acquisition and processing module acquires surface images; S3. Convert the image to the CIELAB color space, perform pixel filtering, connected component clustering and defect identification, and output the set of effective measurement areas, defect area information and comprehensive weight of the areas; calculate the color whiteness and spectral whiteness respectively to obtain the visual whiteness, and then remove or reduce the weight of the corresponding measurement points of the defect area according to the comprehensive weight of the areas before fusion, and output the target whiteness value and whiteness level. S4. Display the target whiteness value and whiteness level in the human-computer interaction and data interface module, and upload it to the host computer or cloud platform.
10. The intelligent measurement method for the whiteness of marble surface according to claim 9, characterized in that: After any measurement cycle ends, the system automatically triggers repeated measurements on the standard whiteboard based on changes in ambient light, stability of measurement results, or preset time intervals, in order to update calibration parameters and compensate for light source aging and sensor drift. In S3, the whiteness level is evaluated by the mean square error (MSE) model. The MSE of the sample to be tested and the standard samples of each level in the pre-stored standard marble database are calculated, and the level corresponding to the smallest MSE is selected as the whiteness level output. The fusion in S3 satisfies the following formula: ; ; And regional comprehensive weight .