A handheld visual fusion inertial navigation laser measurement of coffee color value device and method
By integrating visual segmentation, laser interpolation, and inertial navigation compensation technologies, the interference and error problems in coffee bean color value measurement are solved, achieving high-precision, portable coffee color value measurement and outputting stable test reports.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Filing Date
- 2026-04-22
- Publication Date
- 2026-07-14
Smart Images

Figure CN122385498A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of coffee bean quality testing technology, specifically to a handheld device and method for measuring coffee color values using a vision-fusion inertial navigation laser. Background Technology
[0002] In the roasting and quality grading of coffee beans, color value is a crucial evaluation indicator. Accurate measurement of color value is not only related to the determination of green bean quality, but also directly affects the consistency of roasting curves for roasted beans.
[0003] In existing technologies, the determination of coffee bean color values mainly relies on manual comparison with standard color charts or the use of a single optical detection instrument. However, in actual operation, the above methods have inherent defects that are difficult to overcome. First, the silver skin attached to the surface of coffee beans and the gaps formed by the stacking of beans will cause strong diffuse reflection interference to the light signal, resulting in drastic fluctuations in the measured values. Second, existing handheld measurement solutions are highly dependent on the stability of the operator. The angle deflection and displacement jitter generated during the measurement process will introduce systematic errors, resulting in poor repeatability of the measurement data. Furthermore, although traditional benchtop instruments have high accuracy, they are bulky and have redundant measurement steps, which cannot meet the portability requirements of rapid on-site testing. Finally, the single optical measurement mechanism is extremely sensitive to the measurement distance. Small changes in the distance to be measured will cause the reflection intensity to drift, and existing equipment lacks effective means of shielding the background noise of the silver skin and gaps. Summary of the Invention
[0004] The purpose of this invention is to overcome the deficiencies of the prior art and provide a handheld vision fusion inertial navigation laser measurement device and method for measuring coffee color values, so as to solve the problems mentioned in the background art.
[0005] A handheld device for measuring the brown value of coffee using vision fusion inertial navigation laser measurement includes:
[0006] Device housing;
[0007] The vision module installed on one side of the detection end of the device housing is configured to acquire images containing coffee beans and containers, identify and remove silver foil, gaps and container boundaries based on deep learning algorithms, and generate a confidence mask for the effective measurement area.
[0008] The laser module installed on the other side of the detection end of the device housing is configured to emit laser light into the effective measurement area and receive reflected light, acquire laser reflection intensity data and distance data, and calculate the original color value using a biharmonic spline interpolation algorithm;
[0009] The inertial navigation module installed inside the device housing is configured to acquire angle and acceleration data of the device housing in real time, and calculate angle compensation and acceleration compensation values based on nonlinear functions.
[0010] The device also includes a data processing module installed inside the housing, which connects to the vision module, laser module, and inertial navigation module. This module is used to compensate and correct the original color values, and to perform weighted fusion calculations on the compensated color values from multiple measurement cycles, outputting the final color values and statistical indicators.
[0011] Preferably, the visual module classifies pixels using a semantic segmentation network, with categories including coffee beans, silver skin, gaps, and background, and generates a binarized mask based on the classification results and the container boundaries detected by Hough transform.
[0012] Preferably, the laser module uses a biharmonic spline interpolation algorithm based on the radial basis function φ(r) = r^2ln(r), combined with the sampling point weights w_i = f(I_i)·g(d_i) determined by the reflection intensity and distance, to calculate the interpolation result characterizing the color value of the coffee bean surface.
[0013] Preferably, the inertial navigation module calculates the compensation value using a pre-calibrated cubic polynomial function, specifically using the following formula:
[0014] ΔC(t)=k3·α(t)^3+k2·α(t)^2+k1·α(t)+k0,
[0015] ΔCa(t)=k3'·a(t)^3+k2'·a(t)^2+k1'·a(t)+k0',
[0016] Where ΔC(t) is the angle compensation value, ΔCa(t) is the acceleration compensation value, α(t) is the real-time angle deviation, a(t) is the real-time acceleration, and k0 to k3 and k0' to k3' are calibration coefficients.
[0017] Preferably, the data processing module determines the weighting factor based on the confidence level or data quality index of each module, calculates the fused color value according to the formula C_fused=Σ(w_i·C_i) / Σw_i, and outputs the average color value, standard deviation and measurement confidence level.
[0018] Preferably, the operating parameters of the handheld visual fusion inertial laser measurement device for measuring coffee color value are: measurement distance from 10cm to 50cm, handheld angle of ±20° in both the horizontal and vertical directions, and visual recognition area of a circular area with a radius of 5cm.
[0019] A method for measuring the brown value of coffee using handheld vision fusion inertial navigation laser, applied to any of the devices described above, includes the following steps:
[0020] Step S1: Acquire images through the vision module, and use deep learning segmentation algorithms to remove silver plating, gaps, and container boundaries to generate an effective measurement area mask;
[0021] Step S2: Based on the mask, drive the laser module to collect multi-point laser reflection intensity and distance data, and calculate the original color value through a biharmonic spline interpolation algorithm;
[0022] Step S3: Simultaneously collect angle and acceleration data using the inertial navigation module, calculate the compensation amount using a cubic polynomial nonlinear function, correct the original color value, and obtain the compensated color value.
[0023] Step S4: The data processing module performs weighted fusion and statistical calculation on the compensated color values of multiple measurement cycles, and outputs the final average color value, standard deviation and measurement confidence level.
[0024] Preferably, the algorithm steps of the vision module specifically include:
[0025] Image acquisition;
[0026] Deep learning segmentation calculates pixel class probabilities based on the formula P(y_i|x_i;θ)=softmax(f_θ(x_i));
[0027] Canny edge detection calculates the gradient magnitude G = sqrt(Gx^2 + Gy^2).
[0028] Hough transform is used to detect container boundaries, and boundary lines are identified based on the formula ρ=x·cosθ+y·sinθ.
[0029] Generate an effective region mask and output the visual confidence score.
[0030] Preferably, the interpolation algorithm steps of the laser module specifically include:
[0031] Collect the reflection intensity and distance at N sampling points within the effective area;
[0032] The interpolation weights are calculated using the formula w_i = f(I_i)·g(d_i);
[0033] Construct an interpolation matrix based on φ(r) = r^2ln(r);
[0034] Solve for the weight vector and calculate the original color value based on the formula C(x,y)=Σ_{i=1}^Nw_i·φ(||(x,y)-(x_i,y_i)||).
[0035] Preferably, the measurement repeatability error is less than 2% under the conditions of a measurement distance of 10-50cm and a handheld angle of ±20°.
[0036] The beneficial effects of this invention are as follows: By organically integrating visual segmentation, laser interpolation, and inertial navigation compensation technology, it completely overcomes the core problems of existing handheld coffee color value measurement technologies, such as interference from silver skin gaps, strong distance sensitivity, and large handheld shaking errors. In practical applications, the device of this invention can use deep learning algorithms to perform pixel-level precise segmentation of the coffee bean surface, silver skin, gaps, and container boundaries, automatically generating a confidence mask for the effective measurement area. This filters out background noise from contaminating the laser reflection signal, ensuring the purity of the sampled data. Simultaneously, by synchronously acquiring laser reflection intensity and distance data and executing a biharmonic spline interpolation algorithm based on radial basis functions, it achieves smooth reconstruction of the color value surface of the coffee bean, effectively compensating for the influence of changes in the measured distance caused by handheld operation on the reflection intensity. This ensures that the measurement results maintain high consistency within the range of 10cm to 50cm. Furthermore… This invention innovatively introduces an inertial navigation module, utilizing a gyroscope and accelerometer to capture the angular deviation and acceleration data of the device body in real time. It then calculates precise dynamic compensation using a preset cubic polynomial nonlinear function, correcting the original color value in real time. This significantly suppresses measurement fluctuations and systematic errors caused by operator hand movements. Furthermore, the data processing module performs weighted fusion and statistical analysis on the multi-cycle compensated data, outputting not only a high-precision average color value but also providing standard deviation and confidence level indicators reflecting measurement stability, making the final test report more valuable. In summary, this invention features a compact and portable device with a measurement repeatability error of less than 2% within a handheld angle of ±20°. It combines the high precision of desktop instruments with the flexibility of handheld devices, providing reliable technical support for rapid on-site grading of coffee bean quality and monitoring of the roasting process. Attached Figure Description
[0037] Figure 1 This is a schematic diagram of a handheld vision fusion inertial navigation laser measurement device for measuring brown color values according to an embodiment of the present invention.
[0038] Figure 2 This is a schematic diagram of the internal structure of a handheld vision fusion inertial navigation laser measuring device for measuring brown color values, provided in an embodiment of the present invention.
[0039] Figure 3 This is a flowchart illustrating a method for measuring the brown color value using handheld vision fusion inertial navigation laser according to an embodiment of the present invention.
[0040] The markings in the attached diagram are as follows: 100 - Device housing; 200 - Vision module; 300 - Laser module; 400 - Inertial navigation module. Detailed Implementation
[0041] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be described in detail below with reference to specific embodiments. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0042] Example 1, such as Figure 1 and Figure 2 As shown, a preferred embodiment of the present invention provides a handheld vision-fusion inertial navigation laser measurement device for coffee color values, comprising an ergonomically designed housing 100, which facilitates single-handed operation. A vision module 200 and a laser module 300 are mounted side-by-side at the detection end of the housing 100 (the end facing the coffee bean sample). The vision module 200, located on one side of the detection end, is used to acquire image information including the coffee beans and container; the laser module 300, located on the other side of the detection end, is used to emit a detection laser and receive reflected light signals. An inertial navigation module 400 and a data processing module are also fixedly installed within the internal cavity of the housing 100. The data processing module is electrically connected to the vision module 200, the laser module 300, and the inertial navigation module 400 via an internal bus for data exchange and command control.
[0043] During the actual measurement operation, the operator holds the device housing 100, aligns the detection end with the container holding the coffee bean sample (in this embodiment, a shallow disc with a diameter of 10cm is used as an example), and presses the trigger button, after which the device enters the automatic measurement process. First, the image sensor in the vision module 200 takes an image of the target area. The acquired image is sent to the embedded vision processing unit, which is loaded with a pre-trained lightweight deep learning semantic segmentation network. This network calculates the category probability for each pixel (x_i, y_i) in the image, that is, it determines the probability value of the pixel belonging to the preset category (coffee bean surface, silver skin, crevice, or background) by P(y_i|x_i;θ)=softmax(f_θ(x_i)), where θ is the network parameter and f_θ(·) is the network mapping function. By setting a probability threshold, the system removes the pixels corresponding to the silver skin, crevice, and background areas, and only retains the pixels in the coffee bean surface area to form the initial mask. Meanwhile, the vision module 200 executes the edge detection algorithm in parallel. First, it uses the Canny operator to calculate the horizontal gradient Gx and vertical gradient Gy of the image, obtaining the gradient magnitude G = sqrt(Gx^2 + Gy^2) and gradient direction θ = arctan(Gy / Gx). Then, based on the Hough transform principle, it uses the formula ρ = x·cosθ + y·sinθ to vote in the parameter space, thereby identifying the circular or rectangular geometric boundary of the container, where ρ represents the distance from the origin to the boundary line. The vision module 200 performs a logical AND operation between the initial mask generated by deep learning and the internal region of the container boundary identified by the Hough transform, ultimately generating a precise binary effective measurement region mask. This mask defines that subsequent laser measurements are limited to the pure coffee bean surface, effectively eliminating interference from silver skin, gaps, and container edges, and simultaneously outputs a visual confidence score reflecting the segmentation quality of that frame.
[0044] Subsequently, the data processing module, guided by the coordinates of the effective measurement area mask, controls the laser module 300 to begin operation. A miniature galvanometer inside the laser module 300, or a pointer light, guides the operator's movement, causing the laser spot to collect data from N discrete sampling points within the area defined by the mask. At each sampling point, the laser emitter emits a laser beam of a specific wavelength, and the receiver simultaneously acquires the laser reflection intensity value I_i after reflection from the coffee bean surface, and measures the real-time distance d_i between the device housing 100 and the sampling point using either the time-of-flight method or the phase method. For subsequent surface interpolation reconstruction, the system assigns a composite weight w_i = f(I_i)·g(d_i) to each sampling point, where f(I_i) is a function positively correlated with the quality of the reflected signal, and g(d_i) is a distance attenuation compensation function, designed to correct measurement deviations caused by changes in reflection intensity with distance. After acquiring the weighted discrete point set, the data processing chip of the laser module 300 uses a thin-plate spline-based interpolation algorithm to reconstruct the color value surface. Specifically, it selects the radial basis function φ(r) = r^2ln(r), where r is the Euclidean distance between sampling points, to construct the interpolation matrix Φ. After obtaining the global weight vector by solving the linear equation system Φ·w=C, the original color value of any coordinate point (x,y) within the effective region can be calculated using the formula C(x,y) = Σ_{i=1}^Nw_i·φ(||(x,y)-(x_i,y_i)||). Thus, the laser module 300 generates a smooth, continuous original color value C_raw for the coffee bean surface that eliminates spatial noise interference.
[0045] Throughout the data acquisition process of the laser module 300, the inertial navigation module 400, built into the device housing 100, maintains a high-frequency synchronous operating state. The inertial navigation module 400 integrates a three-axis gyroscope and a three-axis accelerometer of a microelectromechanical system, which are used to monitor in real time the angular deviation α(t) and acceleration a(t) generated by the device housing 100 under handheld operation. To compensate for the nonlinear effects of the handheld dynamic environment on the optical system's receiving efficiency and spot shape, the inertial navigation module 400 uses a pre-calibrated cubic polynomial function to calculate the error compensation. The specific formulas are: angle compensation value ΔC(t) = k3·α(t)^3 + k2·α(t)^2 + k1·α(t) + k0, and acceleration compensation value ΔCa(t) = k3'·a(t)^3 + k2'·a(t)^2 + k1'·a(t) + k0', where k0 to k3 and k0' to k3' are fixed calibration coefficients obtained through fitting a large amount of experimental data. The inertial navigation module 400 sends the calculated real-time compensation values ΔC(t) and ΔCa(t) to the data processing module.
[0046] The data processing module receives the original color value C_raw from the laser module 300 and the compensation amount from the inertial navigation module 400, and performs a color value correction calculation, i.e., C_corrected = C_raw - (ΔC + ΔCa), to obtain the single-frame compensated color value C_corrected after eliminating the effects of handheld angle deflection and displacement sway. To improve the reliability and repeatability of the final output data, in a single measurement task, the data processing module controls the aforementioned visual guidance, laser sampling, and inertial navigation compensation process to be executed cyclically several times (e.g., 10 to 20 measurement cycles) to obtain multiple sets of compensated color value data C_i. Subsequently, the data processing module uses the visual confidence level or other signal quality index corresponding to each cycle as a weighting factor w_i, and performs weighted fusion calculation on the multi-cycle data according to the formula C_fused = Σ(w_i·C_i) / Σw_i to obtain a more robust final fused color value. In addition, the data processing module, based on statistical principles, calculates the arithmetic mean color value C = (1 / N)ΣC_i and the standard deviation σ_C = sqrt((1 / N)Σ(C_i-C)^2), reflecting the degree of measurement dispersion. Finally, the device presents a comprehensive test report to the user via a display screen, including the mean color value, standard deviation, and overall measurement confidence level.
[0047] In the practical application of the device in this embodiment, its rated effective operating parameter range is defined as follows: measurement distance 10cm to 50cm, allowable angular deviation of ±20° in both the horizontal and vertical directions during handheld operation, and the effective area that the vision module 200 can recognize is a 5cm radius circular area centered on the detection optical axis. Experimental data verification shows that within the above dynamic operating range, the repeatability error of this device for multiple measurements of the same batch of coffee bean samples is stably controlled within 2%, significantly improving the anti-interference capability and measurement accuracy of the portable coffee color value measuring instrument.
[0048] like Figure 3 As shown in the above-described device embodiment, the present invention also provides a method for measuring the brown value of coffee using handheld vision fusion inertial navigation laser, the method specifically including the following steps:
[0049] Step S1: Acquire images through the vision module, and use deep learning segmentation algorithms to remove silver skin, gaps and container boundaries to generate an effective measurement area mask.
[0050] In this step, the operator aligns the detection end of the device housing 100 with the container holding coffee beans. The vision module 200 first executes the image acquisition sub-step to acquire high-resolution color image frames. Subsequently, the vision module 200 calls its internal deep learning segmentation algorithm to perform pixel-level processing on the image. This processing is specifically detailed as follows: First, forward inference is performed based on the pre-trained semantic segmentation network, and the probability value of each pixel (x_i, y_i) in the image belonging to each preset semantic category (coffee bean surface, silver skin, gap, background) is calculated according to the formula P(y_i|x_i;θ)=softmax(f_θ(x_i)), where θ is the network parameter and f_θ(·) is the network mapping function; Second, the Canny edge detection sub-step is executed to calculate the horizontal and vertical gradients Gx and Gy of the image and obtain the edge detection results. The gradient magnitude G = sqrt(Gx^2 + Gy^2) and gradient direction θ = arctan(Gy / Gx) are defined. Next, a sub-step for detecting container boundaries using Hough transform is employed. Based on the polar coordinate formula ρ = x·cosθ + y·sinθ, the geometric lines of the container edge are identified, where ρ is the distance from the origin to the boundary line. Finally, by combining the deep learning classification results with the boundary line information detected by Hough transform, the pixel values corresponding to the silver skin region, the gap region, and the region outside the container boundary are set to zero, generating a binarized effective measurement region mask. Simultaneously, a visual confidence index reflecting the segmentation quality of the frame is output.
[0051] Step S2: Based on the mask, drive the laser module to collect multi-point laser reflection intensity and distance data, and calculate the original color value through a biharmonic spline interpolation algorithm.
[0052] After obtaining the effective measurement area mask in step S1, the data processing module controls the laser module 300 to start working based on the coordinate range of the mask. In this step, the laser module 300 selects and collects N sampling points within the coffee bean surface area defined by the mask. For each sampling point, the laser module 300 simultaneously records the laser reflection intensity value I_i obtained by the photoelectric receiver and the distance value d_i from the device to the sampling point surface obtained by the ranging unit. After data acquisition, the sub-process of the interpolation algorithm is executed: First, each sampling point is assigned an interpolation weight w_i=f(I_i)·g(d_i) according to a predetermined weight function, which comprehensively considers the compensation of signal strength and distance attenuation; Second, the biharmonic spline basis function φ(r)=r^2ln(r) is selected, where r is the Euclidean distance between sampling points, and the interpolation matrix Φ is constructed accordingly; Finally, the weight vector is obtained by solving the linear equation system, and the surface reconstruction calculation is performed on any point (x,y) in the measurement area according to the interpolation formula C(x,y)=Σ_{i=1}^Nw_i·φ(||(x,y)-(x_i,y_i)||) to obtain the original color value C_raw that represents the color value of the coffee bean surface.
[0053] Step S3: Simultaneously collect angle and acceleration data using the inertial navigation module, calculate the compensation amount using a cubic polynomial nonlinear function, correct the original color value, and obtain the compensated color value.
[0054] Throughout the laser sampling process in step S2, step S3 is synchronously performed at a high frequency by the inertial navigation module 400. Specifically, the gyroscope in the inertial navigation module 400 acquires the angle deviation data α(t) of the device housing 100 in three-dimensional space in real time, and the accelerometer acquires the acceleration data a(t) of the device housing 100 in real time. The inertial navigation module 400 calls the pre-calibrated compensation coefficients k0, k1, k2, k3 and k0', k1', k2', k3' stored in the firmware, and substitutes them into the preset cubic polynomial nonlinear compensation models: angle compensation value calculation model ΔC(t) = k3·α(t)^3 + k2·α(t)^2 + k1·α(t) + k0, and acceleration compensation value calculation model ΔCa(t) = k3'·a(t)^3 + k2'·a(t)^2 + k1'·a(t) + k0'. After calculating the dynamic error compensation amounts ΔC(t) and ΔCa(t) at the current moment, a correction operation is then performed on the original color value obtained in step S2, i.e., C_corrected=C_raw-(ΔC+ΔCa), thereby obtaining the single-frame compensated color value C_corrected after eliminating the effects of handheld angle deflection and displacement shaking.
[0055] Step S4: The data processing module performs weighted fusion and statistical calculation on the compensated color values of multiple measurement cycles, and outputs the final average color value, standard deviation and measurement confidence level.
[0056] To overcome random errors in a single measurement, the data processing module controls steps S1 to S3 to be executed repeatedly for multiple measurement cycles (e.g., 10 to 20 cycles) within the duration of a single press measurement. In step S4, the data processing module collects the compensated color value sequence C_i generated in all measurement cycles. The data processing module determines the weighting factor w_i for each color value data based on the visual confidence level or signal quality index corresponding to each cycle. Subsequently, a weighted fusion operation is performed, and the final fused color value is calculated according to the formula C_fused=Σ(w_i·C_i) / Σw_i. In addition, the data processing module also calculates the arithmetic mean C=(1 / N)ΣC_i and the standard deviation σ_C=sqrt((1 / N)Σ(C_i-C)^2) of the batch of measurement data to characterize the central tendency and dispersion of the measurement. Finally, the device outputs a comprehensive test report containing the average color value C, the standard deviation σ_C, and the overall measurement confidence level to the display screen.
[0057] By implementing the above methods and steps, the entire measurement process can effectively overcome the influence of environmental interference and hand shake within the preset working parameter range (measurement distance 10cm to 50cm, hand angle ±20° in both horizontal and vertical directions), ensuring that the repeatability error of the measurement is stably controlled within 2%.
[0058] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A handheld device for measuring the brown value of coffee using vision fusion inertial navigation laser, characterized in that, include: Device housing (100); The vision module (200) installed on the detection end side of the device housing (100) is configured to acquire images containing coffee beans and containers, identify and remove silver skin, gaps and container boundaries based on deep learning algorithms, and generate a confidence mask of the effective measurement area. The laser module (300) installed on the other side of the detection end of the device housing (100) is configured to emit laser light into the effective measurement area and receive reflected light, acquire laser reflection intensity data and distance data, and calculate the original color value using a biharmonic spline interpolation algorithm; An inertial navigation module (400) installed inside the device housing (100) is configured to acquire angle and acceleration data of the device housing (100) in real time and calculate angle compensation and acceleration compensation values based on nonlinear functions; The data processing module installed inside the device housing (100) is connected to the vision module (200), the laser module (300) and the inertial navigation module (400) to compensate and correct the original color value, and to perform weighted fusion calculation on the compensated color value of multiple measurement cycles, and output the final color value and statistical indicators.
2. The handheld vision fusion inertial navigation laser measurement device for measuring brown color value according to claim 1, characterized in that, The visual module (200) classifies pixels through a semantic segmentation network, including categories such as coffee beans, silver skin, gaps and background, and generates a binarized mask based on the classification results and the container boundaries detected by Hough transform.
3. The handheld vision fusion inertial navigation laser measurement device for measuring brown color value according to claim 1, characterized in that, The laser module (300) uses a biharmonic spline interpolation algorithm based on the radial basis function φ(r) = r^2ln(r), combined with the sampling point weights w_i = f(I_i)·g(d_i) determined by the reflection intensity and distance, to calculate the interpolation result characterizing the color value of the coffee bean surface.
4. The handheld vision fusion inertial navigation laser measurement device for measuring brown color value according to claim 1, characterized in that, The inertial navigation module (400) calculates the compensation value using a pre-calibrated cubic polynomial function, specifically using the following formula: ΔC(t)=k3·α(t)^3+k2·α(t)^2+k1·α(t)+k0, ΔCa(t)=k3'·a(t)^3+k2'·a(t)^2+k1'·a(t)+k0', Where ΔC(t) is the angle compensation value, ΔCa(t) is the acceleration compensation value, α(t) is the real-time angle deviation, a(t) is the real-time acceleration, and k0 to k3 and k0' to k3' are calibration coefficients.
5. The handheld vision fusion inertial navigation laser measurement device for measuring brown color value according to claim 1, characterized in that, The data processing module determines the weighting factor based on the confidence level or data quality index of each module, calculates the fused color value according to the formula C_fused=Σ(w_i·C_i) / Σw_i, and outputs the average color value, standard deviation and measurement confidence level.
6. The handheld vision fusion inertial navigation laser measurement device for measuring brown color value according to claim 1, characterized in that, The operating parameters of the handheld visual fusion inertial laser measurement device for measuring coffee color values are as follows: measurement distance from 10cm to 50cm, handheld angle of ±20° in both the horizontal and vertical directions, and visual recognition area of a circular area with a radius of 5cm.
7. A method for measuring the brown value of coffee using handheld vision fusion inertial navigation laser, applied to the apparatus as described in any one of claims 1 to 6, characterized in that, Includes the following steps: Step S1: Acquire images through the vision module (200), and use deep learning segmentation algorithms to remove silver skin, gaps and container boundaries to generate an effective measurement area mask; Step S2: Based on the mask, drive the laser module (300) to collect multi-point laser reflection intensity and distance data, and calculate the original color value through a biharmonic spline interpolation algorithm; Step S3: Synchronously use the inertial navigation module (400) to collect angle and acceleration data, calculate the compensation amount through a cubic polynomial nonlinear function, correct the original color value, and obtain the compensated color value; Step S4: The data processing module performs weighted fusion and statistical calculation on the compensated color values of multiple measurement cycles, and outputs the final average color value, standard deviation and measurement confidence level.
8. The method for measuring coffee brown value using handheld vision fusion inertial navigation laser as described in claim 7, characterized in that, The algorithm steps of the vision module (200) specifically include: Image acquisition; Deep learning segmentation calculates pixel class probabilities based on the formula P(y_i|x_i;θ)=softmax(f_θ(x_i)); Canny edge detection calculates the gradient magnitude G = sqrt(Gx^2 + Gy^2). Hough transform is used to detect container boundaries, and boundary lines are identified based on the formula ρ=x·cosθ+y·sinθ. Generate an effective region mask and output the visual confidence score.
9. The method for measuring coffee brown value using handheld vision fusion inertial navigation laser as described in claim 7, characterized in that, The interpolation algorithm steps of the laser module (300) specifically include: Collect the reflection intensity and distance at N sampling points within the effective area; The interpolation weights are calculated using the formula w_i = f(I_i)·g(d_i); Construct an interpolation matrix based on φ(r) = r^2ln(r); Solve for the weight vector and calculate the original color value based on the formula C(x,y)=Σ_{i=1}^Nw_i·φ(||(x,y)-(x_i,y_i)||).
10. A method for measuring coffee brown value using handheld vision fusion inertial navigation laser as described in claim 7, characterized in that, The measurement process, under the conditions of a measurement distance of 10-50cm and a handheld angle of ±20°, has a repeatability error of less than 2%.