Data processing methods and apparatus

CN122671002APending Publication Date: 2026-09-01SHENZHEN SHENSHI INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611170598.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-04
Publication Date
2026-09-01

AI Technical Summary

Technical Problem

[0004]然而,在实际工业检测场景中,被测物体的表面可能具有高反光特性(如覆膜包装、烤漆面、镀膜玻璃、铝箔、镀层金属等),这类表面易产生镜面反射光

Benefits of technology

[0047] It is worth noting that the beneficial effects of the technical solutions in the second to fifth aspects can be found in the technical effects of the technical solution in the first aspect mentioned above, and will not be repeated here.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122671002A_ABST
    Figure CN122671002A_ABST
Patent Text Reader

Abstract

This application discloses a data processing method and apparatus, relating to the field of optical detection. The method is applied to a color mark sensor, which includes a transmitting unit and L receiving units. The transmitting unit emits probe light, and the L receiving units receive L paths of reflected light from the surface of an object illuminated by the probe light from L different angles, where L is an integer greater than 1. The L paths of reflected light include L paths of first reflected light and L paths of second reflected light. Based on L sets of calibration data corresponding to the L paths of first reflected light and L sets of measurement data corresponding to the L paths of second reflected light, the presence or absence of specular reflection components in the L paths of second reflected light is determined, yielding determination information. Based on this, the data similarity determined by the determination information can avoid interference from specular reflection, improving the accuracy of surface reflection characteristic differences identified by data similarity, thereby reducing the interference of specular reflection on color mark detection and improving the accuracy and reliability of color mark detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of optical inspection, and more particularly to data processing methods and apparatus. Background Technology

[0002] A color mark sensor is an industrial photoelectric sensor that detects color marks based on the reflected light from an object's surface. For example, a color mark sensor emits probe light onto an object's surface using a built-in light source, collects the surface reflection characteristics of the reflected light, and compares these characteristics with preset calibration features to complete the color mark detection.

[0003] Reflected light consists of diffuse and specular components. The diffuse component carries the color characteristics of the object's surface and has a uniform intensity distribution, making it an effective signal for color mark detection by the color mark sensor. Because the diffuse component scatters uniformly in all directions, the color mark sensor will always receive a certain amount of diffuse reflection regardless of the sensor's receiving angle. The specular component does not carry the object's color characteristics and has highly concentrated energy, easily leading to overexposure or saturation of the received light intensity, thus interfering with color mark detection. Therefore, the receiving angle of the color mark sensor can be adjusted before actual detection to avoid the sensor receiving the specular reflection component.

[0004] However, in actual industrial testing scenarios, the surface of the object being tested may have highly reflective properties (such as coated packaging, painted surfaces, coated glass, aluminum foil, coated metal, etc.). These surfaces are prone to specular reflection. When the detection light emitted by the color mark sensor shines on such surfaces, the color mark sensor is very likely to receive the specular reflection component, which may cause the received light intensity of the color mark sensor to be overexposed or saturated, thus causing specular reflection interference in the detection, ultimately leading to false detection or missed detection of the color mark, reducing the accuracy and reliability of the detection. Summary of the Invention

[0005] This application provides a data processing method and apparatus, which aims to avoid the presence of specular reflection components in all of the multi-path reflected light by receiving multi-path reflected light from multiple different angles. Based on the determination of whether specular reflection components exist in each path of the multi-path reflected light, color mark detection is performed according to the determination information and the surface reflection characteristics of the multi-path reflected light. This helps to reduce the impact of specular reflection interference on the detection and improve the accuracy and reliability of the detection.

[0006] In a first aspect, this application provides a data processing method applied to a color mark sensor. The color mark sensor is used to identify the difference in surface reflectance characteristics between a measured object and a calibrated object. The color mark sensor includes a transmitting unit and L receiving units. The transmitting unit is used to emit probe light, and the L receiving units are used to receive L paths of reflected light reflected from the object surface by the probe light from L different angles, where L is an integer greater than 1. The method includes: The system receives L channels of first reflected light from the calibration object and obtains L sets of calibration data corresponding to the light intensity of the L channels of first reflected light, wherein there is no specular reflection component in each of the L channels of first reflected light; it receives L channels of second reflected light from the test object and obtains L sets of measurement data corresponding to the L channels of second reflected light, wherein the L sets of measurement data correspond one-to-one with the L sets of calibration data; it determines judgment information based at least on the L sets of measurement data, the judgment information being used to indicate whether there is a specular reflection component in each of the L channels of second reflected light; it determines the data similarity between the L sets of calibration data and the L sets of measurement data based on the judgment information; and it identifies the differences in surface reflection characteristics between the test object and the calibration object based on the data similarity.

[0007] In this method, L receiving units of the color mark sensor receive L paths of reflected light, enabling the reception of multiple reflected light from multiple different angles. By setting each of the L paths of first reflected light from the calibration object to have no specular reflection component, i.e., each path of first reflected light only contains diffuse reflection components, the color mark sensor receives only the multiple diffuse reflection components of the calibration object, and uses the L sets of calibration data obtained from the calibration as the standard reference for detection.

[0008] Since specular reflection is directional reflection, meaning the color mark sensor can only receive specular reflection at a specific angle, when receiving L second-path reflected light from the object being measured from L different angles, while ensuring that each of the L second-path reflected light contains diffuse reflection, it is necessary to prevent all of the L second-path reflected light from simultaneously containing specular reflection, thus ensuring that at least one second-path reflected light does not contain specular reflection.

[0009] Since the L sets of calibration data serve as the standard reference and the L sets of measurement data serve as the actual measurement data, it is possible to determine whether or not a specular reflection component exists in each of the L sets of second reflected lights based on at least the L sets of measurement data, thereby enabling the identification of each second reflected light subject to specular reflection interference in the L sets of second reflected lights.

[0010] Based on the identification of each second reflected light subject to specular reflection in the L-channel second reflected light, the data similarity determined by the judgment information can minimize interference from specular reflection, thereby improving the accuracy of the surface reflection characteristic differences identified by data similarity, and further reducing the degree of interference of specular reflection on color mark detection, thus improving the accuracy and reliability of color mark detection.

[0011] In one possible example of the first aspect, the i-th set of calibration data within the L sets of calibration data includes X calibration values ​​corresponding to the light intensity of X color bands in the i-th first reflected light, and the i-th set of measurement data within the L sets of measurement data includes X measurement values ​​corresponding to the light intensity of X color bands in the i-th second reflected light.

[0012] Based on at least L sets of measurement data, determine the judgment information, including: Based on L sets of calibration data, calculate L first single-path total values ​​and L sets of first single-path color ratios. The i-th first single-path total value is the sum of X calibration values ​​corresponding to the light intensity of X color bands in the i-th first reflected light. The i-th set of first single-path color ratios includes the ratios of the X calibration values ​​corresponding to the light intensity of X color bands in the i-th first reflected light to the i-th first total value. Based on L sets of measurement data, calculate L total values ​​of the second single channel and L color ratios of the second single channel. The i-th total value of the second single channel is the sum of X measured values ​​corresponding to the light intensity of X color bands in the i-th second reflected light. The i-th color ratio of the second single channel includes the ratios of the X measured values ​​corresponding to the light intensity of X color bands in the i-th second reflected light to the i-th total value of the second single channel. The judgment information is determined based on the color ratio of the first single channel in group L, the color ratio of the second single channel in group L, the total value of the first single channel L, and the total value of the second single channel L.

[0013] In this example, based on the L total values ​​of the first single channel and the L total values ​​of the second single channel, the difference in surface light intensity characteristics between the tested object and the calibration object can be determined, thereby identifying the difference in surface reflection characteristics between the tested object and the calibration object.

[0014] Based on the color ratio of the first single channel in group L and the color ratio of the second single channel in group L, the difference in surface color characteristics between the tested object and the calibration object can be determined, thereby identifying the difference in surface reflection characteristics between the tested object and the calibration object.

[0015] Based on the color ratio of the first single channel in group L, the color ratio of the second single channel in group L, the total value of the first single channel L, and the total value of the second single channel L, it is possible to accurately determine whether there is a specular reflection component in each of the second reflected lights in the L channels, thereby improving the accuracy of the determination information. In this way, based on the determination of data similarity according to the determination information, the accuracy of the differences in surface reflection characteristics identified by data similarity is improved.

[0016] In one possible example of the first aspect, the determination information is determined based on the L-group first single-channel color ratio, the L-group second single-channel color ratio, the L total values ​​of the first single channels, and the L total values ​​of the second single channels, including: Based on the color ratio of the first single channel in group L and the color ratio of the second single channel in group L, calculate the color ratio deviation of L single channels. The color ratio deviation of the i-th single channel is the sum of the absolute values ​​of the same color ratio deviation between the color ratio of the first single channel in group i and the color ratio of the second single channel in group i, or the color ratio deviation of the i-th single channel is the maximum absolute value of the same color ratio deviation between the color ratio of the first single channel in group i and the color ratio of the second single channel in group i. Based on the L total values ​​of the first single path and the L total values ​​of the second single path, calculate the ratio of the L total values ​​of the single path. The ratio of the total value of the i-th single path is the ratio of the total value of the i-th second single path to the total value of the i-th first single path. If the color ratio deviation of the i-th single channel is less than or equal to the preset deviation threshold and the total value ratio of the i-th single channel is greater than or equal to the preset ratio threshold, then the i-th information in the judgment information is determined. The i-th information is used to indicate that there is a specular reflection component in the i-th second reflected light. If the color ratio deviation of the i-th single channel is greater than the preset deviation threshold, or the total value ratio of the i-th single channel is less than the preset ratio threshold, then the i-th information in the judgment information is determined. The i-th information is used to indicate that there is no specular reflection component in the i-th second reflected light.

[0017] In this example, since specular reflection interference only increases the total intensity of reflected light to cause overexposure or saturation, but does not change the color ratio, if the color ratio deviation of the i-th single channel is less than or equal to the preset deviation threshold, and the total value ratio of the i-th single channel is greater than or equal to the preset ratio threshold, it indicates that the color ratio between the i-th second reflected light and the i-th first reflected light is basically the same, and the total intensity of the X color bands in the second reflected light increases significantly, thus determining that there is a specular reflection component in the i-th second reflected light; otherwise, it is determined that there is no specular reflection component in the i-th second reflected light, thereby accurately determining whether there is a specular reflection component in each of the L second reflected lights, improving the accuracy of the determination information.

[0018] In one possible example of the first aspect, the i-th set of measurement data within the L sets of measurement data includes X measurement values ​​corresponding to the light intensity of X color bands in the i-th second reflected light, where i is an integer from 1 to L, and X is an integer greater than or equal to 1. Based on at least L sets of measurement data, determine the judgment information, including: If the X measured values ​​corresponding to the light intensity of the X color bands in the i-th second reflected light are all less than the corresponding preset maximum measured values, then the i-th information in the judgment result is determined. The i-th information is used to indicate that there is no specular reflection component in the i-th second reflected light.

[0019] If the measured value of the light intensity of any color band in the i-th second reflected light is greater than or equal to the corresponding preset maximum measured value, then the i-th information in the determination information is determined. The i-th information is used to indicate that there is a specular reflection component in the i-th second reflected light.

[0020] In this example, since specular reflection interference can cause the total intensity of reflected light to increase, resulting in overexposure or saturation of the reflected light intensity, this application introduces a preset maximum measurement value and determines whether the X measurement values ​​corresponding to the light intensity of X color bands in each second reflected light are all less than the corresponding preset maximum measurement value, thereby accurately determining whether there is a specular reflection component in each of the L second reflected lights and improving the accuracy of the determination information.

[0021] In one possible example of the first aspect, determining the data similarity between L sets of calibration data and L sets of measurement data based on the decision information includes: Based on the judgment information, determine a confidence weight for each of the L paths of second reflected light, and obtain L confidence weights; Based on L sets of calibration data and L sets of measurement data, L single-path similarities are determined. The i-th single-path similarity is the similarity between the i-th set of measurement data and the i-th set of calibration data. The L single-path similarities correspond one-to-one with the L confidence weights, and i takes integers from 1 to L. Based on L confidence weights and L single-path similarities, the data similarity between L sets of calibration data and L sets of measurement data is determined.

[0022] In this example, since the decision information is used to indicate whether there is a specular reflection component in each of the L paths of second reflected light, the L confidence weights determined according to the decision information are related to whether there is a specular reflection component in the second reflected light, so that the data similarity determined according to the L confidence weights can avoid interference from specular reflection as much as possible.

