Test tube image processing method and device, electronic equipment and storage medium

By intercepting and identifying test tube images, and using the image interpretation model to extract effective areas, the problem of accuracy and efficiency of test tube interpretation in clinical medical testing is solved, and automated and highly accurate interpretation results are achieved.

CN118865342APending Publication Date: 2024-10-29XIAN JINYU MEDICAL INSPECTION OFFICE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410964808.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

In the existing technology, direct visual interpretation of clinical medical testing through test tubes involves human errors and inaccuracies, which wastes a lot of manpower and results in non-standard interpretations.

Method used

By obtaining the test tube image, image interception and recognition are performed, the effective image area is extracted, and the trained image interpretation model is used for interpretation to improve the accuracy of interpretation.

Benefits of technology

It realizes the automation and accuracy of test tube interpretation, reduces human errors, and improves the standardization and efficiency of test results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118865342A_ABST
    Figure CN118865342A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a test tube image processing method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring an initial test tube image; performing image interception on the initial test tube image to obtain an initial image area corresponding to the test tube; the initial image area comprises a test tube wall line of the test tube and supernate; identifying the initial image area to extract an effective image area corresponding to the test tube; the effective image area refers to an image area corresponding to supernate of the test tube; and interpreting the effective image area through an image interpretation model obtained through training to obtain an interpretation detection result corresponding to the test tube. By implementing the embodiment of the invention, the test tube interpretation accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a test tube image processing method, device, electronic equipment and storage medium. Background Art

[0002] At present, clinical medical tests usually use test tubes to conduct a series of chemical reactions on the test samples, and then directly observe the properties of the test samples in the test tubes by naked eyes to interpret the results of the test samples in the test tubes. Since the results of the test samples need to be interpreted manually, a lot of manpower is wasted for mechanical interpretation. Moreover, the interpretation results of the test samples are often biased by human subjective interpretation, which is prone to incorrect interpretation or non-standard interpretation results. Summary of the invention

[0003] The embodiments of the present application disclose a test tube image processing method, device, electronic device and storage medium, which can improve the accuracy of test tube interpretation.

[0004] The present application embodiment discloses a test tube image processing method, the method comprising:

[0005] Acquire an initial test tube image;

[0006] Performing image interception on the initial test tube image to obtain an initial image region corresponding to the test tube; the initial image region includes the test tube wall line and supernatant of the test tube;

[0007] Identifying the initial image area to extract a valid image area corresponding to the test tube; the valid image area refers to an image area corresponding to the supernatant of the test tube;

[0008] The effective image area is interpreted by the trained image interpretation model to obtain the interpretation detection result corresponding to the test tube.

[0009] As an optional implementation manner, the step of performing image interception on the initial test tube image to obtain an initial image region corresponding to the test tube includes:

[0010] The image capture model uses the pixel information corresponding to each pixel point contained in the initial test tube image and uses the pixel points corresponding to the pixel information in the first pixel interval obtained through training as the initial image area corresponding to the test tube.

[0011] As an optional implementation manner, the identifying the initial image area to extract the effective image area corresponding to the test tube includes:

[0012] Identifying the test tube wall line contained in the initial image area;

[0013] Extracting the image area inside the test tube contained in the initial image area according to the test tube wall line;

[0014] The floating object pixel points corresponding to the blood floating objects contained in the image area in the test tube are identified, and the floating object pixel points contained in the image area in the test tube are removed to obtain a valid image area.

[0015] As an optional implementation, the identifying floating object pixel points corresponding to the blood floating objects contained in the in-test tube image area and removing the floating object pixel points contained in the in-test tube image area to obtain the effective image area includes:

[0016] Obtaining pixel values ​​corresponding to each pixel point contained in the image area in the test tube;

[0017] A pixel point in the image region in the test tube whose pixel value is in a second pixel interval corresponding to the blood floater is determined as a floater pixel point.

[0018] As an optional implementation, before the image interpretation model obtained through training interprets the effective image area to obtain the interpretation and detection result corresponding to the test tube, the method further includes:

[0019] Calculating a first image area corresponding to the effective image region, and calculating a second image area corresponding to the initial test tube image;

[0020] calculating a ratio between the first image area and the second image area to obtain a relative image ratio;

[0021] The image interpretation model obtained through training interprets the effective image area to obtain the interpretation detection result corresponding to the test tube, including:

[0022] If the relative image ratio is greater than a preset ratio threshold, the effective image area corresponding to the test tube is interpreted by the trained image interpretation model to obtain the interpretation detection result corresponding to the test tube.

[0023] As an optional implementation, the judgment detection result corresponding to the test tube includes the target interpretation category corresponding to the test tube and the interpretation degree corresponding to the target interpretation category; the image interpretation model includes a first interpretation module and a plurality of second interpretation modules; the image interpretation model obtained by training interprets the effective image area to obtain the judgment detection result corresponding to the test tube, including:

