Evaluation method and device for detection kit, readable storage medium and electronic device
By using the position determination method of templates and marking lines in in vitro diagnostic equipment, the problem of insufficient anti-interference of the equipment in complex environments is solved, and the accuracy and stability of the interpretation results are improved.
Patent Information
- Application Number
- CN202410834498.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-06-25
AI Technical Summary
Existing in vitro diagnostic equipment has weak anti-interference in complex usage environments, resulting in insufficient accuracy and stability of interpretation results.
By intercepting the test strip image of the object detection kit on the original image based on the first template, the second template and the preset deviation value, and determining the identification line position using the reference position of the identification line and the third template, the image is converted into a grayscale image , evaluate the properties of proteins.
It improves the accuracy and stability of the identification line identification of the detection kit, enhances the anti-interference of the equipment, and improves the accuracy and stability of the interpretation results.
Smart Images

Figure CN118735880B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of in vitro detection technology, and specifically relates to an evaluation method and device for a detection kit, a readable storage medium and an electronic device Background Art
[0002] Immunoblotting, also known as protein blotting, is a method for detecting a certain protein in a complex sample based on the specific binding of antigen and antibody. It has become the most commonly used method for detecting protein characteristics, expression and distribution due to its advantages such as large analytical capacity, high sensitivity and strong specificity.
[0003] In the medical field, both manual and automatic detection of immunoblotting are widely used. Among them, manual detection has the disadvantages of strong subjectivity, low efficiency, and easy errors, while automatic detection is easily interfered with and misidentified in complex use environments, and its anti-interference ability is weak and its stability is insufficient. Summary of the invention
[0004] The purpose of the present invention is to provide an evaluation method and device for a detection kit, a readable storage medium and an electronic device, aiming to improve the anti-interference ability of in vitro diagnostic equipment and thereby improve the accuracy and stability of its interpretation results.
[0005] To achieve the above object, the present invention provides a method for evaluating a detection kit, comprising:
[0006] Based on the first template, the second template and the preset deviation value, a test paper image of the target detection kit is intercepted on the first original image; and the image of the target detection kit is displayed on the first original image;
[0007] Determine the position of the identification line of the target detection kit on its test paper image based on the reference position of the identification line and the third template; the identification line includes a quality control identification line and at least one detection identification line;
[0008] Converting the test paper image of the target detection kit into a target grayscale image;
[0009] Determine a first target area in the target grayscale image based on the position of the identification line of the target detection kit on its test paper image;
[0010] The characteristics of the protein detected by the target detection kit are evaluated based on the grayscale value of the first target area; the first template includes an image of the first detection kit; the second template includes an image of a test paper, a part of the label, and a part of the shell located between the test paper and the label of the first detection kit; the preset deviation value is the distance between the edge of the second template away from the test paper and the edge of the test paper close to the label; the third template includes an image of the quality control identification line of the first detection kit; the quality control identification line of the first detection kit is colored; the reference position of the identification line is determined based on the image of the second detection kit, at least two of the identification lines of the second detection kit are colored, and the colored identification lines are evenly distributed on the second detection kit.
[0011] Optionally, the size of the first original image is x1×y1; the central axis of the target detection kit image extending along the x direction coincides with the central axis of the first original image extending along the x direction;
[0012] The size of the first template is x2×y2;
[0013] The step of intercepting the test paper image of the target detection kit on the first original image based on the first template, the second template and the preset deviation value includes:
[0014] The normalized correlation coefficient matching method is performed on the second target area of the first original image and the first template to obtain a first matching result matrix; the positions of the two ends of the first original image in the y direction are 0 and y1 respectively, and the positions of the two ends of the second target area in the y direction are and
[0015] Obtaining the position of the maximum value in the first matching result matrix on the first original image as the position of the target detection kit image on the first original image;
[0016] intercepting an intermediate transition image on the first original image based on the position of the target detection kit image on the first original image, and displaying the target detection kit image on the intermediate transition image;
[0017] Performing a normalized correlation coefficient matching method on the intermediate transition image and the second template to obtain a second matching result matrix;
[0018] Obtaining the position of the maximum value in the second matching result matrix on the intermediate transition image as the position of the image of the test paper, a portion of the label, and a portion of the shell between the test paper and the label of the target detection kit on the intermediate transition image;
[0019] Determine the position of the test paper image of the target detection kit on the intermediate transition image based on the positions of the images of the test paper of the target detection kit, a portion of the label, and a portion of the housing between the test paper and the label on the intermediate transition image, and the preset deviation value;
[0020] The test paper image of the target detection kit is intercepted on the intermediate transition image based on the position of the test paper image of the target detection kit on the intermediate transition image.
[0021] Optionally, the step of determining the position of the identification line of the target detection kit on the test paper image thereof based on the reference position of the identification line and the third template includes:
[0022] Determine the position of the quality control identification line of the target detection kit on its test paper image based on the reference position of the quality control identification line, the reference position of a detection identification line adjacent to the quality control identification line, and the third template; and
[0023] The position of the detection identification line of the target detection kit on the test paper image is determined based on the position of the quality control identification line of the target detection kit on the test paper image and the reference position of the detection identification line.
[0024] Optionally, the reference position of the quality control mark line is x 01 , the reference position of the detection identification line adjacent to the quality control identification line is x 02 ; The size of the third template is x3×y3;
[0025] The step of determining the position of the quality control identification line of the target detection kit on its test paper image based on the reference position of the quality control identification line, the reference position of a detection identification line adjacent to the quality control identification line, and the third template comprises:
[0026] The normalized correlation coefficient matching method is performed on the third target area in the test paper image of the target detection kit and the third template to obtain a third matching result matrix; the positions of the two ends of the third target area in the x direction are respectively and
[0027] Obtaining the position of the maximum value in the third matching result matrix on the test paper image of the target detection kit, and determining the position of the quality control identification line of the target detection kit in the test paper image of the target detection kit based on the position of the maximum value in the third matching result matrix on the test paper image of the target detection kit and the size of the third template;
[0028] The position of the maximum value in the third matching result matrix on the test paper image of the target detection kit is x′, and the position of the quality control identification line of the target detection kit in its test paper image is
[0029] Optionally, the step of determining the position of the detection identification line of the target detection kit on the test paper image thereof based on the position of the quality control identification line of the target detection kit on the test paper image thereof and the reference position of the detection identification line comprises:
[0030] Based on the position of the quality control identification line of the target detection kit on its test paper image and the reference position of the detection identification line, the test paper image of the target detection kit is divided into regions to obtain a plurality of partitions, wherein the plurality of partitions are arranged in sequence along the x direction;
[0031] Performing a normalized correlation coefficient matching method on at least the other partitions except the partition where the quality control identification line of the target detection kit is located and the third template to obtain a plurality of fourth matching result matrices;
[0032] Obtain the maximum value in each of the fourth matching result matrices, and determine whether the maximum value in each of the fourth matching result matrices meets the preset conditions. If so, use the position of the corresponding maximum value in the fourth matching result matrix on the test paper image of the target detection kit as the position of the corresponding identification line in the partition on the test paper image of the target detection kit; if not, use the reference position of the corresponding identification line as the position of the corresponding identification line in the partition on the test paper image of the target detection kit.
[0033] Optionally, the boundary position of two adjacent partitions is located in the middle of the reference positions of the corresponding two identification lines; the position of the first partition away from the boundary line of the second partition and the position of the boundary line between the first partition and the second partition are symmetrical about the reference position of the identification line corresponding to the first partition; the position of the last partition away from the boundary line of the second-to-last partition and the position of the boundary line between the last partition and the second-to-last partition are symmetrical about the reference position of the identification line corresponding to the last partition; and / or,
[0034] The preset condition is greater than or equal to a preset value.
[0035] Optionally, the step of converting the target detection kit image into a target grayscale image comprises:
[0036] Converting the test paper image of the target detection kit after completing the area division into a first grayscale image;
[0037] Calculating an average value of the grayscale values of each column of pixels in the first grayscale image to obtain reference grayscale values corresponding to each column of pixels in the first grayscale image, and obtaining a maximum reference grayscale value and a minimum reference grayscale value;
[0038] Based on all the reference grayscale values, the first grayscale image is converted into a second grayscale image of 1 row×n columns; the grayscale value of each pixel in the second grayscale image corresponds to the reference grayscale value;
[0039] Grayscale compensation is performed on each of the subareas of the second grayscale image based on the maximum reference grayscale value and the minimum reference grayscale value to obtain the target grayscale image.
[0040] Optionally, the step of performing grayscale compensation on each of the subareas of the second grayscale image based on the maximum reference grayscale value and the minimum reference grayscale value comprises:
[0041] Subtract the minimum reference grayscale value from the grayscale value of each pixel in the second grayscale image to obtain a third grayscale image;
[0042] Obtaining the maximum grayscale value in each of the partitions in the third grayscale image;
[0043] Calculating an absolute value of a difference between a maximum grayscale value in each of the partitions in the third grayscale image and the maximum reference grayscale value as a grayscale compensation value of each of the partitions;
[0044] The grayscale value of each pixel point of each partition in the third grayscale image is added to the corresponding grayscale compensation value to obtain the target grayscale image.
[0045] Optionally, the width of each identification line is p pixels, where p is an even number greater than or equal to 2, and is an integer; the positions of the two ends of the first target area in the i-th partition in the x direction are respectively and x i is the position of the identification line in the i-th partition on the target grayscale image; i is an integer greater than or equal to 1; and / or,
[0046] The step of evaluating the characteristic of the protein detected by the target detection kit based on the grayscale value of the first target area in the target grayscale image comprises:
[0047] Obtaining q times the average grayscale value of all pixels in each first target area as the reference optical density data of the corresponding subarea, where q is a positive integer greater than or equal to 2;
[0048] Obtaining the concentration value of the detected protein based on the reference optical density data of each partition and a predetermined optical density-protein concentration relationship;
[0049] The identity of the protein is evaluated based on the concentration values of the detected protein.
[0050] Optionally, the method further includes acquiring the first template, the second template, a preset deviation value, and the third template based on a second original image; the second original image includes a first detection kit image;
[0051] The step of acquiring the first template, the second template, the preset deviation value, and the third template based on the second original image includes:
[0052] Determine, on the second original image, based on straight line matching, other first edge lines of the shell of the first detection kit except the side close to the label, and determine a second edge line of the side of the label of the first detection kit away from the shell;
[0053] Cutting out, from the second original image, an area enclosed by the first edge line of the shell of the first detection kit except the side close to the label and the second edge line of the side of the label away from the shell as the first template;
[0054] Determine all third edge lines of the window of the first detection kit on the first template based on straight line matching;
[0055] A third edge line of the window of the first detection kit close to the label is translated along the direction from the test paper to the label to obtain a fourth edge line, wherein the fourth edge line is located on a side of the intersection line of the housing of the first detection kit and the label close to the label;
[0056] On the first template, an area enclosed by the fourth edge line and the third edge lines of the window of the first detection kit except the third edge line close to the label is intercepted to serve as the second template; and a translation distance of the third edge line of the window of the first detection kit close to the label is used as the preset deviation value;
[0057] Determine all fifth edge lines of the quality control identification line of the first detection kit in one of the second original image, the first template, and the second template based on straight line matching;
[0058] In the corresponding image, all areas enclosed by the fifth edge lines are intercepted to serve as the third template.
[0059] Optionally, the method further includes: acquiring the reference position of the identification line based on a third original image including an image of the second detection kit;
[0060] The step of acquiring the reference position of the identification line based on the third original image including the second detection kit image comprises:
[0061] Determine, on the third original image, at least based on a straight line matching method, a third edge line of the window of the second detection kit on a side close to the quality control identification line and a position of each of the identification lines;
[0062] Based on the position of the quality control identification line of the second detection kit and the third edge line of the test paper of the second detection kit on the side close to the quality control identification line, obtain the position of the quality control identification line of the second detection kit relative to the third edge line of the window of the second detection kit on the side away from the label, as the reference position of the quality control identification line;
[0063] Based on the positions of the detection identification line and the quality control identification line of the second detection kit, the position of each detection identification line of the second detection kit relative to the quality control identification line is obtained as a reference position of each detection identification line.
[0064] To achieve the above object, the present invention further provides a computer-readable storage medium having a program stored thereon, and when the program is executed, the evaluation method of the detection kit as described above is executed.
[0065] To achieve the above objective, the present invention further provides an electronic device, comprising a processor and the computer-readable storage medium as described above, wherein the processor is used to execute a program stored on the computer-readable storage medium.
[0066] To achieve the above-mentioned purpose, the present invention also provides an evaluation device for a detection kit, comprising a camera and a control unit, wherein the camera is at least used to obtain the first original image; the control unit is communicatively connected to the camera and is configured to receive the first original image and execute the evaluation method of the detection kit as described above.
[0067] Compared with the prior art, the evaluation method and device, readable storage medium and electronic device of the detection kit of the present invention have the following advantages:
[0068] The aforementioned evaluation method of the detection kit includes: intercepting a test paper image of the target detection kit on a first original image based on a first template, a second template and a preset deviation value; the first original image displays the target detection kit image; determining the position of the identification line of the target detection kit on its test paper image based on the reference position of the identification line and a third template; the identification line includes a quality control identification line and at least one detection identification line; converting the target detection kit image into a target grayscale image; determining a first target area in the target grayscale image based on the position of the identification line of the target detection kit on its test paper image; and evaluating the target detection kit based on the grayscale value of the first target area. The characteristics of the protein detected by the kit; the first template includes the image of the first detection kit, the second template includes the image of the test paper of the first detection kit, a part of the label, and the part of the shell located between the test paper and the label; the preset deviation value is the distance between the edge of the second template away from the test paper and the edge of the test paper close to the label; the third template includes the image of the quality control identification line of the first detection kit; the quality control identification line of the first detection kit is colored; the reference position of the identification line is determined based on the image of the second detection kit, at least two identification lines of the second detection kit are colored, and the colored identification lines are evenly distributed on the second detection kit. The test paper image of the target detection kit is intercepted by using the first template, the second template, and the preset deviation value, and the position of the identification line of the target detection kit on its test paper image is located by using the third template and the reference position of the identification line, which improves the recognition accuracy and stability of the identification line of the target detection kit, and there is no need to locate the detection kit, thereby improving the processing speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0070] Figure 1 is a schematic diagram of a detection kit in the prior art, in which at least part of the identification line of the detection kit is colored;
[0071] Figure 2 A schematic diagram of a first template in an evaluation method of a detection kit provided by the present invention according to one embodiment;
[0072] Figure 3 is a schematic diagram of a second template in the evaluation method of a detection kit provided according to one embodiment of the present invention;
[0073] Figure 4 is a schematic diagram of a first original image in a method for evaluating a detection kit provided according to an embodiment of the present invention;
[0074] Figure 5 is a schematic diagram of a target test paper image of a target detection kit in a method for evaluating a detection kit provided according to an embodiment of the present invention;
[0075] Figure 6 is a schematic diagram of a second original image in the evaluation method of the detection kit provided according to one embodiment of the present invention;
[0076] Figure 7 is a schematic diagram of obtaining a first rectangular area in a second original image in a method for evaluating a detection kit provided according to an embodiment of the present invention;
[0077] Figure 8 It is a schematic diagram of obtaining a third edge line and a fourth edge line of a test paper of a first detection kit in a first template in a method for evaluating a detection kit provided by an embodiment of the present invention;
[0078] Fig. 9 It is a schematic diagram of obtaining the fifth edge line of the quality control identification line 210 of the first detection kit in the second template in the evaluation method of the detection kit provided according to one embodiment of the present invention;
[0079] Fig.10 is a schematic diagram of a third original image in the evaluation method of the detection kit provided according to one embodiment of the present invention;
[0080] Fig.11 It is a schematic diagram of obtaining the position of the third edge line of the test paper of the second test kit away from the label and the positions of each identification line 210 in the evaluation method of the test kit provided according to one embodiment of the present invention;
[0081] Fig.12 is a schematic diagram of a second target area of a first original image in an evaluation method of a detection kit provided according to an embodiment of the present invention;
[0082] Fig.13 is a schematic diagram of an intermediate transition image captured from a first original image in a method for evaluating a detection kit provided according to an embodiment of the present invention;
[0083] Fig.14 It is a schematic diagram of obtaining the position of the quality control identification line 210 of the target detection kit on its test paper image in the evaluation method of the detection kit provided according to one embodiment of the present invention;
[0084] Fig.15 It is a schematic diagram of dividing the test paper image of the target detection kit in the evaluation method of the detection kit provided according to one embodiment of the present invention.
[0085] [Description of reference numerals is as follows]:
[0086] 100-housing, 101-intersection line, 200-test paper, 210-identification line, 211-quality control identification line, 212-detection identification line, 300-label;
[0087] 1-target detection kit image, 2-target test paper image, 21-third target area, 22-partition, 3-first detection kit image, 4-second detection kit image, 5-intermediate transition image;
[0088] 01-first original image, 011-second target area, 02-second original image, 03-third original image, 001-fourth edge line;
[0089] 10-first template, 20-second template. DETAILED DESCRIPTION
[0090] The following is an explanation of the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the present embodiment only illustrate the basic concept of the present invention in a schematic manner, and only the components related to the present invention are shown in the figure instead of being drawn according to the number, shape and size of the components in the actual implementation. The type, quantity and proportion of each component in the actual implementation can be a random change, and the component layout type may also be more complicated.
[0091] In addition, each embodiment of the following description has one or more technical features, but this does not mean that the user of the present invention must implement all the technical features in any embodiment at the same time, or can only implement part or all of the technical features in different embodiments separately. In other words, under the premise that implementation is possible, those skilled in the art can selectively implement part or all of the technical features in any embodiment according to the disclosure of the present invention and according to the design specifications or implementation requirements, or selectively implement a combination of part or all of the technical features in multiple embodiments, thereby increasing the flexibility of the implementation of the present invention.
[0092] As used in this specification, the singular forms "one", "an", and "the" include plural objects, and the plural form "a plurality" includes more than two objects, unless the content clearly indicates otherwise. As used in this specification, the term "or" is generally used in a sense that includes "and / or", unless the content clearly indicates otherwise, and the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection. It can be a mechanical connection or an electrical connection. It can be directly connected or indirectly connected through an intermediate medium, and it can be a connection between two elements or an interactive relationship between two elements. Relational terms such as the terms "first", "second", etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations, nor do they indicate or imply relative importance or implicitly indicate the number of technical features indicated. It should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "axial", "radial", "circumferential" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0093] One of the purposes of the present invention is to provide an evaluation method for a detection kit, which is intended to evaluate the characteristics of a protein detected by the detection kit. The evaluation method has the advantages of strong anti-interference, high stability and accurate interpretation results.
[0094] The detection kit can work based on the immunoblotting method or the colloidal gold method.
[0095] In order to make the purpose, advantages and features of the present invention more clear, the present invention is further described in detail below with reference to the accompanying drawings. It should be noted that the accompanying drawings are all in a very simplified form and are not in precise proportions, and are only used to conveniently and clearly assist in explaining the purpose of the embodiments of the present invention. The same or similar reference numerals in the accompanying drawings represent the same or similar components.
[0096] To facilitate understanding of the evaluation method of the detection kit provided by the present invention, the configuration of the detection kit is first briefly introduced.
[0097] Figure 1A schematic diagram of a detection kit is shown. Figure 1 As shown, the detection kit includes a housing 100 , a test paper 200 and a label 300 .
[0098] The housing 100 is provided with a window (not marked in the figure). The test paper 200 is arranged in the housing 100, and the test paper 200 is at least partially visible to the outside through the window. The test paper 200 is also provided with a plurality of identification lines 210, and all of the identification lines 210 are located at the window. Each of the identification lines 210 extends along the y direction, and all of the identification lines 210 are arranged in sequence along the x direction. One of the identification lines 210 is a quality control identification line 211, and all of the remaining identification lines 210 are detection identification lines 212, and all of the detection identification lines 212 are located on one side of the quality control identification line 211.
[0099] Those skilled in the art know that when the test kit is not used, all the identification lines 210 are not colored (i.e., all the identification lines 210 are not visible), and when the test kit is used and is effective, the quality control identification line 211 is colored, and all the detection identification lines 212 are not colored, or at least partially colored, according to the characteristics of the protein in the sample being tested. It is understood that the colored identification lines 210 are visible to the outside through the window.
[0100] Those skilled in the art know that when the detection kit works based on the immunoblotting method, the number of the detection identification line 212 is at least one, usually multiple, and the quality control identification line 211 and the multiple detection identification lines 212 are distributed at equal intervals or substantially equal intervals. When the detection kit works based on the colloidal gold method, the number of the detection identification line 212 is one.
[0101] The label 300 is connected to one side of the housing 100, and the label 300 and the housing 100 intersect at an intersection line 101, and the intersection line 101 constitutes a boundary line between the label 300 and the housing 100. In some examples, the label 300 and the housing 100 are arranged along the x direction, and the label 300 is located on a side where all the detection identification lines 212 are away from the quality control identification line 211, or the label 300 is located on a side where the quality control identification line 211 is away from all the detection identification lines 212.
[0102] It is understandable that the mark (not shown in the figure) on the label 300 shows predetermined information, such as the type of the detection kit, or a series of serial numbers of the detection kits of the same type, etc. The specific information is determined according to actual conditions.
[0103] The evaluation method of the detection kit provided in the embodiment of the present invention is used to evaluate the characteristics of the protein detected by the used and effective target detection kit. The evaluation method can be automatically executed by a control unit to automatically evaluate the characteristics of the protein detected by the detection kit.
[0104] The evaluation methods include:
[0105] Step S1, based on the first template 10; (such as Figure 2 As shown), the second template 20; (as Figure 3 As shown), and the preset deviation value includes the first original image 01 of the target detection kit image 1; (as shown Figure 4 For the convenience of description, the test paper image of the target detection kit is uniformly referred to as the target test paper image 2 in the following text. Figure 5 shown.
[0106] Step S2, positioning the identification line 210 of the target detection kit based on the reference position of the identification line 210 and a third template (not shown in the figure) to determine the position of the identification line 210 of the target detection kit on the target test paper image 2.
[0107] Step S3: convert the target test paper image 2 into a target grayscale image (not shown in the figure).
[0108] Step S4: determine the first target area (not shown) on the target grayscale image based on the position of the identification line 210 of the target detection kit on the target test paper image 2. It can be understood that the number of the first target areas is the same as the number of the identification lines 210.
[0109] Step S5: evaluating the characteristics of the protein detected by the target detection kit based on the grayscale value of the first target area.
[0110] Wherein, the first template 10 includes a first detection kit image 3; (such as Figure 6As shown). The second template 20 includes the test paper 200 of the first detection kit, a portion of the label 300 of the first detection kit, and the image of the portion of the housing 100 of the first detection kit located between the test paper 200 and the label 300, that is, at least a partial image of the intersection line 101 of the housing 100 and the label 300 of the first detection kit is displayed on the second template 20. The preset deviation value is the distance between the edge of the second template 20 away from the test paper 200 and the edge of the test paper 200 close to the label 300. The third template includes the image of the quality control identification line 211 of the first detection kit. The quality control identification line 211 of the first detection kit is colored, and the detection identification line 212 can be completely non-colored or at least partially colored, but in a preferred embodiment, all the detection identification lines 212 of the first detection kit are completely non-colored.
[0111] The reference position of the identification line 210 is based on the second detection kit image 4; (eg Fig.10 and Fig.11 As shown). At least two of the identification lines 210 of the second detection kit are colored. It can be understood that when the detection kit works based on the colloidal gold method, the quality control identification line 211 and the detection identification line 212 are all colored. When the detection kit works based on the immunoblotting method, preferably all of the identification lines 210 are colored. If only part of the identification lines 210 are colored, the colored identification lines 210 are required to be evenly distributed on the second detection kit. Here, the meaning of the colored identification lines 210 being evenly distributed on the second detection kit is that the colored identification lines 210 are distributed at equal intervals or substantially equal intervals.
[0112] It should also be noted that the target detection kit is the same detection kit as the first detection kit and the second detection kit.
[0113] In the evaluation method provided in the embodiment of the present invention, the target test paper image 2 is acquired by using the first template 10, the second template 20, and the preset deviation value, and the position of the identification line 210 of the target detection kit on the target test paper image 2 is calibrated using the third template and the reference position of the identification line 210, thereby improving the recognition accuracy and stability of the identification line 210 of the target detection kit, and also eliminating the need to locate the detection kit, thereby improving the processing speed.
[0114] In some embodiments, the first template 10, the second template 20, the third template, the preset deviation value, and the reference position of the identification line 210 are pre-stored in the control unit. When actually evaluating the characteristics of the protein detected by the target detection kit, the control unit directly calls the first template 10, the second template 20, the third template, the preset deviation value, and the reference position of the identification line 210 corresponding to the type of the target detection kit. In other embodiments, the evaluation method also includes step S0 performed before step S1, and step S0 includes based on the second original image 02; (e.g. Figure 6 As shown) obtain the first template 10, the second template 20, the third template, the preset deviation value, and, based on the third original image 03; (as shown Fig.10 ) to obtain the reference position of the identification line 210. It can be understood that the first detection kit image 3 is displayed in the second original image 02, and the second detection kit image 4 is displayed on the third original image 03.
[0115] It should be noted that the first original image 01, the second original image 02 and the third original image 03 are all color images. Moreover, in the first original image 01, the second original image 02 and the third original image 03, the width of the identification line 210 of the detection kit is p pixels. In this article, "the width of the identification line 210" refers to the number of pixels occupied by the identification line 210 in the x direction.
[0116] Next, each step of the evaluation method will be described in detail by taking the evaluation method including step S0 to step S4 as an example.
[0117] Herein, the edge line of the shell 100 of the detection kit is referred to as the first edge line, the edge line of the label 300 is referred to as the second edge line, the edge of the window is referred to as the third edge line, and the edge line of the identification line 210 is referred to as the fifth edge line. Since the shell 100, the window, and the label 300 are all rectangular, the number of the first edge lines, the number of the second edge lines, and the number of the third edge lines are all four, and one second edge line partially overlaps with one first edge line. In the second original image 02, the identification line 210 is a straight line, so the number of the fifth edge lines is also four.
[0118] The operation of obtaining the first template 10 in step S0 includes:
[0119] Step S01: Determine the other three first edge lines of the shell 100 of the first detection kit on the second original image 02, except the side close to the label 300, and determine a second edge line of the label 300 of the first detection kit away from the shell 100, based on the straight line matching method. For ease of description, the three first edge lines of the shell 100 of the first detection kit, except the side close to the label 300, are respectively recorded as first edge line a, first edge line b, and first edge line c, and the second edge line of the label 300 of the first detection kit away from the shell 100 is recorded as second edge line a (e.g., Figure 7 shown).
[0120] Step 02: intercept a first rectangular area enclosed by the first edge line a, the first edge line b, the first edge line c, and the second edge line a on the second original image 02 to serve as the first template 10. The size of the first template 10 is x2×y2.
[0121] The operation of obtaining the second template 20 and the preset deviation value in step S0 includes:
[0122] Step S03: Determine all the third edge lines of the window of the first detection kit on the first template 10 based on straight line matching. The four third edge lines are respectively referred to as third edge line a, third edge line b, third edge line c and third edge line d; (e.g. Figure 8 As shown), wherein the third edge line d is close to the label 300.
[0123] Step S04: translate the third edge line d along the direction from the test paper 200 to the label 300 until the third edge line d reaches the intersection line 101 close to the label 300. The translated third edge line d is referred to as a fourth edge line 001.
[0124] Step S05: intercepting a second rectangular area enclosed by the fourth edge line 001, the third edge line a, the third edge line b, and the third edge line c on the first template 10 as the second template 20. And obtaining a distance D between the fourth edge line 001 and the third edge line d before translation as the preset deviation value, that is, the preset deviation value is D.
[0125] A partial image of the intersection line 101 is displayed in the second template 20. The reason for this is that the intersection line 101 is a relatively obvious feature, and displaying it in the second template 20 is conducive to improving the accuracy of the target image test paper image 2 obtained when the target test paper image 2 is obtained based on the second template 20.
[0126] The operation of obtaining the third template in step S0 includes:
[0127] Step S06: Determine four fifth edge lines of the quality control identification line 211 of the first detection kit on any one of the second original image 02, the first template 10, and the second template 20 based on straight line matching, which are the fifth edge line a, the fifth edge line b, the fifth edge line c, and the fifth edge line d (such as Fig. 9 shown).
[0128] Step S07: intercepting the area enclosed by the fifth edge line a, the fifth edge line b, the fifth edge line c, and the fifth edge line d on the corresponding image to serve as the third template. The size of the third template is x3×y3.
[0129] The operation of acquiring the reference position of the identification line 210 in the step S0 includes the following steps S08 and S09.
[0130] Wherein, the step S08 includes determining the third edge line of the window of the second detection kit close to the quality control identification line 211 and the position of each colored identification line 210 on the third original image 03 based on straight line matching.
[0131] In this step, if Fig.11 As shown, the third edge line of the window of the second detection kit close to the quality control identification line 211 is called the third edge line b. The position of the third edge line b in the x direction is recorded as x 10 , the identification lines 210 are numbered according to the direction away from the third edge line b, and the position of each identification line 210 in the x direction is recorded as x 11 、x 12 、x 13 ……x 1j 、x 1j+1 That is, the position of the quality control identification line 211 of the second detection kit on the third original image 03 is x 11 , the position of the first detection identification line 212 on the third original image 03 is x 12 , the position of the second detection identification line 212 on the third original image 03 is x13 ...The position of the j-1th detection identification line 212 on the third original image 03 is x 1j , the position of the jth detection identification line 212 on the third original image 03 is x 1j+1 j is a positive integer greater than or equal to 1, and there are j detection identification lines 212 on the test paper 200 of the second detection kit, or there are j+1 identification lines 210 on the test paper 200 of the second detection kit. The first detection identification line 212 is adjacent to the quality control identification line 211.
[0132] As mentioned above, the target detection kit, the first detection kit and the second detection kit are the same, and therefore, the test paper 200 of the first detection kit and the target detection kit also has j detection identification lines 212, or in other words, the test paper 200 of the first detection kit and the target detection kit has j+1 identification lines 210.
[0133] It should be noted that when determining the positions of the third edge line b and the identification line 210 of the second detection kit on the third original image 03, any appropriate point on the third original image 03 can be used as the origin of the coordinate system, for example, Fig.11 Point O1 in Fig.11 The lower left vertex in the coordinate system is the origin of the coordinate system. It should also be noted that if all the identification lines 210 on the second detection kit are colored, the positions of all the identification lines 210 on the third original image 03 can be directly determined based on the straight line matching method. If only part of the identification lines 210 on the second detection kit are colored, and all the colored identification lines 210 are evenly spaced or substantially evenly spaced, based on the distance between two adjacent identification lines 210 known at the time of production, the distance between two adjacent identification lines 210 that have been colored, and the position of the identification lines 210 that have been colored on the third original image 03, the position of the uncolored identification lines 210 on the third original image 03 can be calculated.
[0134] The step S09 includes obtaining the position of the quality control identification line 211 of the second detection kit relative to the third edge line b of the second detection kit as the reference position of the quality control identification line 211. And, obtaining the position of each of the detection identification lines 212 relative to the quality control identification line 211 as the reference position of each of the detection identification lines 212. In other words, the reference position of the quality control identification line 211 is recorded as x 01 , the reference position of the first detection identification line 212 is recorded as x 02, the reference position of the second detection identification line 212 is recorded as x 03 ... The reference position of the j-1th detection identification line 212 is recorded as x 0j , the reference position of the jth detection identification line 212 is recorded as x 0j+1 When x 01 =x 11 -x 10 , x 02 =x 12 -x 11 , x 03 =x 13 -x 11 ……x 0j =x 1j -x 11 , x 0j+1 =x 1j+1 -x 11 .
[0135] The size of the first original image 01 is x1×y1. In some examples, a plurality of detection kit images are displayed on the first original image 01, and one of the plurality of detection kit images is the target detection kit image 1. In other examples, only one detection kit image, namely the target detection kit image 1, is displayed on the first original image 01. However, no matter which method is used, the target detection kit image 1 is basically located in the middle of the first original image 01, so that the central axis of the target detection kit image 1 extending in the x direction coincides with the central axis of the first original image 01 extending in the x direction. It should be noted that the coincidence here includes the situation where the central axis of the target detection kit image 1 extending in the x direction completely coincides with the central axis of the first original image 01 extending in the x direction, and also includes the situation where the deviation between the two is less than the first preset value. It should be understood that when the central axis of the target detection kit image 1 extending along the x direction is parallel to the central axis of the first original image 01 extending along the x direction, the first preset value is a distance value, and when the central axis of the target detection kit image 1 extending along the x direction intersects with the central axis of the first original image 01 extending along the x direction, the first preset value is an angle value. In other words, the central axis of the target detection kit image 1 extending along the x direction roughly coincides with the central axis of the first original image 01 extending along the x direction.
[0136] The specific operations of step S1 include:
[0137] Step S11, for the second target area 011 of the first original image 01; (eg Figure 4 and Fig.12The target detection kit image 1 is located in the second target area 011 and includes the first target area 012 .
[0138] Step S12: Obtain the position of the maximum value in the first result matching matrix on the first original image 01 as the position of the target detection kit image 1 in the first original image 01.
[0139] Step S13: based on the position of the target detection kit image 1 on the first original image 01, a Fig.13 The intermediate transition image 5 is shown.
[0140] Step S14: performing a normalized correlation coefficient matching method on the intermediate transition image 5 and the second template 20 to obtain a second matching result matrix.
[0141] Step S15, obtaining the position of the maximum value in the second matching result matrix on the intermediate transition image 5 as the position of the image of the test paper 200 of the target detection kit, a part of the label 300, and the part of the shell 100 located between the test paper 200 and the label 300 on the intermediate transition image 5.
[0142] Step S16, determining the position of the test paper 200 of the target detection kit on the intermediate transition image 5 based on the position of the image of the test paper 200 of the target detection kit, a portion of the label 300, and the portion of the shell 100 located between the test paper 200 and the label 300 on the intermediate transition image 5, and the preset deviation value D.
[0143] Step S17: based on the position of the test paper 200 of the target detection kit on the intermediate transition image 5, a Figure 5 The 2 test strips are shown in Image 2.
[0144] In the above step S11, a vertex (eg Figure 4 When the coordinate system is established with the position of the lower left corner of the first original image 01 as the origin O2, the positions of the two ends of the first original image 01 in the y direction are respectively 0 and y1. The position of the central axis of the target detection kit image 1 extending along the x direction in the y direction is approximately The positions of the two ends of the second target area 011 in the y direction are respectively and Thus, the second target area 011 includes the target detection kit image 1 .
[0145] In addition, the normalized correlation coefficient matching method used in the above operation is a prior art, and its specific operation is well known to those skilled in the art and will not be described in detail here.
[0146] The target test paper image 2 acquired in step S17 is an image of the portion of the test paper 200 of the target detection kit located at the window.
[0147] The specific operation of step S2 is to first obtain the position of the quality control identification line 211 of the target detection kit on the target test paper image 2, and then obtain the position of the detection identification line 212 of the target detection kit on the target test paper image 2.
[0148] The position of the quality control identification line 211 of the target detection kit on the target test paper image 2 is determined based on the reference position of the quality control identification line 211, the reference position of the first detection identification line 212, and the third template. The specific process is as follows, including:
[0149] Step S21, for the third target area 21 in the target test paper image 2; (such as Fig.14 As shown) and the third template straight line normalized correlation coefficient matching method, a third matching result matrix is obtained. The quality control identification line 211 of the target detection kit is located in the third target area 21. In a specific embodiment, a vertex of the target test paper image 2 (for example Figure 5 When the coordinate system is established with the origin O2 as the lower left corner in the figure, the positions of the two ends of the third target area in the x direction are respectively and
[0150] Step S22: Obtain the position of the maximum value in the third matching result matrix on the target test paper image 2. The position of the maximum value in the third matching result matrix is recorded as x'.
[0151] Step S23: Determine the position of the quality control identification line 211 of the target detection kit in the target test strip image 2 based on the position of the maximum value in the third matching result matrix on the target test strip image 2 and the size of the third template. The position of the quality control identification line 211 of the target detection kit in the target test strip image 2 is
[0152] The position of the detection identification line 212 of the target detection kit on the target test paper image 2 is determined based on the position of the quality control identification line 211 of the target detection kit on the target test paper image 2 and the reference position of each detection identification line 212. The specific operation includes the following steps S24 to S27.
[0153] The step S24 includes dividing the target test paper image 2 into regions based on the position of the quality control identification line 211 of the target detection kit in the target test paper image 2 and the reference position of each of the detection identification lines 212 .
[0154] After this step is completed, the target test paper image 2 is divided into j+1 partitions 22 (such as Fig.15 As shown in FIG. 1 , j+1 partitions 22 are arranged in sequence along the x direction, and each partition 22 has an identification line 210 therein.
[0155] At Fig.15 In the figure, the boundary position between two adjacent partitions 22 is exactly in the middle of the reference positions of the corresponding two identification lines 210. Each partition 22 is numbered in the direction from the quality control identification line 211 to the detection identification line 212. The quality control identification line 211 is located in the first partition 22, the first detection identification line 212 is located in the second partition 22, the second detection identification line 212 is located in the third partition 22... The j-1th detection identification line 212 is located in the jth partition 22, and the jth detection identification line 212 is located in the j+1th partition 22. The position of the boundary line between the first partition 22 and the second partition 22 is exactly in the middle of the reference position of the quality control identification line 211 and the reference position of the first detection identification line 212, that is, the position of the boundary line between the first partition 22 and the second partition 22 on the target test paper image 2 is The position of the boundary between the second partition 22 and the third partition 22 is the middle of the reference position of the first detection identification line 212, that is, the position of the boundary between the second partition 22 and the third partition 22 on the target test paper image 2 is ...The position of the boundary between the jth partition 22 and the j+1th partition 22 on the target test paper image 2 is For the first partition 22, its boundary line away from the second partition 22 is symmetrical with the boundary line between the first partition 22 and the second partition 22 about the reference position of the quality control identification line 211, that is, the position of the boundary line of the first partition 22 away from the second partition 22 on the target test paper image 2 is For the j+1th partition 22, its boundary line away from the jth partition 22 and the boundary line between the j+1th partition 22 and the jth partition 22 are symmetrical about the reference position of the jth detection identification line 212, that is, the position of the boundary line of the j+1th partition 22 away from the jth partition 22 on the target test paper image 2 is
[0156] Step S25 includes performing a normalized correlation coefficient matching method on at least each of the partitions 22 except the first partition 22 where the quality control identification line 211 is located and the third template to obtain a plurality of fourth matching result matrices.
[0157] That is, the step S25 includes: performing the normalized correlation coefficient matching method on the second partition 22 and the third template to obtain the second fourth matching result matrix; performing the normalized correlation coefficient matching method on the third partition 22 and the third template to obtain the third fourth matching result matrix... performing the normalized correlation coefficient matching method on the jth partition 22 and the third template to obtain the jth fourth matching result matrix, and performing the normalized correlation coefficient matching method on the j+1th partition 22 and the third template to obtain the j+1th fourth matching result matrix.
[0158] Step S26 includes obtaining the maximum value in each of the fourth matching result matrices.
[0159] The step S27 includes determining whether the maximum value in each of the fourth matching result matrices satisfies a preset condition. If so, the position of the maximum value in the fourth matching result matrix on the target test paper image 2 is used as the position of the corresponding identification line 210 in the partition 22 on the target test paper image 2. If not, the reference position of the corresponding identification line 210 is used as the position of the corresponding identification line 210 in the partition 22 in the target test paper image 2.
[0160] The preset condition in this step is greater than or equal to the second preset value. That is, the step S27 includes: judging whether the maximum value in the second fourth matching result matrix is greater than or equal to the second preset value, if so, taking the position of the maximum value in the second fourth matching result matrix on the target test paper image 2 as the position of the identification line 210 (that is, the first detection identification line 212) in the second partition 22 on the target test paper image 2, if not, taking the second identification line 210; (that is, the first detection identification line 212) as the reference position of the identification line 210 (that is, the first detection identification line 212) in the second partition 22 on the target test paper image 2. image 2; determine whether the maximum value in the third of the fourth matching result matrices is greater than or equal to the second preset value, if so, use the position of the maximum value in the third of the fourth matching result matrices on the target test paper image 2 as the position of the identification line 210 in the third partition 22 (that is, the second detection identification line 212) on the target test paper image 2; if not, use the reference position of the second identification line 210 (that is, the second detection identification line 212) as the position of the identification line 210 in the second partition 22 (that is, the second detection identification line 212) on the target test paper image 2. ... determine whether the maximum value in the j-th fourth matching result matrix is greater than or equal to the second preset value. If so, the position of the maximum value in the j-th fourth matching result matrix on the target test paper image 2 is used as the position of the identification line 210 in the j-th partition 22 (that is, the j-1-th detection identification line 212) on the target test paper image 2. If not, the reference position of the j-th identification line 210 (that is, the j-1-th detection identification line 212) is used as the reference position of the identification line 210 in the j-th partition 22 (that is, the j-1-th detection identification line 212) on the target test paper image 2. ; determine whether the maximum value in the j+1th fourth matching result matrix is greater than or equal to the second preset value, if so, use the position of the maximum value in the j+1th fourth matching result matrix on the target test paper image 2 as the position of the j+1th identification line 210 (that is, the jth detection identification line 212) on the target test paper image 2, if not, use the reference position of the j+1th identification line 210 (that is, the jth detection identification line 212) as the position of the identification line 210 in the j+1th partition 22; (that is, the jth detection identification line 212) on the target test paper image 2.
[0161] The second preset value is determined by the user as needed. For example, for a sensitive screening kit based on immunoblotting, the second preset value may be 0.6.
[0162] It should be noted that the identification line 210 in the first partition 22 is the quality control identification line 211, and the position of the quality control identification line 211 on the target test paper image 2 has been obtained by executing steps S21 to S23. Therefore, in step 25, the normalized correlation coefficient matching method may not be performed on the first partition 22 and the third template. Of course, in an alternative embodiment, the normalized correlation coefficient matching method may also be performed on the first partition 22 and the third template in step S25 to obtain the first fourth matching result matrix. Thereafter, the maximum value in the first fourth matching result matrix is obtained in step S26, and whether the maximum value in the first fourth matching result matrix is greater than or equal to the second preset value is determined in step S27, and the position of the quality control identification line 211 on the target test paper image 2 is obtained based on the judgment result. In general, the position of the quality control identification line 211 on the target test paper image 2 obtained by this method is also
[0163] It should also be noted that after the identification line 210 of the target detection kit is positioned on the target test paper image 2 by executing step S2, the width of the identification line 210 becomes one pixel.
[0164] The specific operation of step S3 includes the following steps S31 to S34.
[0165] The step S31 includes converting the target test paper image 2 that has completed the area division into a first grayscale image (not shown in the figure). It can be understood that the first grayscale image also includes j+1 partitions 22. In addition, the first grayscale image has m rows×n columns of pixels. Both m and n are positive integers, and n is greater than j+1.
[0166] Step S32 includes calculating the average value of the grayscale values of each column of pixels in the first grayscale image to obtain the reference grayscale values corresponding to each column of pixels in the first grayscale image. That is, in this step, the average value of the grayscale values of the first column of pixels in the first grayscale image is calculated as the first reference grayscale value, the average value of the grayscale values of the second column of pixels in the first grayscale image is calculated as the second reference grayscale value... The average value of the grayscale values of the pixels in the n-1th column is calculated as the n-1th reference grayscale value, and the average value of the grayscale values of the pixels in the nth column is calculated as the nth reference grayscale value. At the same time, the maximum reference grayscale value and the minimum reference grayscale value are obtained.
[0167] Step S33 includes converting the first grayscale image into a second grayscale image based on all the reference grayscale values. The second grayscale image has 1 row×n columns of pixels, and the grayscale value of each pixel is the reference grayscale value of the corresponding column in the first grayscale image. That is, the grayscale value of the first pixel of the second grayscale image is equal to the first reference grayscale value, the grayscale value of the second pixel is equal to the second reference grayscale value... The grayscale value of the n-1th pixel is equal to the n-1th reference grayscale value, and the grayscale value of the nth pixel is equal to the nth reference grayscale value. The second grayscale image also includes j+1 partitions 22.
[0168] The step S34 includes performing grayscale compensation on the pixel points of each of the subareas 22 of the second grayscale image based on the minimum reference grayscale value and the maximum reference grayscale value to obtain the target grayscale image.
[0169] Specifically, the operation of step S34 may include:
[0170] Step S341: Subtract the minimum reference grayscale value from the grayscale value of each pixel in the second grayscale image to obtain a third grayscale image. That is, the grayscale value of each pixel in the third grayscale image is the difference between the grayscale value of the corresponding pixel in the second grayscale image and the minimum reference grayscale value.
[0171] Step S342: Obtain the maximum grayscale value in each of the partitions 22 in the third grayscale image.
[0172] Step S343: Calculate the absolute value of the difference between the maximum grayscale value of each of the subareas 22 in the third grayscale image and the maximum reference grayscale value, as the grayscale compensation value of each of the subareas 22. That is, by executing this step, the first grayscale compensation value of the first subarea 22, the second grayscale compensation value of the second subarea 22, ... the jth grayscale compensation value of the jth subarea 22, and the j+1th grayscale compensation value of the j+1th subarea 22 are obtained.
[0173] Step S344, add the grayscale value of each pixel of each subarea 22 in the third grayscale image to the corresponding grayscale compensation value to obtain the target grayscale image. That is, the grayscale value of each pixel of the first subarea 22 of the target grayscale image is equal to the sum of the grayscale value of the corresponding pixel of the first subarea 22 of the third grayscale image and the first compensation grayscale value, the grayscale value of each pixel of the second subarea 22 of the target grayscale image is equal to the sum of the grayscale value of the corresponding pixel of the second subarea 22 of the third grayscale image and the second grayscale compensation value... the grayscale value of each pixel of the jth subarea 22 of the target grayscale image is equal to the sum of the grayscale value of the corresponding pixel of the jth subarea 22 of the third grayscale image and the jth grayscale compensation value, and the grayscale value of each pixel of the j+1th subarea 22 of the target grayscale image is equal to the sum of the grayscale value of the corresponding pixel of the j+1th subarea 22 of the third grayscale image and the j+1th grayscale compensation value.
[0174] By executing step S3, the grayscale values of all the identification lines 210 under the same brightness background are corrected, which is beneficial to improving the accuracy of subsequent evaluation.
[0175] It should be understood that, in the target grayscale image, each partition 22 has a first target region, and each first target region is centered on the identification line 210 in the corresponding partition 22 .
[0176] Furthermore, the width of the first target area can be determined according to the width of the identification line 210 on the first original image 01. Specifically, when the width of the identification line 210 on the first original image 01 is p pixels, the width of the first target area is Thus, in step S4, the positions of the two ends of the first target area determined in the i-th partition 22 of the target grayscale image in the x direction are respectively and where x i is the position of the identification line 210 in the i-th partition 22 on the target grayscale image 2, i is a positive integer greater than or equal to 1 and less than or equal to j+1, p is an even number greater than or equal to 2, and For example, when the width of the identification line 210 is 10 pixels, the width of the first target area is 5 pixels, and the positions of the two ends of the first target area in the i-th partition 22 in the x direction are respectively x i +2 and x i -2.
[0177] The specific operations of step S5 include:
[0178] Step S51, obtaining the original optical density data of each partition 22. The original optical density data of the partition 22 is the average grayscale value of all pixels of the first target area in the corresponding partition 22. That is, this step specifically includes calculating the average grayscale value of all pixels of the first target area of the first partition 22 as the original optical density data of the first partition 22, calculating the average grayscale value of all pixels of the first target area of the second partition 22 as the original optical density data of the second partition 22...calculating the average grayscale value of all pixels of the first target area of the jth partition as the original optical density data of the jth partition 22, and calculating the average grayscale value of all pixels of the first target area of the j+1th partition 22 as the original optical density data of the j+1th partition 22.
[0179] Step S52, multiplying the original optical density data of each partition 22 by a coefficient q to obtain the reference optical density data of each partition 22. That is, the specific operation of this step includes obtaining q times the original optical density data of the first partition 22 as the reference optical density data of the first partition 22, obtaining q times the original optical density data of the second partition 22 as the reference optical density data of the second partition 22... obtaining q times the original optical density data of the jth partition 22 as the reference optical density data of the jth partition 22, and obtaining q times the original optical density data of the j+1th partition 22 as the reference optical density data of the j+1th partition 22. q is a positive integer greater than or equal to 2, and its specific value is determined as needed. By executing this step, the optical density data of each partition 22 can be multiplied, which is beneficial to subsequent calculations.
[0180] Step S53: obtaining the concentration value of the protein detected by each of the identification lines 210 based on the reference optical density data of each of the partitions 22 and a predetermined relationship between optical density and protein concentration.
[0181] Step S54: Evaluate the properties of the protein based on the concentration value of the detected protein.
[0182] Among them, the relationship between optical density and protein concentration is obtained in advance by those skilled in the art based on experimental summaries. This is content that those skilled in the art can be familiar with and will not be repeated here. It should be noted that for detection kits based on different principles, such as detection kits based on immunoblotting and immune kits based on colloidal gold method, the relationship between optical density and protein concentration is different; for detection kits with the same principle but different specific types, such as sensitive screening kits based on immunoblotting detection method and autoimmune detection kits, the relationship between optical density and protein concentration is also different. Moreover, when the q value is selected differently, even for the same type of detection kits, the relationship between optical density and protein concentration used is different.
[0183] In a specific example, the detection kit is a sensitive screening kit based on immunoblotting, and q is 2. The corresponding optical density and protein relationship is:
[0184]
[0185] Wherein, a2, a1, a3, a4 are all constants, and their specific values are obtained based on experimental summary. M is the concentration of the protein detected by the identification line 210 , and its unit is IU / ml. dataValue is the reference optical density data of one of the partitions 22 .
[0186] Furthermore, the operation of "evaluating the characteristics of the protein based on the concentration of the detected protein" may include: substituting the concentration value of the protein obtained in step S42 into a predetermined formula for the relationship between protein concentration and concentration level to obtain a corresponding level N, and evaluating the characteristics of the protein based on the obtained level N.
[0187] The detection kit is still described by taking the example of a sensitive screening kit based on the immunoblotting method.
[0188] In a specific example, the protein concentration and concentration level relationship formula includes:
[0189] If M < 0.35, then
[0190] If 0.35≤M<0.7, then
[0191] If 0.7≤M<3.5, then
[0192] If 3.5≤M<17.5, then
[0193] If 17.5≤M<50, then
[0194] If 50≤M≤100, then
[0195] If M>100, then N=6.
[0196] Generally speaking, a case where N is greater than or equal to 2 can be called a positive test result, and the larger N is, the stronger the positive result; a case where N is greater than or equal to 1 and less than 2 is called a weak positive result; and a case where N is less than 1 is called a negative result.
[0197] Furthermore, a second object of the present invention is to provide a computer-readable storage medium, on which a program is stored, and when the program is executed, at least part of the steps of the evaluation method of the aforementioned detection kit is executed, for example, at least steps S1 to S4 are executed.
[0198] Furthermore, a third object of the present invention is to provide an electronic device, comprising a processor and a computer-readable storage medium as described above, and the electronic device is used to execute a program stored on the computer-readable storage medium.
[0199] Furthermore, a third object of the present invention is to provide an evaluation device for a detection kit, the evaluation device comprising a camera and a control unit, the camera being at least used to acquire the first original image, the control unit being communicatively connected to the camera and configured to receive the first original image and execute at least part of the steps of the evaluation method for the detection kit as described above.
[0200] Although the present invention is disclosed as above, it is not limited thereto. Those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for evaluating a detection kit, characterized in that: include: Based on the first template, the second template and the preset deviation value, a test paper image of the target detection kit is intercepted on the first original image; The target detection kit image is displayed on the first original image; Determine the position of the identification line of the target detection kit on its test paper image based on the reference position of the identification line and the third template; the identification line includes a quality control identification line and at least one detection identification line; Converting the test paper image of the target detection kit into a target grayscale image; Determine a first target area in the target grayscale image based on the position of the identification line of the target detection kit on its test paper image; evaluating the characteristics of the protein detected by the target detection kit based on the grayscale value of the first target area; The first template includes an image of a first detection kit; the second template includes an image of a test strip of the first detection kit, the second template also includes an image of a portion of the label adjacent to the housing, and an image of a portion of the housing between the test strip and the label, and the second template displays at least a partial image of an intersection line of the housing and the label; The preset deviation value is the distance between the edge of the second template away from the test paper and the edge of the test paper close to the label; The third template includes an image of the quality control identification line of the first detection kit; the quality control identification line of the first detection kit is colored; the reference position of the identification line is determined based on the image of the second detection kit, at least two of the identification lines of the second detection kit are colored, and the colored identification lines are evenly distributed on the second detection kit.
2. The method for evaluating a detection kit according to claim 1, characterized in that: The size of the first original image is x1×y1; the central axis of the target detection kit image extending along the x direction coincides with the central axis of the first original image extending along the x direction; The size of the first template is x2×y2; The step of intercepting the test paper image of the target detection kit on the first original image based on the first template, the second template and the preset deviation value includes: The normalized correlation coefficient matching method is performed on the second target area of the first original image and the first template to obtain a first matching result matrix; the positions of the two ends of the first original image in the y direction are 0 and y1 respectively, and the positions of the two ends of the second target area in the y direction are and Obtaining the position of the maximum value in the first matching result matrix on the first original image as the position of the target detection kit image on the first original image; intercepting an intermediate transition image on the first original image based on the position of the target detection kit image on the first original image, and displaying the target detection kit image on the intermediate transition image; Performing a normalized correlation coefficient matching method on the intermediate transition image and the second template to obtain a second matching result matrix; Obtaining the position of the maximum value in the second matching result matrix on the intermediate transition image as the position of the image of the test paper, a portion of the label, and a portion of the shell between the test paper and the label of the target detection kit on the intermediate transition image; Determine the position of the test paper image of the target detection kit on the intermediate transition image based on the positions of the images of the test paper of the target detection kit, a portion of the label, and a portion of the housing between the test paper and the label on the intermediate transition image, and the preset deviation value; The test paper image of the target detection kit is intercepted on the intermediate transition image based on the position of the test paper image of the target detection kit on the intermediate transition image.
3. The method for evaluating a detection kit according to claim 1, characterized in that: The step of determining the position of the identification line of the target detection kit on the test paper image based on the reference position of the identification line and the third template comprises: Determine the position of the quality control identification line of the target detection kit on its test paper image based on the reference position of the quality control identification line, the reference position of a detection identification line adjacent to the quality control identification line, and the third template; and The position of the detection identification line of the target detection kit on the test paper image is determined based on the position of the quality control identification line of the target detection kit on the test paper image and the reference position of the detection identification line.
4. The method for evaluating a detection kit according to claim 3, characterized in that: The reference position of the quality control identification line is x 01 , the reference position of the detection identification line adjacent to the quality control identification line is x 02 ; The size of the third template is x3×y3; The step of determining the position of the quality control identification line of the target detection kit on its test paper image based on the reference position of the quality control identification line, the reference position of a detection identification line adjacent to the quality control identification line, and the third template comprises: The normalized correlation coefficient matching method is performed on the third target area in the test paper image of the target detection kit and the third template to obtain a third matching result matrix; the positions of the two ends of the third target area in the x direction are respectively and Obtaining the position of the maximum value in the third matching result matrix on the test paper image of the target detection kit, and determining the position of the quality control identification line of the target detection kit in the test paper image of the target detection kit based on the position of the maximum value in the third matching result matrix on the test paper image of the target detection kit and the size of the third template; The position of the maximum value in the third matching result matrix on the test paper image of the target detection kit is x′, and the position of the quality control identification line of the target detection kit in its test paper image is 5. The evaluation method of the detection kit according to claim 3 or 4, characterized in that: The step of determining the position of the detection identification line of the target detection kit on the test paper image based on the position of the quality control identification line of the target detection kit on the test paper image and the reference position of the detection identification line comprises: Based on the position of the quality control identification line of the target detection kit on its test paper image and the reference position of the detection identification line, the test paper image of the target detection kit is divided into regions to obtain a plurality of partitions, wherein the plurality of partitions are arranged in sequence along the x direction; Performing a normalized correlation coefficient matching method on at least the other partitions except the partition where the quality control identification line of the target detection kit is located and the third template to obtain a plurality of fourth matching result matrices; Obtain the maximum value in each of the fourth matching result matrices, and determine whether the maximum value in each of the fourth matching result matrices meets the preset conditions. If so, use the position of the corresponding maximum value in the fourth matching result matrix on the test paper image of the target detection kit as the position of the corresponding identification line in the partition on the test paper image of the target detection kit; if not, use the reference position of the corresponding identification line as the position of the corresponding identification line in the partition on the test paper image of the target detection kit.
6. The method for evaluating a detection kit according to claim 5, characterized in that: The boundary position of two adjacent partitions is located in the middle of the reference positions of the corresponding two identification lines; the position of the first partition away from the boundary line of the second partition and the position of the boundary line between the first partition and the second partition are symmetrical about the reference position of the identification line corresponding to the first partition; the position of the last partition away from the boundary line of the second-to-last partition and the position of the boundary line between the last partition and the second-to-last partition are symmetrical about the reference position of the identification line corresponding to the last partition; and / or, The preset condition is greater than or equal to a preset value.
7. The method for evaluating a detection kit according to claim 5, characterized in that: The step of converting the target detection kit image into a target grayscale image comprises: Converting the test paper image of the target detection kit after completing the area division into a first grayscale image; Calculating an average value of the grayscale values of each column of pixels in the first grayscale image to obtain reference grayscale values corresponding to each column of pixels in the first grayscale image, and obtaining a maximum reference grayscale value and a minimum reference grayscale value; Based on all the reference grayscale values, the first grayscale image is converted into a second grayscale image of 1 row×n columns; the grayscale value of each pixel in the second grayscale image corresponds to the reference grayscale value; Grayscale compensation is performed on each of the subareas of the second grayscale image based on the maximum reference grayscale value and the minimum reference grayscale value to obtain the target grayscale image.
8. The method for evaluating a detection kit according to claim 7, characterized in that: The step of performing grayscale compensation on each of the subareas of the second grayscale image based on the maximum reference grayscale value and the minimum reference grayscale value comprises: Subtract the minimum reference grayscale value from the grayscale value of each pixel in the second grayscale image to obtain a third grayscale image; Obtaining the maximum grayscale value in each of the partitions in the third grayscale image; Calculating an absolute value of a difference between a maximum grayscale value in each of the partitions in the third grayscale image and the maximum reference grayscale value as a grayscale compensation value of each of the partitions; The grayscale value of each pixel point of each partition in the third grayscale image is added to the corresponding grayscale compensation value to obtain the target grayscale image.
9. The method for evaluating a detection kit according to claim 7, characterized in that: The width of each of the identification lines is p pixels, where p is an even number greater than or equal to 2, and is an integer; the positions of the two ends of the first target area in the i-th partition in the x direction are respectively and x i is the position of the identification line in the i-th partition on the target grayscale image; i is an integer greater than or equal to 1; and / or, The step of evaluating the characteristic of the protein detected by the target detection kit based on the grayscale value of the first target area in the target grayscale image comprises: Obtaining q times the average grayscale value of all pixels in each first target area as the corresponding reference optical density data of the subarea, where q is a positive integer greater than or equal to 2; Obtaining the concentration value of the detected protein based on the reference optical density data of each partition and a predetermined optical density-protein concentration relationship; The identity of the protein is evaluated based on the concentration values of the detected protein.
10. The method for evaluating a detection kit according to claim 1, characterized in that: It also includes acquiring the first template, the second template, the preset deviation value, and the third template based on a second original image; the second original image includes a first detection kit image; The step of acquiring the first template, the second template, the preset deviation value, and the third template based on the second original image includes: Determine, on the second original image, based on straight line matching, other first edge lines of the shell of the first detection kit except the side close to the label, and determine a second edge line of the side of the label of the first detection kit away from the shell; Cutting out, from the second original image, an area enclosed by the first edge line of the shell of the first detection kit except the side close to the label and the second edge line of the side of the label away from the shell as the first template; Determine all third edge lines of the window of the first detection kit on the first template based on straight line matching; A third edge line of the window of the first detection kit close to the label is translated along the direction from the test paper to the label to obtain a fourth edge line, wherein the fourth edge line is located on a side of the intersection line of the housing of the first detection kit and the label close to the label; On the first template, an area enclosed by the fourth edge line and the third edge lines of the window of the first detection kit except the third edge line close to the label is intercepted to serve as the second template; and a translation distance of the third edge line of the window of the first detection kit close to the label is used as the preset deviation value; Determine all fifth edge lines of the quality control identification line of the first detection kit in one of the second original image, the first template, and the second template based on straight line matching; In the corresponding image, all areas enclosed by the fifth edge lines are intercepted to serve as the third template.
11. The method for evaluating a detection kit according to claim 1, characterized in that: Also includes: Acquiring the identification line reference position based on a third original image including the second detection kit image; The step of acquiring the reference position of the identification line based on the third original image including the second detection kit image comprises: Determine, on the third original image, at least based on a straight line matching method, a third edge line of the window of the second detection kit on a side close to the quality control identification line and a position of each of the identification lines; Based on the position of the quality control identification line of the second detection kit and the third edge line of the test paper of the second detection kit on the side close to the quality control identification line, obtain the position of the quality control identification line of the second detection kit relative to the third edge line of the window of the second detection kit on the side away from the label, as the reference position of the quality control identification line; Based on the positions of the detection identification line and the quality control identification line of the second detection kit, the position of each detection identification line of the second detection kit relative to the quality control identification line is obtained as a reference position of each detection identification line.
12. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed, the evaluation method of the detection kit according to any one of claims 1 to 11 is performed.
13. An electronic device, characterized in that: The method comprises a processor and the computer-readable storage medium according to claim 12, wherein the processor is configured to execute a program stored on the computer-readable storage medium.
14. An evaluation device for a detection kit, characterized in that: It comprises a camera and a control unit, wherein the camera is at least used to obtain the first original image; the control unit is communicatively connected to the camera and is configured to receive the first original image and execute the evaluation method of the detection kit as described in any one of claims 1-11.
Citation Information
Patent Citations
Test paper reading method and test paper reading device
CN104198482A
Quick detecting method of immune chromatography test paper card
CN107328776A