[0023] Optionally, based on L sets of calibration data and L sets of measurement data, L single-path similarities are determined, including: Based on L sets of calibration data, calculate L first single-path total values ​​and L sets of first single-path color ratios. The i-th first single-path total value is the sum of X calibration values ​​corresponding to the light intensity of X color bands in the i-th first reflected light. The i-th set of first single-path color ratios includes the ratios of the X calibration values ​​corresponding to the light intensity of X color bands in the i-th first reflected light to the i-th first total value. Based on L sets of measurement data, calculate L total values ​​of the second single channel and L color ratios of the second single channel. The i-th total value of the second single channel is the sum of X measured values ​​corresponding to the light intensity of X color bands in the i-th second reflected light. The i-th color ratio of the second single channel includes the ratios of the X measured values ​​corresponding to the light intensity of X color bands in the i-th second reflected light to the i-th total value of the second single channel. Based on the color ratio of the first single channel in group L and the color ratio of the second single channel in group L, calculate the color ratio deviation of L single channels. The color ratio deviation of the i-th single channel is the sum of the absolute values ​​of the same color ratio deviation between the color ratio of the first single channel in group i and the color ratio of the second single channel in group i, or the color ratio deviation of the i-th single channel is the maximum absolute value of the same color ratio deviation between the color ratio of the first single channel in group i and the color ratio of the second single channel in group i. Based on the L first single-path total values ​​and the L second single-path total values, calculate the ratio of the L single-path total values. The ratio of the i-th single-path total value is the ratio of the i-th first single-path total value to the i-th second single-path total value. The similarity of L individual channels is determined based on the color ratio deviation of L individual channels and the total value ratio of L individual channels.

[0024] As can be seen, since the L first single-channel total values ​​are used to characterize the surface light intensity characteristics of the calibration object and the L second single-channel total values ​​are used to characterize the surface light intensity characteristics of the test object, the ratio of the L single-channel total values ​​is used to characterize the difference in surface light intensity characteristics between the test object and the calibration object.

[0025] Since the first single-channel color ratio of group L is used to characterize the surface color characteristics of the calibration object and the second single-channel color ratio of group L is used to characterize the surface color characteristics of the tested object, the deviation of the L single-channel color ratios can be used to characterize and determine the difference in surface color characteristics between the tested object and the calibration object.

[0026] Thus, by determining the L single-channel similarity based on the L single-channel color ratio deviation and the L single-channel total value ratio, the L single-channel similarity can be used to characterize the degree of matching between the L sets of calibration data and the L sets of measurement data in terms of surface color characteristics and surface light intensity characteristics. It can be used to identify the differences in surface reflection characteristics between the measured object and the calibration object, thereby improving the accuracy and reliability of identification.

[0027] Optionally, based on the L individual color ratio deviations and the L individual total value ratios, L individual similarities are determined, including: Calculate the weighted average of the color ratio deviation of the L individual channels and the total value ratio of the L individual channels to obtain the similarity of the L individual channels. The similarity of the i-th individual channel is the weighted average of the color ratio deviation of the i-th individual channel and the total value ratio of the i-th individual channel.

[0028] It is evident that by weighting the L individual color ratio deviations with the L individual total value ratios, it is easy to determine the similarity of the L individual channels.

[0029] Optionally, based on the L individual color ratio deviations and the L individual total value ratios, L individual similarities are determined, including: Calculate the logarithm of the L single-channel total value ratios; calculate the weighted sum of the L single-channel color ratio deviations and the logarithms of the L single-channel total value ratios to obtain L total difference quantities, where the i-th total difference quantity is the weighted sum of the i-th single-channel color ratio deviation and the i-th single-channel total value ratio; calculate the exponent of the L total difference quantities and round the exponents of the L total difference quantities to obtain L single-channel similarities, where the i-th single-channel similarity is the rounded sum of the exponents of the i-th total difference quantity.

[0030] It can be seen that by calculating the logarithm of the ratio of the total value of L single channels, the light intensity characteristics can be logarithmically transformed to adapt to different reflectivity materials of the measured object or changes in detection distance.

[0031] In one possible example of the first aspect, the sum of the L confidence weights is 1, and each confidence weight is greater than 0 and less than 1; based on the L confidence weights and L single-path similarities, the data similarity between the L sets of calibration data and the L sets of measurement data is determined, including: Based on L confidence weights, the fusion weighted average of L single-path similarities is calculated to obtain the data similarity between L sets of calibration data and L sets of measurement data.

[0032] It is evident that by calculating the fusion weighted average of L single-path similarities based on L confidence weights, it is easy to determine the data similarity between L sets of calibration data and L sets of measurement data.

[0033] In one possible example of the first aspect, if the i-th piece of information in the determination information indicates that there is no specular reflection component in the i-th path of the second reflected light, then the i-th confidence weight is 1; if the i-th piece of information in the determination information indicates that there is a specular reflection component in the i-th path of the second reflected light, then the i-th confidence weight is 0. Based on L confidence weights and L single-path similarities, the data similarity between L sets of calibration data and L sets of measurement data is determined, including: Based on L confidence weights, N single-path similarities are determined from the L single-path similarities. The confidence weight corresponding to each of the N single-path similarities is 1, and N is a positive integer less than or equal to L. Based on the N single-path similarities, N weighting coefficients are determined. The sum of the N weighting coefficients is 1, and each weighting coefficient is greater than 0 and less than 1. There is a one-to-one correspondence between the N single-path similarities and the N weighting coefficients. Based on the N weighting coefficients, the fusion weight of the N single-path similarities is calculated to obtain the data similarity between the L sets of calibration data and the L sets of measurement data.

[0034] In this example, when there is no specular reflection component in the i-th second reflected light, the i-th confidence weight is set to 1; when there is a specular reflection component in the i-th second reflected light, the i-th confidence weight is set to 0.

[0035] In this way, based on L confidence weights, N single-path similarities with a confidence weight of 1 are selected from L single-path similarities, and single-path similarities that are affected by specular reflection are excluded. Finally, the N single-path similarities are fused and weighted to obtain the data similarity, so that the data similarity can avoid the interference of specular reflection as much as possible, thereby improving the accuracy of the differences in surface reflection characteristics identified by the data similarity.

[0036] In one possible example of the first aspect, determining the data similarity between L sets of calibration data and L sets of measurement data based on the decision information includes: Based on the judgment information, N second reflected lights are determined within L second reflected lights. Each of the N second reflected lights contains no specular reflection component, and N is a positive integer less than or equal to L. N sets of calibration data corresponding to the N second reflected lights are selected from L sets of calibration data. N sets of measurement data corresponding to the N second reflected lights are selected from L sets of measurement data. Based on the N sets of calibration data and N sets of measurement data, N single-path similarities are determined. The j-th single-path similarity is the similarity between the j-th measurement data and the j-th calibration data, where j is an integer from 1 to N. Based on the N single-path similarities, N weighting coefficients are determined. The sum of the N weighting coefficients is 1, and each weighting coefficient is greater than 0 and less than 1. There is a one-to-one correspondence between the N single-path similarities and the N weighting coefficients. Based on the N weighting coefficients, the fusion weight of the N single-path similarities is calculated to obtain the data similarity between the L sets of calibration data and the L sets of measurement data.

[0037] In this example, since the determination information is used to indicate whether there is a specular reflection component in each of the L paths of second reflected light, N paths of second reflected light without specular reflection components can be selected based on the determination information, excluding each path of second reflected light interfered with by specular reflection. Then, N sets of calibration data and N sets of measurement data corresponding to the N paths of second reflected light are selected, and N single-path similarities are determined based on the N sets of calibration data and N sets of measurement data, excluding single-path similarities interfered with by specular reflection. Finally, the N single-path similarities are fused and weighted to obtain the data similarity, so that the data similarity can avoid the interference of specular reflection as much as possible, thereby improving the accuracy of the surface reflection characteristic differences identified by the data similarity.

[0038] Optionally, based on N sets of calibration data and N sets of measurement data, N single-path similarities are determined, including: Based on N sets of calibration data, calculate N total values ​​for the third single channel and N color ratios for the third single channel. The j-th total value for the third single channel is the sum of the X calibration values ​​corresponding to the light intensity of the X color bands in the j-th first reflected light. The j-th color ratio for the third single channel includes the ratios of the X calibration values ​​corresponding to the light intensity of the X color bands in the j-th first reflected light to the j-th total value. Based on N sets of measurement data, calculate N total values ​​of the fourth single channel and N color ratios of the fourth single channel. The j-th total value of the fourth single channel is the sum of the X measured values ​​corresponding to the light intensity of the X color bands in the j-th second reflected light. The j-th color ratio of the fourth single channel includes the ratios of the X measured values ​​corresponding to the light intensity of the X color bands in the j-th second reflected light to the total value of the j-th fourth single channel. Based on the Nth group of third single-channel color ratios and the Nth group of fourth single-channel color ratios, calculate the N single-channel color ratio deviations. The j-th single-channel color ratio deviation is the sum of the absolute values ​​of the same color ratio deviations between the j-th group of third single-channel color ratios and the j-th group of fourth single-channel color ratios, or the j-th single-channel color ratio deviation is the maximum absolute value of the same color ratio deviation between the j-th group of third single-channel color ratios and the j-th group of fourth single-channel color ratios. Based on the total values ​​of N third single channels and N total values ​​of N fourth single channels, calculate the ratio of the total values ​​of N single channels. The ratio of the total value of the j-th single channel is the ratio of the total value of the j-th third single channel to the total value of the j-th fourth single channel. The similarity of N individual channels is determined based on the color ratio deviation of N individual channels and the total value ratio of N individual channels.

[0039] As can be seen, since the N third single-channel total values ​​are used to characterize the surface light intensity characteristics of the calibration object and the N fourth single-channel total values ​​are used to characterize the surface light intensity characteristics of the test object, the ratio of the N single-channel total values ​​is used to characterize the difference in surface light intensity characteristics between the test object and the calibration object.

[0040] Since N sets of third single-channel color ratios are used to characterize the surface color characteristics of the calibration object and N sets of third single-channel color ratios are used to characterize the surface color characteristics of the tested object, the deviations of N single-channel color ratios can be used to characterize and determine the difference in surface color characteristics between the tested object and the calibration object.

[0041] Thus, by determining N single-channel similarities based on N single-channel color ratio deviations and N single-channel total value ratios, the N single-channel similarities can be used to characterize the degree of matching between N sets of calibration data and N sets of measurement data in terms of surface color features and surface light intensity features. They can be used to identify the differences in surface reflection characteristics between the measured object and the calibration object, thereby improving the accuracy and reliability of identification.

[0042] In a second aspect, this application provides a data processing apparatus, which includes a processor, a memory, and a computer program or signaling stored in the memory. The processor executes the computer program or signaling to implement the method described in the first aspect above.

[0043] Thirdly, this application provides a color mark sensor, which is used to identify the difference in surface reflectance characteristics between a measured object and a calibrated object. The color mark sensor includes a transmitting unit, L receiving units and a processing unit. The transmitting unit is used to emit a probe light, and the L receiving units are used to receive L reflected light reflected from the surface of the object by the probe light from L different angles, where L is an integer greater than 1.

[0044] L receiving units are used to receive L paths of first reflected light from the calibrated object; The processing unit is used to calibrate and obtain L sets of calibration data corresponding to the light intensity of L first reflected light, wherein there is no specular reflection component in each of the L first reflected light paths; The L receiving units are also used to receive the L paths of second reflected light from the object under test; The processing unit is also used to measure and obtain L sets of measurement data corresponding to the L-path second reflected light, and the L sets of measurement data correspond one-to-one with the L sets of calibration data; The processing unit is also configured to determine determination information based on at least L sets of measurement data. The determination information is used to indicate whether there is a specular reflection component in each of the L second reflected beams. The processing unit is also used to determine the data similarity between the L sets of calibration data and the L sets of measurement data based on the judgment information; The processing unit is also used to identify differences in surface reflection characteristics between the tested object and the calibrated object based on data similarity.

[0045] Fourthly, this application provides a computer-readable storage medium storing a computer program or instructions that, when executed, implement the steps of the method described in the first aspect.

[0046] Fifthly, this application provides a computer program product, including a computer program or instructions, which, when executed, implement the steps of the method described in the first aspect. For example, the computer program product may be a software installation package.

[0047] It is worth noting that the beneficial effects of the technical solutions in the second to fifth aspects can be found in the technical effects of the technical solution in the first aspect mentioned above, and will not be repeated here. Attached Figure Description

[0048] Figure 1This is a functional unit block diagram of a color mark sensor according to an embodiment of this application; Figure 2 This is a schematic diagram illustrating a scenario where a color mark sensor detects a color mark according to an embodiment of this application; Figure 3 This is a schematic diagram illustrating another scenario of color mark sensor detecting color marks according to an embodiment of this application; Figure 4 This is a flowchart illustrating a data processing method according to an embodiment of this application; Figure 5 This is a flowchart illustrating another data processing method according to an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a data processing device according to an embodiment of this application. Detailed Implementation

[0049] The terms "first," "second," etc., used in the embodiments of this application are used to distinguish different objects, not to describe a specific order. "At least one of the following" or similar expressions in the embodiments of this application refer to any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can represent the following seven cases: a, b, c; a and b; a and c; b and c; a, b, and c. Each of a, b, and c can be an element or a set containing one or more elements.