[0024] Statistically analyzing pixel information of each pixel point contained in the effective image area through the image interpretation model, and generating effective image features according to the statistical results;

[0025] The effective image features are interpreted by the first interpretation module to obtain a target interpretation category corresponding to the test tube;

[0026] The second interpretation module corresponding to the target interpretation category is used to determine the interpretation degree corresponding to the target interpretation category according to the effective image feature.

[0027] As an optional implementation, the first interpretation module interprets the effective image features to obtain the target interpretation category corresponding to the test tube, including:

[0028] The first interpretation module determines the feature range to which the pixel average value in the effective image feature belongs, and uses the interpretation category corresponding to the feature range as the interpretation category corresponding to the test tube.

[0029] The present application embodiment discloses a test tube image processing device, the device comprising:

[0030] An acquisition module, used for acquiring an initial test tube image;

[0031] A capture module, used to capture the initial test tube image to obtain an initial image area corresponding to the test tube; the initial image area includes the test tube wall line and supernatant of the test tube;

[0032] A recognition module, used to recognize the initial image area to extract the effective image area corresponding to the test tube; the effective image area refers to the image area corresponding to the supernatant of the test tube;

[0033] The interpretation module is used to interpret the effective image area through the trained image interpretation model to obtain the interpretation detection result corresponding to the test tube.

[0034] An embodiment of the present application discloses an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor implements any one of the test tube image processing methods disclosed in the embodiment of the present application.

[0035] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, any test tube image processing method disclosed in the embodiment of the present application is implemented.

[0036] Compared with the related art, the embodiments of the present application have the following beneficial effects:

[0037] The embodiments of the present application provide a test tube image processing method, device, electronic device and storage medium, which obtain an initial test tube image, perform image interception on the initial test tube image to obtain an initial image area corresponding to the test tube, the initial image area includes the test tube wall line and the supernatant of the test tube, and the initial image area is identified to extract the effective image area corresponding to the test tube, the effective image area refers to the image area corresponding to the supernatant of the test tube, and the effective image area is interpreted by the trained image interpretation model to obtain the interpretation detection result corresponding to the test tube. In implementing the embodiments of the present application, by performing image interception on the initial test tube image, an initial image area including the test tube wall line and the supernatant is preliminarily obtained, and the initial image area is identified, and the effective image area is further extracted to avoid the image area of ​​the test tube wall line and other image areas interfering with the interpretation detection result, and the image interpretation model is used to interpret the effective image area, which can improve the accuracy of the test tube interpretation. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1 This is an application scenario diagram of a test tube image processing method disclosed in an embodiment of the present application;

[0040] Figure 2 It is a flow chart of a test tube image processing method disclosed in an embodiment of the present application;

[0041] Figure 3 is a flow chart of another test tube image processing method disclosed in an embodiment of the present application;

[0042] Figure 4 is a schematic diagram of obtaining an image area in a test tube in an embodiment;

[0043] Figure 5 It is a schematic diagram of a flow chart of the image interpretation model obtained through training disclosed in the embodiment of the present application, which interprets the effective image area corresponding to the test tube to obtain the interpretation and detection result corresponding to the test tube;

[0044] Figure 6 is a schematic diagram of outputting a judgment detection result in an embodiment;

[0045] Figure 7 is a structural schematic diagram of a test tube image processing device disclosed in an embodiment of the present application;

[0046] Figure 8 It is a structural schematic diagram of an electronic device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0048] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present application and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.

[0049] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first image area may be referred to as a second image area, and similarly, a second image area may be referred to as a first image area. Both the first image area and the second image area are image areas, but they are not the same image area.

[0050] The embodiments of the present application disclose a test tube image processing method, device, electronic device and storage medium, which can automatically interpret the test tube image and obtain a high accuracy interpretation result. Detailed descriptions are given below.

[0051] See also Figure 1 , Figure 1 : is an application scenario diagram of a test tube image processing method disclosed in an embodiment of the present application. The test tube image processing method is applicable to electronic devices, which may include but are not limited to mobile phones, tablet computers, laptop computers, PCs (Personal Computers), etc., and are not limited in the embodiments of the present application.

[0052] The electronic device acquires an initial test tube image 101, performs image capture on the initial test tube image 101 to obtain an initial image region corresponding to the test tube 102, the initial image region includes the test tube wall line and the supernatant 103 of the test tube 102, identifies the initial image region to extract a valid image region corresponding to the test tube 102, the valid image region refers to an image region corresponding to the supernatant 103 of the test tube 102, interprets the valid image region through the trained image interpretation model, and obtains an interpretation detection result corresponding to the test tube 102.

[0053] Figure 2 : is a flow chart of a test tube image processing method disclosed in an embodiment of the present application. Figure 1 The test tube image processing method described is applicable to the above electronic devices. Figure 2 As shown, the test tube image processing method may include the following steps:

[0054] S202, acquiring an initial test tube image.

