Rapid and convenient white granulated sugar color value analysis method
Through image analysis technology and weighted averaging algorithm, combined with linear fitting equations, the color value of the white sugar sample is quickly calculated, which solves the cumbersome and time-consuming problem of existing analysis methods and realizes fast and convenient color value analysis.
Patent Information
- Application Number
- CN202411435146.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-02-28
AI Technical Summary
The existing white sugar color value analysis methods are cumbersome and time-consuming, making it difficult to achieve fast and convenient analysis.
Image analysis technology is used to obtain RGB color information of the sample to be tested and the standard sample by taking pictures, and the color value of the sample is calculated using the weighted average algorithm and linear fitting equation.
It realizes fast and convenient analysis of the color value of white sugar, which is simple to operate, short time to consume and low cost, and is better than traditional chemical methods.
Smart Images

Figure CN119534348A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of analytical technology application, and in particular to a fast and convenient method for analyzing the color value of white granulated sugar. Background Art
[0002] The current color value analysis experiment of white sugar in edible sugar is basically as described in GB / T35887-2018 "White Sugar Test Method": Weigh 100.0g of white sugar sample in a 250mL beaker, add 135mL of triethanolamine hydrochloric acid buffer solution and stir until completely dissolved. Pour into a filter with a 0.45μm pore size microporous membrane pre-laid, filter under vacuum, discard the initial 50L of filtrate, and collect no less than 50mL of filtrate. Use a refractometer to measure the refractive index of the filtrate, then use a colorimetric container to hold the liquid, and measure its absorbance at a wavelength of 420nm on a spectrophotometer, and at the same time use the triethanolamine-hydrochloric acid buffer solution to adjust the measurement to zero. The process is complicated and time-consuming. Summary of the invention
[0003] The purpose of the invention is to solve the problems existing in the prior art and to provide a fast and convenient method for analyzing the color value of white granulated sugar.
[0004] In order to solve the problems existing in the prior art, the present invention adopts the following technical solutions:
[0005] A fast and convenient method for analyzing the color value of white sugar includes the following steps:
[0006] Set up the lighting environment;
[0007] Place the sample to be tested under the same lighting environment and take photos to obtain photos of the sample to be tested;
[0008] Performing image analysis on the sample to be tested to obtain multiple pixel points and their corresponding RGB color information;
[0009] Based on the RGB color information, using a weighted average algorithm to calculate an average RGB array;
[0010] Composition of four-variable space coordinate points based on RGB color information related to standard samples;
[0011] A fitting equation is obtained by performing linear fitting based on the coordinate points, and the RGB color information of the sample to be tested is substituted into the fitting equation to calculate the color value of the sample to be tested.
[0012] As an improvement of the technical solution of the fast and convenient white sugar color value analysis method of the present invention, a weighted average algorithm based on RGB color information is used:
[0013]
[0014]
[0015] As an improvement to the technical solution of the fast and convenient method for analyzing the color value of white granulated sugar of the present invention, a lighting environment is set;
[0016] Place the standard sample with known color value under the same lighting environment and take a photo to obtain a photo of the standard sample;
[0017] Performing image analysis on the sample to be tested to obtain multiple pixel points and their corresponding RGB color information;
[0018] Based on the RGB color information, using a weighted average algorithm to calculate an average RGB array;
[0019] Composition of four-variable space coordinate points based on RGB color information related to standard samples;
[0020] A linear fitting is performed based on the coordinate points to obtain a fitting equation.
[0021] As an improvement of the technical solution of the fast and convenient method for analyzing the color value of white sugar of the present invention, a set of four-variable arrays, namely (A, R, G, B), can be obtained by using a standard sample with a known color value A;
[0022] By fitting the five sets of values (A1, R1, G1, B1), (A2, R2, G2, B2), (A3, R3, G3, B3), (A4, R4, G4, B4), (A5, R5, G5, B5) in four-dimensional space using the least bisection method, we can get the equation of the intercept A=k1*R+k2*G+k3*B+D.
[0023] The RGB color information (Rx, Gx, Bx) of the sample to be tested can be obtained by analyzing the fitting equation, and the color value A can be calculated by substituting the fitting equation of the standard sample.
[0024] Beneficial effects of the present invention:
[0025] The present invention uses graphic analysis technology to extract the image RGB information of standard samples and unknown samples photographed under the same environmental conditions, and uses a weighted average algorithm to calculate the total average RGB array; first, the RGB-related four-variable spatial coordinate points of the standard sample with a known color value A are used to linearly fit the coordinate points to obtain a fitting equation; then the (Rx, Gx, Bx) information of the unknown sample to be tested is substituted to calculate the corresponding color value Ax. Compared with the current ICUMSA international method and the domestic national standard GB / T35887-2018 "White Sugar Test Method", the image recognition method of the present invention is superior to conventional chemical methods in terms of operation, time, and cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 Schematic diagram of weighted average decomposition of RGB information. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical scheme and beneficial effects of the present invention clearer, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0028] A fast and convenient method for analyzing the color value of white sugar includes the following steps:
[0029] Set up the lighting environment;
[0030] Place the sample to be tested under the same lighting environment and take photos to obtain photos of the sample to be tested;
[0031] Performing image analysis on the sample to be tested to obtain multiple pixel points and their corresponding RGB color information;
[0032] Based on the RGB color information, using a weighted average algorithm to calculate an average RGB array;
[0033] Composition of four-variable space coordinate points based on RGB color information related to standard samples;
[0034] A fitting equation is obtained by performing linear fitting based on the coordinate points, and the RGB color information of the sample to be tested is substituted into the fitting equation to calculate the color value of the sample to be tested.
[0035] In some embodiments of the present invention, a weighted average algorithm is performed based on RGB color information:
[0036]
[0037] In some embodiments of the present invention, a lighting environment is set;
[0038] Place the standard sample with known color value under the same lighting environment and take a photo to obtain a photo of the standard sample;
[0039] Performing image analysis on the sample to be tested to obtain multiple pixel points and their corresponding RGB color information;
[0040] Based on the RGB color information, using a weighted average algorithm to calculate an average RGB array;
[0041] Composition of four-variable space coordinate points based on RGB color information related to standard samples;
[0042] A linear fitting is performed based on the coordinate points to obtain a fitting equation.
[0043] In some embodiments of the present invention, a standard sample with a known color value A can obtain an array of four variables, namely (A, R, G, B);
[0044] By fitting the five sets of values (A1, R1, G1, B1), (A2, R2, G2, B2), (A3, R3, G3, B3), (A4, R4, G4, B4), (A5, R5, G5, B5) in four-dimensional space using the least bisection method, we can get the equation of the intercept A=k1*R+k2*G+k3*B+D.
[0045] The RGB color information (Rx, Gx, Bx) of the sample to be tested can be obtained by analyzing the fitting equation, and the color value A can be calculated by substituting the fitting equation of the standard sample.
[0046] Specifically, the sample to be tested and the standard sample are photographed under the same lighting environment conditions, and corresponding photos are obtained respectively. The photos are analyzed and all pixels are decomposed into different RGB information.
[0047] Weighted average algorithm based on RGB color information:
[0048]
[0049]
[0050] The array of RGB color information is obtained. The standard sample with known color value A can be used to obtain an array of four variables, namely (A, R, G, B). The five sets of values, namely (A1, R1, G1, B1), (A2, R2, G2, B2), (A3, R3, G3, B3), (A4, R4, G4, B4), (A5, R5, G5, B5) are fitted into a straight line using the least bisection method in four-dimensional space to obtain the equation of A = k1*R+k2*G+k3*B+D intercept. Figure 1 The analytical method can be used to analyze the unknown sample to be tested to obtain its (Rx, Gx, Bx), and the color value A can be calculated by substituting it into the fitting equation of the standard sample. The method is convenient, time-saving and saves a lot of work.
[0051] Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in the field without making any creative work shall fall within the scope of protection of the present invention.
Claims
1. A fast and convenient method for analyzing the color value of white sugar, characterized in that: The following steps are included: Set up the lighting environment; Place the sample to be tested under the same lighting environment and take photos to obtain photos of the sample to be tested; Performing image analysis on the sample to be tested to obtain multiple pixel points and their corresponding RGB color information; Based on the RGB color information, using a weighted average algorithm to calculate an average RGB array; Composition of four-variable space coordinate points based on RGB color information related to standard samples; A fitting equation is obtained by performing linear fitting based on the coordinate points, and the RGB color information of the sample to be tested is substituted into the fitting equation to calculate the color value of the sample to be tested.
2. The fast and convenient method for analyzing the color value of white granulated sugar according to claim 1, characterized in that: Weighted average algorithm based on RGB color information:
3. The fast and convenient method for analyzing the color value of white sugar according to claim 1, characterized in that: Set up the lighting environment; Place the standard sample with known color value under the same lighting environment and take a photo to obtain a photo of the standard sample; Performing image analysis on the sample to be tested to obtain multiple pixel points and their corresponding RGB color information; Based on the RGB color information, using a weighted average algorithm to calculate an average RGB array; Composition of four-variable space coordinate points based on RGB color information related to standard samples; A linear fitting is performed based on the coordinate points to obtain a fitting equation.
4. The fast and convenient method for analyzing the color value of white sugar according to claim 3, characterized in that: The standard sample with known color value A can produce an array of four variables, namely (A, R, G, B); By fitting the five sets of values (A1, R1, G1, B1), (A2, R2, G2, B2), (A3, R3, G3, B3), (A4, R4, G4, B4), (A5, R5, G5, B5) in four-dimensional space using the least bisection method, we can get the equation of the intercept A=k1*R+k2*G+k3*B+D. The RGB color information (Rx, Gx, Bx) of the sample to be tested can be obtained by analyzing the fitting equation, and the color value A can be calculated by substituting the fitting equation of the standard sample.
Citation Information
Patent Citations
Sample color development rapid analysis and detection method and detection kit based on intelligent equipment
CN116429702A
Rapid detection method and device for soft white sugar
CN118090662A
Color index value control device and color index value control method
JP2019138830A
Method And Apparatus for Predicting Agricultural Freshness
KR102448123B1