[0050] In the embodiments of this application, "equal to" can be used with "greater than" or "less than". When "equal to" is used with "greater than", that is, greater than or equal to, "equal to" is not used with "less than"; when "equal to" is used with "less than", that is, less than or equal to, "equal to" is not used with "greater than".

[0051] The following is an example of the color mark sensor in the embodiments of this application.

[0052] A color mark sensor is an industrial photoelectric sensor that detects color marks based on the reflected light from the surface of an object. It mainly identifies the differences in surface reflection characteristics between the object being measured and the calibration object, thereby detecting color mark markings on the surface of the object being measured. It is widely used in industrial scenarios such as packaging, printing, and sorting.

[0053] For example, in the calibration stage, the color mark sensor emits probe light onto the surface of the calibration object through its built-in light source, and collects the surface reflection characteristics of the reflected light from the surface of the calibration object as preset calibration characteristics. In the actual measurement stage, the color mark sensor emits probe light onto the surface of the object being measured through its built-in light source, collects the surface reflection characteristics of the reflected light from the surface of the object being measured, and compares the collected surface reflection characteristics with the preset calibration characteristics to complete the color mark detection.

[0054] The calibration object serves as a standard reference object, used to determine the judgment benchmark parameters for color mark detection; the object to be tested is the object to be tested that needs to be color mark detected, and is the object to be detected by the color mark sensor for real-time data acquisition and feature comparison.

[0055] The surface reflection characteristics, color, and material of the calibrated object serve as the reference standard for judging qualified products. Only when the measured characteristics of the tested object are similar to the reference standard can the color mark be judged as qualified.

[0056] In one possible example, the surface reflectance properties of an object (including the calibration object and the object being measured) include the object's surface color properties and surface light intensity properties.

[0057] Surface color characteristics are characterized by the proportion of each color band in the reflected light and are used to reflect the inherent color attributes of an object's surface.

[0058] Surface light intensity characteristics are characterized by the light intensity of each color band in the reflected light, and are used to reflect the overall brightness of the object's surface and the overall energy level of the reflected light.

[0059] In this way, by identifying the differences in surface color characteristics and surface light intensity characteristics between the tested object and the calibration object, both the color difference between the two can be identified, as well as the abnormal strong light interference caused by specular reflection.

[0060] In one possible example, the luminous intensity of reflected light is the intensity of reflected light. Luminous intensity can be characterized by luminous flux, luminous intensity, or illuminance. The unit of luminous flux is lumen (lm), the unit of luminous intensity is candela (cd), and the unit of illuminance is lux (lx).

[0061] In one possible example, the data corresponding to the intensity of the reflected light is the sampled and quantized data obtained after the reflected light undergoes photoelectric conversion and analog-to-digital conversion.

[0062] During the calibration phase, the calibration object needs to be placed in a standard detection position. By adjusting the installation angle, detection distance, illumination angle, and receiving angle of the color mark sensor, the color mark sensor is prevented from receiving specular reflection light reflected from the surface of the calibration object by the detection light, ensuring that the color mark sensor only receives diffuse reflection light reflected from the surface of the calibration object.

[0063] During the actual measurement phase, the object being measured is affected by its placement angle, surface finish, and reflective properties. The reflected light from the surface of the object may contain a specular reflection component.

[0064] The reflected light from an object's surface consists of diffuse reflection and specular reflection components.

[0065] The diffuse component is the reflected light that is uniformly scattered in all directions after the probe light shines on the surface of an object with a certain micro-roughness.

[0066] In other words, when the probe light shines on the surface of an object with a certain micro-roughness, the incident probe light will be uniformly scattered in all directions of space to form a diffuse reflection component.

[0067] Because the diffuse reflection component scatters uniformly in all directions, the color mark sensor will always receive a certain amount of diffuse reflection regardless of how the receiving angle of the color mark sensor is adjusted. Furthermore, the intensity distribution of the diffuse reflection component is uniform and unaffected by minute changes in the receiving angle of the color mark sensor.

[0068] Furthermore, since the surfaces of objects of different colors selectively absorb incident light of specific wavelengths, such as different colored materials absorbing red, green and blue light to different degrees, and then scattering the light of the unabsorbed wavelengths to form diffuse reflection components, the diffuse reflection components can carry the color characteristics of the object surface, making the diffuse reflection components an effective signal for color mark sensors to realize color recognition and color mark detection.

[0069] The specular reflection component is the reflected light produced when the probe light is irradiated by the surface of an object with highly reflective properties, and the probe light undergoes directional reflection on the surface of the object (i.e., the angle of incidence and the angle of reflection are equal).

[0070] In other words, when the probe light shines on the surface of an object with highly reflective properties, the probe light follows directional reflection and forms a specular reflection component only within the range where the incident angle equals the reflection angle.

[0071] Unlike diffuse reflection, specular reflection does not interact with the surface material of an object and therefore does not carry the color characteristics of the object's surface; it only reflects the spectral characteristics of the probe light itself. Furthermore, because specular reflection is a directional reflection of the incident probe light, its energy is highly concentrated, easily leading to overexposure or saturation of the received light intensity. This makes specular reflection an interference signal for color mark sensors in color recognition and color mark detection.

[0072] In practical industrial testing scenarios, the surface of the object being tested may have highly reflective properties. Such surfaces are called highly reflective surfaces. Highly reflective surfaces follow the law of reflection of light, exhibiting strong reflection of incident light with a concentrated reflection direction, easily generating specular reflection components. When the probe light emitted by the color mark sensor illuminates a highly reflective surface, even if the receiving angle of the color mark sensor is adjusted before detection, the color mark sensor is still very likely to receive specular reflection components. This can cause the received light intensity of the color mark sensor to be overexposed or saturated, thus generating specular reflection interference in the detection, ultimately leading to false or missed detections of the color mark, reducing the accuracy and stability of the detection.

[0073] Traditional color mark sensors typically receive only one reflected light source and perform color mark detection based on the surface reflection characteristics of that single reflected light source. For example, a color mark sensor emits probe light onto the surface of the object being measured through a built-in light source, collects the surface reflection characteristics of the reflected light source, and compares these characteristics with preset calibration features to complete the color mark detection.

[0074] However, when the surface of the object being measured is a highly reflective surface, the color mark sensor is very likely to receive specular reflection components. Once there are specular reflection components in this reflected light path, the detection will be interfered with by specular reflection, reducing the accuracy and stability of the detection.

[0075] Based on this, this application introduces a color mark sensor that receives multiple reflected light from multiple different angles. Since specular reflection is directional reflection, meaning the color mark sensor can only receive specular reflection at a specific angle, when receiving multiple reflected light from multiple different angles, it can avoid the presence of specular reflection in all of the reflected light.

[0076] Subsequently, based on the determination of whether specular reflection components exist in each of the multi-path reflected light, color mark detection is performed according to the determination information and the surface reflection characteristics of the multi-path reflected light. This helps to reduce the impact of specular reflection interference on the detection and improve the accuracy and reliability of the detection.

[0077] The following example illustrates how a color mark sensor receives L reflected light from L different angles, where L is an integer greater than 1.

[0078] Figure 1 This is a block diagram of the functional units of a color mark sensor according to an embodiment of this application. Figure 1 In the color mark sensor 10, there is a transmitting unit 110, L receiving units 120 and a processing unit 130.

[0079] The transmitting unit 110 is used to generate and emit probe light and illuminate the object surface, including the surface of the calibrated object and the surface of the object being measured.

[0080] L receiving units 120 are used to receive L reflected light from the surface of the object illuminated by the probe light from L different angles, and to convert the L reflected light from optical signals into electrical signals. Each of the L receiving units 120 corresponds to one of the L reflected light paths, and each receiving unit 120 is used to receive the corresponding reflected light path.

[0081] The processing unit 130 is used to perform analog-to-digital conversion and quantization, comparison and logical judgment on the electrical signals output by the L receiving units 120, and finally output the detection result.

[0082] In one possible example, the emitting unit 110 includes three independent light sources of red (R), green (G), and blue (B) (i.e., RGB light sources), a monochromatic light source, or a white light source.

[0083] RGB light sources are used to emit red light (i.e., red-band detection light), green light (i.e., green-band detection light), and blue light (i.e., blue-band detection light). Monochromatic light sources are used to emit detection light of a single color band. White light sources are used to emit white light, which is a mixed light that can be decomposed into seven colors: red, orange, yellow, green, blue, indigo, and violet.

[0084] Optionally, the RGB light source includes red-light emitting diodes (R-LED), green-light emitting diodes (G-LED), and blue-light emitting diodes (B-LED), and the white light source includes white-light emitting diodes.

[0085] Optionally, when an RGB light source is used, the RGB light source can illuminate three monochromatic light sources in a preset time sequence, illuminating the surface of the object under test with three different color wavelengths of probe light. In this way, by illuminating the three monochromatic light sources in a time sequence, interference between the probe light of different color wavelengths can be avoided, ensuring that the reflected light reflected from the object surface illuminated by the probe light of different color wavelengths can be received independently.

[0086] Optionally, when a white light source is used, the white light is decomposed into three independent bands—red, green, and blue—by a prism or a dichroic filter.

[0087] Optionally, the emitting unit 110 also includes an emitting lens for focusing, collimating, or shaping the exploration light emitted by the light source into a specific spot shape (such as a circle, square, or strip) to accommodate different color mark sizes.

[0088] In one possible example, the L receiving units 120 include L photosensitive chips, with each of the L photosensitive chips corresponding to one of the L reflected light paths, and each photosensitive chip is used to receive the corresponding reflected light path.

[0089] Optionally, the photosensitive chip includes a pixel array, which is used to convert the received light signal from one of the reflectors into an electrical signal. When the light source is an RGB light source, each pixel in the pixel array includes three sets of independent photodiodes, corresponding to the three independent bands of red, green, and blue, respectively.

[0090] Optionally, the L receiving units 120 further include L receiving lenses, each of which corresponds to one of the L photosensitive chips. Each receiving lens is used to converge a reflected light path to the corresponding photosensitive chip.

[0091] For example, taking L as 2 as an example, Figure 2 This is a schematic diagram illustrating a scenario where a color mark sensor detects a color mark, according to an embodiment of this application. Figure 2 In the color mark sensor, there is one transmitting unit 110 and two receiving units 120. The transmitting unit 110 includes a light source and a transmitting lens. The first receiving unit 120 includes a first photosensitive chip and a first receiving lens. The second receiving unit 120 includes a second photosensitive chip and a second receiving lens.

[0092] exist Figure 2 In the process, the light source generates and emits probe light; the emitting lens converges the incident probe light and illuminates the object surface; the object surface reflects two paths of emitted light, the first receiving lens converges the first path of reflected light to the first photosensitive chip, and the second receiving lens converges the second path of reflected light to the second photosensitive chip.

[0093] In one possible example, the L receiving units 120 include L photosensitive units of a photosensitive chip, with each of the L photosensitive units corresponding to one of the L reflected light paths, and each photosensitive unit is used to receive the corresponding reflected light path.

[0094] Optionally, the photosensitive unit includes a pixel array for converting the received optical signal from one of the reflectors into an electrical signal.

[0095] Optionally, the L receiving units 120 further include L receiving lenses, each of which corresponds to one of the L photosensitive units. Each receiving lens is used to converge a path of reflected light to the corresponding photosensitive unit.

[0096] For example, taking L as 2 as an example, Figure 3 This is a schematic diagram illustrating another scenario where a color mark sensor detects a color mark, according to an embodiment of this application. Figure 3 In the color mark sensor, there is one transmitting unit 110 and two receiving units 120. The transmitting unit 110 includes a light source and a transmitting lens. The first receiving unit 120 includes a first photosensitive unit of a photosensitive chip and a first receiving lens. The second receiving unit 120 includes a second photosensitive unit of a photosensitive chip and a second receiving lens.

[0097] exist Figure 3 In the process, the light source generates and emits detection light; the emitting lens converges the incident detection light and illuminates the object surface; the object surface reflects two paths of emitted light, the first receiving lens converges the first path of reflected light to the first photosensitive unit, and the second receiving lens converges the second path of reflected light to the second photosensitive unit.

[0098] In one possible example, the processing unit 130 includes a data processing unit, an interference determination unit, and a data output unit. The data processing unit is used to perform analog-to-digital conversion and quantization on the electrical signals output by the L receiving units 120 to obtain data corresponding to the light intensity of the L reflected lights. The interference determination unit is used to determine whether there is a specular reflection component in each of the L reflected lights. The data output unit is used to output the detection results.

[0099] In one possible example, processing unit 130 is a processor or controller. For example, processing unit 130 is a central processing unit (CPU), a general-purpose processor, an electronic control unit (ECU), a microcontroller unit (MCU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), or a field-programmable gate array (FPGA).