[0055] In clinical medical tests, since test tubes do not react with most drugs, and the tube wall of the test tube is usually transparent glass, it is easy to observe the changes of the reactants in the test tube. In clinical medical tests, test samples are usually loaded through test tubes, and chemical drugs are added to the test tubes to make the test samples react, so as to obtain test tubes containing the test samples after the reaction. The test samples after the reaction can be divided into supernatant and sediment in the test tube. The supernatant is the liquid in the upper layer, and the supernatant usually has a higher transparency and better light transmittance. The sediment is the solid below the supernatant, and the sediment usually has a lower transparency and poorer light transmittance.

[0056] Optionally, if the test sample in the test tube is a blood sample, after a chemical reaction on the blood sample, the supernatant in the test tube may be plasma and / or serum in the blood, and the precipitate in the test tube may be red blood cells in the blood. The electronic device may capture these test tube images by controlling the optical shooting device, thereby acquiring an initial test tube image containing the test sample.

[0057] In some embodiments, the electronic device can obtain the initial test tube image captured by the experimenter through the optical shooting device, wherein the optical shooting device can be a traditional camera, an optical scanner, an industrial camera, etc., but is not limited thereto. The experimenter can shoot the test tube containing the test sample in a weak light environment, so that the electronic device can obtain the initial test tube image captured in a weak light environment, which can avoid the formation of light spots on the tube wall of the test tube due to refraction of strong light, thereby affecting the subsequent electronic device to process the initial test tube image, and also affect the accuracy of the judgment of the test result to a certain extent. Further, the experimenter can set the background of the test tube containing the test sample to a dark background (such as a black background). If the test sample in the test tube has a supernatant and a precipitate, the precipitate will be captured in the initial test tube image and will be darker, and the supernatant has high light transmittance and transparency. Therefore, the supernatant under the dark background usually does not change much, thereby enhancing the contrast between the supernatant and the precipitate, which can facilitate the electronic device to more accurately identify the initial image area containing the supernatant in the initial test tube image.

[0058] S204, performing image capture on the initial test tube image to obtain an initial image region corresponding to the test tube; the initial image region includes the test tube wall line and the supernatant of the test tube.

[0059] In some embodiments, the initial image area may include the corresponding test tube wall line and the supernatant, and further, the initial image area may only include the test tube wall line on the initial test tube image where the supernatant contacts the tube wall. The initial image area includes a plurality of pixels and pixel information corresponding to each pixel, wherein the pixel information may be a parameter describing the color of the corresponding pixel, may include an RGB value for describing the color of the corresponding pixel, or may include brightness data for describing the brightness of the corresponding pixel. Specifically, the pixel information may be a parameter for describing the pixel in the RGB color space, for example, the pixel information may include an RGB value and a brightness value. Since the brightness contrast and color contrast of the supernatant and the precipitate in the initial test tube image are obvious, the color range or brightness range may be set, and the pixel whose RGB value in the pixel information in the initial test tube image is within a preset color range may be used as a pixel in the initial image area, or the pixel whose brightness data in the pixel information in the initial test tube image is within a preset brightness range may be used as a pixel in the initial image area, thereby obtaining the initial image area corresponding to the test tube.

[0060] S206, identifying the initial image region to extract the effective image region corresponding to the test tube; the effective image region refers to the image region corresponding to the supernatant of the test tube.

[0061] Since the precipitate in the initial test tube image appears black against a dark background, and the test tube wall lines appear light black against a dark background, the pixel information corresponding to the pixel points on the test tube wall lines in the initial test tube image may be less different from the pixel information corresponding to the pixel points in the supernatant than the precipitate in the initial test tube image. Therefore, the initial image area needs to be further identified to separate the test tube wall lines in the initial image area, thereby extracting the effective image area of ​​the test tube.

[0062] In some embodiments, the electronic device may set a screening condition for screening the test tube wall lines according to the common characteristics of the pixel information of the pixels on the test tube wall lines in the initial image area, thereby identifying the test tube wall lines and removing the pixels belonging to the test tube wall lines, thereby obtaining a valid image area. The common characteristics of the pixel information of the pixels on the test tube wall lines may be that the brightness of the pixels is within a certain brightness range and / or the color of the pixels is within a certain color range, thereby setting the screening condition for screening the pixels on the test tube wall lines.

[0063] S208, interpreting the effective image area through the trained image interpretation model to obtain the interpretation and detection result corresponding to the test tube.

[0064] In some embodiments, the interpretation test result may include the interpretation category and the interpretation degree corresponding to the interpretation category, wherein the interpretation category may be used to describe the classification of the test sample in the test tube, and specifically, the interpretation category may be a classification for blood samples, such as hemolysis, jaundice, lipemia, etc. The interpretation degree may be used to describe the degree involved in the interpretation category of the test sample in the test tube, and the interpretation degree may be represented by the number of specific symbols. The more the number of specific symbols, the deeper the interpretation degree in the corresponding interpretation category. Specifically, the degree may be represented by the number of plus signs "+", "+" may represent that the corresponding interpretation category is relatively low, "++" may represent that the corresponding interpretation category is medium, and "+++" may represent that the corresponding interpretation category is relatively high. For example, the interpretation test result may be represented as "hemolysis +", "jaundice ++", etc., wherein "hemolysis +" represents that the hemolysis degree of the test sample in the test tube is relatively low, and "jaundice ++" represents that the jaundice degree of the test sample in the test tube is medium. The electronic device inputs the effective image area corresponding to the test tube into the image interpretation model. The image interpretation model can first determine the interpretation category corresponding to the test tube, and then determine the interpretation degree corresponding to the interpretation category, thereby obtaining the interpretation detection result corresponding to the test tube.

