A blood oxygen compensation value determination method and device, a computer device, and a blood oxygen detection system
By acquiring skin images and using a skin color compensation model to adjust the pulse oximeter's detection results, the problem of low measurement accuracy for users with different skin colors was solved, achieving higher detection accuracy and robustness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GREE ELECTRIC APPLIANCE INC OF ZHUHAI
- Filing Date
- 2023-07-25
- Publication Date
- 2026-05-29
AI Technical Summary
The problem of low accuracy in blood oxygen testing due to skin color differences among users.
By acquiring skin images, extracting skin color feature vectors, and inputting them into a preset skin color compensation model, a blood oxygen compensation value is obtained to adjust the pulse oximeter's detection results.
This improves the accuracy and robustness of blood oxygen detection, ensuring the precision of the measured values.
Smart Images

Figure CN116831575B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electrical equipment technology, specifically to a method, apparatus, computer equipment, and blood oxygen detection system for determining blood oxygen compensation values. Background Technology
[0002] The working principle of a pulse oximeter is based on two light-emitting diodes: one emits a light beam with a wavelength of 660nm, which oxygenated hemoglobin absorbs less strongly than deoxygenated hemoglobin; the other emits a light beam with a wavelength of 940nm, which oxygenated hemoglobin absorbs more strongly than deoxygenated hemoglobin. By solving equations based on the measured values after transmission at these two wavelengths, the content of the two types of hemoglobin is determined, and then the blood oxygen saturation is calculated.
[0003] However, different users have different skin tones and melanin content, resulting in differences in their absorption of the spectrum. Therefore, in blood oxygen testing, users with different skin tones will have different transmittance of infrared rays, which will affect the accuracy of blood oxygen measurement values. Summary of the Invention
[0004] In view of this, the present invention provides a method, apparatus, computer equipment and blood oxygenation detection system for determining blood oxygenation compensation value, so as to solve the problem of low accuracy of measurement values when using a pulse oximeter for blood oxygenation detection.
[0005] In a first aspect, embodiments of the present invention provide a method for determining blood oxygen compensation values, the method comprising the following steps: acquiring a skin image; obtaining a skin color feature vector based on the skin image; inputting the skin color feature vector into a preset skin color compensation model to obtain a blood oxygen compensation value corresponding to the skin image.
[0006] The blood oxygen compensation value determination method provided in this embodiment obtains a skin image, generates a skin color feature vector from the skin image, and further inputs the skin color feature vector into a preset skin color compensation model to obtain a blood oxygen compensation value corresponding to the skin image. In other words, a blood oxygen compensation value can be obtained by processing a skin image, thereby compensating for the blood oxygen value detected by a pulse oximeter, solving the problem of low measurement accuracy when using a pulse oximeter for blood oxygen detection.
[0007] In one optional implementation, obtaining a skin color feature vector from a skin image includes: extracting skin color parameters from the skin image, wherein the skin color parameters include color feature parameters and texture feature parameters; obtaining a color feature vector based on the color feature parameters; obtaining a texture feature vector based on the texture feature parameters; and obtaining a skin color feature vector using the color feature vector and the texture feature vector.
[0008] This is because not only do people of different skin colors have different transmittance of infrared light, but skin textures also vary in their transmittance of infrared light. Skin color feature vectors include both color and texture feature vectors, which can improve the accuracy of methods for determining blood oxygen compensation values.
[0009] In one optional implementation, the color feature vector includes a first average of the H values, a second average of the S values, and a third average of the V values of all pixels in the skin image. Obtaining the color feature vector based on the color feature parameters includes: acquiring the R, G, and B values of each pixel in the skin image; obtaining the H, S, and V values of each pixel in the skin image based on the R, G, and B values; and determining the first average of the H values, the second average of the S values, and the third average of the V values of all pixels in the skin image based on the H, S, and V values of each pixel in the skin image.
[0010] In the HSV color space, hue represents the basic attribute of color, lightness represents the brightness of a color, and saturation represents the vividness of a color. This separation makes the HSV color space more suitable for classifying color features. Furthermore, the lightness channel in the HSV color space extracts the brightness information of a color separately, enabling a more stable representation of the brightness characteristics of a color. The HSV color space also better aligns with human perception and judgment of color. By observing and analyzing the distribution of skin tone in the HSV space, different skin tones can be classified more accurately.
[0011] In one optional implementation, the color feature vector further includes a first variance of the H value, a second variance of the S value, and a third variance of the V value for each pixel in the skin image; obtaining the color feature vector based on the color feature parameters further includes: calculating the difference between the H value and the first average value for each pixel, and obtaining the first variance based on the difference between the H values of all pixels and the first average value, and the number of pixels in the skin image; calculating the difference between the S value and the second average value for each pixel, and obtaining the second variance based on the difference between the S values of all pixels and the second average value, and the number of pixels in the skin image; calculating the difference between the V value and the third average value for each pixel, and obtaining the third variance based on the difference between the V values of all pixels and the third average value, and the number of pixels in the skin image.
[0012] This is because the first, second, and third average values of all pixels in a skin image can only reflect the average color of the skin image. If the first, second, and third variances are added, they can also reflect the uniformity of color in the skin image, thus providing a more comprehensive representation of the skin image's color.
[0013] In one optional implementation, obtaining texture features based on texture feature parameters includes: extracting texture features from a skin image using a local binary mode to obtain a histogram; and converting the histogram into an encoding vector to obtain a texture feature vector.
[0014] This allows the histogram to be converted into a fixed-length encoded vector, facilitating subsequent comparison and processing.
[0015] In an optional implementation, the blood oxygen compensation value determination method further includes the following steps: obtaining a training dataset, wherein the training dataset includes multiple sets of training data, wherein each set of training data includes a first blood oxygen concentration detected by a precision blood oxygen detection instrument for the same target user, a second blood oxygen concentration detected by a blood oxygen meter, and a skin color feature vector obtained from the skin image of the target user; and training a skin color compensation model based on the training dataset.
[0016] This allows us to obtain a skin color compensation model.
[0017] In one alternative implementation, training a skin color compensation model based on a training dataset includes: training the training dataset using a support vector machine to obtain the skin color compensation model.
[0018] Training the training dataset with a support vector machine can yield a skin color compensation model with high robustness and accuracy, thereby improving the robustness and accuracy of the blood oxygen compensation value determination method.
[0019] In one alternative implementation, after determining the first average value of H values, the second average value of S values, and the third average value of V values for all pixels in the skin map, the method further includes: determining the skin tone type of the target user based on the first average value, the second average value, and the third average value.
[0020] Secondly, embodiments of the present invention also provide a blood oxygen compensation value determination device, the device comprising a first acquisition module, a skin color feature vector determination module, and a compensation parameter determination module; the first acquisition module is used to acquire a skin image; the skin color feature vector determination module is used to obtain a skin color feature vector based on the skin image; the compensation parameter determination module is used to input the skin color feature vector into a preset skin color compensation model to obtain a blood oxygen compensation value corresponding to the skin image.
[0021] Thirdly, embodiments of the present invention also provide a computer device, including a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the blood oxygen compensation value determination method of the first aspect or any corresponding embodiment described above.
[0022] Fourthly, embodiments of the present invention also provide a blood oxygen detection system, including a pulse oximeter and a computer device as described in the third aspect.
[0023] In one alternative implementation, the computer device is a mobile phone, which communicates with the pulse oximeter to send the acquired skin color type corresponding feature parameters to the pulse oximeter.
[0024] Fifthly, embodiments of the present invention also provide a computer-readable storage medium storing computer instructions, which are used to cause a computer to execute the blood oxygen compensation value determination method of the first aspect or any corresponding embodiment. Attached Figure Description
[0025] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0026] Figure 1 This is a flowchart of a method for determining blood oxygen compensation value according to an embodiment of the present invention;
[0027] Figure 2 This is a flowchart of another method for determining blood oxygen compensation value according to an embodiment of the present invention;
[0028] Figure 3 This is a flowchart of another method for determining blood oxygen compensation value according to an embodiment of the present invention;
[0029] Figure 4 This is a flowchart of another method for determining blood oxygen compensation value according to an embodiment of the present invention;
[0030] Figure 5 This is a structural block diagram of a blood oxygen compensation value determination device according to an embodiment of the present invention;
[0031] Figure 6 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention;
[0032] Figure 7 This is a schematic diagram of a blood oxygen compensation value determination system according to an embodiment of the present invention. Detailed Implementation
[0033] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0034] According to an embodiment of the present invention, a method for determining blood oxygen compensation value is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0035] This embodiment provides a method for determining blood oxygen compensation value, which can be used in computer devices. The following description uses a computer device on a mobile phone as an example. Figure 1 This is a flowchart of a method for determining blood oxygen compensation values according to an embodiment of the present invention, as follows: Figure 1 As shown, the process includes the following steps:
[0036] Step S101: Obtain the skin image.
[0037] Normally, when using a pulse oximeter to test a subject's blood oxygen level, the pulse oximeter needs to be clipped onto the subject's finger. Therefore, in this embodiment, the skin image can be a skin image on the finger.
[0038] Specifically, the camera function of a mobile phone can be used to take a picture of the test subject's fingers to obtain a skin image.
[0039] Step S102: Obtain the skin color feature vector based on the skin image.
[0040] Among them, the skin color feature vector can be understood as a set of data that can reflect the skin color of the test subject.
[0041] Step S103: Input the skin color feature vector into the preset skin color compensation model to obtain the blood oxygen compensation value corresponding to the skin image, and send it to the pulse oximeter.
[0042] In this embodiment, the skin color compensation model is trained using a machine learning algorithm.
[0043] The blood oxygen compensation value determination method provided in this embodiment obtains a skin image, generates a skin color feature vector from the skin image, and further inputs the skin color feature vector into a preset skin color compensation model to obtain a blood oxygen compensation value corresponding to the skin image. In other words, a blood oxygen compensation value can be obtained by processing a skin image on a computer device and sent to a pulse oximeter. The pulse oximeter can then use the blood oxygen compensation value and the detected blood oxygen value to obtain an accurate blood oxygen value, thereby solving the problem of low measurement accuracy when using a pulse oximeter for blood oxygen detection.
[0044] It should be noted that to address the low accuracy of blood oxygen measurements using pulse oximeters, an additional skin color detection module can be added to the pulse oximeter. However, adding this module complicates the oximeter's structure and increases its manufacturing cost. Currently, smartphones are widely used in daily life, and their camera functions allow for the extraction of blood oxygen compensation values using their powerful processing capabilities.
[0045] This embodiment provides a method for determining blood oxygen compensation value, which can be used in computer devices. The following description uses a computer device on a mobile phone as an example. Figure 2 This is a flowchart of another method for determining blood oxygen compensation value according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:
[0046] Step S201: Obtain the training dataset.
[0047] Specifically, the training dataset includes multiple sets of training data, each set of training data including a first blood oxygen concentration detected by a precise blood oxygenation detection instrument (e.g., a CO-oximeter blood gas analyzer) for the same target user, a second blood oxygen concentration detected by a pulse oximeter, and a skin color feature vector obtained from the target user's skin image.
[0048] Step S202: Train the skin color compensation model based on the training dataset.
[0049] Specifically, the skin color compensation model is obtained by training the training dataset using a support vector machine (SVM).
[0050] This is because (1) Support Vector Machines (SVMs) can map data to a high-dimensional space by using kernel functions, which can handle complex nonlinear relationships. This is helpful for understanding the possible nonlinear relationships between skin color, texture, and blood oxygen saturation. (2) SVMs are robust to noise and interference from local small samples and can effectively handle outliers in the data. This is very important for improving the stability and accuracy of the model in practical applications. (3) SVMs can effectively control overfitting by maximizing the margin to establish the decision boundary. This can improve the model's generalization ability on unseen samples and help improve the accuracy of blood oxygen saturation prediction. (4) Compared with some complex deep learning models, SVM models have strong interpretability and can help understand the relationship between skin color, texture, and blood oxygen saturation.
[0051] Step S203: Obtain the skin image.
[0052] Specifically, after obtaining the skin image, you can perform operations such as cropping and image enhancement to ensure image quality.
[0053] Step S204: Obtain the skin color feature vector from the skin image. See details below. Figure 1 Step S102 of the illustrated embodiment will not be described again here.
[0054] Step S205: Input the skin color feature vector into the skin color compensation model to obtain the blood oxygen compensation value corresponding to the skin image. For details, please refer to [link to relevant documentation]. Figure 1 Step S103 of the illustrated embodiment will not be described again here.
[0055] The blood oxygen compensation value determination method provided in this embodiment can obtain blood oxygen compensation values by processing skin images on a computer device and sending them to a pulse oximeter. The pulse oximeter can use the blood oxygen compensation values and the detected blood oxygen values to obtain accurate blood oxygen values, thereby solving the problem of low measurement accuracy when using a pulse oximeter for blood oxygen detection. Moreover, by training the training dataset with a support vector machine, a skin color compensation model with high robustness and accuracy can be obtained, thereby improving the robustness and accuracy of the blood oxygen compensation value determination method.
[0056] This embodiment provides a method for determining blood oxygen compensation values, which can be used in computer equipment. Figure 3 This is a flowchart of another method for determining blood oxygen compensation value according to an embodiment of the present invention, as follows: Figure 3 As shown, the process includes the following steps:
[0057] Step S301: Obtain the training dataset.
[0058] The training dataset includes multiple sets of training data. Each set of training data includes a first blood oxygen concentration detected by a precise blood oxygenation detector for the same target user, a second blood oxygen concentration detected by a blood oxygenation meter, and a skin color feature vector obtained from the target user's skin image.
[0059] Step S302: Train the skin color compensation model based on the training dataset.
[0060] Specifically, the skin color compensation model is obtained by training the training dataset using a support vector machine (SVM).
[0061] Step S303: Obtain the skin image. See details below. Figure 1 Step S101 of the illustrated embodiment will not be described again here.
[0062] Step S304: Obtain the skin color feature vector based on the skin image.
[0063] As one specific implementation method, step S304 includes:
[0064] Step S3041: Extract skin color parameters from the skin image, where the skin color parameters include color feature parameters and texture feature parameters.
[0065] Step S3042: Obtain the color feature vector based on the color feature parameters.
[0066] As one specific implementation, the color feature vector includes the first average of the H values, the second average of the S values, and the third average of the V values of all pixels in the skin map.
[0067] As a specific implementation method, obtaining the color feature vector based on the color feature parameters includes:
[0068] Step a1: Obtain the R, G, and B values of each pixel in the skin image.
[0069] Step a2: Based on the R, G, and B values of each pixel in the skin image, obtain the H, S, and V values of each pixel in the skin image.
[0070] This is because (1) the HSV color space separates color information into three channels: hue, saturation, and value, while the RGB color space has three channels: red, green, and blue. In the HSV color space, hue represents the basic attributes of color, value represents the lightness or darkness of color, and saturation represents the vividness of color. This separation makes the HSV color space more suitable for classifying color features. (2) The value channel of the HSV color space can better resist changes in lighting and brightness. Since the value in the RGB color space is composed of three channels: red, green, and blue, the RGB values will change when the lighting conditions change. The value channel of the HSV color space extracts the lightness or darkness of color separately, which can more stably represent the brightness characteristics of color. (3) The HSV color space is more in line with human perception and judgment of color. Hue specifies the basic attributes of color, such as red, green, and blue; while saturation and value provide the perception of the vividness and lightness or darkness of color. By observing and analyzing the distribution of skin color in the HSV space, different skin colors can be classified more accurately.
[0071] Step a3: Based on the H, S, and V values of each pixel in the skin image, determine the first average of the H values, the second average of the S values, and the third average of the V values for all pixels in the skin image.
[0072] Specifically, the first average value is obtained by dividing the sum of the H values of all pixels in the skin image by the number of pixels in the skin image; the second average value is obtained by dividing the sum of the S values of all pixels in the skin image by the number of pixels in the skin image; and the third average value is obtained by dividing the sum of the V values of all pixels in the skin image by the number of pixels in the skin image.
[0073] Step S3043: Obtain the texture feature vector based on the texture feature parameters.
[0074] As a specific implementation method, obtaining texture features based on texture feature parameters includes:
[0075] Step b1: Extract texture features from the skin image using Local Binary Pattern (LBP) to obtain a histogram.
[0076] Specifically, the histogram can be obtained by extracting texture features from skin images using Local Binary Pattern (LBP) using the following methods: (1) Divide the skin image into multiple local regions (e.g., 3x3 pixel blocks); (2) Calculate the LBP code for each local region; (3) Calculate the histogram of the LBP codes for all local regions in the skin image.
[0077] Step b2: Convert the histogram into an encoding vector to obtain the texture feature vector.
[0078] Specifically, the following methods can be used to convert the histogram into an encoding vector to obtain the texture feature vector: (1) Determine the value range of LBP encoding, which is generally 0 to 255, corresponding to 8 bits of LBP; (2) Create a fixed-length encoding vector with the same length as the value range of LBP encoding; (3) Statistically analyze the LBP encoding of local regions and accumulate the occurrence frequency of each value to the corresponding encoding vector position; (4) Normalize the encoding vector so that the value of each position is between 0 and 1, so as to facilitate comparison and processing.
[0079] For example, (1) assuming that 256 different values are considered for the LBP encoding of a local region, create an encoding vector of length 256; (2) count the LBP encoding of each local region, and accumulate the occurrence count of each value to the corresponding encoding vector position; (3) normalize the encoding vector, which can be done using simple linear normalization, dividing all values by the total number of pixels in the local region, so that the value of the encoding vector is between 0 and 1. Through this transformation, the LBP histogram can be converted into a fixed-length encoding vector, which is convenient for subsequent comparison and processing.
[0080] Step S3044: Obtain the skin color feature vector using the color feature vector and texture feature vector.
[0081] In other words, the skin color feature vector includes not only a color feature vector that reflects skin color, but also a texture feature vector that reflects skin texture. This is because not only do people with different skin colors have different transmittance of infrared light, but skin with different textures also have different transmittance of infrared light. The skin color feature vector includes both color and texture feature vectors, which can improve the accuracy of the blood oxygen compensation value determination method.
[0082] Step S305: Input the skin color feature vector into the preset skin color compensation model to obtain the blood oxygen compensation value corresponding to the skin image.
[0083] The blood oxygen compensation value determination method provided in this embodiment can obtain blood oxygen compensation values by processing skin images on a computer device and sending them to a pulse oximeter. The pulse oximeter can use the blood oxygen compensation values and the detected blood oxygen values to obtain accurate blood oxygen values, thereby solving the problem of low measurement accuracy when using a pulse oximeter for blood oxygen detection. Moreover, by training the training dataset with a support vector machine, a robust and accurate skin color compensation model can be obtained, thereby improving the robustness and accuracy of the blood oxygen compensation value determination method. Furthermore, the skin color feature vector includes not only color feature vectors that can reflect skin color, but also texture feature vectors that can reflect skin texture, thereby improving the accuracy of the blood oxygen compensation value determination method.
[0084] This embodiment provides a method for determining blood oxygen compensation values, which can be used in computer equipment. Figure 4 This is a flowchart of another method for determining blood oxygen compensation value according to an embodiment of the present invention, as follows: Figure 4 As shown, the process includes the following steps:
[0085] Step S401: Obtain the training dataset, which includes multiple sets of training data. Each set of training data includes a first blood oxygen concentration detected by a precision blood oxygenation instrument for the same target user, a second blood oxygen concentration detected by a blood oxygenation meter, and a skin color feature vector obtained from the target user's skin image.
[0086] Step S402: Train the skin color compensation model based on the training dataset.
[0087] Step S403: Obtain the skin image.
[0088] Step S404: Extract skin color parameters from the skin image, where skin color parameters include color feature parameters and texture feature parameters.
[0089] Step S405: Obtain the R value, G value, and B value of each pixel in the skin image.
[0090] Step S406: Obtain the H, S, and V values of each pixel in the skin image based on the R, G, and B values of each pixel in the skin image.
[0091] Step S407: Based on the H, S, and V values of each pixel in the skin image, determine the first average value of the H value, the second average value of the S value, and the third average value of the V value of all pixels in the skin image.
[0092] As a further implementation, after obtaining the first average value of H value, the second average value of S value and the third average value of V value in step S407, the method further includes: determining the skin color type of the target user based on the first average value, the second average value and the third average value.
[0093] Specifically, skin color can be classified according to the range in which the first, second, and third average values fall. This skin color type can then be sent to the pulse oximeter so that the target user can know their skin color type.
[0094] For example, the criteria for judging white skin are: the first average is between 0 and 50 degrees, the second average is between 0.1 and 0.3, and the third average is between 0.7 and 1.
[0095] The criteria for judging yellow skin are: the first average is between 20 and 40 degrees, the second average is between 0.3 and 0.6, and the third average is between 0.5 and 0.8.
[0096] The criteria for judging brown skin are: the first average is between 20 and 40 degrees, the second average is between 0.3 and 0.6, and the third average is between 0.2 and 0.5.
[0097] Step S408: Determine the first variance of the H value, the second variance of the S value, and the third variance of the V value for all pixels in the skin image.
[0098] In other words, after obtaining the first average H value, the second average S value, and the third average V value of all pixels in the skin image, we also need the first variance of the H value, the second variance of the S value, and the third variance of the V value. This is because the first, second, and third average values of all pixels in the skin image only reflect the average color of the skin image. Adding the first, second, and third variances further reflects the uniformity of color in the skin image, thus providing a more comprehensive representation of the skin image's color.
[0099] Specifically, step S408 includes: calculating the difference between the H value and the first average value for each pixel, and obtaining the first variance based on the difference between the H values of all pixels and the first average value, and the number of pixels in the skin image; calculating the difference between the S value and the second average value for each pixel, and obtaining the second variance based on the difference between the S values of all pixels and the second average value, and the number of pixels in the skin image; and calculating the difference between the V value and the third average value for each pixel, and obtaining the third variance based on the difference between the V values of all pixels and the third average value, and the number of pixels in the skin image.
[0100] Assuming the skin image contains m pixels, then:
[0101] First variance = [(H value of pixel 1 – First average value)] 2 +(H value of pixel 2 – first average value) 2 ... + (H value of pixel m – first average value) 2 ]÷m
[0102] Second variance = [(S value of pixel 1 – Second average value)] 2 +(S value of pixel 2 – second average value) 2 ... + (S value of pixel m – second average value) 2 ]÷m
[0103] Third difference = [(V value of pixel 1 – Third average value)] 2 +(V value of pixel 2 – third average) 2 ... + (V value of pixel m – third average value) 2 ]÷m
[0104] Step S409: Extract the texture features of the skin image using local binary mode to obtain a histogram.
[0105] Step S410: Convert the histogram into an encoding vector to obtain the texture feature vector.
[0106] Step S411: Obtain the skin color feature vector using the first average, second average, third average, first variance, second variance, third variance, and texture feature vector.
[0107] Step S412: Input the skin color feature vector into the preset skin color compensation model to obtain the blood oxygen compensation value corresponding to the skin image.
[0108] The blood oxygen compensation value determination method provided in this embodiment can obtain blood oxygen compensation values by processing skin images on a computer device and sending them to a pulse oximeter. The pulse oximeter can use the blood oxygen compensation values and the detected blood oxygen values to obtain accurate blood oxygen values, thereby solving the problem of low measurement accuracy when using a pulse oximeter for blood oxygen detection. Moreover, by training the training dataset with a support vector machine, a robust and accurate skin color compensation model can be obtained, thereby improving the robustness and accuracy of the blood oxygen compensation value determination method. Furthermore, the skin color feature vector includes not only color feature vectors that can reflect skin color, but also texture feature vectors that can reflect skin texture, thereby improving the accuracy of the blood oxygen compensation value determination method. Furthermore, the color feature vector includes not only the first average, second average, and third average, but also the first variance, second variance, and third variance, thereby more comprehensively reflecting the color of the skin image.
[0109] This embodiment also provides a blood oxygen compensation value determination device, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0110] This embodiment provides a device for determining blood oxygen compensation value, such as... Figure 5 As shown, it includes:
[0111] The first acquisition module 501 is used to acquire skin images.
[0112] The skin color feature vector determination module 502 is used to obtain the skin color feature vector based on the skin image.
[0113] The compensation parameter determination module 503 is used to input the skin color feature vector into the preset skin color compensation model to obtain the blood oxygen compensation value corresponding to the skin image.
[0114] In some optional implementations, the skin color feature vector determination module 502 includes:
[0115] The skin color parameter extraction unit is used to extract skin color parameters from skin images, including color feature parameters and texture feature parameters.
[0116] The color feature vector determination unit is used to obtain the color feature vector based on the color feature parameters.
[0117] The texture feature vector determination unit is used to obtain the texture feature vector based on the texture feature parameters.
[0118] The skin color feature vector determination unit is used to obtain the skin color feature vector using the color feature vector and the texture feature vector.
[0119] In some optional implementations, the color feature vector includes a first average of the H values, a second average of the S values, and a third average of the V values of all pixels in the skin image. The color feature vector determination unit is specifically used to: obtain the R, G, and B values of each pixel in the skin image; obtain the H, S, and V values of each pixel in the skin image based on the R, G, and B values; and determine the first average of the H values, the second average of the S values, and the third average of the V values of all pixels in the skin image based on the H, S, and V values of each pixel.
[0120] In some optional implementations, the color feature vector further includes a first variance of the H value, a second variance of the S value, and a third variance of the V value for each pixel in the skin image. The color feature vector determination unit is further configured to: calculate the difference between the H value and the first average value for each pixel, and obtain the first variance based on the difference between the H values of all pixels and the first average value, and the number of pixels in the skin image; calculate the difference between the S value and the second average value for each pixel, and obtain the second variance based on the difference between the S values of all pixels and the second average value, and the number of pixels in the skin image; calculate the difference between the V value and the third average value for each pixel, and obtain the third variance based on the difference between the V values of all pixels and the third average value, and the number of pixels in the skin image.
[0121] In some optional implementations, the texture feature vector determination unit is used to: extract texture features from the skin image using a local binary mode to obtain a histogram; and convert the histogram into an encoded vector to obtain a texture feature vector.
[0122] In some optional implementations, the blood oxygen compensation value determination device further includes a second acquisition module and a training module. The second acquisition module is used to: acquire a training dataset, wherein the training dataset includes multiple sets of training data, each set of training data including a first blood oxygen concentration detected by a precision blood oxygenation instrument for the same target user, a second blood oxygen concentration detected by a pulse oximeter, and a skin color feature vector obtained from a skin image of the target user. The training module is used to: train a skin color compensation model based on the training dataset.
[0123] In some optional implementations, the blood oxygen compensation value determination device further includes a skin color type determination module. After determining a first average of the H values, a second average of the S values, and a third average of the V values of all pixels in the skin image, the skin color type determination module is used to determine the skin color type of the target user based on the first average, the second average, and the third average.
[0124] In this embodiment, the blood oxygen compensation value determination device is presented in the form of a functional unit. Here, a unit refers to an ASIC circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0125] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0126] This invention also provides a computer device having the above-described features. Figure 5 The device shown is for determining blood oxygen compensation values.
[0127] This invention also provides a blood oxygen detection system, including a pulse oximeter and the aforementioned computer equipment.
[0128] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 6 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 6 Take a processor 10 as an example.
[0129] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0130] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.
[0131] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device as shown by a landing page for an app. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, which can be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0132] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0133] The computer device also includes an input device 30 and an output device 40. The processor 10, memory 20, input device 30, and output device 20 can be connected via a bus or other means. Figure 6 Taking the example of a connection between China and Israel via a bus.
[0134] Input device 30 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the computer device, such as a touchscreen, keypad, mouse, trackpad, touchpad, joystick, one or more mouse buttons, trackball, joystick, etc. Output device 40 may include display devices, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors). The aforementioned display devices include, but are not limited to, liquid crystal displays, light-emitting diodes, displays, and plasma displays. In some alternative embodiments, the display device may be a touchscreen.
[0135] Based on the aforementioned computer equipment, this embodiment of the invention also provides a blood oxygen detection system, including a pulse oximeter and the aforementioned computer equipment. Specifically, the computer equipment can be a mobile phone, which communicates with the pulse oximeter to send the acquired skin color type corresponding feature parameters to the pulse oximeter.
[0136] like Figure 7 The pulse oximeter includes a main control module, a wireless connection module, a display module, a digital processing module, two light-emitting diodes (a first light-emitting diode and a second light-emitting diode), and two receiving diodes (a first receiving diode and a second receiving diode). The first light-emitting diode emits a 660nm wavelength light beam under the control of a control signal from the main control module, while the second light-emitting diode emits a 940nm wavelength light beam under the control of a control signal from the main control module. The digital processing module processes the control signals from the main control module and processes the signals received by the receiving diodes before sending them back to the main control module. The main control module solves equations using the measured values after transmission at the two wavelengths to determine the levels of the two types of hemoglobin, and then calculates the blood oxygen saturation.
[0137] The smartphone and the pulse oximeter's main control module are connected via a wireless connection module. The smartphone sends the pulse oxygen compensation value to the main control module via the wireless connection module. The main control module obtains the accurate pulse oxygen saturation based on the blood pressure saturation and the pulse oxygen compensation value, and sends it to the display module for display.
[0138] The smartphone can also send the skin tone type to the main control module via a wireless connection module, and the main control module will then send the skin tone type to the display module for display.
[0139] The blood oxygen detection system provided in this embodiment of the invention has the following beneficial effects:
[0140] (1) Skin color collection is performed using a widely available smartphone, eliminating the need for specialized skin color detection instruments or sensors;
[0141] (2) By using the powerful computing power of the mobile phone CPU to perform machine learning algorithms for skin color compensation, the accuracy of blood oxygen testing has been improved.
[0142] (3) The system is small in size, easy to carry and move, and can perform blood oxygen testing anytime and anywhere.
[0143] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0144] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A method for determining blood oxygen compensation value, characterized in that, The method includes: Get skin image; The skin color feature vector is obtained from the skin image; The skin color feature vector is input into a preset skin color compensation model to obtain the blood oxygen compensation value corresponding to the skin image; The step of obtaining the skin color feature vector based on the skin image includes: Extract skin color parameters from the skin image, wherein the skin color parameters include color feature parameters and texture feature parameters; A color feature vector is obtained based on the color feature parameters. The color feature vector includes the first average value of H value, the second average value of S value, the third average value of V value, the first variance of H value, the second variance of S value, and the third variance of V value for all pixels in the skin image. The texture feature vector is obtained based on the texture feature parameters; The skin color feature vector is obtained using the color feature vector and the texture feature vector.
2. The method according to claim 1, characterized in that, The step of obtaining the color feature vector based on the color feature parameters includes: Obtain the R, G, and B values of each pixel in the skin image; The H, S, and V values of each pixel in the skin image are obtained based on the R, G, and B values of each pixel in the skin image. Based on the H, S, and V values of each pixel in the skin image, determine the first average value of the H values, the second average value of the S values, and the third average value of the V values of all pixels in the skin image.
3. The method according to claim 2, characterized in that, The step of obtaining the color feature vector based on the color feature parameters further includes: The difference between the H value of each pixel and the first average value is calculated. Based on the difference between the H values of all pixels and the first average value, and the number of pixels in the skin image, the first variance is obtained. Calculate the difference between the S value of each pixel and the second average value, and obtain the second variance based on the difference between the S values of all pixels and the second average value, and the number of pixels in the skin image; The difference between the V value of each pixel and the third average value is calculated. The third difference is obtained based on the difference between the V values of all pixels and the third average value, and the number of pixels in the skin image.
4. The method according to claim 1, characterized in that, The process of obtaining texture features based on the texture feature parameters includes: The texture features of the skin image are extracted using a local binary mode to obtain a histogram; The histogram is converted into an encoding vector to obtain the texture feature vector.
5. The method according to claim 1, characterized in that, Also includes: Obtain a training dataset, wherein the training dataset includes multiple sets of training data, wherein each set of training data includes a first blood oxygen concentration detected by a precision blood oxygen detection instrument for the same target user, a second blood oxygen concentration detected by a blood oxygen meter, and a skin color feature vector obtained based on the skin image of the target user; The skin color compensation model is obtained by training the training dataset.
6. The method according to claim 5, characterized in that, The step of training the skin color compensation model based on the training dataset includes: The skin color compensation model is obtained by training the training dataset using a support vector machine.
7. The method according to claim 2, characterized in that, After determining the first average of the H values, the second average of the S values, and the third average of the V values for all pixels in the skin image, the method further includes: The skin color type of the target user is determined based on the first average value, the second average value, and the third average value.
8. A device for determining blood oxygen compensation value, characterized in that, The device includes: The first acquisition module is used to acquire skin images; A skin color feature vector determination module is used to obtain a skin color feature vector based on the skin image; The compensation parameter determination module is used to input the skin color feature vector into a preset skin color compensation model to obtain the blood oxygen compensation value corresponding to the skin image; The step of obtaining the skin color feature vector based on the skin image includes: Extract skin color parameters from the skin image, wherein the skin color parameters include color feature parameters and texture feature parameters; A color feature vector is obtained based on the color feature parameters. The color feature vector includes the first average value of H value, the second average value of S value, the third average value of V value, the first variance of H value, the second variance of S value, and the third variance of V value for all pixels in the skin image. The texture feature vector is obtained based on the texture feature parameters; The skin color feature vector is obtained using the color feature vector and the texture feature vector.
9. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the blood oxygen compensation value determination method according to any one of claims 1 to 7.
10. A blood oxygen detection system, characterized in that, Includes a pulse oximeter and the computer device as described in claim 9.
11. The blood oxygen detection system according to claim 10, characterized in that, The computer device is a mobile phone, which communicates with the pulse oximeter to send the pulse oximeter compensation value.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the blood oxygen compensation value determination method according to any one of claims 1 to 7.