[0100] The following is an example of a data processing method according to an embodiment of this application.

[0101] Figure 4 This is a flowchart illustrating a data processing method according to an embodiment of this application. Figure 4 In this method, the color mark sensor 10 is used to identify the difference in surface reflectance characteristics between the measured object and the calibrated object. Figure 4 The method includes: S410. Receive the L-channel first reflected light from the calibration object and calibrate the L sets of calibration data corresponding to the light intensity of the L-channel first reflected light. There is no specular reflection component in each of the L-channel first reflected light.

[0102] S420. Receive the L-channel second reflected light from the object under test, and measure the L sets of measurement data corresponding to the light intensity of the L-channel second reflected light. The L sets of measurement data correspond one-to-one with the L sets of calibration data.

[0103] S430. Determine judgment information based on at least L sets of measurement data. The judgment information is used to indicate whether there is a specular reflection component in each of the L paths of second reflected light.

[0104] S440. Based on the judgment information, determine the data similarity between the L-group calibration data and the L-group measurement data.

[0105] S450. Based on data similarity, identify the differences in surface reflectance characteristics between the tested object and the calibration object.

[0106] Using the above method, the L receiving units of the color mark sensor receive L paths of reflected light, enabling the reception of multiple reflected light from multiple different angles. By setting each of the L paths of the first reflected light from the calibration object to have no specular reflection component, the color mark sensor receives only the multiple diffuse reflection components of the calibration object, and uses the L sets of calibration data obtained from the calibration as the standard reference for detection.

[0107] Since specular reflection is directional reflection, meaning the color mark sensor can only receive specular reflection at a specific angle, when receiving L second-path reflected light from the object being measured from L different angles, while ensuring that each of the L second-path reflected light contains diffuse reflection components, it is necessary to prevent all of the L second-path reflected light from simultaneously containing specular reflection components, thus ensuring that at least one second-path reflected light does not contain specular reflection components.

[0108] Since the L sets of calibration data serve as the standard reference and the L sets of measurement data serve as the actual measurement data, it is possible to determine, based on at least the L sets of measurement data, whether specular reflection components exist in each of the L paths of second reflected light. Based on this determination, the data similarity determined by the determination information can minimize interference from specular reflection, thereby improving the accuracy of surface reflection characteristic differences identified by data similarity. This, in turn, reduces the interference of specular reflection on color mark detection, enhancing the accuracy and reliability of color mark detection.

[0109] The following provides further examples illustrating the content of S410.

[0110] Receiving the L-path first reflected light from the calibrated object can be understood as receiving the L-path first reflected light reflected from the surface of the calibrated object by the probe light through L receiving units 120, with the i-th receiving unit 120 receiving the i-th path of first reflected light, where i is an integer from 1 to L.

[0111] There is no specular reflection component in each of the L-channel first reflected light. This can be understood as follows: during the calibration stage, by placing the calibration object in the standard detection position and adjusting the installation angle, detection distance, illumination angle, and receiving angle of the color mark sensor, the L channels of first reflected light received by the L receiving units 120 are made to have no specular reflection component and only diffuse reflection component.

[0112] For example, in the above Figure 2 In the middle, assuming Figure 2The surface of the object in the model is the surface of the calibration object, and the two reflected lights are the two first reflected lights. By properly placing the calibration object and adjusting the relevant angle of the color mark sensor, it is possible to ensure that there is no specular reflection component in the two first reflected lights.

[0113] In one possible example, the light intensity of the first reflected light from path L is the intensity of the first reflected light from path L, which can be characterized by luminous flux, luminous intensity, or illuminance.

[0114] In one possible example, the L sets of calibration data corresponding to the light intensity of the L-path first reflected light are the sampled quantization data obtained after photoelectric conversion and analog-to-digital conversion of the L-path first reflected light.

[0115] Photoelectric conversion can be understood as converting the first reflected light from the L-channel from an optical signal into an analog electrical signal; analog-to-digital conversion can be understood as converting an analog electrical signal into a digital electrical signal.

[0116] Optionally, the calibration to obtain L sets of calibration data corresponding to the light intensity of the L-channel first reflected light includes: performing photoelectric conversion, analog-to-digital conversion and quantization on the L-channel first reflected light to obtain L sets of calibration data corresponding to the light intensity of the L-channel first reflected light.

[0117] In one possible example, the L sets of calibration data include X calibration values ​​corresponding to the light intensity of X color bands in the L-path first reflected light, and the i-th set of calibration data includes X calibration values ​​corresponding to the light intensity of X color bands in the i-th path first reflected light, where X is an integer greater than or equal to 1.

[0118] For example, taking the emitting unit 110 as an example, which includes a light source with X color bands, the color mark sensor 10 sequentially drives the internal LEDs with X color bands to emit monochromatic probe light, which illuminates the surface of the calibration object. The probe light is reflected on the surface of the calibration object to generate first reflected light. L receiving units 120 receive L channels of first reflected light and convert the light signals of the X color bands in the L channels of first reflected light into corresponding analog electrical signals, i.e., photoelectric conversion. The processing unit 130 processes the analog electrical signals, performs analog-to-digital conversion, and finally quantizes and outputs X calibration values ​​corresponding to the light intensity of the X color bands.

[0119] Optionally, the X color bands are determined by the type of light source in the emitting unit 110. For example, when the light source is an RGB light source, the X color bands are red, green, and blue bands; when the light source is a single red light source, the X color bands are red bands; when the light source is a single green light source, the X color bands are green bands; and when the light source is a single blue light source, the X color bands are blue bands.

[0120] Optionally, if the X color bands are red, green, and blue bands, i.e., X=3, then the X calibration values ​​corresponding to the light intensity of the X color bands include RGB calibration values.

[0121] For example, the X calibration values ​​corresponding to the light intensity of the X color bands in the first reflected light of the i-th path are RGB calibration values, which are denoted as follows: ; in, This represents the calibration value corresponding to the light intensity of the red band in the first reflected light from the i-th path. This represents the calibration value corresponding to the light intensity of the green band in the first reflected light from the i-th path. This represents the calibration value corresponding to the light intensity of the blue band in the first reflected light of the i-th path.

[0122] Taking the RGB calibration value range of 0 to 255 as an example, , , .

[0123] The following provides further examples illustrating the content of S420.

[0124] Receiving L paths of second reflected light from the object being measured can be understood as receiving L paths of second reflected light reflected from the surface of the object being measured by the probe light through L receiving units 120, with the i-th receiving unit 120 receiving the i-th path of second reflected light, where i is an integer from 1 to L.

[0125] Since both the i-th first reflected light and the i-th second reflected light are received by the i-th receiving unit 120, the i-th first reflected light corresponds to the i-th second reflected light, and the L-th first reflected light corresponds to the L-th second reflected light one-to-one.

[0126] The L sets of measurement data correspond one-to-one with the L sets of calibration data. This can be understood as follows: since the first reflected light of the i-th path corresponds to the second reflected light of the i-th path, the i-th set of measurement data corresponds to the i-th set of calibration data.

[0127] Since the diffuse reflection component is scattered uniformly in all directions, the color mark sensor 10 will receive a certain diffuse reflection component no matter how the receiving angle of the color mark sensor 10 is adjusted, so that each of the second reflected lights in the L-path second reflected light contains a diffuse reflection component.

[0128] In one possible example, a portion of the second reflected light in the L-path second reflected light contains a specular reflection component, or none of the second reflected light contains a specular reflection component, or all of the second reflected light contains a specular reflection component.

[0129] For example, in the above Figure 2In the middle, assuming Figure 2 The object surface in the two paths is the surface of the object being measured, and the two reflected lights are two second reflected lights. At this time, the first second reflected light in the two second reflected lights does not have a specular reflection component, and the second second reflected light has a specular reflection component, or neither of the two second reflected lights has a specular reflection component, or both of the two second reflected lights have a specular reflection component.

[0130] In one possible example, the light intensity of the second reflected light from path L is the intensity of the second reflected light from path L, which can be characterized by luminous flux, luminous intensity, or illuminance.

[0131] In one possible example, the L sets of measurement data corresponding to the light intensity of the L-path second reflected light are the sampled and quantized data obtained after photoelectric conversion and analog-to-digital conversion of the L-path second reflected light.

[0132] Optionally, the measurement of L sets of measurement data corresponding to the light intensity of the L-channel second reflected light includes: performing photoelectric conversion, analog-to-digital conversion and quantization on the L-channel second reflected light to obtain L sets of measurement data corresponding to the light intensity of the L-channel second reflected light.

[0133] In one possible example, the L sets of measurement data include X measurements corresponding to the light intensity of X color bands in the L-path second reflected light, and the i-th set of measurement data includes X measurements corresponding to the light intensity of X color bands in the i-th-path second reflected light, where X is an integer greater than or equal to 1, and i is an integer from 1 to L.

[0134] For example, taking the emitting unit 110 as an example, which includes a light source with X color bands, the color mark sensor 10 sequentially drives the internal LEDs with X color bands to emit monochromatic probe light, which illuminates the surface of the object being measured. The probe light is reflected on the surface of the object to generate second reflected light. L receiving units 120 receive L channels of second reflected light and convert the light signals of the X color bands in the L channels of second reflected light into corresponding analog electrical signals. The processing unit 130 processes the analog electrical signals, performs analog-to-digital conversion, and finally quantizes and outputs X measurement values ​​corresponding to the light intensity of the X color bands.

[0135] Optionally, the X color bands are determined by the type of light source in the emitting unit 110. For example, when the light source is an RGB light source, the X color bands are red, green, and blue bands; when the light source is a single red light source, the X color bands are red bands; when the light source is a single green light source, the X color bands are green bands; and when the light source is a single blue light source, the X color bands are blue bands.

[0136] Optionally, if the X color bands are red, green, and blue bands, i.e., X=3, then the X measurements corresponding to the light intensity of the X color bands are RGB measurements.

[0137] For example, the X calibration values ​​corresponding to the light intensity of the X color bands in the i-th second reflected light are RGB measurement values, which are denoted as follows: ; in, This represents the measured value corresponding to the light intensity of the red band in the second reflected light from the i-th path. This represents the measured value corresponding to the light intensity of the green band in the second reflected light from the i-th path. This represents the measured value corresponding to the light intensity of the blue band in the second reflected light of the i-th path.

[0138] Taking the RGB measurement value range of 0 to 255 as an example, , , .

[0139] The following provides further examples illustrating the content of S430.

[0140] The determination information is used to indicate whether there is a specular reflection component in each of the L-path second reflected light. It can be understood that the determination information indicates whether there is a specular reflection component in each of the L-path second reflected light.

[0141] In one possible example, the decision information includes L pieces of information, where the i-th piece of information indicates whether or not a specular reflection component exists in the i-th path of the second reflected light.

[0142] The following examples illustrate the determination of information in various possible ways. These methods can be combined to form new methods. For details of these new methods, please refer to the relevant content. They will not be repeated here.

[0143] The following example illustrates how to determine the judgment information using Method 1.

[0144] In "Method 1", the i-th set of calibration data in the L-group calibration data includes X calibration values ​​corresponding to the light intensity of X color bands in the i-th first reflected light, and the i-th set of measurement data in the L-group measurement data includes X measurement values ​​corresponding to the light intensity of X color bands in the i-th second reflected light.

[0145] For example, taking "Method 1" as having X color bands of red, green, and blue, and X=3, the X calibration values ​​corresponding to the light intensity of the X color bands in the first reflected light of the i-th path are recorded as follows: ; At this time, the L group calibration data includes , This represents the RGB calibration values ​​corresponding to the light intensity of X color bands in the first reflected light from the first path. This represents the RGB calibration values ​​corresponding to the light intensity of the X color bands in the first reflected light from the second path. This represents the RGB calibration value corresponding to the light intensity of the X color bands in the first reflected light of the Lth path.

[0146] Correspondingly, the X measured values ​​of the light intensity of the X color bands in the i-th second reflected light are denoted as follows: ; At this time, the L group of measurement data includes , This represents the RGB measurement values ​​corresponding to the light intensity of X color bands in the second reflected light from the first path. This represents the RGB measurement values ​​corresponding to the light intensity of X color bands in the second reflected light from the second path. This represents the RGB measurement value corresponding to the light intensity of the X color bands in the second reflected light of the Lth path.

[0147] In "Method 1", at least L sets of measurement data are used to determine the judgment information, including: Based on L sets of calibration data, calculate L first single-path total values ​​and L sets of first single-path color ratios. The i-th first single-path total value is the sum of X calibration values ​​corresponding to the light intensity of X color bands in the i-th first reflected light. The i-th set of first single-path color ratios includes the ratios of the X calibration values ​​corresponding to the light intensity of X color bands in the i-th first reflected light to the i-th first total value. Based on L sets of measurement data, calculate L total values ​​of the second single channel and L color ratios of the second single channel. The i-th total value of the second single channel is the sum of X measured values ​​corresponding to the light intensity of X color bands in the i-th second reflected light. The i-th color ratio of the second single channel includes the ratios of the X measured values ​​corresponding to the light intensity of X color bands in the i-th second reflected light to the i-th total value of the second single channel. The judgment information is determined based on the color ratio of the first single channel in group L, the color ratio of the second single channel in group L, the total value of the first single channel L, and the total value of the second single channel L.