[0065] As an optional implementation, the electronic device may train the image interpretation model through a sample image region set, wherein the sample image region set includes multiple sample image regions and target interpretation detection results corresponding to each sample image region, and the sample image region may refer to the image region corresponding to the supernatant of a test tube containing a historical detection sample. The electronic device inputs the sample image region set into the image interpretation model to be trained, interprets each sample image region through the image interpretation model to be trained, obtains the predicted interpretation detection results corresponding to each sample image region, and adjusts the model parameters of the image interpretation model according to the error between the predicted interpretation detection results corresponding to each sample image region and the corresponding target interpretation detection results, thereby obtaining a trained image interpretation model.

[0066] In some embodiments, the electronic device can also obtain the test tube identification corresponding to the test tube in the initial test tube, and can uniquely identify the test sample according to the test tube identification corresponding to the test tube. After obtaining the interpretation test result corresponding to the test tube, the test sample can be found according to the test tube identification, so that a report on the interpretation test result corresponding to the test sample can be output, so that the experimenter can know the interpretation situation corresponding to each test sample. Among them, the test tube identification corresponding to the test tube can be manually input by the experimenter, or it can be obtained by identifying the barcode or number attached to the test tube to obtain the test tube identification corresponding to the test tube.

[0067] In an embodiment of the present application, an initial test tube image is acquired, and an image capture is performed on the initial test tube image to obtain an initial image region corresponding to the test tube, and the initial image region is identified to extract a valid image region corresponding to the test tube, and the valid image region is interpreted by a trained image interpretation model to obtain a corresponding interpretation detection result of the test tube. The electronic device preliminarily obtains an initial image region including the test tube wall line and the supernatant by performing image capture on the initial test tube image, and identifies the initial image region, and further extracts a valid image region, thereby avoiding interference of the image region of the test tube wall line and other image regions on the interpretation detection result, and the image interpretation model is used to interpret the valid image region, so as to improve the accuracy of the test tube interpretation.

[0068] Figure 3 FIG. 1 is a flow chart of another test tube image processing method disclosed in an embodiment of the present application. Figure 3 As shown, the method comprises the following steps:

[0069] S302, acquiring an initial test tube image.

[0070] The description of step S302 can be referred to the relevant description of step S202 in the above embodiment, which will not be repeated here.

[0071] S304, using the image capture model according to the pixel information corresponding to each pixel point contained in the initial test tube image, the pixel points corresponding to the pixel information in the first pixel interval obtained through training are used as the initial image area corresponding to the test tube.

[0072] In some embodiments, the electronic device inputs the initial test tube image into the image capture model, and the image capture model can select the pixel points corresponding to the pixel information in the first pixel interval according to the pixel information corresponding to each pixel point contained in the initial test tube image as the initial image area corresponding to the test tube. The first pixel interval can be the interval of RGB values ​​in the pixel information, and specifically, the first pixel interval can be the interval of RGB values ​​in the RGB color space. For example, the first pixel interval may include a data interval [150, 200] corresponding to red data, a data interval [175, 210] corresponding to blue data, and a data interval [180, 235] corresponding to green data. Assuming that the RGB value of a pixel A in the initial test tube image is {red data: 160, blue data: 190, green data: 200}, and the RGB value of pixel B is {red data: 170, blue data: 165, green data: 175}, then the RGB values ​​of pixel A are all within the first pixel interval, while the blue data and green data in the RGB value of pixel B are not within the first pixel interval. Therefore, pixel A can be used as a pixel in the initial image area corresponding to the test tube, while pixel B cannot be used as a pixel in the initial image area.

[0073] As an optional implementation, the electronic device can train the image interception model to be trained through a sample test tube image set, the sample test tube image set includes multiple sample test tube images and a target interception area corresponding to each sample test tube image, intercept each sample test tube image through the image interception model to be trained to obtain a predicted interception area, and adjust the first pixel interval in the image interception model through the error between the target interception area corresponding to each sample test tube image and the predicted interception area to obtain a trained image interception model. The first pixel interval obtained through training of multiple sample test tube images can enable the image interception model to accurately intercept the initial image area of ​​the initial test tube image containing the supernatant, thereby ensuring the accuracy of the interpretation based on the image area in the test tube.

[0074] S306, identifying the test tube wall lines contained in the initial image area.

