Infrared ranging correction method and system based on color compensation
Through the infrared ranging correction method based on color compensation, the compensation relationship between the objects to be measured in different colors is established, and the distance measurement results of the infrared rangefinder are corrected, which solves the problem of low accuracy in children's toy applications, and achieves higher measurement accuracy and accuracy.
Patent Information
- Application Number
- CN202111414378.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-25
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2041-11-25
AI Technical Summary
Due to cost limitations in children's toy applications, the measurement accuracy is not high and is greatly affected by the intensity of external light.
Using the infrared ranging correction method based on color compensation, the infrared rangefinder measurement results and the RGB value collected by the color sensor are obtained, and the compensation relationship between the objects to be measured in different colors is established and the distance is corrected.
Improve the accuracy of the measurement results, reduce the measurement error of the color sensor, and further ensure the measurement accuracy through feedback compensation.
Smart Images

Figure CN113933853B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of distance measurement, and in particular to an infrared distance measurement correction method and system based on color compensation. Background Art
[0002] As a precise measuring tool, infrared rangefinder has been widely used in various fields. It uses infrared transmitter to emit infrared light, and then receives the reflected infrared light through infrared receiver to get the distance between the measured object and the rangefinder. The accuracy of infrared rangefinder is closely related to cost, measurement distance and external light intensity. For infrared rangefinders used in children's toys, the measurement accuracy is not high due to cost constraints.
[0003] In a Chinese patent document with publication number CN108362311A, a segmented distance compensation method for a distance measuring sensor is disclosed, comprising the following steps: using a distance measuring sensor to be compensated to test the distance at several calibration points, obtaining the actual distance and the test distance, the difference between the test distance and the actual distance is the deviation value, and drawing a coordinate distribution diagram of several points; connecting several points in sequence to obtain a curve, and dividing the curve into several segments according to the curve change trend, and the curve of each segment is close to linear; the host computer collects the test distance of the distance measuring sensor at each compensation point position in sequence, calculates the deviation value, generates a compensation command for each compensation point position, and sends it to the distance measuring sensor; after receiving the compensation command, the distance measuring sensor extracts the distance information and calculates the linear compensation formula for each segment; and performs segmented distance compensation on the distance measuring sensor. Summary of the invention
[0004] In view of the defects in the prior art, an object of the present invention is to provide an infrared ranging correction method and system based on color compensation.
[0005] According to the present invention, an infrared ranging correction method based on color compensation includes the following steps:
[0006] Step S1: obtaining the measurement result of the infrared rangefinder on the standard color block on the measured object;
[0007] Step S2: obtaining the RGB value of the standard color block on the object under test collected by the color sensor;
[0008] Step S3: Correct the measured distance value according to the collected RGB value.
[0009] Preferably, the correction method further comprises:
[0010] Step S4: Feedback compensation is performed on the RGB value collected by the color sensor using the corrected distance.
[0011] Preferably, the step S3 comprises: establishing a compensation relationship for measured objects of different colors according to the RGB value of the standard color block, the distance value measured by the infrared rangefinder and the actual distance value to compensate for the distance.
[0012] Preferably,
[0013] The correspondence between the RGB measurement value and the distance includes:
[0014] y=f(x)
[0015] Among them, x represents the measured value of RGB, and y represents the compensation value of distance.
[0016] Preferably, step S4 comprises:
[0017] Step S4.1: Obtain the correction result of any one of the corresponding relationships between RGB measurement difference and distance for the measured distance,
[0018] Step S4.2: Compensate the corresponding RGB value measured by the color sensor according to the corrected distance and the other two of the corresponding relationships between the RGB measurement difference and the distance.
[0019] An infrared ranging correction system based on color compensation provided by the present invention includes the following modules:
[0020] Module M1: obtains the measurement result of the infrared rangefinder on the standard color block on the measured object;
[0021] Module M2: obtains the RGB value of the standard color block on the object under test collected by the color sensor;
[0022] Module M3: Correct the measured distance value according to the collected RGB value and the RGB value of the standard color block.
[0023] Preferably, the correction system further comprises:
[0024] Module M4: Feedback compensation of the RGB value collected by the color sensor through the corrected distance.
[0025] Preferably, the module M3 comprises: establishing a compensation relationship for measured objects of different colors according to the RGB value of the standard color block, the distance value measured by the infrared rangefinder and the actual distance value to compensate for the distance.
[0026] Preferably,
[0027] The correspondence between the RGB measurement value and the distance includes:
[0028] y=f(x)
[0029] Among them, x represents the measured value of RGB, and y represents the compensation value of distance.
[0030] Preferably, the module M4 includes:
[0031] Module M4.1: Obtain the correction result of any one of the corresponding relationships between RGB measurement difference and distance for the measured distance.
[0032] Module M4.2: Compensate the corresponding RGB value measured by the color sensor according to the corrected distance and the other two of the corresponding relationships between the RGB measurement difference and the distance.
[0033] Compared with the prior art, the present invention has the following beneficial effects:
[0034] 1. The present invention combines color compensation to correct the infrared ranging results, which greatly improves the accuracy of the measurement results by increasing a small amount of hardware cost;
[0035] 2. According to the corresponding relationship between various RGB measurement differences and distances, the measurement error of the color sensor can be effectively reduced;
[0036] 3. The present invention performs feedback compensation on the measurement result of the color sensor through the corrected distance, thereby further ensuring the measurement accuracy of the color sensor. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0038] Figure 1 This is a schematic flow chart of an infrared ranging correction method based on color compensation according to an embodiment of the present invention;
[0039] Figure 2 : is a corresponding relationship diagram between RGB measurement difference and distance in an embodiment of the present invention;
[0040] Figure 3 This is a modulation timing diagram of infrared ranging based on color compensation in an embodiment of the present invention. DETAILED DESCRIPTION
[0041] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0042] The present invention introduces an infrared ranging correction method based on color compensation, referring to Figure 1 , including the following steps:
[0043] Step S1: Obtain the measurement result of the infrared rangefinder on the standard color block on the measured object; place a standard color block in front of the measured object, the distance between the standard color block and the infrared rangefinder is the distance to be measured, the standard color block can be a standard red block, a standard green block or any uniform color block, and the accurate RGB value of the color block is known.
[0044] Step S2: Obtain the RGB value of the standard color block on the object being measured collected by the color sensor. In this step, the distances from the color sensor and the infrared rangefinder to the standard color block should be kept equal. The color sensor is used to collect the color of the standard color block to obtain the three color measured values of R, G, and B respectively.
[0045] Step S3: Correct the measured distance value according to the collected RGB value. According to the RGB value of the standard color block, the distance value measured by the infrared rangefinder and the actual distance value, a compensation relationship between the measured objects of different colors is established to compensate the distance.
[0046] The correspondence between RGB measurement values and distances includes:
[0047] y=Ax 3 +Bx 2 +Cx+D
[0048] Among them, x represents the measurement value of RGB, y represents the compensation value of distance, and A, B, C and D represent the distance compensation coefficients.
[0049] Reference Figure 2 , the corresponding relationship between RGB measurement difference and distance includes:
[0050] y R =0.0795x 3 -2.2495x 2 +40.21x-87.708;
[0051] y B =0.2246x 2 +16.134x-38.912;
[0052] y G =0.0702x 3 -1.5715x 2 +12.83x-23.349;
[0053] From this we get: R =0.0795(x 测 +x 补 ) 3 -2.2495(x 测 +x 补 ) 2+40.21(x 测 +x 补 )-87.708;
[0054] y B =0.2246(x 测 +x 补 ) 2 +16.134(x 测 +x 补 )-38.912;
[0055] y G =0.0702(x 测 +x 补 ) 3 -1.5715(x 测 +x 补 ) 2 +12.83(x 测 +x 补 )-23.349;
[0056] where y R Represents the measured difference of R color, y B Represents the measured difference of B color, y G represents the measured difference of G color, x represents the distance between the standard color block and the infrared sensor, x 测 is the distance value measured by the infrared rangefinder, x 补 The compensation value of the distance. The theoretical distance between at least one standard color block and the infrared rangefinder is calculated using any one or more of the corresponding relationships between the RGB measurement difference and the distance, and the average value of at least one theoretical distance and the measured distance is calculated, and the average value is used as the final measurement result of the standard color block and the infrared rangefinder. During measurement, if the color of the measured object is not within the standard color range, the staff is reminded to change the measured object.
[0057] The calibration method also includes:
[0058] Step S4: Feedback compensation is performed on the RGB value collected by the color sensor using the corrected distance. Specifically, it includes:
[0059] Step S4.1: Obtain the correction result of any one of the corresponding relationships between RGB measurement difference and distance for the measured distance,
[0060] Step S4.2: Compensate the corresponding RGB values measured by the color sensor according to the corrected distance and the other two in the correspondence between the RGB measurement difference and the distance. For example: use the red correspondence in the correspondence between the RGB measurement difference and the distance to calculate the theoretical distance between the standard color block and the infrared rangefinder, calculate the average value of the theoretical distance and the measured distance, and use the calculated result as the final distance between the standard color block and the infrared rangefinder. Substitute the final distance obtained in this step into the blue correspondence and the green correspondence, respectively, and calculate the corresponding color difference, so as to correct the feedback compensation of the measurement result of the color sensor, thereby improving the measurement accuracy of the color sensor.
[0061] The present invention also introduces an infrared ranging correction system based on color compensation, comprising the following modules:
[0062] Module M1: obtains the measurement result of the infrared rangefinder on the standard color block on the measured object;
[0063] Module M2: obtains the RGB value of the standard color block on the object under test collected by the color sensor;
[0064] Module M3: Correct the measured distance value according to the collected RGB value.
[0065] Preferably, the infrared ranging correction system based on color compensation also includes:
[0066] Module M4: Feedback compensation of the RGB value collected by the color sensor through the corrected distance.
[0067] Preferably, the module M3 comprises: establishing a compensation relationship for measured objects of different colors according to the RGB value of the standard color block, the distance value measured by the infrared rangefinder and the actual distance value to compensate for the distance.
[0068] Preferably, the correspondence between the RGB measurement value and the distance includes:
[0069] y=Ax 3 +Bx 2 +Cx+D
[0070] Among them, x represents the measurement value of RGB, y represents the compensation value of distance, and A, B, C and D represent the distance compensation coefficients.
[0071] Preferably, the module M4 includes:
[0072] Module M4.1: Obtain the correction result of any one of the corresponding relationships between RGB measurement difference and distance for the measured distance.
[0073] Module M4.2: Compensate the corresponding RGB value measured by the color sensor according to the corrected distance and the other two of the corresponding relationships between the RGB measurement difference and the distance.
[0074] The present invention also introduces a modulation method for infrared ranging correction based on color compensation, wherein the infrared emitting unit works continuously at a set frequency, and the color sensor works by conditional triggering or continuously; the conditional triggering work: when the measured distance is less than the set value, the color sensor works by the set frequency; the continuous work: the color sensor always works at the set frequency.
[0075] Reference Figure 3 As shown in the figure, if the color recognition is set to trigger within the specified distance, then outside the specified distance, only infrared data is collected. For example, in the T1 segment of the CLK timing, the infrared rangefinder Figure 3 The timing of IRDA works in the middle, and the frequency of the modulation can be set according to the actual use.
[0076] When it is determined in segment T2 that the distance has reached the specified value based on the infrared ranging data, the color sensor is turned on for color recognition.
[0077] like Figure 3 When the color data is collected in the T3 and T4 segments, the frequency of infrared data collection is not changed, and the infrared part is still Figure 3 The IRDA works in sequence, and the color sensor uses the set frequency to collect color data, such as Figure 3 The timing of R, G, and B in the image can be used to collect infrared data at the same time as color data.
[0078] When the collected infrared data returns to the specified distance, the color sensor is turned off, and the infrared part is still Figure 3 Timing work of IRDA.
[0079] If the color recognition is set to work all the time, the infrared part and the color sensor part are Figure 3 The T3 and T4 segments of CLK work sequentially to collect infrared data while collecting color data.
[0080] In the description of the present application, it should be understood that the terms "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0081] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. An infrared ranging correction method based on color compensation, characterized in that: The following steps are involved: Step S1: obtaining the measurement result of the infrared rangefinder on the standard color block on the measured object; Step S2: obtaining the RGB value of the standard color block on the object under test collected by the color sensor; Step S3: Correcting the measured distance value according to the collected RGB value; The step S3 includes: establishing a compensation relationship for measured objects of different colors according to the RGB value of the standard color block, the distance value measured by the infrared rangefinder and the actual distance value to compensate for the distance.
2. The infrared ranging correction method based on color compensation according to claim 1, characterized in that: Also includes: Step S4: Feedback compensation is performed on the RGB value collected by the color sensor using the corrected distance.
3. The infrared ranging correction method based on color compensation according to claim 1, characterized in that: The correspondence between the RGB measurement value and the distance includes: y=f(x) Among them, x represents the measured value of RGB, and y represents the compensation value of distance.
4. The infrared ranging correction method based on color compensation according to claim 2, characterized in that: The step S4 comprises: Step S4.1: Obtain the correction result of any one of the corresponding relationships between RGB measurement difference and distance for the measured distance, Step S4.2: Compensate the corresponding RGB value measured by the color sensor according to the corrected distance and the other two of the corresponding relationships between the RGB measurement difference and the distance.
5. An infrared ranging correction system based on color compensation, characterized in that: Includes the following modules: Module M1: obtains the measurement result of the infrared rangefinder on the standard color block on the measured object; Module M2: obtains the RGB value of the standard color block on the object under test collected by the color sensor; Module M3: Correct the measured distance value according to the collected RGB value; The module M3 includes: establishing a compensation relationship for measured objects of different colors according to the RGB value of the standard color block, the distance value measured by the infrared rangefinder and the actual distance value to compensate for the distance.
6. The infrared ranging correction system based on color compensation according to claim 5, characterized in that: Also includes: Module M4: Feedback compensation of the RGB value collected by the color sensor through the corrected distance.
7. The infrared ranging correction system based on color compensation according to claim 5, characterized in that: The correspondence between the RGB measurement value and the distance includes: y=f(x) Among them, x represents the measured value of RGB, and y represents the compensation value of distance.
8. The infrared ranging correction system based on color compensation according to claim 6, characterized in that: The module M4 comprises: Module M4.1: Obtain the correction result of any one of the corresponding relationships between RGB measurement difference and distance for the measured distance. Module M4.2: Compensate the corresponding RGB value measured by the color sensor according to the corrected distance and the other two of the corresponding relationships between the RGB measurement difference and the distance.
Citation Information
Patent Citations
Sectional type distance compensation method for range finding sensor
CN108362311A
Distance measurement apparatus and method enabling correction of distance error induced by target brightness
KR1020140114131A