[0148] In "Method 1", L first single-path total values ​​are used to indicate the total light intensity of X color bands in the L first reflected light, and are used to characterize the surface light intensity characteristics of the calibrated object. The i-th first single-path total value is used to indicate the total light intensity of X color bands in the i-th first reflected light.

[0149] L second single-channel total values ​​are used to indicate the total light intensity of X color bands in the L channels of second reflected light, and are used to characterize the surface light intensity characteristics of the object being measured. The i-th second single-channel total value is used to indicate the total light intensity of X color bands in the i-th channel of second reflected light.

[0150] When the surface of the object being measured undergoes specular reflection and the color mark sensor 10 receives the specular reflection component, the light intensity of each of the X color bands in a portion of the second reflected light will increase synchronously compared to the light intensity of each of the X color bands in the corresponding first reflected light. This results in an increase in the total light intensity of the X color bands in that portion of the second reflected light, and the total values ​​of the L second single channels differ from the total values ​​of the L first single channels. For example, taking the X color bands as red, green, and blue bands, and X=3, assume that the light intensity of each of the RGB color bands in the first second emitted light will increase synchronously compared to the light intensity of each of the RGB color bands in the first first reflected light.

[0151] Thus, in "Method 1", based on the L first single-channel total values ​​and the L second single-channel total values, the difference in surface light intensity characteristics between the tested object and the calibration object can be determined, thereby identifying the difference in surface reflection characteristics between the tested object and the calibration object.

[0152] The first single-channel color ratio of group L is used to indicate the proportion of the light intensity of each of the X color bands in the first reflected light of the L channel to the total light intensity. It is used to characterize the surface color characteristics of the calibrated object and to determine whether the surface color of the tested object matches the surface color of the calibrated object.

[0153] The first single-path color ratio of the i-th group is used to indicate the proportion of the light intensity of each of the X color bands in the first reflected light of the i-th path to the total light intensity.

[0154] The L-group second single-channel color ratio is used to indicate the proportion of the light intensity of each of the X color bands in the L-channel second reflected light to the total light intensity, and is used to characterize the surface color characteristics of the object being measured.

[0155] The second single-path color ratio of the i-th group is used to indicate the proportion of the light intensity of each of the X color bands in the second reflected light of the i-th path to the total light intensity.

[0156] When the surface of the object being measured undergoes specular reflection and the color mark sensor 10 receives the specular reflection component, the light intensity of each of the X color bands in a portion of the second reflected light will increase synchronously with the light intensity of each of the X color bands in the corresponding first reflected light. However, the color ratio of the second single channel in group L is basically consistent with the color ratio of the first single channel in group L.

[0157] Thus, in "Method 1", the difference in surface color characteristics between the tested object and the calibration object can be determined based on the first single-channel color ratio of group L and the second single-channel color ratio of group L, thereby identifying the difference in surface reflection characteristics between the tested object and the calibration object.

[0158] It can be seen that, based on the color ratio of the first single channel in group L, the color ratio of the second single channel in group L, the total value of the first single channel L, and the total value of the second single channel L, it is possible to accurately determine whether there is a specular reflection component in each of the second reflected lights in the L channels, thereby improving the accuracy of the determination information. Thus, based on the determination of data similarity according to the determination information, the accuracy of the differences in surface reflection characteristics identified by data similarity is improved.

[0159] For example, L sets of calibration data include The L group of measurement data includes For example, according to Calculate the total value of the i-th first single channel and the color ratio of the i-th group of first single channels. The total value of the i-th first single channel and the color ratio of the i-th group of first single channels satisfy the following: ; }; ; ; ; in, This represents the total value of the first single path in the i-th case. This represents the color ratio of the first single path in the i-th group. express and The ratio, express and The ratio, express and The ratio of .

[0160] At this point, the total value of the L first single path is denoted as , This represents the total value of the first single path. This represents the total value of the second single path. This represents the total value of the first single path of the Lth element.

[0161] The color ratio of the first single channel in group L is denoted as: , This indicates the color ratio of the first single channel in group 1. This indicates the color ratio of the first single channel in the second group. This indicates the color ratio of the first single channel in group L.

[0162] according to Calculate the total value of the i-th second single channel and the color ratio of the i-th group of second single channels. The total value of the i-th second single channel and the color ratio of the i-th group of second single channels satisfy the following: ; }; ; ; ; in, This represents the total value of the i-th second single path. This represents the color ratio of the second single path in the i-th group. express and The ratio, express and The ratio, express and The ratio of .

[0163] At this point, the total value of the L second single-paths is denoted as , This represents the total value of the first second single-path. This represents the total value of the second single path. This represents the total value of the Lth second single-path.

[0164] The color ratio of the second single channel in group L is denoted as... , This indicates the color ratio of the second single channel in group 1. This indicates the color ratio of the second single channel in the second group. This indicates the color ratio of the second single channel in group L.

[0165] Finally, according to , , , Determine the judgment information.

[0166] In a possible example, "Method 1" determines the judgment information based on the L-group first single-channel color ratio, the L-group second single-channel color ratio, the L total values ​​of the first single channels, and the L total values ​​of the second single channels, including: Based on the color ratio of the first single channel in group L and the color ratio of the second single channel in group L, calculate the color ratio deviation of L single channels. The color ratio deviation of the i-th single channel is the sum of the absolute values ​​of the same color ratio deviation between the color ratio of the first single channel in group i and the color ratio of the second single channel in group i, or the color ratio deviation of the i-th single channel is the maximum absolute value of the same color ratio deviation between the color ratio of the first single channel in group i and the color ratio of the second single channel in group i. Based on the L total values ​​of the first single path and the L total values ​​of the second single path, calculate the ratio of the L total values ​​of the single path. The ratio of the total value of the i-th single path is the ratio of the total value of the i-th second single path to the total value of the i-th first single path. If the color ratio deviation of the i-th single channel is less than or equal to the preset deviation threshold and the total value ratio of the i-th single channel is greater than or equal to the preset ratio threshold, then the i-th information in the judgment information is determined. The i-th information is used to indicate that there is a specular reflection component in the i-th second reflected light. If the color ratio deviation of the i-th single channel is greater than the preset deviation threshold, or the total value ratio of the i-th single channel is less than the preset ratio threshold, then the i-th information in the judgment information is determined. The i-th information is used to indicate that there is no specular reflection component in the i-th second reflected light.

[0167] In this example, the i-th single-channel color ratio deviation can be understood as the deviation between the second single-channel color ratio of the i-th group and the first single-channel color ratio of the i-th group.

[0168] L single-channel color ratio deviations are used to characterize the differences in surface color characteristics between the tested object and the calibration object.

[0169] If the deviation of the i-th single-path color ratio is less than or equal to the preset deviation threshold, it can be understood that the deviation between the second single-path color ratio of the i-th group and the first single-path color ratio of the i-th group is small and the two are basically consistent, indicating that the color ratio between the second reflected light of the i-th channel and the first reflected light of the i-th channel is basically the same.

[0170] If the ratio of the total value of the i-th single channel is greater than or equal to the preset ratio threshold, it can be understood that the total value of the i-th second single channel is larger than the total value of the i-th first single channel, indicating that the total light intensity of the X color bands in the second reflected light will be much greater than the total light intensity of the X color bands in the first reflected light.

[0171] The L single-channel total value ratio is used to characterize the difference in surface light intensity characteristics between the tested object and the calibration object.

[0172] As can be seen, since specular reflection interference only increases the total intensity of reflected light to cause overexposure or saturation, but does not change the color ratio, if the color ratio between the i-th second reflected light and the i-th first reflected light is basically the same, and the total intensity of X color bands in the second reflected light increases significantly, then it is determined that there is a specular reflection component in the i-th second reflected light; otherwise, it is determined that there is no specular reflection component in the i-th second reflected light, thereby accurately determining whether there is a specular reflection component in each of the L second reflected lights, and improving the accuracy of the determination information.

[0173] For example, in the above-mentioned basis , , , In the determination information, according to and Calculate the color ratio deviation of the i-th single channel. The color ratio deviation of the i-th single channel satisfies the following: ,or ; in, This represents the color ratio deviation of the i-th single channel. express and The sum of the absolute values ​​of the proportional deviations of the same color between them. express and The maximum absolute value of the deviation in the proportion of the same color between them.

[0174] At this point, the L single-channel color ratio deviations are denoted as... , This indicates the color ratio deviation of the first single channel. This indicates the color ratio deviation of the second single channel. This represents the color ratio deviation of the Lth single channel.

[0175] according to and Calculate the total value ratio of the i-th single channel. The total value ratio of the i-th single channel satisfies the following: .

[0176] At this point, the proportion of the total value of the L single channels is denoted as: , This indicates the percentage of the total value of the first single channel. This indicates the proportion of the total value of the second single channel. This represents the percentage of the total value of the Lth single channel.

[0177] Assume the preset deviation threshold is denoted as The preset ratio threshold is denoted as ,like and If the i-th path second reflected light contains a specular reflection component, then the i-th path second reflected light contains a specular reflection component; otherwise (e.g.) or There is no specular reflection component in the second reflected light of the i-th path.

[0178] The following example illustrates how to determine the judgment information using Method 2.

[0179] In "Method 2", the i-th set of measurement data within the L sets of measurement data includes X measurement values ​​corresponding to the light intensity of X color bands in the i-th path of the second reflected light; at least based on the L sets of measurement data, determination information is made, including: If the X measured values ​​corresponding to the light intensity of the X color bands in the i-th second reflected light are all less than the corresponding preset maximum measured values, then the i-th information in the judgment result is determined. The i-th information is used to indicate that there is no specular reflection component in the i-th second reflected light.

[0180] If the measured value of the light intensity of any color band in the i-th second reflected light is greater than or equal to the corresponding preset maximum measured value, then the i-th information in the determination information is determined. The i-th information is used to indicate that there is a specular reflection component in the i-th second reflected light.

[0181] In "Method 2", the X measured values ​​corresponding to the light intensity of the X color bands in the i-th second reflected light are all less than the corresponding preset maximum measured values. This can be understood as the light intensity of the X color bands in the i-th second reflected light not being overexposed or saturated. Therefore, it can be determined that there is no specular reflection component in the i-th second reflected light.

[0182] If the measured value of the light intensity of any color band in the i-th second reflected light is greater than or equal to the corresponding preset maximum measured value, it can be understood that the light intensity of at least one color band in the i-th second reflected light is overexposed or saturated. Therefore, it can be determined that there is a specular reflection component in the i-th second reflected light.

[0183] As can be seen, since specular reflection interference can lead to an increase in the total intensity of reflected light, resulting in overexposure or saturation of the reflected light intensity, this application introduces a preset maximum measurement value and determines whether the X measurement values ​​corresponding to the light intensity of X color bands in each second reflected light are all less than the corresponding preset maximum measurement value, thereby accurately determining whether there is a specular reflection component in each of the L second reflected lights and improving the accuracy of the determination information.

[0184] For example, taking "Method 2" as having X color bands of red, green, and blue, and X=3, the X measured values ​​corresponding to the light intensity of the X color bands in the i-th second reflected light are recorded as follows: .

[0185] Assume the preset maximum measurement value corresponding to the light intensity of the red band is denoted as... The preset maximum measurement value corresponding to the light intensity of the green band is denoted as... The preset maximum measurement value corresponding to the light intensity of the blue band is denoted as... If satisfied , , If any one of these three conditions is met, then the i-th path of the second reflected light contains a specular reflection component; otherwise (if all three conditions are met simultaneously)... , , Of these three items, there is no specular reflection component in the second reflected light of the i-th path.

[0186] Optionally, the preset maximum measurement values ​​corresponding to the light intensity of the X color bands are the same. For example, if the maximum value that the processing unit 130 can quantize the digital electrical signal is 4095, then the preset maximum measurement value is 4095. For example, .

[0187] The following provides further examples illustrating the content of S440.

[0188] The data similarity between the L-group calibration data and the L-group measurement data can be understood as the degree of matching between the L-group calibration data and the L-group measurement data in terms of surface color characteristics and surface light intensity characteristics. It can be used to identify the differences in surface reflection characteristics between the measured object and the calibration object.

[0189] For example, this application introduces a similarity threshold. When the data similarity is greater than or equal to the similarity threshold, it indicates that the data similarity is relatively large, the L-group calibration data and the L-group measurement data have a high degree of matching in terms of surface color features and surface light intensity features, and the surface reflection characteristics between the measured object and the calibration object are relatively similar.