[0075] In some embodiments, the electronic device may identify the test tube wall lines contained in the initial image area based on image recognition technology, or may traverse the initial image area to identify the pixel points corresponding to the pixel information in the initial image area that meets the preset pixel conditions for screening out the tube wall lines as the test tube wall lines, wherein the pixel conditions for screening out the tube wall lines may include brightness data and / RGB values ​​for limiting the pixel points. After identifying the test tube wall lines contained in the initial image area, the electronic device may mark the pixel points on the test tube wall lines. Specifically, the pixel points on the test tube wall lines may be depicted in the same depiction color, which may be a color that is significantly different from the color of the supernatant, so that the electronic device can extract the image area inside the test tube contained in the initial image area based on the depicted test tube wall lines to obtain the image area inside the test tube.

[0076] S308, extracting the image area inside the test tube contained in the initial image area according to the test tube wall line.

[0077] In one embodiment, the electronic device can depict the pixel points on the test tube wall line and extract the image area surrounded by the depicted test tube wall line. After extracting the image area in the test tube, the electronic device can determine the area range of the image area in the test tube, reduce the area range, and then intercept the image area in the test tube according to the reduced area range to obtain a smaller image area in the test tube. By intercepting the smaller image area in the test tube, the pixel points on the test tube wall line can be further separated from the image area in the test tube to obtain an image area in the test tube that only contains the supernatant.

[0078] S310, identifying floating object pixel points corresponding to the blood floating objects contained in the image area in the test tube, and removing the floating object pixel points contained in the image area in the test tube to obtain a valid image area.

[0079] In some embodiments, there may be some floating objects in the supernatant, and the pixels of the floating objects may affect the interpretation of the test results in the subsequent interpretation process. For example, in a blood sample belonging to lipemia, due to the high fat content in the blood sample, a white fat layer will float on the supernatant of the blood sample. Since the pixel information corresponding to the pixels on the fat layer is similar to the pixel information corresponding to the pixels contained in the supernatant, both appear light in color and high in brightness on the initial test tube image, the fat layer may be extracted into the effective image area, thereby affecting the accuracy of the subsequent interpretation of the effective image area.

[0080] In some embodiments, the electronic device may obtain pixel values ​​corresponding to each pixel point included in the image area in the test tube; determine the pixel point in the image area in the test tube whose pixel value is in the second pixel interval corresponding to the blood floater as the floater pixel point. The electronic device may obtain the pixel values ​​corresponding to each pixel point by traversing each pixel point included in the image area in the test tube. Since the floaters appearing in the supernatant are not too complicated, the corresponding second pixel intervals may be specially formulated for each type of floater, so as to determine the first pixel point in the image area in the test tube whose pixel information is in the preset second pixel interval according to the second pixel intervals corresponding to each type of floater, thereby eliminating the first pixel point to obtain the effective image area. For example, the initial test tube image of the blood sample belonging to lipemia may be collected, and the pixel information of the pixel point of the fat layer in the initial test tube image of each blood sample belonging to lipemia may be extracted to determine the range of the pixel information corresponding to the pixel point in the fat layer as the second pixel interval of the floater belonging to lipemia, therefore, the first pixel point whose pixel information corresponding to the pixel point in the image area in the test tube is determined to belong to the second pixel area, so as to determine the pixel point on the fat layer, thereby eliminating the first pixel point to obtain the effective image area.

[0081] By setting a second pixel interval, the electronic device eliminates the first pixel point whose pixel information in the image area in the test tube is in the preset second pixel interval, thereby further ensuring that the effective image area only contains the image area of ​​the supernatant, avoiding other image areas from affecting the corresponding interpretation and detection results of the test tube, thereby improving the technical basis for improving the accuracy of the interpretation and detection results.

[0082] As an optional implementation, the electronic device can calculate the first image area corresponding to the effective image area, and calculate the second image area corresponding to the initial test tube image, and calculate the ratio between the first image area and the second image area to obtain a relative image ratio. If the relative image ratio is greater than a preset ratio threshold, the effective image area corresponding to the test tube is interpreted by the trained image interpretation model to obtain a reading detection result corresponding to the test tube.

[0083] Among them, the electronic device can count the number of pixels contained in the effective image area as the first image area corresponding to the effective image area. Similarly, it can also count the number of pixels contained in the initial test tube image as the second image area corresponding to the initial test tube image. At the same time, the relative image ratio can be determined by the ratio between the number of pixels contained in the effective image area and the number of pixels contained in the initial test tube image. The electronic device can determine whether the relative image ratio is greater than a preset ratio threshold. If the relative image ratio is less than or equal to the preset ratio threshold, the effective image area of ​​the acquired initial test tube image is extracted again. If the relative image ratio is greater than the preset ratio threshold, the effective image area corresponding to the test tube can be interpreted by the image interpretation model to obtain the corresponding interpretation detection result of the test tube.

