Image processing method and system in analyte testing, medium, and device
The image processing method for analyte detection using infrared imaging and convolution filters addresses the challenge of blood vessel localization, improving the accuracy and convenience of non-invasive blood glucose measurement.
Patent Information
- Authority / Receiving Office
- HK · HK
- Patent Type
- Applications
- Current Assignee / Owner
- SENSURA PTE LTD
- Filing Date
- 2026-05-20
- Publication Date
- 2026-07-10
AI Technical Summary
Existing methods for non-invasive analyte detection, such as fluorescence and Raman spectroscopy, face challenges in accurately locating blood vessels due to interference from skin pigmentation and spectral signal overlap, leading to inaccurate blood glucose measurements.
An image processing method using infrared grayscale imaging to identify blood vessels by converting images into two-dimensional matrices, differentiating minimum value points, and applying convolution kernels to filter out target regions, enabling accurate blood vessel localization.
This method enhances the accuracy of blood glucose detection by isolating blood vessel areas from skin regions, allowing for non-invasive, cost-effective, and real-time analyte detection.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
(19) State Intellectual Property Office (12) Invention Patent Application (10) Application Publication Number (43) Application Publication Date (21) Application Number 202410951413.1 (22) Application Date 2024.07.16 (71) Applicant Guangzhou Ruixin Microelectronics Co., Ltd. Address Room 1703, No. 188, Kaitai Avenue, Huangpu District, Guangzhou City, Guangdong Province 510535 (72) Inventor Zheng Hongzhi (74) Patent Agency Shanghai Duan & Duan Law Firm 31334 Patent Attorney Li Yuan (51) Int.Cl. A61B 5 / 1455 (2006.01) A61B 5 / 145 (2006.01) A61B 5 / 00 (2006.01) G06V 40 / 145 (2022.01) G06V 10 / 143 (2022.01) G06V 10 / 25 (2022.01) G06V 10 / 44 (2022.01) G06V 10 / 82 (2022.01) G06T 7 / 00 (2017.01) (54) Invention Title: Detection of Analyte, Image Processing Method, System, Medium and Device (57) Abstract: This invention provides a detection of analyte, image processing method, system, medium and device, including: Image acquisition step: acquiring an infrared grayscale image of a first region; Minimum value finding step: converting the infrared grayscale image into a two-dimensional matrix, sequentially differentiating each row and column matrix in the x and y directions, finding the minimum value point, and recording the number of pixels whose grayscale values remain monotonic on both sides of the minimum value point; Equal-size matrix creation step: creating an equal-size matrix of the two-dimensional matrix, The minimum value points are replaced with non-zero values; the region filtering step is as follows: a matrix is used as the convolution kernel to convolve a created matrix of the same size. The larger the value of the element in the convolution matrix, the greater the probability that the corresponding position is in the target region. The elements and their corresponding positions in the convolution matrix are sorted from largest to smallest to filter out the target region. The method of selecting blood vessel regions based on grayscale in this invention is not affected by skin type and has good versatility. Claims 1 page, Description 13 pages, Drawings 7 pages, CN 121337325 A 2026.01.16 CN 1 21 33 73 25 A 1. An image processing method for analyte detection, characterized in that it includes: Image acquisition step: acquiring an infrared grayscale image of a first region; Minimum value finding step: converting the infrared grayscale image into a two-dimensional matrix, sequentially differentiating each row and column matrix in the x and y directions to find the minimum value point, and recording the number of pixels whose grayscale values remain monotonic on both sides of the minimum value point; Equal-size matrix creation step: creating an equal-size matrix of the two-dimensional matrix, and replacing the minimum value points with non-zero values; Region filtering step: using a matrix as a convolution kernel to convolve the created equal-size matrix, and obtaining the convolution matrix...The larger the value of an element in the matrix, the greater the probability that the corresponding position is in the target region. The elements and their corresponding positions in the convolution matrix are sorted from largest to smallest to filter out the target region. 2. The image processing method for detecting analytes according to claim 1, characterized in that the distribution of minimum points drawn by the equal-sized matrix is replaced by 1, and if there is overlap of minimum points, it is replaced by 2. 3. The image processing method for detecting analytes according to claim 1, characterized in that the size of the matrix used as the convolution kernel is (n / 2)*(n / 2), where n is the number of times the grayscale values of the pixels on both sides of the minimum point remain monotonic. 4. A method for detecting analytes, characterized in that it includes the image processing method for detecting analytes according to any one of claims 1-3. 5. An image processing system for analyte detection, characterized in that it comprises: an image acquisition module for acquiring an infrared grayscale image of a first region; a minimum value finding module for converting the infrared grayscale image into a two-dimensional matrix, sequentially differentiating each row and column matrix in the x and y directions to find minimum points, and recording the number of pixels whose grayscale values remain monotonic on both sides of the minimum point; an equal-size matrix creation module for creating an equal-size matrix of the two-dimensional matrix, and replacing the minimum points with non-zero values; and a region filtering module for convolving the created equal-size matrix with a matrix as the convolution kernel, wherein the larger the value of an element in the convolved matrix, the greater the probability that the corresponding position is in the target region, and sorting the elements and their corresponding positions in the convolution matrix from largest to smallest to filter out the target region. 6. The image processing system for analyte detection according to claim 5, characterized in that the distribution of minimum points in the equal-size matrix is represented by 1, and if there are overlapping minimum points, it is represented by 2. 7. The image processing system for analyte detection according to claim 5, characterized in that the size of the matrix serving as the convolution kernel is (n / 2)*(n / 2), where n is the number of pixels whose grayscale values remain monotonic on both sides of the minimum point. 8. An analyte detection system, characterized in that it includes the image processing system for analyte detection according to any one of claims 5-7. 9. A computer-readable storage medium storing a computer program, characterized in that when the computer program is executed by a processor, it implements the steps of the image processing method for analyte detection according to any one of claims 1 to 3. 10. An electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that when the computer program is executed by a processor, it implements the steps of the image processing method for analyte detection according to any one of claims 1 to 3. Claims 1 / 1 page 2 CN 121337325 A Analyte detection, image processing method, system, medium and device technical field
[0001] This invention relates to the field of optical analysis, specifically to a method, system, medium, and device for detecting and image processing analytes. Background Art
[0002] Fluorescence analysis refers to a method that utilizes the fluorescence that occurs when certain substances are irradiated with ultraviolet light and are in an excited state. The excited-state molecules undergo a collision and emission de-excitation process, which reflects the characteristics of the substance and can be used for qualitative or quantitative analysis.
[0003] When using fluorescence analysis to detect blood glucose in the human body, the acquired image includes areas where veins are located and areas without veins. Since the blood glucose content in blood vessels differs greatly from that in the skin, directly acquiring spectral data from the image will lead to inaccurate detection results. Therefore, accurately locating the blood vessels in the image is an important prerequisite for using fluorescence analysis to detect blood glucose, but existing detection technologies cannot accurately locate blood vessels.
[0004] Patent document US20160287147A1 discloses a device for non-invasive in vivo measurement using Raman spectroscopy, which uses Raman spectroscopy to measure in vivo blood glucose concentration. The advantage of this approach is that it has higher accuracy compared to the electrochemical method in US20100065441A1. However, its disadvantage is that it currently requires a laboratory-grade Raman spectroscopy system, which is bulky and expensive.
[0005] In addition, patent document CN118078277A discloses a non-invasive blood glucose detection method based on hyperspectral data analysis, achieving non-invasive detection. This document uses absorption spectroscopy, and the spectral signals collected and analyzed include not only the spectral signals of blood glucose but also the spectral signals of components such as skin tissue. The spectral signals of different wavelengths are superimposed, making it difficult to finely separate and extract the spectral signals related to blood glucose. At the same time, factors such as the excitation light source, human skin color, and differences in epidermal thickness also affect the intensity of the spectral signals, resulting in differences in the intensity of the spectral signals. The final collected spectral signals are easily affected and cannot be strongly correlated with blood glucose concentration, affecting the accurate measurement of blood glucose concentration. Similarly, patent document CN108542402A also has the same problem.
[0006] To address the deficiencies in the prior art, the present invention aims to provide a method, system, medium, and device for detecting and processing analytes.
[0007] According to the present invention, an image processing method for detecting analytes includes:
[0008] An image acquisition step: acquiring an infrared grayscale image of a first region;
[0009] A minimum value finding step: converting the infrared grayscale image into a two-dimensional matrix, sequentially differentiating each row and column matrix in the x and y directions to find the minimum value point, and recording the number of pixels whose grayscale values remain monotonic on both sides of the minimum value point;
[0010] A uniform-size matrix creation step: creating a uniform-size matrix of the two-dimensional matrix, and replacing the minimum value points with non-zero values;
[0011] Region filtering step: A matrix is used as the convolution kernel to convolve the created equal-sized matrix. The larger the value of the element in the convolution matrix, the greater the probability that the corresponding position of the point is in the target region. The elements and their corresponding positions in the convolution matrix are sorted from largest to smallest to filter out the target region.
[0012] Preferably, the distribution of the minimum point in the equal-sized matrix is represented by 1, and if there is an overlap of minimum points, it is represented by 2.
[0013] Preferably, the size of the matrix used as the convolution kernel is (n / 2)*(n / 2), where n is the number of pixels on both sides of the minimum point whose gray values remain monotonic.
[0014] The present invention also provides a method for detecting analytes, including the image processing method in the above-mentioned analyte detection.
[0015] The present invention also provides an image processing system for analyte detection, comprising:
[0016] an image acquisition module: acquiring an infrared grayscale image of a first region;
[0017] a minimum value finding module: converting the infrared grayscale image into a two-dimensional matrix, sequentially differentiating each row and column matrix in the x and y directions to find minimum value points, and recording the number of pixels whose grayscale values remain monotonic on both sides of the minimum value point;
[0018] an equal-size matrix creation module: creating an equal-size matrix of the two-dimensional matrix, and replacing the minimum value points with non-zero values;
[0019] a region filtering module: using a matrix as a convolution kernel to convolve the created equal-size matrix, the larger the value of the element in the convolution matrix, the greater the probability that the corresponding position of the point is in the target region, sorting the elements and their corresponding positions in the convolution matrix from largest to smallest, and filtering out the target region.
[0020] Preferably, the distribution of minimum value points in the equal-size matrix is represented by 1, and if there are overlapping minimum value points, it is represented by 2.
[0021] Preferably, the size of the matrix used as the convolution kernel is (n / 2)*(n / 2), where n is the number of pixels whose gray values remain monotonic on both sides of the minimum point.
[0022] The present invention also provides an analyte detection system, including the image processing system in the above-mentioned analyte detection.
[0023] The present invention also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the above-mentioned image processing method in analyte detection.
[0024] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by a processor, implements the steps of the above-mentioned image processing method in analyte detection.
[0025] Compared with the prior art, the present invention has the following beneficial effects:
[0026] 1. The technical solution of this application uses an infrared light source as a blood vessel positioning light source, on the one hand because blood in human blood contains blood...Hemoglobin has a strong absorption of infrared light waves. The skin reflectance of blood vessels under infrared light source collected by the detector is lower than that of the skin area. On the other hand, thanks to the fact that skin pigmentation such as age spots does not absorb infrared light waves, this means that the method of selecting blood vessel areas based on grayscale is not affected by skin type and has good versatility.
[0027] 2. The technical solution of this application can accurately identify the area where blood vessels are located on the skin, improving the accuracy of blood glucose detection in the human body through optical analysis.
[0028] 3. The detection method of this application does not require electrochemical reaction with the analyte, making the detection method more convenient. Especially when detecting analytes in living organisms, it can achieve the purpose of non-invasive detection.
[0029] 4. The detection method of this application can obtain spectral data of different areas by utilizing the uneven distribution of analytes in the imaging area. Since the distribution of other components besides the analyte in the imaging area is relatively uniform, the difference in spectral data of different areas can directly reflect the information of the correlation between the analyte and the spectral data after basically excluding the influence of non-analytes, such as the concentration of the analyte.
[0030] 5. The detection method of this application uses fluorescence spectroscopy for detection, avoiding the traditional method of measuring analytes using Raman spectroscopy, thereby achieving low cost and miniaturization of the detection system and achieving the purpose of real-time detection. Specification 2 / 13 pages 4 CN 121337325 A Description of Drawings
[0031] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0032] FIG1 is a flowchart of Embodiment 1;
[0033] FIG2 is a schematic diagram of the first image acquired in Embodiment 2;
[0034] FIG3 is a schematic diagram of the second image acquired in Embodiment 2;
[0035] FIG4 is a schematic diagram of the detection model of Embodiment 2;
[0036] FIG5 is a schematic diagram of the detection point-reference point spectral data obtained in Embodiment 2;
[0037] FIG6 is the experimental results of the accuracy of the analysis results of the analysis model;
[0038] FIG7 is a structural schematic diagram of an analyte detection device provided in Embodiment 7;
[0039] FIG8 is a structural schematic diagram of an electronic device provided in Embodiment 8;
[0040] FIG9 is a structural schematic diagram of an analyte detection watch provided in Embodiment 7;
[0041] FIG10 is a schematic diagram of the back of the analyte detection watch;
[0042] Figure 11 is an exploded view of the analyte detection watch;
[0043] Figure 12 is a schematic diagram of the analyte detection watch in use;
[0044] Figure 13 is a schematic diagram and cross-sectional view of blood vessel distribution under infrared light source;
[0045] Figure 14 is a flowchart of the image processing method in analyte detection in Example 3.
[0046] In the figures:
[0047] 100: Imaging area; 200: Detection device;
[0048] 201: Light source; 202: Imaging spectral detection device;
[0049] 203: Controller; 204: First bandpass filter;
[0050] 205: Lens; 206: Second bandpass filter;
[0051] 207: Circuit board; 501: Processor;
[0052] 502: Memory. Detailed Embodiments
[0053] The present invention will be described in detail below with reference to specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but do not limit the present invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.
[0054] Embodiment 1
[0055] Figure 1 is a flowchart of this embodiment. This embodiment is a method for detecting an analyte, including:
[0056] Imaging step: A first region is irradiated by light within a preset wavelength range provided by a light source, and the first region is imaged by an imaging spectral detection device to obtain an image of the imaging region. By irradiating the image with light within a preset wavelength range, the image can reflect the distribution data and spectral data of the reflected or excitation signals generated by the analyte under light irradiation in the imaging area. The first area can be a region on the surface of human skin. To avoid the influence of external light such as ambient light on the detection, the acquisition window of the imaging spectral detection device needs to be tightly attached to the surface of human skin in the first area. The imaging area refers to the area within the lens range of the imaging spectral detection device. In general, the imaging area can be a part of the first area or the same area as the first area. Specification 3 / 13 page 5 CN 121337325 A
[0057] Since different wavelength ranges of light are needed to irradiate the analyte to obtain the distribution data and spectral data, there are two ways to achieve this: the light is a light with a large wavelength range provided by one light source or light with a small wavelength range provided by two light sources. When there is only one light source, the wavelength range of the light provided by the light source needs to cover both the wavelength range that can acquire the distribution data of the analyte and the wavelength range that can acquire the spectral data of the analyte. When there are two light sources, the two light sources provide different light. The wavelength coverage of one light source is sufficient to obtain the wavelength range for acquiring analyte distribution data, and the wavelength coverage of the other light source is sufficient to acquire the wavelength range for acquiring analyte spectral data. Simultaneously, when there is only one light source, one image is formed; when there are two light sources, two images are formed. For ease of processing, the imaging areas of the two images must be identical, i.e., the acquisition window of the imaging spectral detection device must not move on the surface of human skin.
[0058] In this application, the analyte can be glucose, ketones, alcohols, lactate, oxygen, hemoglobin A1C, acetylene, etc., found in blood vessels.Acylcholine, amylase, bilirubin, cholesterol, human chorionic gonadotropin, creatine kinase (e.g., CK-MB), creatine, creatinine, DNA, fructosamine, glutamine, growth hormone, hormones, peroxides, prostate-specific antigen, prothrombin, RNA, thyroid-stimulating hormone, or troponin, and may also be drugs such as antibiotics (e.g., gentamicin, vancomycin, etc.), digitalis, digoxin, abused drugs, theophylline, or warfarin. In embodiments that detect two or more analytes, the analytes may be monitored at the same or different times. In other embodiments, the analytes may also be other substances on the body surface, and non-invasive detection can be achieved by the present invention.
[0059] Spectral acquisition step: Spectral data reflecting the uneven distribution of the reflected or excitation signals generated by the analyte under light irradiation in the imaging area is acquired from the image using an imaging spectral detection device. Specifically, the imaging area can be partitioned according to different distribution data to facilitate the selection of the location for acquiring spectral data from different partitions.
[0060] Analysis Steps: Based on the acquired spectral data, information about the analytes in the imaging region is obtained. This information includes the correlation between the analytes and the spectral data. Since the distribution of analytes differs in different regions, the reflected or excitation signals generated by the analytes when exposed to light will also differ. Taking human skin as an example, it is divided into three parts: epidermis, dermis, and subcutaneous tissue. Veins and other blood vessels are located in the subcutaneous tissue. Ultraviolet light irradiation of skin areas with and without blood vessels can yield corresponding spectral data, as can skin areas with thicker blood vessels and skin areas with thinner blood vessels. The difference between these two spectral data can reflect the correlation between the analytes in the blood vessels and the spectral data, such as the degree of influence of the analytes on the spectral data, for further analysis, or directly obtain information such as the concentration of the analytes through an analysis model.
[0061] Example 2
[0062] This example is based on Example 1, taking glucose detection in human blood vessels as an example, and provides a non-invasive glucose detection method, including:
[0063] Imaging step: Irradiating the skin at the location of the vein, such as the wrist or back of the hand, with infrared light in the first wavelength range of 800-1000 nm, and acquiring a first image of the imaging area. The first wavelength range is preferably near-infrared. And irradiating the same location with ultraviolet light in the second wavelength range of 300-390 nm, and acquiring a second image of the imaging area.
[0064] As shown in Figure 2, the horizontal axis is the horizontal coordinate of the first image, the vertical axis is the vertical coordinate of the first image, the white box represents the selected detection point pixel block on the vein, and the black box represents the selected reference point pixel block on the surrounding skin. In the first image, part of the infrared light will penetrate the human skin and part will be absorbed by the human skin. At the same time,In areas where veins are located, the pixels will absorb a large amount of light, resulting in smaller pixel gray values in vein areas and larger pixel gray values in non-vein areas. This allows for easy division of the imaging region into vein areas and non-vein areas.
[0065] As shown in Figure 3, the horizontal axis represents the horizontal coordinate of the second image, and the vertical axis represents the vertical coordinate of the second image. The white box represents the selected detection point pixel block on the vein, and the black box represents the selected reference point pixel block on the surrounding skin. In the second image, it is difficult to distinguish between vein areas and non-vein areas, so the first image is needed for differentiation. The excitation light in the second wavelength range of 300-390 nm is used to obtain high-quality effective fluorescence spectral signals. This is because the main response band of the imaging spectral detection device is located in the 400-800 nm range. When the excitation wavelength is less than 300 nm, the main peak of the excited fluorescence radiation signal is located in the <400 nm band, making it difficult for imaging spectral detection devices to obtain high-quality effective fluorescence spectral signals. When the excitation wavelength is greater than 390 nm, the excitation light itself is also visible light, and the spectral signal of the excitation light is superimposed on the fluorescence spectral signal, making it difficult to eliminate the interference of the excitation light's spectral signal and extract the effective fluorescence spectral signal. Glucose in venous blood vessels, after absorbing ultraviolet light in the 300-390 nm wavelength range, can emit fluorescence radiation signals in the 400-800 nm visible light band. This band is within the effective response range of imaging spectral detection devices, and the characteristic spectral intensity of this fluorescence radiation signal is positively correlated with the glucose concentration, exhibiting high fluorescence excitation efficiency.
[0066] Spectrum acquisition steps: Based on the grayscale distribution of pixels in the first image, the imaging area is divided into areas where veins are located and areas where non-vein vessels are located. Detection points are selected from the locations in the second image corresponding to the locations in the vein areas, and reference points are selected from the locations in the second image corresponding to the locations in the non-vein areas. The spectral data of the detection points and the spectral data of the reference points in the second image are acquired respectively. Specifically, based on the grayscale values of pixels in the second image, a pixel with a grayscale value that meets the preset requirements is selected from the vein areas as a detection point, or a combination of that pixel and its adjacent pixels is selected as a detection point. A pixel with a grayscale value within the preset deviation range from the selected detection point is selected from the non-vein areas as a reference point, or a combination of that pixel and multiple adjacent pixels is selected as a reference point. The fluorescence spectral data of the detection points and the fluorescence spectral data of the reference points are calculated in the second image. The spectral data is taken from a single pixel of the detection point or reference point, or the average of a combination of multiple pixels, which can be appropriately selected according to the width of the blood vessel; the combination of multiple pixels...On average, this method can improve the signal-to-noise ratio, but it is limited by the width of the blood vessel and avoids capturing areas outside the blood vessel. Selecting a single pixel has high spatial resolution and is suitable for thinner blood vessels, but the signal-to-noise ratio is lower. The preset requirement for grayscale value can be to use the point with the smallest grayscale value as the detection point, but this application does not impose this restriction. The calculation results are shown in Figure 5, where the horizontal axis is wavelength (in nm), the vertical axis is relative radiance (in W / nm), the solid line is the spectral data of the detection point, and the dashed line is the spectral data of the reference point. The reason why the gray value of the reference point and the gray value of the selected detection point are within the preset deviation range is that the skin in the imaging area may have influencing factors such as skin color, spots, and cosmetics, which will directly affect the spectral data of the reference point. The first image cannot distinguish the areas with these influencing factors. By setting the preset deviation range of the gray value, these influencing factors can be effectively eliminated. In addition, the fact that the gray value and the gray value of the selected detection point are within the preset deviation range can ensure that the selection of the reference point is close to the detection point. For example, if it is selected at the edge of the vein, it can ensure that the color, thickness and other parameters of the epidermis, dermis and subcutaneous tissue are as close as possible, except for the blood vessels, so that the deviation between the spectral data of the detection point and the spectral data of the reference point can minimize the influence of non-analytes.
[0067] In addition to the spectral reconstruction algorithm, the spectral data can also be obtained by forming a radiometric calibration coefficient through the previous radiometric calibration, and the spectral line is obtained by calculating the gray value * the radiometric calibration coefficient.
[0068] When a combination of multiple pixels is selected as the detection point, the fluorescence spectral data of the detection point can be the average value of the fluorescence spectral data of these pixels. Meanwhile, the number of detection points and reference points can be one or more. When there are multiple detection points and reference points, the average value of the fluorescence spectral data of all detection points and the average value of the fluorescence spectral data of all reference points can be calculated separately. (Instruction manual, page 5 / 13, CN 121337325 A)
[0069] Analysis steps: After preprocessing, the acquired spectral data of the detection points and reference points are input into the trained detection model, and the glucose concentration or intermediate results of the correlation between glucose and spectral data are output. During training, the detection model needs to simultaneously acquire the spectral data of the tested object and accurate test results, such as blood test results. The spectral data is used as the input of the detection model, and the blood test results are used as the output of the detection model to train the detection model.
[0070] The detection model can adopt a convolutional neural network model, which sequentially includes an input layer, at least two convolutional layers, at least two activation function layers, a Flatten layer, a fully connected layer, and an output layer. The convolutional layers and the activation function layers are distributed alternately; the activation function used in the activation function layer is the ReLU function.
[0071] In the convolutional neural network model, the kernel size of each layer is 1, and the number of kernels in the first convolutional layer is...32. The second layer has 64 convolutional kernels, all used to extract blood glucose features, and the output of the convolutional layer is nonlinearly transformed by the activation function. The flatten layer flattens the output of the convolutional layer into a one-dimensional vector, which is convenient for connecting the subsequent fully connected layers. The final output dimension is 1. The Adam optimizer is used to train the model during the model training process, and the mean squared error is used as the loss function. At the same time, the mean absolute error is calculated as the performance index for model evaluation.
[0072] When the output result of the detection model is glucose concentration, if the error between the output result and the measured standard glucose concentration value meets the preset condition, the training is stopped and the detection model is obtained. When the output result of the detection model is an intermediate result of glucose and spectral data association, such as the result of the intermediate neuron, if the error between the output result and the result of the intermediate neuron meets the preset condition, the training is stopped and the detection model is obtained. Further model correction processing is performed on the result of the intermediate neuron to obtain the glucose concentration.
[0073] As shown in Figure 4, the input layer is the spectral data input layer, which is obtained after preprocessing the original spectral data. The hidden layer is an intermediate hidden layer. After feature combination through convolutional deep learning, the output layer outputs the final predicted blood glucose concentration value. Alternatively, after feature combination through convolutional deep learning, a neuron Output1 is output as an intermediate result value. The intermediate result value Output1 and two infrared (IR) feature brightness values are used to train the model again to further correct the blood glucose prediction error and output the final predicted blood glucose concentration value Output2. The training degree of the detection model needs to be set with different parameters as needed. The extracted glucose feature values will continuously learn according to the different parameter settings until the error between the output result and the standard glucose value of the above label value meets the requirements, then the training stops and the detection model is obtained.
[0074] Through multiple iterative training, the neurons learn the corresponding change law between different glucose concentrations and glucose spectral features of different samplers, thereby improving the universality of the detection model and enabling it to predict the glucose concentration of different users.
[0075] The entire glucose detection process does not require puncturing the skin to collect blood or implanting a needle. It acquires the spectral information of the subject based on fluorescence spectroscopy and obtains the glucose detection result based on this spectral information, avoiding pain and discomfort and improving the comfort and convenience of the test. This method can finely distinguish the spectral signals of blood vessels and skin, providing the possibility for accurate extraction of glucose signals in the future. At the same time, it also makes the spectral signal strongly correlated with glucose concentration, realizing accurate measurement of glucose concentration, making the detection results more accurate and the processing more convenient.
[0076] Figure 6 shows a schematic diagram of the experimental effect of the trained detection model. The horizontal axis represents the glucose level collected by the blood glucose meter.The vertical axis represents the blood glucose concentration (in mmol / L) as a reference, and the horizontal axis represents the blood glucose concentration (in mmol / L) predicted using the method of this patent. A total of 2037 samples were collected, including 1537 training samples and 500 prediction samples. The distribution of the detection model's results is shown in the figure. The MARD value of the predicted samples is 11.32%, with the vast majority of samples falling into regions A and B. Specifically, 87.03% of the samples fell into region A, and 12.77% fell into region B, indicating that the detection model has high accuracy. Instruction Manual 6 / 13 Page 8 CN 121337325 A
[0077] Example 3
[0078] This example further describes the image processing method in analyte detection based on Examples 1 and 2. As shown in Figure 14, this example provides an image processing method in analyte detection, including:
[0079] Image acquisition step: Acquire an infrared grayscale image of a first region;
[0080] Minimum value finding step: Convert the infrared grayscale image into a two-dimensional matrix, and sequentially differentiate each row and column matrix in the x and y directions to find the minimum value point, and record the number of pixels on both sides of the minimum value point that remain monotonic;
[0081] Equal-size matrix creation step: Create an equal-size matrix of the two-dimensional matrix, and replace the minimum value points with non-zero values; The equal-size matrix draws the distribution of minimum value points by replacing 1, and replaces 2 if there are overlapping minimum value points;
[0082] Region filtering steps: A matrix is used as a convolution kernel to convolve the created equal-sized matrix. The larger the value of the element in the convolution matrix, the greater the probability that the corresponding position of the point is in the target region. The elements and their corresponding positions in the convolution matrix are sorted from largest to smallest to filter out the target region. The size of the matrix used as the convolution kernel is (n / 2)*(n / 2), where n is the number of pixels whose gray values on both sides of the minimum point remain monotonic.
[0083] This embodiment also provides a method for detecting analytes, including the image processing method in the above-mentioned analyte detection. This embodiment also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the image processing method in the above-mentioned analyte detection.
[0084] This embodiment also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, which, when executed by a processor, implements the steps of the image processing method in the above-mentioned analyte detection.
[0085] In an infrared grayscale image, dark spots and bright spots are distinguished based on pixel gradients. Dark spots represent blood vessel regions, and bright spots represent skin regions. First, calculate the gray-level gradient of the neighborhood around each pixel in the sub-region with a period of 2*2. Then, find the peak values in the sub-region, including local maxima (dark spots) and local minima (bright spots). Select 20 consecutive maximum values as candidates for dark spots.Location. Specific blood vessel screening method:
[0086] 1. Blood vessel positioning
[0087] An infrared light source with a center wavelength of 940nm is selected as the blood vessel positioning light source. On the one hand, because hemoglobin in human blood has a strong absorption of infrared light waves, the skin reflectivity of the blood vessels under the infrared light source collected by the detector is lower than that of the skin area. On the other hand, thanks to the fact that skin pigment deposits such as age spots do not absorb infrared light waves, this means that the method of selecting blood vessel areas based on grayscale is not affected by skin type and has good versatility.
[0088] As shown in Figure 13, along the direction of the blood vessel cross section, the infrared reflection intensity of the skin around the blood vessel changes uniformly, making it difficult to accurately delineate the specific blood vessel area. At the same time, due to the uneven distribution of image illumination, the grayscale intensity alone cannot correctly reflect the absorption of light energy by hemoglobin. The grayscale change trend in this direction needs to be considered. Therefore, the minimum value point can be used as the basis for judging blood vessels. In an ideal case, assuming that the blood vessel is a standard cylinder, the center of the blood vessel absorbs infrared light the strongest, and the grayscale in the image is lower than that of the surrounding area. The image is regarded as a two-dimensional matrix. The derivatives of each row and column matrix in the x and y directions are calculated in turn to find the minimum point. The minimum point in both x and y directions is the center of the blood vessel. The line connecting the minimum points is the line connecting the centers of the blood vessels. The area around the blood vessels is the skin area. In Figure 13, the left image is a schematic diagram of the blood vessel skin with infrared light source, and the right image is a schematic diagram of the gray-scale distribution at the cross section.
[0089] There are still many interference factors to consider in actual acquisition. This means that the model needs to be optimized and filters added to eliminate interference:
[0090] a. The real blood vessels are not standard cylinders. In addition, due to the influence of noise, the minimum points in the x and y directions in the blood vessel area are not necessarily in the same position. Therefore, in actual screening, the distance between the extreme points in the two directions should be close. Manual 7 / 13 Page 9 CN 121337325 A
[0091] b. There are a lot of noise, fine lines and other interference objects in the skin area of the actual image. These interference objects are also extreme points in the image. The characteristics of noise and fine lines are that they are small in area and discretely distributed. Based on these two considerations, the design scheme is as follows: (1) The blood vessel region has a certain width, which mathematically means that the area within a certain distance on both sides of the minimum point is a monotonic region with no other extreme points. Single-pixel noise and fine lines can be screened out in this way; (2) The blood vessel region is a continuous region with a relatively dense distribution of its extreme points. Discrete noise can be filtered out in this way.
[0092] The above scheme is converted into an algorithm as follows: Convert the infrared grayscale image into a two-dimensional matrix, and take the derivative of each row and column matrix in the x and y directions in turn to find the minimum point. If the grayscale value within n pixels on both sides of the minimum point remains monotonic, then mark the position. Here, n depends on the width of the blood vessel. The larger the value of n, the larger the selection range, and vice versa. Create a two-dimensional matrix, etc.The size matrix is used to replace the minimum value points with non-zero values. The distribution of minimum value points is drawn in this matrix and replaced with 1. If there are overlapping minimum value points, they are replaced with 2. A matrix of size (n / 2)*(n / 2) (rounded down) is used as the convolution kernel to convolve the created matrix. The larger the value of the element in the convolution matrix, the greater the probability that the corresponding position is a blood vessel region. The blood vessel region can be filtered out by sorting the elements and their corresponding positions in the convolution matrix from largest to smallest.
[0093] 2. Skin localization
[0094] Skin localization is to find the point with the maximum brightness near the above blood vessel region. Record the coordinates of all selected blood vessel regions, filter out the maximum and minimum values of xmax, xmin, ymax, and ymin, and use xmax+m, xmin-m, ymax+m, and ymin-m as the boundary of the search region, where m is the extension distance, which depends on the image spatial resolution. If the image spatial resolution is high, the value of m can be increased appropriately, and vice versa. Finally, the area within the range of the image edge L is filtered out, where L depends on the size of the possible color cast area at the lens edge. The final search area is sorted according to gray level, and the higher the gray level, the greater the probability that it is a skin area.
[0095] 3. Skin pigmentation area screening
[0096] The 365nm ultraviolet light source can better reflect the skin pigmentation area. Therefore, after the infrared light source is collected, the same skin area is collected by the 365nm ultraviolet light source. Record the coordinates of all previously screened blood vessel areas and skin areas, and mark the positions in the ultraviolet image. Record the image gray value D of the above positions. Calculate the mean Mu and variance Sigma of the above gray values respectively. When |D-Mu|>Sigma×threshold, it means that the selected point is covered by the skin pigment area or the fluorescent marked area and can be filtered out. The remaining coordinates after filtering are the usable coordinates of the screened blood light area and skin area.
[0097] Outlier detection is performed on the blood vessel and skin candidate points. The threshold is set by the standard deviation for filtering and screening to remove abnormal values such as skin spots and fluorescence. The threshold determination condition is: |X–μ|≤T*σ, where μ represents the average value of dark spots or bright spots, σ represents the standard deviation of dark spots or bright spots, and T is used to set the threshold size, usually a multiple of the standard deviation σ. Here, the threshold is set to 1 as the basis for judging whether the selected data points are outliers (abnormal values), so as to obtain more accurate coordinate positions of dark spots, i.e., coordinate positions of blood vessels.
[0098] The present invention also provides an image processing system for analyte detection. The image processing system for analyte detection can be implemented by executing the process steps of the image processing method for analyte detection. That is, those skilled in the art can understand the image processing method for analyte detection as a preferred embodiment of the image processing system for analyte detection.
[0099] Example 4
[0100] This embodiment provides an image processing system for analyte detection, including:
[0101] an image acquisition module: acquiring an infrared grayscale image of a first region;
[0102] a minimum value finding module: converting the infrared grayscale image into a two-dimensional matrix, sequentially differentiating each row and column matrix in the x and y directions to find minimum points, and recording the number of pixels whose grayscale values remain monotonic on both sides of the minimum point;
[0103] an equal-size matrix creation module: creating an equal-size matrix of the two-dimensional matrix, and replacing the minimum point positions with non-zero values; the equal-size matrix plots the distribution of minimum points using 1, and replaces them with 2 if there are overlapping minimum points;
[0104] Region filtering module: A matrix is used as a convolution kernel to convolve a created matrix of the same size. The larger the value of the element in the convolution matrix, the greater the probability that the corresponding position of the point is in the target region. The elements and their corresponding positions in the convolution matrix are sorted from largest to smallest to filter out the target region. The size of the matrix used as the convolution kernel is (n / 2)*(n / 2), where n is the number of pixels whose gray values on both sides of the minimum point remain monotonic.
[0105] This embodiment also provides an analyte detection system, including the image processing system in the above-mentioned analyte detection.
[0106] Embodiment 5
[0107] This embodiment is based on Embodiment 2, replacing infrared light with visible light to provide another non-invasive glucose detection method, including:
[0108] Imaging steps: The skin at the location of the vein, such as the wrist or back of the hand, is irradiated with visible light to acquire a first image of the imaging area. The same location is irradiated with ultraviolet light in the second wavelength range of 300-390 nanometers to acquire a second image of the imaging area.
[0109] In the first image, since the color of the area where the veins are located differs from that of the area where the non-vein vessels are located, the imaging area can be easily divided into the area where the veins are located and the area where the non-vein vessels are located.
[0110] In the second image, since it is difficult to distinguish between the area where the veins are located and the area where the non-vein vessels are located, the first image is needed for differentiation. The excitation light in the second wavelength range of 300-390 nm is used to obtain a high-quality effective fluorescence spectrum signal. This is because the main response band of the imaging spectral detection device is located in the 400-800 nm range. When the wavelength of the excitation light used is less than 300 nm, the main peak of the fluorescence spectrum of the excited fluorescence radiation signal is located in the <400 nm band, making it difficult for the imaging spectral detection device to obtain a high-quality effective fluorescence spectrum signal. When the wavelength of the excitation light used is greater than 390 nm, the excitation light itself is also visible light, and the spectral signal of the excitation light is superimposed on the fluorescence spectrum signal, making it difficult to eliminate the interference of the spectral signal of the excitation light and extract the effective fluorescence spectrum signal. Glucose in veins absorbs...After exposure to ultraviolet light in the wavelength range of 300-390 nm, a fluorescence radiation signal can be emitted in the visible light band of 400-800 nm. This band is within the effective response range of the imaging spectral detection device. The characteristic spectral intensity of this fluorescence radiation signal is positively correlated with the concentration of glucose and has a high fluorescence excitation efficiency.
[0111] Spectral acquisition steps: According to the gray value distribution of pixels in the first image, the imaging area is divided into the area where veins are located and the area where non-vein vessels are located. Detection points are selected from the area where veins are located and reference points are selected from the area where non-vein vessels are located. The spectral data of the detection points and the spectral data of the reference points are acquired respectively. Specifically, according to the gray value of pixels in the second image, a pixel with a gray value that meets the preset requirements or a combination of the pixel and its adjacent pixels is selected from the area where veins are located as a detection point. A pixel with a gray value within the preset deviation range of the selected detection point or a combination of the pixel and multiple adjacent pixels is selected from the area where non-vein vessels are located as a reference point. The fluorescence spectral data of the detection points and the fluorescence spectral data of the reference points are calculated. The reason why the gray value of the reference point and the gray value of the selected detection point are within the preset deviation range is that the skin in the imaging area may have influencing factors such as skin color, spots, and cosmetics, which will directly affect the spectral data of the reference point. The first image cannot distinguish the area of all influencing factors at the same time. By setting the preset deviation range of the gray value, these influencing factors can be effectively eliminated.
[0112] When multiple pixels are selected as the detection point, the fluorescence spectrum data of the detection point can be the average value of the fluorescence spectrum data of these pixels. At the same time, the number of detection points and reference points can be one or more. When there are multiple detection points and reference points, the average value of the fluorescence spectrum data of all detection points and the average value of the fluorescence spectrum data of all reference points can be calculated separately.
[0113] Analysis steps: After preprocessing, the spectral data of the acquired detection points and reference points are input into the trained detection model, and the glucose concentration is output. During training, the detection model needs to simultaneously acquire the spectral data of the tested object and accurate test results, such as blood test results. The spectral data is used as the input to the detection model, and the blood test results are used as the output to train the detection model.
[0114] The detection model can employ a convolutional neural network model, which sequentially includes an input layer, at least two convolutional layers, at least two activation function layers, a Flatten layer, a fully connected layer, and an output layer. The convolutional layers and activation function layers are spaced apart. The activation function used in the activation function layers is the ReLU function.
[0115] In the convolutional neural network model, the kernel size of each convolutional layer is 1, and the number of kernels in the first convolutional layer is...32. The second layer has 64 convolutional kernels, all used to extract blood glucose features, and the output of the convolutional layer is non-linearly transformed by the activation function. The flatten layer flattens the output of the convolutional layer into a one-dimensional vector, which is convenient for connecting to the subsequent fully connected layers. The final output dimension is 1. The Adam optimizer is used to train the model during the model training process, and the mean squared error is used as the loss function. At the same time, the mean absolute error is calculated as the performance index for model evaluation.
[0116] If the error between the output result of the detection model and the standard glucose value meets the preset condition, the training is stopped and the detection model is obtained.
[0117] The training degree of the detection model needs to be set with different parameters as needed. The extracted glucose feature values will learn continuously according to the setting of different parameters until the error between the output result and the standard glucose value of the above label value meets the requirements. Then the training is stopped and the detection model is obtained.
[0118] Through multiple iterations of training, the neurons learn the corresponding change law between different glucose concentrations and glucose spectral features of different samplers, thereby improving the universality of the detection model and enabling the prediction of glucose concentrations of different users.
[0119] The entire glucose detection process does not require blood collection or skin puncture. It obtains the spectral information of the test subject based on fluorescence spectroscopy and obtains the glucose detection result of the test subject based on the spectral information, avoiding pain and discomfort and improving the comfort and convenience of the detection. This method can finely distinguish the spectral signals of blood vessels and skin, providing the possibility for accurate extraction of glucose signals in the future. At the same time, it also makes the spectral signal strongly correlated with glucose concentration, realizing accurate measurement of glucose concentration, making the detection results more accurate and the processing more convenient.
[0120] Example 6
[0121] This embodiment provides an analyte detection system. The analyte detection system can be implemented by executing the process steps of the analyte detection method. That is, those skilled in the art can understand the analyte detection method as a preferred embodiment of the analyte detection system. The analyte detection system includes:
[0122] Imaging module: The light source provides light within a preset wavelength range to illuminate the first area, and the imaging spectral detection device images the first area to obtain an image of the imaging area. By illuminating the image with light within a preset wavelength range, the image can reflect the distribution data and spectral data of the reflected or excitation signals generated by the analyte under light illumination in the imaging area. Since different wavelength ranges are required to obtain the distribution data and spectral data of the analyte, the light can be two corresponding wavelength ranges, or it can be a single light with a larger wavelength range covering both required wavelength ranges. When there are two types of light, two images are obtained. For ease of processing, it is usually required that the imaging areas of the two images are the same.
[0123] In this application, the analyte can be glucose, ketones, alcohols, lactate, oxygen, hemoglobin A1C, acetylcholine, amylase, bilirubin, cholesterol, human chorionic gonadotropin, creatine kinase (e.g., CK-MB), creatine, creatinine, DNA, fructosamine, glutamine, growth hormone, hormones, peroxides, prostate-specific antigen, prothrombin, RNA, thyroid-stimulating hormone, troponin, or drugs such as antibiotics (e.g., gentamicin, vancomycin, etc.), digitalis, digoxin, abused drugs, theophylline, and warfarin. In embodiments that detect more than one analyte, the analyte can be monitored at the same or different times. In other embodiments, the analyte can also be other substances in a liquid.
[0124] Spectral acquisition module: Acquires spectral data from an image through an imaging spectral detection device that reflects the uneven distribution of the reflected or excitation signals generated by the analyte being irradiated by light in the imaging area. Specifically, the imaging area can be partitioned according to different distribution data to facilitate the selection of locations for obtaining spectral data from different partitions.
[0125] Analysis module: Based on the acquired spectral data, information about the analytes in the imaging area is obtained. The information about the analytes includes information related to the analytes and the spectral data. Since the distribution of analytes in different partitions is different, the reflection signals or excitation signals generated by the analytes when irradiated by light will also be different. Utilizing this characteristic, the difference in spectral data between the two can be obtained, thereby accurately reflecting the information related to the analytes and the spectral data, such as the concentration of the analytes.
[0126] Those skilled in the art know that, in addition to implementing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code manner, the same functions can be achieved entirely by logically programming the method steps so that the system and its various devices, modules, and units provided by the present invention can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for implementing various functions can also be considered as structures within the hardware component; the devices, modules, and units for implementing various functions can also be considered as both software modules for implementing the method and structures within the hardware component.
[0127] Embodiment 7
[0128] Figure 7 shows an electronic device of this embodiment, specifically an analyte detection device 200. The detection device 200 is a portable, non-invasive detection device for the human body. It can be a standalone detection device or integrated into a watch or mobile phone, thereby enabling convenient and quick detection of analytes within the body surface.
[0129] The detection device 200 includes: a light source 201, an imaging spectral detection device 202, a controller 203, a first bandpass filter 204, a second bandpass filter 206, and a lens 205. The controller 203 establishes an electrical connection or a communication connection with the light source 201 and the imaging spectral detection device 202, respectively.
[0130] The light source 201 is capable of providing light within a preset wavelength range. Since different wavelength ranges of light are required to irradiate the analyte to obtain distribution data and spectral data, there are two implementation methods: one light source that can provide light with a large wavelength range; or two light sources that each provide light with a smaller wavelength range. When there is only one light source, the wavelength range of the light provided by the light source needs to cover both the wavelength range capable of obtaining distribution data and the wavelength range capable of obtaining spectral data, such as a halogen lamp. When there are two light sources, the two light sources provide different light, one light whose wavelength covers the wavelength range capable of obtaining distribution data and the other light whose wavelength covers the wavelength range capable of obtaining spectral data, such as an infrared lamp combined with an ultraviolet lamp, or a visible light lamp combined with an ultraviolet lamp.
[0131] To ensure uniform illumination of the imaging area 100, a ring light source can be used. The light source has multiple light-emitting modules, which are evenly distributed on the same circumference. When there are two types of light sources, the light-emitting modules of the two types of light sources are arranged alternately.
[0132] The imaging spectral detection device 202 can image the imaging area 100 according to the instructions to obtain the corresponding image, and can obtain the corresponding spectral data according to the instructions. The imaging spectral detection device 202 includes a sensor and a periodic pixel-level filter structure set on the sensor surface as described in the sensor surface specification page 11 / 13, CN 121337325 A. The periodic pixel-level filter structure is used to perform spectral modulation on the incoming light signal so that the sensor can generate an image containing the spectral information to be measured.
[0133] The periodic pixel-level filter structure includes multiple filter pixel channels with different shapes. The multiple filter pixel channels have the same size and are evenly arranged. Their length and width are integer multiples of the pixel size in the image sensor. Different pixel-level filter structures of different shapes correspond to different spectral filtering coefficients. Pixel-level filter structures with different spectral filtering coefficients are arranged periodically after being combined in a fixed order. The sensor modulates the received first detection light through the periodic pixel-level filter structure set on its surface to form a mosaic image containing spectral information. Then, the spectral data is reconstructed using an algorithm.
[0134] The controller 203 is configured to control the light source to provide light within a preset wavelength range to illuminate the first area, and to control the imaging spectral detection device to image the first area to obtain an image of the imaging area. The controller also controls the imaging spectral detection device to obtain from the image the unevenness of the reflection signal or excitation signal generated by the analyte being illuminated by light in the imaging area.Uniformly distributed spectral data. Information about the analytes in the imaging region is obtained based on the acquired spectral data. The information about the analytes includes information related to the analytes and the spectral data. When there is one type of light source 201, one image is formed; when there are two types of light sources 201, two images are formed. When the first type of light source is on, the second type of light source is off, and similarly, when the second type of light source is on, the first type of light source is off, and the two do not interfere with each other.
[0135] The first bandpass filter 204 is located between the light source 201 and the imaging region 100. Its function is to allow light within a preset wavelength range to pass through, while blocking light outside the preset wavelength range, thereby reducing the influence of other external light on the detection results.
[0136] The second bandpass filter 206 is located between the imaging spectral detection device 202 and the lens 205. Its function is to allow light within the wavelength range of the reflected signal or excitation signal generated by the analyte when it is irradiated to pass through, while blocking light in other wavelength ranges, thereby reducing the influence of reflected signals or excitation signals of non-analytes on the detection results.
[0137] The lens 205 can be used for fixed-focusing to obtain a clear image. In other embodiments, the second bandpass filter 206 may also be located on the side of the lens 205 away from the imaging spectral detection device 202, which is not a limitation of the present invention.
[0138] According to the above description, FIG9 shows an analyte detection watch provided in this embodiment. The front of the watch is a display, as shown in FIG10, and the back of the watch has a light-transmitting window and a built-in detection device 200. As shown in FIG11, the light source 201 and the first bandpass filter 204 are both ring structures. The light-emitting modules of the light source 201 are distributed in a ring, and the emitted light is filtered by the first bandpass filter 204 to output light with a wavelength that meets the requirements, which is then irradiated onto the human body through the light-transmitting window on the back of the watch. The reflected signal or excitation signal of the human body enters the light-transmitting window, passes through the light source 201 and the hollow part in the middle of the first bandpass filter 204, passes through the lens 205 and enters the second bandpass filter 206, and enters the imaging spectral detection device 202 after being filtered by the second bandpass filter 206. The imaging spectral detection device 202 is mounted on the circuit board 207, and the controller 203 (not shown in the figure) of the detection device 200 is also mounted on the circuit board 207. As shown in Figure 12, in order to more accurately identify the location of veins, the watch can be worn on the inside of the wrist.
[0139] Embodiment 8
[0140] Figure 8 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. As shown in Figure 8, it includes at least one processor 501; and a memory 502 communicatively connected to at least one processor 501; wherein, the memory 502 stores instructions that can be executed by at least one processor 501, and the instructions are executed by at least one processor 501 to enable at least one processor 501 to perform the above-mentioned method for detecting analytes.
[0141] The memory 502 and processor 501 are connected via a bus. The bus may include any number of interconnected buses and bridges, connecting various circuits of one or more processors 501 and memory 502 together. The bus may also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, as is well known in the art, and therefore will not be further described here. The bus interface provides an interface between the bus and the transceiver. The transceiver may be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by processor 501 is transmitted over a wireless medium via an antenna, which further receives data and transmits it to processor 501.
[0142] Processor 501 is responsible for managing the bus and general processing, and may also provide various functions, including timing, peripheral interface,
[0143] voltage regulation, power management, and other control functions. The memory 502 can be used to store data used by the processor 501 when performing operations.
[0144] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described method for detecting analytes.
[0145] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. The program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes: USB flash drive, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and other media that can store program code.
[0146] Those skilled in the art will understand that the above embodiments are specific embodiments of the present invention, and in practical applications, various changes can be made to them in form and detail without departing from the spirit and scope of the present invention.
[0147] The specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above. Those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other. Specification 13 / 13 pages 15 CN 121337325 A Figure 1 Figure 2 Specification Drawings 1 / 7 pages 16 CN121337325 A Figure 3 Figure 4 Appendix 2 / 7 Page 17 CN 121337325 A Figure 5 Figure 6 Appendix 3 / 7 Page 18 CN 121337325 A Figure 7 Figure 8 Appendix 4 / 7 Page 19 CN 121337325 A Figure 9 Figure 10 Appendix 5 / 7 Page 20 CN 121337325 A Figure 11 Figure 12 Appendix 6 / 7 Page 21 CN 121337325 A Figure 13 Figure 14 Appendix 7 / 7 Page 22 CN 121337325 A Abstract The present invention provides an image processing method and system in analytical testing, a medium, and a device, including: image obtaining: obtaining an infrared grayscale image in a first area; minimum value searching: converting the infrared grayscale image into a two-dimensional matrix, performing derivation on each row and each column of the matrix in an x direction and ay direction. in turn, searching for a minimum value point, and recording a quantity of pixel grayscale values that remain monotonous on both sides of the minimum value point; equal-size matrix creation: creating an equal-size matrix of a two-dimensional matrix, and performing non-zero substitution on the minimum value point; and area selection: using amatrix as a convolution kernel to convolute the created equal-size matrix, where a probability that a position corresponding to the point is in a target area is greater as a value of an element in the obtained convoluted matrix is greater, sequencing elements and corresponding positions thereof in the convolution matrix in descending order, and selecting the target area. In the present invention, a method for selecting a blood vessel area based on a grayscale is not affected by the skin quality, and has good versatility.
Claims
1. A method of image processing in analyte detection, characterized by, The method comprises the following steps: an image acquisition step: acquiring an infrared gray image of a first region; a minimum value finding step: converting the infrared gray image into a two-dimensional matrix, sequentially performing derivation on each row and column matrix in x and y directions, finding minimum value points, and recording the number of pixels whose gray values on both sides of the minimum value points remain monotonic; an equal-size matrix creation step: creating an equal-size matrix of the two-dimensional matrix, and replacing the minimum value point position with a non-zero value; a region screening step: performing convolution on the created equal-size matrix by taking a matrix as a convolution kernel, the greater the element value in the obtained post-convolution matrix, the greater the probability that the corresponding position of the element is in the target region, sorting the elements in the convolution matrix and their corresponding positions from large to small, and screening out the target region.
2. The image processing method in the analysis of an analyte according to claim 1, wherein, The equal-size matrix draws the distribution of minimum value points by replacing them with 1, and replacing them with 2 if there is a minimum value point overlap.
3. The image processing method in the analysis of an analyte according to claim 1, wherein, The size of the matrix as the convolution kernel is (n / 2)*(n / 2), and n is the number of pixels whose gray values on both sides of the minimum value points remain monotonic.
4. A method of detecting an analyte, characterized by, The method comprises the following steps:
5. An image processing system in analyte detection, characterized by an image acquisition step: acquiring an infrared gray image of a first region; a minimum value finding step: converting the infrared gray image into a two-dimensional matrix, sequentially performing derivation on each row and column matrix in x and y directions, finding minimum value points, and recording the number of pixels whose gray values on both sides of the minimum value points remain monotonic; an equal-size matrix creation step: creating an equal-size matrix of the two-dimensional matrix, and replacing the minimum value point position with a non-zero value; a region screening step: performing convolution on the created equal-size matrix by taking a matrix as a convolution kernel, the greater the element value in the obtained post-convolution matrix, the greater the probability that the corresponding position of the element is in the target region, sorting the elements in the convolution matrix and their corresponding positions from large to small, and screening out the target region. The equal-size matrix draws the distribution of minimum value points by replacing them with 1, and replacing them with 2 if there is a minimum value point overlap.
6. The image processing system in analyte detection according to claim 5, wherein, The size of the matrix as the convolution kernel is (n / 2)*(n / 2), and n is the number of pixels whose gray values on both sides of the minimum value points remain monotonic.
7. The image processing system in analyte detection according to claim 5, wherein, The method comprises the following steps:
8. A system for detecting an analyte, characterized by an image acquisition step: acquiring an infrared gray image of a first region; 9. A computer readable storage medium storing a computer program, characterized in that, a minimum value finding step: converting the infrared gray image into a two-dimensional matrix, sequentially performing derivation on each row and column matrix in x and y directions, finding minimum value points, and recording the number of pixels whose gray values on both sides of the minimum value points remain monotonic; 10. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, an equal-size matrix creation step: creating an equal-size matrix of the two-dimensional matrix, and replacing the minimum value point position with a non-zero value; a region screening step: performing convolution on the created equal-size matrix by taking a matrix as a convolution kernel, the greater the element value in the obtained post-convolution matrix, the greater the probability that the corresponding position of the element is in the target region, sorting the elements in the convolution matrix and their corresponding positions from large to small, and screening out the target region. The equal-size matrix draws the distribution of minimum value points by replacing them with 1, and replacing them with 2 if there is a minimum value point overlap. The size of the matrix as the convolution kernel is (n / 2)*(n / 2), and n is the number of pixels whose gray values on both sides of the minimum value points remain monotonic. The method comprises the following steps: an image acquisition step: acquiring an infrared gray image of a first region; a minimum value finding step: converting the infrared gray image into a two-dimensional matrix, sequentially performing derivation on each row and column matrix in x and y directions, finding minimum value points, and recording the number of pixels whose gray values on both sides of the minimum value points remain monotonic; an equal-size matrix creation step: creating an equal-size matrix of the two-dimensional matrix, and replacing the minimum value point position with a non-zero value; a region screening step: performing convolution on the created equal-size matrix by taking a matrix as a convolution kernel, the greater the element value in the obtained post-convolution matrix, the greater the probability that the corresponding position of the element is in the target region, sorting the elements in the convolution matrix and their corresponding positions from large to small, and screening out the target region. The equal-size matrix draws the distribution of minimum value points by replacing them with 1, and replacing them with 2 if there is a minimum value point overlap. The size of the matrix as the convolution kernel is (n / 2)*(n / 2), and n is the number of pixels whose gray values on both sides of the minimum value points remain monotonic.