[0190] Correspondingly, when the data similarity is less than the similarity threshold, it indicates that the data similarity is small, the L-group calibration data and the L-group measurement data have a low degree of matching in terms of surface color features and surface light intensity features, and the surface reflection characteristics between the measured object and the calibration object are significantly different.

[0191] The following examples illustrate various possible methods for determining the data similarity between L sets of calibration data and L sets of measurement data. These methods can be combined to form new methods, the details of which can be found in relevant materials and will not be elaborated here.

[0192] The following example illustrates how to determine data similarity using method A.

[0193] In "Method A", based on the judgment information, the data similarity between L sets of calibration data and L sets of measurement data is determined, including: Based on the judgment information, determine a confidence weight for each of the L paths of second reflected light, and obtain L confidence weights; Based on L sets of calibration data and L sets of measurement data, L single-path similarities are determined. The i-th single-path similarity is the similarity between the i-th set of measurement data and the i-th set of calibration data. The L single-path similarities correspond one-to-one with the L confidence weights. Based on L confidence weights and L single-path similarities, the data similarity between L sets of calibration data and L sets of measurement data is determined.

[0194] The i-th single-path similarity can be understood as the degree of matching between the i-th set of calibration data and the i-th set of measurement data in terms of surface color features and surface light intensity features.

[0195] As can be seen, since the judgment information is used to indicate whether there is a specular reflection component in each of the L paths of second reflected light, the L confidence weights determined according to the judgment information are related to whether there is a specular reflection component in the second reflected light, so that the data similarity determined according to the L confidence weights can avoid interference from specular reflection as much as possible.

[0196] For example, L sets of calibration data include The L group of measurement data includes For example, based on the judgment information, L credibility weights are determined, and the L credibility weights are denoted as follows: ; in, This represents a confidence weight corresponding to the second reflected light from the first path. This represents a confidence weight corresponding to the second reflected light from the second path. This represents a confidence weight corresponding to the second reflected light from the Lth path.

[0197] according to and Determine L single-path similarities, denoted as follows: ; in, This represents the first single-path similarity, which is... and The similarity between them; This represents the second single-path similarity, which is... and The similarity between them; Let L be the single-path similarity, and let L be the similarity of L. and The similarity between them.

[0198] according to and ,Sure and The data similarity between them is denoted as . .

[0199] In a possible example, "Method A" determines L single-path similarities based on L sets of calibration data and L sets of measurement data, including: Based on L sets of calibration data, calculate L first single-path total values ​​and L sets of first single-path color ratios. The i-th first single-path total value is the sum of X calibration values ​​corresponding to the light intensity of X color bands in the i-th first reflected light. The i-th set of first single-path color ratios includes the ratios of the X calibration values ​​corresponding to the light intensity of X color bands in the i-th first reflected light to the i-th first total value. Based on L sets of measurement data, calculate L total values ​​of the second single channel and L color ratios of the second single channel. The i-th total value of the second single channel is the sum of X measured values ​​corresponding to the light intensity of X color bands in the i-th second reflected light. The i-th color ratio of the second single channel includes the ratios of the X measured values ​​corresponding to the light intensity of X color bands in the i-th second reflected light to the i-th total value of the second single channel. Based on the color ratio of the first single channel in group L and the color ratio of the second single channel in group L, calculate the color ratio deviation of L single channels. The color ratio deviation of the i-th single channel is the sum of the absolute values ​​of the same color ratio deviation between the color ratio of the first single channel in group i and the color ratio of the second single channel in group i, or the color ratio deviation of the i-th single channel is the maximum absolute value of the same color ratio deviation between the color ratio of the first single channel in group i and the color ratio of the second single channel in group i. Based on the L first single-path total values ​​and the L second single-path total values, calculate the ratio of the L single-path total values. The ratio of the i-th single-path total value is the ratio of the i-th first single-path total value to the i-th second single-path total value. The similarity of L individual channels is determined based on the color ratio deviation of L individual channels and the total value ratio of L individual channels.

[0200] As can be seen, since the L first single-channel total values ​​are used to characterize the surface light intensity characteristics of the calibration object and the L second single-channel total values ​​are used to characterize the surface light intensity characteristics of the test object, the ratio of the L single-channel total values ​​is used to characterize the difference in surface light intensity characteristics between the test object and the calibration object.

[0201] Since the first single-channel color ratio of group L is used to characterize the surface color characteristics of the calibration object and the second single-channel color ratio of group L is used to characterize the surface color characteristics of the tested object, the deviation of the L single-channel color ratios can be used to characterize and determine the difference in surface color characteristics between the tested object and the calibration object.

[0202] Thus, by determining the L single-channel similarity based on the L single-channel color ratio deviation and the L single-channel total value ratio, the L single-channel similarity can be used to characterize the degree of matching between the L sets of calibration data and the L sets of measurement data in terms of surface color characteristics and surface light intensity characteristics. It can be used to identify the differences in surface reflection characteristics between the measured object and the calibration object, thereby improving the accuracy and reliability of identification.

[0203] For example, the total value of the L first single paths in "Method 1" above is The color ratio of the first single channel in group L is The total value of L second single-paths is The color ratio of the second single channel in group L is The color ratio deviation of L single channels is The proportion of the total value of L single channels is For example, according to and Sure , Depend on and Sure, Depend on and Sure, Depend on and Sure.

[0204] Optionally, determining the L single-channel similarity based on the L single-channel color ratio deviations and the L single-channel total value ratios in "Method A" includes: Calculate the weighted average of the color ratio deviation of the L individual channels and the total value ratio of the L individual channels to obtain the similarity of the L individual channels. The similarity of the i-th individual channel is the weighted average of the color ratio deviation of the i-th individual channel and the total value ratio of the i-th individual channel.

[0205] It is evident that by weighting the L individual color ratio deviations with the L individual total value ratios, it is easy to determine the similarity of the L individual channels.

[0206] For example, with L single-channel color ratio deviations as The proportion of the total value of L single channels is For example, the similarity of the i-th single path satisfies the following: ; ; in, This represents the similarity of the i-th single path. and These represent the preset weighting coefficients.

[0207] Optionally, determining the L single-channel similarity based on the L single-channel color ratio deviations and the L single-channel total value ratios in "Method A" includes: Calculate the logarithm of the total percentage of L individual channels; Calculate the weighted sum of the logarithms of the L individual color ratio deviations and the L individual total value ratios to obtain L total differences. The i-th total difference is the weighted sum of the logarithms of the i-th individual color ratio deviation and the i-th individual total value ratio. Calculate the exponents of the L total differences, and round the exponents of the L total differences to obtain the L single-path similarities. The i-th single-path similarity is the rounded exponent of the i-th total difference.

[0208] It can be seen that by calculating the logarithm of the ratio of the total value of L single channels, the light intensity characteristics can be logarithmically transformed to adapt to different reflectivity materials of the measured object or changes in detection distance.

[0209] For example, with L single-channel color ratio deviations as The proportion of the total value of L single channels is For example, the logarithm of the proportion of the total value of the i-th single path satisfies the following: ; in, This indicates the preset amplification factor. The value range is from 100 to 1000. This represents a logarithmic function with the natural constant e as its base.

[0210] The i-th total difference satisfies the following: ; in, and These represent the preset adjustable coefficients. The value range is from 0.5 to 1.5. The value range is from 0.1 to 1.0. and The value can be adjusted according to the material and reflective properties of the object being measured.

[0211] The i-th single-path similarity satisfies the following: ; in, This represents the rounding function. Represents the sensitivity coefficient. The value range is from 0.0001 to 0.1.

[0212] Optionally, the sum of the L confidence weights in "Method A" is 1, and each confidence weight is greater than 0 and less than 1; based on the L confidence weights and L single-path similarities, the data similarity between the L sets of calibration data and the L sets of measurement data is determined, including: Based on L confidence weights, the fusion weighted average of L single-path similarities is calculated to obtain the data similarity between L sets of calibration data and L sets of measurement data.

[0213] It is evident that by calculating the fusion weighted average of L single-path similarities based on L confidence weights, it is easy to determine the data similarity between L sets of calibration data and L sets of measurement data.

[0214] For example, using L confidence weights as L single-path similarity is For example, the data similarity between L sets of calibration data and L sets of measurement data satisfies the following: .

[0215] Optionally, in “Method A”, if the i-th piece of information in the determination information indicates that there is no specular reflection component in the i-th path of the second reflected light, then the confidence weight of the i-th piece of information is 1. If the i-th piece of information in the judgment information indicates that there is a specular reflection component in the i-th second reflected light, then the confidence weight of the i-th piece of information is 0.

[0216] It should be noted that if all L confidence weights are 0, it means that the identification of the difference in surface reflection characteristics between the measured object and the calibrated object has failed, and the color mark sensor 10 will trigger an alarm or output an error code.

[0217] At this point, based on L confidence weights and L single-path similarities, the data similarity between L sets of calibration data and L sets of measurement data is determined, including: Based on L confidence weights, N single-path similarities are determined from the L single-path similarities. The confidence weight corresponding to each single-path similarity in the N single-path similarities is 1, and N is a positive integer less than or equal to L. Based on N single-path similarities, N weighting coefficients are determined. The sum of the N weighting coefficients is 1. Each weighting coefficient is greater than 0 and less than 1. There is a one-to-one correspondence between the N single-path similarities and the N weighting coefficients. Based on N weighting coefficients, calculate the fusion weight of N single-path similarities to obtain the data similarity between L sets of calibration data and L sets of measurement data.

[0218] It can be seen that when there is no specular reflection component in the i-th second reflected light, the i-th confidence weight is set to 1; when there is a specular reflection component in the i-th second reflected light, the i-th confidence weight is set to 0.

[0219] In this way, based on L confidence weights, N single-path similarities with a confidence weight of 1 are selected from L single-path similarities, and single-path similarities that are affected by specular reflection are excluded. Finally, the N single-path similarities are fused and weighted to obtain the data similarity, so that the data similarity can avoid the interference of specular reflection as much as possible, thereby improving the accuracy of the differences in surface reflection characteristics identified by the data similarity.

[0220] For example, taking the i-th confidence weight as L single-path similarity is For example, if the i-th path of the second reflected light does not contain a specular reflection component, then ;otherwise, .

[0221] Assumption There exists N single-path similarity, denoted as , This represents the first one-way similarity among the N one-way similarities. The corresponding credibility weight is 1. This represents the Nth single-path similarity among the N single-path similarities. The corresponding credibility weight is 1.

[0222] according to Determine N weighting coefficients, denoted as . And satisfy the following: ; The data similarity between the L-group calibration data and the L-group measurement data satisfies the following: .

[0223] The following example illustrates how to determine data similarity using method B.

[0224] In "Method B", based on the judgment information, L sets of calibration data, and L sets of measurement data, the data similarity between L sets of calibration data and L sets of measurement data is determined, including: Based on the judgment information, N second reflected lights are determined within L second reflected lights. Each of the N second reflected lights does not contain a specular reflection component, and N is a positive integer less than or equal to L. Select the N sets of calibration data corresponding to the Nth path of the second reflected light from the L sets of calibration data; Select N sets of measurement data corresponding to the Nth path of the second reflected light from the L sets of measurement data; Based on N sets of calibration data and N sets of measurement data, N single-path similarities are determined. The j-th single-path similarity is the similarity between the j-th set of measurement data and the j-th set of calibration data, where j is an integer from 1 to N. Based on N single-path similarities, N weighting coefficients are determined. The sum of the N weighting coefficients is 1. Each weighting coefficient is greater than 0 and less than 1. There is a one-to-one correspondence between the N single-path similarities and the N weighting coefficients. Based on N weighting coefficients, calculate the fusion weight of N single-path similarities to obtain the data similarity between L sets of calibration data and L sets of measurement data.

[0225] As can be seen, since the judgment information is used to indicate whether there is a specular reflection component in each of the L-path second reflected lights, N paths of second reflected lights without specular reflection components can be selected based on the judgment information, excluding each path of second reflected light interfered with by specular reflection. Then, N sets of calibration data and N sets of measurement data corresponding to the N paths of second reflected lights are selected, and N single-path similarities are determined based on the N sets of calibration data and N sets of measurement data, excluding single-path similarities interfered with by specular reflection. Finally, the N single-path similarities are fused and weighted to obtain the data similarity, so that the data similarity can avoid the interference of specular reflection as much as possible, thereby improving the accuracy of the surface reflection characteristic differences identified by the data similarity.

[0226] For example, L sets of calibration data include The L group of measurement data includes For example, The N sets of calibration data include , The N sets of measurement data include .

[0227] according to and Determine N single-path similarities, denoted as follows: ; in, This represents the first single-path similarity, which is... and The similarity between them; Let N be the similarity of a single path. and The similarity between them.

[0228] according to Determine N weighting coefficients, and denote these N weighting coefficients as follows: And satisfy the following: ; The data similarity between the L-group calibration data and the L-group measurement data satisfies the following: .