[0084] The electronic device determines the relative image ratio based on the ratio between the first image area and the second image area, and interprets the effective image area when the relative image ratio is greater than a preset ratio threshold, thereby avoiding excessive extraction of the initial test tube image, thereby obtaining an effective image area with fewer pixels, which affects the interpretation of the effective image area.

[0085] Figure 4 FIG. 1 is a schematic diagram of obtaining an image region in a test tube in an embodiment. Figure 4 As shown, the electronic device can obtain the initial test tube image captured by photographing, and identify the initial test tube image according to the RGB color recognition system. The RGB color recognition system can extract red data, green data, and blue data corresponding to the pixels contained in the initial test tube image, and according to the red data, green data, and blue data of each pixel, eliminate the outer part of the test tube, the image part of the test tube wall, and the sediment part in the test tube, so as to obtain the image area inside the test tube.

[0086] S312, interpreting the effective image area through the trained image interpretation model to obtain the interpretation and detection result corresponding to the test tube.

[0087] The description of step S312 can be referred to the relevant description of step S208 in the above embodiment, which will not be repeated here.

[0088] In an embodiment of the present application, an image capture model is used, based on pixel information corresponding to each pixel point contained in the initial test tube image, to use the pixel points corresponding to the pixel information in the first pixel interval obtained through training as the initial image area corresponding to the test tube, to identify the test tube wall line contained in the initial image area, to extract the image area inside the test tube contained in the initial image area based on the test tube wall line, to obtain the image area inside the test tube, to perform floating object processing on the initial image area to remove the floating object pixels contained in the image area inside the test tube, to obtain the effective image area, to perform multiple image processing on the initial test tube image, to gradually extract the effective image area containing the supernatant, and to improve the accuracy of extracting the effective image area.

[0089] See also Figure 5 , Figure 5 The present invention discloses a flow chart of a method for interpreting the effective image area corresponding to the test tube by the trained image interpretation model to obtain the interpretation detection result corresponding to the test tube. In one embodiment, the step of interpreting the effective image area corresponding to the test tube by the trained image interpretation model to obtain the interpretation detection result corresponding to the test tube also includes the following steps:

[0090] S502: Statistically analyze the pixel information of each pixel point contained in the effective image area through the image interpretation model, and generate effective image features according to the statistical results.

[0091] In some embodiments, the electronic device may calculate one or more of the maximum value, minimum value, and average value of the pixel information corresponding to the multiple pixels contained in the effective image area, thereby obtaining effective image features. Further, the electronic device may calculate one or more of the maximum value, minimum value, and average value of the RGB values ​​corresponding to the multiple pixels, thereby calculating effective image features. For example, the electronic device may calculate that the average value of the red data corresponding to the pixels contained in the effective image area is 176, the average value of the blue data is 184, and the average value of the green data is 212, thereby obtaining effective image features of [176, 184, 212].

[0092] S504: The first interpretation module is used to interpret the effective image features to obtain the target interpretation category corresponding to the test tube.

[0093] In some embodiments, the first interpretation module can be used to determine the interpretation category corresponding to the test tube according to the effective image area. Furthermore, the first interpretation module can be constructed using a multivariate classification algorithm such as a decision tree or a random forest. The first interpretation module can be obtained by supervised learning through a sample effective feature set, wherein the sample effective feature set includes multiple sample effective features and target interpretation categories corresponding to each sample effective feature. The sample effective feature can be obtained by extracting features from the effective image area collected in the experiment.

[0094] As an optional implementation, the electronic device determines the feature range to which the pixel average value in the effective image feature belongs through the first interpretation module, and uses the interpretation category corresponding to the feature range as the interpretation category corresponding to the test tube. The feature range may include the range of feature data included in the effective image feature. For example, assuming that feature range 1 may include a data range of [170, 190] for red data, a data range of [180, 205] for blue data, and a data range of [200, 220] for green data, then the effective image feature A may be [176, 184, 212], and each feature data may be the average value of 176 for red data corresponding to the pixel points included in the effective image area, the average value of 184 for blue data, and the average value of 212 for green data, and the effective image feature A belongs to feature range 1. The first interpretation module may include multiple feature ranges, and each feature range has a corresponding interpretation category. The electronic device can efficiently determine the interpretation category corresponding to the feature range according to the feature range to which the effective image feature belongs, thereby improving the accuracy of determining the interpretation category, and the calculation is simple, making the interpretation of the test tube more efficient.

[0095] S506, determining the degree of interpretation corresponding to the target interpretation category according to the effective image features through a second interpretation module corresponding to the target interpretation category.

[0096] In some embodiments, the image interpretation model may include multiple second interpretation modules, each of which corresponds to an interpretation category. Therefore, according to the interpretation category corresponding to the test tube output by the first interpretation module, the second interpretation module corresponding to the interpretation category can be selected, so that the category degree analysis of the effective image features is performed through the second interpretation module to obtain the interpretation degree corresponding to the interpretation category.

[0097] Figure 6 is a schematic diagram of outputting the judgment and detection results in an embodiment, such as Figure 6 As shown, the electronic device acquires the collected initial test tube image and intercepts the image area where the supernatant is located in the initial test tube image to obtain the initial image area, captures and identifies the effective image area, interprets the effective image area according to the image interpretation model and outputs the interpretation detection result.

[0098] In an embodiment of the present application, a statistical analysis of pixel information of each pixel point contained in a valid image area is performed through an image interpretation model, and effective image features are generated based on the statistical results. The effective image features are interpreted by a first interpretation module to obtain a target interpretation category corresponding to the test tube. A second interpretation module corresponding to the target interpretation category is used to determine a degree of interpretation corresponding to the target interpretation category based on the effective image features, thereby improving the accuracy of the interpretation of the initial test tube image.

[0099] See also Figure 7 , Figure 7 Schematic diagram of the structure of a test tube image processing device disclosed in the embodiment of the present application. The device can be applied to the above electronic devices without specific limitation. Figure 7 As shown, the test tube image processing device 700 may include: an acquisition module 701 , a capture module 702 , a recognition module 703 and a judgment module 704 .

[0100] An acquisition module 701 is used to acquire an initial test tube image;

[0101] The capture module 702 is used to capture the initial test tube image to obtain an initial image region corresponding to the test tube; the initial image region includes the test tube wall line and the supernatant of the test tube;

[0102] The recognition module 703 is used to recognize the initial image area to extract the effective image area corresponding to the test tube; the effective image area refers to the image area corresponding to the supernatant of the test tube;

[0103] The interpretation module 704 is used to interpret the effective image area through the trained image interpretation model to obtain the interpretation detection result corresponding to the test tube.

[0104] In one embodiment, the capture module 702 is further used to use the image capture model to select the pixel points corresponding to the pixel information in the first pixel interval obtained through training as the initial image area corresponding to the test tube according to the pixel information corresponding to each pixel point contained in the initial test tube image.

[0105] In one embodiment, the recognition module further includes a pipe wall recognition unit, an image extraction unit, and an image processing unit:

[0106] A tube wall recognition unit, used for recognizing the tube wall line of the test tube contained in the initial image area;

[0107] An image extraction unit, used for extracting the image area inside the test tube contained in the initial image area according to the test tube wall line;

[0108] The image processing unit is used to identify the floating object pixel points corresponding to the blood floating objects contained in the image area in the test tube, and remove the floating object pixel points contained in the image area in the test tube to obtain a valid image area.

[0109] In one embodiment, the image processing unit is further used to obtain pixel values ​​corresponding to each pixel point contained in the image area in the test tube; and determine the pixel point in the image area in the test tube whose pixel value is in the second pixel interval corresponding to the blood floater as the floater pixel point.

[0110] In one embodiment, the test tube image processing device 700 further includes an area calculation module and a ratio determination module:

[0111] An area calculation module, used to calculate a first image area corresponding to the effective image area, and to calculate a second image area corresponding to the initial test tube image;

[0112] a ratio determination module, used to calculate the ratio between the first image area and the second image area to obtain a relative image ratio;

[0113] The interpretation module 704 is also used to interpret the effective image area corresponding to the test tube through the trained image interpretation model if the relative image ratio is greater than a preset ratio threshold, so as to obtain the interpretation detection result corresponding to the test tube.

[0114] In one embodiment, the judgment module 704 further includes a pixel statistics unit, a feature judgment unit, and a degree analysis unit:

[0115] A pixel statistics unit is used to perform statistical analysis on pixel information of each pixel point contained in the effective image area through an image interpretation model, and generate effective image features according to the statistical results;

[0116] A feature interpretation unit, used to interpret the effective image features through the first interpretation module to obtain the target interpretation category corresponding to the test tube;

[0117] The degree analysis unit is used to determine the degree of interpretation corresponding to the target interpretation category according to the effective image features through the second interpretation module corresponding to the target interpretation category.

[0118] In one embodiment, the feature interpretation unit is further used to determine the feature range to which the pixel average value in the effective image feature belongs through the first interpretation module, and use the interpretation category corresponding to the feature range as the interpretation category corresponding to the test tube.

[0119] In an embodiment of the present application, by performing image capture on the initial test tube image, an initial image area including the test tube wall line and the supernatant is preliminarily obtained, and the initial image area is identified, and the effective image area is further extracted to avoid interference of the image area of ​​the test tube wall line and other image areas in the interpretation and detection results. By interpreting the effective image area through an image interpretation model, the accuracy of test tube interpretation can be improved.

[0120] See also Figure 8 , Figure 8 It is a structural schematic diagram of an electronic device disclosed in an embodiment of the present application.

[0121] like Figure 8 As shown, the electronic device 800 may include:

[0122] A memory 801 storing executable program codes;

[0123] a processor 802 coupled to the memory 801;

[0124] The processor 802 calls the executable program code stored in the memory 801 to execute any test tube image processing method disclosed in the embodiments of the present application.