[0229] In a possible example, "Method B" determines N single-path similarities based on N sets of calibration data and N sets of measurement data, including: Based on N sets of calibration data, calculate N total values ​​for the third single channel and N color ratios for the third single channel. The j-th total value for the third single channel is the sum of the X calibration values ​​corresponding to the light intensity of the X color bands in the j-th first reflected light. The j-th color ratio for the third single channel includes the ratios of the X calibration values ​​corresponding to the light intensity of the X color bands in the j-th first reflected light to the j-th total value. Based on N sets of measurement data, calculate N total values ​​of the fourth single channel and N color ratios of the fourth single channel. The j-th total value of the fourth single channel is the sum of the X measured values ​​corresponding to the light intensity of the X color bands in the j-th second reflected light. The j-th color ratio of the fourth single channel includes the ratios of the X measured values ​​corresponding to the light intensity of the X color bands in the j-th second reflected light to the total value of the j-th fourth single channel. Based on the Nth group of third single-channel color ratios and the Nth group of fourth single-channel color ratios, calculate the N single-channel color ratio deviations. The j-th single-channel color ratio deviation is the sum of the absolute values ​​of the same color ratio deviations between the j-th group of third single-channel color ratios and the j-th group of fourth single-channel color ratios, or the j-th single-channel color ratio deviation is the maximum absolute value of the same color ratio deviation between the j-th group of third single-channel color ratios and the j-th group of fourth single-channel color ratios. Based on the total values ​​of N third single channels and N total values ​​of N fourth single channels, calculate the ratio of the total values ​​of N single channels. The ratio of the total value of the j-th single channel is the ratio of the total value of the j-th third single channel to the total value of the j-th fourth single channel. The similarity of N individual channels is determined based on the color ratio deviation of N individual channels and the total value ratio of N individual channels.

[0230] In this example, the example of "calculating the total value of N third single channels and the color ratio of N groups of third single channels" can be understood by referring to the example of "calculating the total value of L first single channels and the color ratio of L groups of first single channels" in "Method 1" above, and will not be repeated here.

[0231] The example of "calculating the total value of N fourth single channels and the color ratio of N groups of fourth single channels" can be understood by referring to the example of "calculating the total value of L second single channels and the color ratio of L groups of second single channels" in "Method 1" above, and will not be repeated here.

[0232] The example of "calculating the color ratio deviation of N single channels" can be understood by referring to the example of "calculating the total value ratio of L single channels" in "Method 1" above, and will not be repeated here.

[0233] The example of "determining N single-path similarities" can be understood by referring to the example of "determining L single-path similarities" in "Method A" above, and will not be repeated here.

[0234] Based on the above, the following example illustrates one possible implementation of the data processing method described above, taking L as 2 and X color bands as RGB bands.

[0235] Figure 5 This is a flowchart illustrating another data processing method according to an embodiment of this application. Figure 5 In this method, the color mark sensor 10 is used to identify the difference in surface reflectance characteristics between the measured object and the calibrated object. Figure 5 The method includes: S501. Receive two channels of first reflected light from the calibrated object and calibrate two sets of RGB calibration values ​​corresponding to the light intensity of the two channels of first reflected light. There is no specular reflection component in each of the two channels of first reflected light.

[0236] Among them, the light intensity of the first reflected light of the first path corresponds to the first group of RGB calibration values, and the light intensity of the second reflected light corresponds to the second group of RGB calibration values.

[0237] For example, the light intensity of the first reflected light from the first path corresponds to the first group of RGB calibration values, which are denoted as follows: ; The light intensity of the first reflected light from the second path corresponds to the second set of RGB calibration values, which are denoted as follows: .

[0238] S502. Receive two channels of second reflected light from the object under test, and measure two sets of RGB measurement values ​​corresponding to the light intensity of the two channels of second reflected light. The two sets of RGB measurement values ​​correspond one-to-one with the two sets of RGB calibration values.

[0239] Among them, the first path of the second reflected light contains a diffuse reflection component, and the second path of the second reflected light also contains a diffuse reflection component.

[0240] Among them, the light intensity of the second reflected light of the first channel corresponds to the first group of RGB measurement values, the light intensity of the second reflected light of the second channel corresponds to the second group of RGB measurement values, the first group of RGB measurement values ​​corresponds to the first group of RGB calibration values, and the second group of RGB measurement values ​​corresponds to the second group of RGB calibration values.

[0241] For example, the light intensity of the second reflected light in the first path corresponds to the first group of RGB measurement values, which are recorded as follows: ; The second reflected light from the second path corresponds to the second group of RGB measurement values, which are recorded as follows: .

[0242] S503. Determine judgment information based on at least two sets of RGB measurement values. The judgment information is used to indicate whether there is a specular reflection component in each of the two second reflected lights.

[0243] For example, according to Calculate the total value of the i-th first single channel and the color ratio of the i-th group of first single channels. The total value of the i-th first single channel and the color ratio of the i-th group of first single channels satisfy the following: ; }

[0244] according to Calculate the total value of the i-th second single channel and the color ratio of the i-th group of second single channels. The total value of the i-th second single channel and the color ratio of the i-th group of second single channels satisfy the following: ; }

[0245] according to and Calculate the color ratio deviation of the i-th single channel. The color ratio deviation of the i-th single channel satisfies the following: .

[0246] according to and Calculate the total value ratio of the i-th single channel. The total value ratio of the i-th single channel satisfies the following: .

[0247] like and or satisfy , , If any one of these three conditions is met, the i-th piece of information in the determination information is used to indicate that there is a specular reflection component in the i-th path of the second reflected light; otherwise, the i-th piece of information in the determination information is used to indicate that there is no specular reflection component in the i-th path of the second reflected light.

[0248] S504. Based on the judgment information, determine a confidence weight for each group of RGB measurement values ​​within the two groups of RGB measurement values, thus obtaining two confidence weights.

[0249] The determination information includes two pieces of information: the first piece of information is used to indicate whether there is a specular reflection component in the first path of the second reflected light, and the second piece of information is used to indicate whether there is a specular reflection component in the second path of the second reflected light.

[0250] If the first piece of information indicates that there is a specular reflection component in the first path of the second reflected light, then the first confidence weight is 0; if the first piece of information indicates that there is no specular reflection component in the first path of the second reflected light, then the first confidence weight is 1.

[0251] If the second piece of information indicates that there is a specular reflection component in the second reflected light of the second path, then the second confidence weight is 0; if the second piece of information indicates that there is no specular reflection component in the second reflected light of the second path, then the second confidence weight is 1.

[0252] For example, based on the judgment information, two confidence weights are determined, and these two confidence weights are denoted as follows: ; in, This represents a confidence weight corresponding to the second reflected light from the first path. This represents a confidence weight corresponding to the second reflected light from the second path.

[0253] If the first information indicates that there is a specular reflection component in the first path of the second reflected light, then If the first message indicates that there is no specular reflection component in the first path of the second reflected light, then .

[0254] If the second information indicates that there is a specular reflection component in the second reflected light, then If the second message indicates that there is no specular reflection component in the second reflected light of the second path, then .

[0255] S505. Based on two sets of RGB calibration values ​​and two sets of RGB measurement values, determine two single-channel similarities. The i-th single-channel similarity is the similarity between the i-th set of RGB measurement values ​​and the i-th set of RGB calibration values. The two single-channel similarities correspond one-to-one with two confidence weights.

[0256] The first single-path similarity corresponds to the first credibility weight, and the second single-path similarity corresponds to the second credibility weight.

[0257] For example, the logarithm of the proportion of the i-th single-path total value is calculated, and this logarithm satisfies the following: ; calculate and We obtain the i-th total difference by weighting the values: ; Calculate the exponent of the i-th total difference and round the exponent of the i-th total difference to obtain the i-th single-path similarity: .

[0258] S506. If both confidence weights are 1, then determine two weighting coefficients based on the two single-path similarities, and calculate the weight of the two single-path similarities based on the two weighting coefficients to obtain the data similarity between the two sets of RGB calibration values ​​and the two sets of RGB measurement values.

[0259] For example, if and According to and Determine two weighting coefficients that satisfy the following: ; ; according to and calculate and We obtain the data similarity by weighting the results: .

[0260] S507. If the first confidence weight is 1 and the second confidence weight is 0, then the first single-path similarity is used as the data similarity between the two sets of RGB calibration values ​​and the two sets of RGB measurement values.

[0261] For example, if and ,but .

[0262] S508. If the first confidence weight is 0 and the second confidence weight is 1, then the second single-path similarity is used as the data similarity between the two sets of RGB calibration values ​​and the two sets of RGB measurement values.

[0263] For example, if and ,but .

[0264] S509. If both confidence weights are 0, then the failure information is determined. The failure information indicates the failure to identify the difference in surface reflection characteristics between the tested object and the calibrated object.

[0265] For example, if and If this occurs, the identification of the difference in surface reflection characteristics between the tested object and the calibrated object will fail.

[0266] S510. Based on data similarity, identify the differences in surface reflection characteristics between the tested object and the calibration object.

[0267] For example, the similarity threshold is For example, if If the surface reflection characteristics of the tested object and the calibrated object are similar, then the difference is small; otherwise, the difference is large.

[0268] The following is an example description of a data processing apparatus according to an embodiment of this application.

[0269] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a data processing apparatus according to an embodiment of this application. Figure 6 In the data processing device 600, there are a processor 610, a memory 620, and a communication bus for connecting the processor 610 and the memory 620.

[0270] Optionally, the memory 620 may include, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or compact disc read-only memory (CD-ROM). The memory 620 is used to store program code executed by the data processing device 600 and data transmitted.

[0271] Optionally, the data processing device 600 also includes a communication interface for receiving and sending data.

[0272] Optionally, the processor 610 may be a chip, CPU, ECU, general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, transistor logic device, hardware component or any combination thereof.

[0273] In one possible example, the processor 610 in the data processing device 600 is used to execute the computer program or instructions 621 stored in the memory 620 to perform the following operations: Receive L channels of first reflected light from the calibrated object and calibrate L sets of calibration data corresponding to the light intensity of the L channels of first reflected light. There is no specular reflection component in each of the L channels of first reflected light. The L-channel second reflected light from the object under test is received, and L sets of measurement data corresponding to the L-channel second reflected light are obtained. The L sets of measurement data correspond one-to-one with the L sets of calibration data. Based on at least L sets of measurement data, a judgment information is determined. The judgment information is used to indicate whether there is a specular reflection component in each of the L paths of second reflected light. Determine the data similarity between the L-group calibration data and the L-group measurement data based on the judgment information; The differences in surface reflection characteristics between the tested object and the calibration object are identified based on data similarity.

[0274] As can be seen, by receiving L reflected light from multiple angles, the data processing device 600 can receive multiple reflected light from multiple different angles. By setting each of the L first reflected light paths of the calibration object to have no specular reflection component, the data processing device 600 only receives the multiple diffuse reflection components of the calibration object, and uses the L sets of calibration data obtained from the calibration as the standard reference for detection.

[0275] Since specular reflection is directional reflection, meaning the color mark sensor can only receive specular reflection at a specific angle, when receiving L second-path reflected light from the object being measured from L different angles, while ensuring that each of the L second-path reflected light contains diffuse reflection, it is necessary to prevent all of the L second-path reflected light from simultaneously containing specular reflection, thus ensuring that at least one second-path reflected light does not contain specular reflection.

[0276] Since the L sets of calibration data serve as the standard reference and the L sets of measurement data serve as the actual measurement data, it is possible to determine whether or not a specular reflection component exists in each of the L sets of second reflected lights based on at least the L sets of measurement data, thereby enabling the identification of each second reflected light subject to specular reflection interference in the L sets of second reflected lights.

[0277] Based on the identification of each second reflected light subject to specular reflection in the L-channel second reflected light, the data similarity determined by the judgment information can minimize interference from specular reflection, thereby improving the accuracy of the surface reflection characteristic differences identified by data similarity, and further reducing the degree of interference of specular reflection on color mark detection, thus improving the accuracy and reliability of color mark detection.

[0278] It should be noted that the specific implementation of each operation can be described in the corresponding description of the method embodiments shown above. The data processing device 600 can be used to execute the relevant content in the above method embodiments, which will not be described again.

[0279] The following is an example of a color mark sensor according to an embodiment of this application.

[0280] In combination with the above Figure 1 Color mark sensor and Figure 4 The method shown includes a color mark sensor 10 comprising a transmitting unit 110, L receiving units 120, and a processing unit 130.