[0125] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by the processor, the processor implements any one of the test tube image processing methods disclosed in the embodiment of the present application.

[0126] The embodiments of the present application disclose a computer program product, including a computer program, and the computer program can be executed by a processor to implement the methods described in the above embodiments.

[0127] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. Those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required for the present application.

[0128] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the above-mentioned processes does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0129] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0130] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0131] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-accessible memory. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several requests for a computer device (which can be a personal computer, a server or a network device, etc., specifically a processor in a computer device) to perform some or all of the steps of the above-mentioned methods of various embodiments of the present application.

[0132] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0133] The above is a detailed introduction to a test tube image processing method, device, electronic device and storage medium disclosed in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for those of ordinary skill in the art, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present application.

Claims

1. A test tube image processing method, characterized in that: The method comprises: Acquire an initial test tube image; Performing image interception on the initial test tube image to obtain an initial image region corresponding to the test tube; the initial image region includes the test tube wall line and supernatant of the test tube; Identifying the initial image area to extract a valid image area corresponding to the test tube; the valid image area refers to an image area corresponding to the supernatant of the test tube; The effective image area is interpreted by the trained image interpretation model to obtain the interpretation detection result corresponding to the test tube.

2. The method according to claim 1, characterized in that The performing image interception on the initial test tube image to obtain an initial image region corresponding to the test tube includes: The image capture model uses the pixel information corresponding to each pixel point contained in the initial test tube image and uses the pixel points corresponding to the pixel information in the first pixel interval obtained through training as the initial image area corresponding to the test tube.

3. The method according to claim 1, characterized in that The identifying the initial image region to extract the effective image region corresponding to the test tube includes: Identifying the test tube wall line contained in the initial image area; Extracting the image area inside the test tube contained in the initial image area according to the test tube wall line; The floating object pixel points corresponding to the blood floating objects contained in the image area in the test tube are identified, and the floating object pixel points contained in the image area in the test tube are removed to obtain a valid image area.

4. The method according to claim 3, characterized in that The step of identifying floating object pixel points corresponding to the blood floating objects contained in the image area in the test tube and removing the floating object pixel points contained in the image area in the test tube to obtain a valid image area includes: Obtaining pixel values ​​corresponding to each pixel point contained in the image area in the test tube; A pixel point in the image region in the test tube whose pixel value is in a second pixel interval corresponding to the blood floater is determined as a floater pixel point.

5. The method according to claim 1, characterized in that Before the image interpretation model obtained through training interprets the effective image area to obtain the interpretation and detection result corresponding to the test tube, the method further includes: Calculating a first image area corresponding to the effective image region, and calculating a second image area corresponding to the initial test tube image; calculating a ratio between the first image area and the second image area to obtain a relative image ratio; The image interpretation model obtained through training interprets the effective image area to obtain the interpretation detection result corresponding to the test tube, including: If the relative image ratio is greater than a preset ratio threshold, the effective image area corresponding to the test tube is interpreted by the trained image interpretation model to obtain the interpretation detection result corresponding to the test tube.

6. The method according to claim 1, characterized in that The judgment detection result corresponding to the test tube includes the target interpretation category corresponding to the test tube and the interpretation degree corresponding to the target interpretation category; the image interpretation model includes a first interpretation module and a plurality of second interpretation modules; The image interpretation model obtained through training interprets the effective image area to obtain the interpretation detection result corresponding to the test tube, including: Statistically analyzing pixel information of each pixel point contained in the effective image area through the image interpretation model, and generating effective image features according to the statistical results; The effective image features are interpreted by the first interpretation module to obtain a target interpretation category corresponding to the test tube; The second interpretation module corresponding to the target interpretation category is used to determine the interpretation degree corresponding to the target interpretation category according to the effective image feature.

7. The method according to claim 6, characterized in that The first interpretation module is used to interpret the effective image features to obtain the target interpretation category corresponding to the test tube, including: The first interpretation module determines the feature range to which the pixel average value in the effective image feature belongs, and uses the interpretation category corresponding to the feature range as the interpretation category corresponding to the test tube.

8. A test tube image processing device, characterized in that: include: An acquisition module, used for acquiring an initial test tube image; A capture module, used to capture the initial test tube image to obtain an initial image area corresponding to the test tube; The initial image area includes the test tube wall line and the supernatant of the test tube; A recognition module, used to recognize the initial image area to extract the effective image area corresponding to the test tube; the effective image area refers to the image area corresponding to the supernatant of the test tube; The interpretation module is used to interpret the effective image area through the trained image interpretation model to obtain the interpretation detection result corresponding to the test tube.

9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor implements the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Serum quality discriminating method

    CN108562584A

  • Serum quality identification method and device based on neural network, equipment and medium

    CN114332058A

  • Image impurity removal method and device, equipment and storage medium

    CN114418880A

  • Lubricating oil impurity pollution detection method and device based on artificial intelligence

    CN117115494A

  • Micro-column gel card agglutination test result identification system and blood grouping analyzer

    WO2019000740A1