[0281] L receiving units 120 are used to receive L paths of first reflected light from the calibrated object; Processing unit 130 is used to calibrate and obtain L sets of calibration data corresponding to the light intensity of L first reflected light, wherein there is no specular reflection component in each of the L first reflected light paths; The L receiving units 120 are also used to receive the L paths of second reflected light from the object under test; The processing unit 130 is also used to measure and obtain L sets of measurement data corresponding to the L-path second reflected light, and the L sets of measurement data correspond one-to-one with the L sets of calibration data; The processing unit 130 is also configured to determine determination information based on at least L sets of measurement data, the determination information being used to indicate whether there is a specular reflection component in each of the L paths of second reflected light; The processing unit 130 is also used to determine the data similarity between the L sets of calibration data and the L sets of measurement data based on the judgment information; The processing unit 130 is also used to identify the differences in surface reflection characteristics between the tested object and the calibrated object based on data similarity.

[0282] As can be seen, by using L receiving units 120 to receive L paths of reflected light, multiple paths of reflected light can be received from multiple different angles. By setting each of the L paths of first reflected light from the calibration object to have no specular reflection component, the color mark sensor 10 only receives the multiple diffuse reflection components of the calibration object, and uses the L sets of calibration data obtained from the calibration as the standard reference for detection.

[0283] Since specular reflection is directional reflection, meaning the color mark sensor can only receive specular reflection at a specific angle, when receiving L second-path reflected light from the object being measured from L different angles, while ensuring that each of the L second-path reflected light contains diffuse reflection, it is necessary to prevent all of the L second-path reflected light from simultaneously containing specular reflection, thus ensuring that at least one second-path reflected light does not contain specular reflection.

[0284] Since the L sets of calibration data serve as the standard reference and the L sets of measurement data serve as the actual measurement data, it is possible to determine whether or not a specular reflection component exists in each of the L sets of second reflected lights based on at least the L sets of measurement data, thereby enabling the identification of each second reflected light subject to specular reflection interference in the L sets of second reflected lights.

[0285] Based on the identification of each second reflected light subject to specular reflection in the L-channel second reflected light, the data similarity determined by the judgment information can minimize interference from specular reflection, thereby improving the accuracy of the surface reflection characteristic differences identified by data similarity, and further reducing the degree of interference of specular reflection on color mark detection, thus improving the accuracy and reliability of color mark detection.

[0286] It should be noted that the specific implementation of each operation can be described in the corresponding description of the method embodiment shown above. The color mark sensor 10 can be used to execute the relevant content in the above method embodiment, which will not be described again.

[0287] Other related content of the embodiments of this application will be illustrated below.

[0288] In one possible example, embodiments of this application provide a computer-readable storage medium storing a computer program or instructions that, when executed, implement the steps described in the above method embodiments.

[0289] In one possible example, embodiments of this application provide a computer program product, including a computer program or instructions that, when executed, implement the steps described in the above method embodiments.

[0290] It is worth noting that, for the sake of simplicity, the above embodiments are all described as a series of actions. Those skilled in the art should understand that this application is not limited to the described order of actions, as some steps in the embodiments of this application can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions, steps, modules, or units involved are not necessarily essential to the embodiments of this application. In the above embodiments, the descriptions of each embodiment in this application have different focuses; parts not described in detail in a certain embodiment can be referred to the relevant descriptions of other embodiments.

[0291] The steps of the methods or algorithms described in the embodiments of this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in RAM, flash memory, ROM, EPROM, electrically erasable programmable read-only memory (EEPROM), registers, hard disk, portable hard disk, read-only optical disk (CD-ROM), or any other form of storage medium well known in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and storage medium can reside in an ASIC. Furthermore, the ASIC can reside in a terminal device or management device. Alternatively, the processor and storage medium can exist as discrete components in the terminal device or management device.

[0292] Those skilled in the art will recognize that, in one or more of the examples above, the functions described in the embodiments of this application can be implemented, in whole or in part, by software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital video discs (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).

[0293] The modules or units included in the various devices and products described in the above embodiments can be software modules or units, hardware modules or units, or a combination of both. For example, for devices and products applied to or integrated into a chip, all modules or units can be implemented using hardware methods such as circuits, or at least some modules or units can be implemented using software programs that run on a processor integrated within the chip, while the remaining (if any) modules or units can be implemented using hardware methods such as circuits. For devices and products applied to or integrated into a chip module, all modules or units can be implemented using hardware methods such as circuits. Different modules or units can be located in the same component (e.g., chip, circuit module, etc.) or different components of the chip module, or at least some modules or units can be implemented using hardware methods such as circuits. The implementation is achieved through a software program that runs on a processor integrated within the chip module. The remaining modules or units (if any) can be implemented using hardware methods such as circuits. For various devices or products applied to or integrated into terminal equipment, each of its modules or units can be implemented using hardware methods such as circuits. Different modules or units can be located in the same component (e.g., chip, circuit module, etc.) or different components within the terminal equipment. Alternatively, at least some modules or units can be implemented using a software program that runs on a processor integrated within the terminal equipment. The remaining modules or units (if any) can be implemented using hardware methods such as circuits.

[0294] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the embodiments of this application. It should be understood that the above descriptions are merely specific embodiments of the embodiments of this application and are not intended to limit the protection scope of the embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solutions of the embodiments of this application should be included within the protection scope of the embodiments of this application.

Claims

1. A data processing method, characterized in that, An application is made to a color mark sensor, which is used to identify differences in surface reflectance characteristics between a measured object and a calibrated object. The color mark sensor includes a transmitting unit and L receiving units. The transmitting unit emits probe light, and the L receiving units receive L reflected light paths from the object surface illuminated by the probe light from L different angles, where L is an integer greater than 1. The method includes: Receive L-channel first reflected light from the calibrated object and calibrate L sets of calibration data corresponding to the light intensity of the L-channel first reflected light. There is no specular reflection component in each of the L-channel first reflected light. The L-channel second reflected light from the object under test is received, and L sets of measurement data corresponding to the light intensity of the L-channel second reflected light are measured. The L sets of measurement data correspond one-to-one with the L sets of calibration data. At least based on the L sets of measurement data, a determination information is determined, which is used to indicate whether there is a specular reflection component in each of the L paths of second reflected light; Based on the determination information, the data similarity between the L sets of calibration data and the L sets of measurement data is determined; Based on the data similarity, the differences in surface reflection characteristics between the tested object and the calibrated object are identified.

2. The method according to claim 1, characterized in that, The i-th set of calibration data in the L-group calibration data includes X calibration values ​​corresponding to the light intensity of X color bands in the i-th first reflected light. The i-th set of measurement data within the L sets includes X measurement values ​​corresponding to the light intensity of X color bands in the i-th second reflected light, where X is an integer greater than or equal to 1, and i is an integer from 1 to L. The determination of the judgment information based at least on the L sets of measurement data includes: Based on the L sets of calibration data, calculate L first single-path total values ​​and L sets of first single-path color ratios. The i-th first single-path total value is the sum of X calibration values ​​corresponding to the light intensity of X color bands in the i-th first reflected light. The i-th set of first single-path color ratios includes the ratios of the X calibration values ​​corresponding to the light intensity of X color bands in the i-th first reflected light to the i-th first total value. Based on the L sets of measurement data, calculate L total values ​​of the second single channel and L color ratios of the second single channel. The i-th total value of the second single channel is the sum of the X measured values ​​corresponding to the light intensity of the X color bands in the i-th second reflected light. The i-th color ratio of the second single channel includes the ratios of the X measured values ​​corresponding to the light intensity of the X color bands in the i-th second reflected light to the i-th total value of the second single channel. The determination information is determined based on the L groups of first single-channel color ratios, the L groups of second single-channel color ratios, the L total values ​​of the first single channels, and the L total values ​​of the second single channels.

3. The method according to claim 2, characterized in that, The determination of judgment information based on the L groups of first single-channel color ratios, the L groups of second single-channel color ratios, the L total values ​​of the first single channels, and the L total values ​​of the second single channels includes: Based on the L groups of first single-channel color ratios and the L groups of second single-channel color ratios, calculate L single-channel color ratio deviations. The i-th single-channel color ratio deviation is the sum of the absolute values ​​of the same color ratio deviations between the i-th group of first single-channel color ratios and the i-th group of second single-channel color ratios, or the i-th single-channel color ratio deviation is the maximum absolute value of the same color ratio deviation between the i-th group of first single-channel color ratios and the i-th group of second single-channel color ratios. Based on the L first single-path total values ​​and the L second single-path total values, calculate the L single-path total value ratios, where the i-th single-path total value ratio is the ratio of the i-th second single-path total value to the i-th first single-path total value. If the color ratio deviation of the i-th single channel is less than or equal to a preset deviation threshold and the total value ratio of the i-th single channel is greater than or equal to a preset ratio threshold, then the i-th information in the determination information is determined. The i-th information is used to indicate that there is a specular reflection component in the i-th second reflected light. If the deviation of the i-th single-channel color ratio is greater than a preset deviation threshold, or the ratio of the i-th single-channel total value is less than a preset ratio threshold, then the i-th information in the determination information is determined. The i-th information is used to indicate that there is no specular reflection component in the i-th second reflected light.

4. The method according to claim 1, characterized in that, The i-th set of measurement data within the L sets includes X measurement values ​​corresponding to the light intensity of X color bands in the i-th second reflected light, where i is an integer from 1 to L, and X is an integer greater than or equal to 1. The determination of the judgment information based at least on the L sets of measurement data includes: If the X measured values ​​corresponding to the light intensity of the X color bands in the i-th second reflected light are all less than the corresponding preset maximum measured values, then the i-th information in the judgment result is determined. The i-th information is used to indicate that there is no specular reflection component in the i-th second reflected light. If the measured value of the light intensity of any color band in the i-th second reflected light is greater than or equal to the corresponding preset maximum measured value, then the i-th information in the determination information is determined. The i-th information is used to indicate that there is a specular reflection component in the i-th second reflected light.

5. The method according to any one of claims 1-4, characterized in that, Determining the data similarity between the L sets of calibration data and the L sets of measurement data based on the determination information includes: Based on the determination information, a confidence weight is determined for each of the L paths of second reflected light, resulting in L confidence weights. Based on the L sets of calibration data and the L sets of measurement data, L single-path similarities are determined. The i-th single-path similarity is the similarity between the i-th set of measurement data and the i-th set of calibration data. The L single-path similarities correspond one-to-one with the L confidence weights, and i takes an integer from 1 to L. Based on the L confidence weights and the L single-path similarities, the data similarity between the L sets of calibration data and the L sets of measurement data is determined.

6. The method according to claim 5, characterized in that, The sum of the L confidence weights is 1, and each confidence weight is greater than 0 and less than 1; The step of determining the data similarity between the L sets of calibration data and the L sets of measurement data based on the L confidence weights and the L single-path similarities includes: Based on the L confidence weights, the fusion weighted average of the L single-path similarities is calculated to obtain the data similarity between the L sets of calibration data and the L sets of measurement data.

7. The method according to claim 5, characterized in that, If the i-th piece of information in the determination information indicates that there is no specular reflection component in the i-th second reflected light, then the confidence weight of the i-th piece of information is 1. If the i-th piece of information in the determination information indicates that there is a specular reflection component in the i-th path of the second reflected light, then the i-th confidence weight is 0; The step of determining the data similarity between the L sets of calibration data and the L sets of measurement data based on the L confidence weights and the L single-path similarities includes: Based on the L confidence weights, N single-path similarities are determined from the L single-path similarities. The confidence weight corresponding to each of the N single-path similarities is 1, and N is a positive integer less than or equal to L. Based on the N single-path similarities, N weighting coefficients are determined. The sum of the N weighting coefficients is 1. Each weighting coefficient is greater than 0 and less than 1. The N single-path similarities correspond one-to-one with the N weighting coefficients. Based on the N weighting coefficients, the fusion weight of the N single-path similarities is calculated to obtain the data similarity between the L sets of calibration data and the L sets of measurement data.

8. The method according to any one of claims 1-4, characterized in that, Determining the data similarity between the L sets of calibration data and the L sets of measurement data based on the determination information includes: Based on the determination information, N second reflected lights are determined within the L second reflected lights. Each of the N second reflected lights does not contain a specular reflection component, and N is a positive integer less than or equal to L. Select the N sets of calibration data corresponding to the N paths of the second reflected light from the L sets of calibration data; Select the N sets of measurement data corresponding to the N paths of the second reflected light from the L sets of measurement data; Based on the N sets of calibration data and the N sets of measurement data, N single-path similarities are determined. The j-th single-path similarity is the similarity between the j-th set of measurement data and the j-th set of calibration data, where j is an integer from 1 to N. Based on the N single-path similarities, N weighting coefficients are determined. The sum of the N weighting coefficients is 1. Each weighting coefficient is greater than 0 and less than 1. The N single-path similarities correspond one-to-one with the N weighting coefficients. Based on the N weighting coefficients, the fusion weight of the N single-path similarities is calculated to obtain the data similarity between the L sets of calibration data and the L sets of measurement data.

9. A data processing apparatus, characterized in that, The data processing apparatus includes a processor, a memory, and a computer program or instructions stored in the memory, wherein the processor executes the computer program or instructions to implement the method as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program or signaling that, when executed, implements the method as described in any one of claims 1-8.