Antigen detection card recognition method and device and storage medium
By processing the antigen detection card image with preset image detection algorithm, calculating the center point distance and judging the target detection result, the problem of low recognition accuracy caused by the wide variety of antigen detection cards and the different sizes is solved, and the accuracy of recognition is improved sex.
Patent Information
- Application Number
- CN202411469547.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-02-18
AI Technical Summary
In the prior art, there are many types of antigen detection cards, with different sizes and sizes. It is impossible to accurately identify the 'C' and 'T' characters of the antigen detection cards, resulting in low recognition accuracy.
By acquiring the detection card image collected by the antigen detection device, the detection card image is processed based on the preset image detection algorithm, and the edge wireframe of the detection area, the edge wireframe of the sample area, the number of straight lines in the detection area and the position of the straight lines in the detection area are obtained. Based on this information, the central point distance is calculated, and the target detection result is judged based on the number of straight lines in the detection area and the position of the straight line.
In the absence of the ‘C’ and ‘T’ characters, the accuracy of the recognition of the antigen detection card is improved by the edge wireframe and center point distance between the detection area and the sample area.
Smart Images

Figure CN119478343A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of antigen detection, and in particular to an antigen detection card identification method, device and storage medium. Background Art
[0002] With the enrichment of detection methods and the need to meet the precise and strict prevention and control management regulations, it is necessary to analyze the antigen detection data of the day on a daily basis to prevent problems before they occur; in order to grasp the development of the infection in a timely manner, a large number of antigen detection cards need to be tested, which requires huge manpower and material resources. Therefore, how to test the antigen detection cards has become a problem.
[0003] In the prior art, the commonly used detection and identification method for antigen test cards is to perform image acquisition through a mobile phone or other image acquisition device, identify the external dimensions of the antigen test card, and then identify the characters on the "C" and "T" on the test card to determine the data line output results of the two areas. However, there are many types of antigen test cards on the market, and the sizes are different. If the "C" and "T" characters on the test card are the same color as the reagent card, this will cause misidentification. In addition, it is possible that the "C" and "T" characters are blocked by stains or faded, and the "C" and "T" characters cannot be recognized.
[0004] Therefore, it is urgent to propose an antigen test card recognition method, device and storage medium to solve the technical problem in the prior art that there are many types of antigen test cards with different sizes, the "C" and "T" characters on the antigen test cards cannot be accurately recognized, resulting in low accuracy of antigen test card recognition. Summary of the invention
[0005] In view of this, it is necessary to provide an antigen test card identification method, device and storage medium to solve the technical problem in the prior art that there are many types of antigen test cards with different sizes, and the "C" and "T" characters on the antigen test cards cannot be accurately identified, resulting in low accuracy in antigen test card identification.
[0006] In order to solve the above problems, the present invention provides an antigen detection card identification method, comprising: Obtain the test card image captured by the antigen testing device; Processing the detection card image based on a preset image detection algorithm to obtain an initial detection result; the initial detection result includes a detection area edge wireframe, a sample area edge wireframe, the number of straight lines in the detection area, and the position of the straight lines; Obtaining a center point distance according to the detection area edge wireframe and the sample area edge wireframe; When the number of straight lines in the detection area is 1, the straight line distance is determined according to the straight line position, and the straight line distance is judged according to the center point distance to obtain the target detection result of the detection card image.
[0007] In a possible implementation, after acquiring the detection card image collected by the antigen detection device, the method further includes: Identifying the detection area of the antigen detection card in the detection card image to obtain an identification result; According to the recognition result, the target detection result of the detection card image is obtained.
[0008] In a possible implementation, obtaining the target detection result of the detection card image according to the recognition result includes: Determining whether the recognition result is that the positions of "C" and "T" are recognized; If yes, determining the target test result of the antigen test card based on the recognition result; If not, the detection card image is processed based on a preset image detection algorithm to obtain a target detection result of the detection card image.
[0009] In a possible implementation, determining the target detection result of the antigen detection card according to the recognition result includes: Determining whether the recognition result includes the number of initial straight lines recognized at the positions of "C" and "T"; If yes, then determining the target test result of the antigen test card according to the initial straight line number; If not, a new test card image is collected based on the antigen detection device, and the new test card image is tested.
[0010] In a possible implementation, obtaining the center point distance according to the detection area edge wireframe and the sample area edge wireframe includes: Based on a center point extraction algorithm, the edge wireframe of the detection area and the edge wireframe of the sample area are processed respectively to obtain a first center point of the detection area and a second center point of the sample area; The first center point and the second center point are calculated to obtain a center point distance.
[0011] In a possible implementation, the method further includes: When the number of straight lines in the detection area is 0, it is determined that the target detection result is invalid.
[0012] In a possible implementation, when the number of straight lines in the detection area is 1, determining the straight line distance according to the straight line position, and judging the straight line distance according to the center point distance to obtain the target detection result of the detection card image includes: When the number of straight lines in the detection area is 1, the straight line position of the detection area is calculated according to the second center point to obtain the straight line distance; Determine whether the straight-line distance is greater than the center point distance; If yes, the straight line position is determined to be "C", and the target detection result is determined to be negative; If not, the straight line position is determined to be "T", and the target detection result is determined to be invalid.
[0013] In a possible implementation, the method further includes: When the number of straight lines in the detection area is 2, it is determined that the target detection result is positive.
[0014] On the other hand, the present invention also provides an antigen detection card identification device, comprising: An image acquisition module, used to acquire the test card image collected by the antigen detection device; A straight line detection module, used to process the detection card image based on a preset image detection algorithm to obtain an initial detection result; the initial detection result includes a detection area edge wireframe, a sample area edge wireframe, the number of straight lines in the detection area, and the position of the straight lines; A distance determination module, used for obtaining a center point distance according to the detection area edge wireframe and the sample area edge wireframe; The result determination module is used to determine the straight line distance according to the straight line position when the number of straight lines in the detection area is 1, and to judge the straight line distance according to the center point distance to obtain the target detection result of the detection card image.
[0015] On the other hand, an embodiment of the present invention discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various steps of the above-mentioned antigen test card identification method embodiment are implemented.
[0016] The beneficial effects of the present invention are as follows: a detection card image collected by an antigen detection device is obtained, and a detection area and a sample area of the detection card image are detected by a preset image detection algorithm to obtain a detection area edge wireframe, a sample area edge wireframe, the number of straight lines in the detection area, and a straight line position, so that the center point distance can be obtained according to the detection area edge wireframe and the sample area edge wireframe. When the number of straight lines in the detection area is 1, the straight line distance can be determined according to the straight line position, and the straight line distance can be judged according to the center point distance to obtain a target detection result of the detection card image; therefore, when the "C" and "T" characters are not recognized, the number of straight lines in the detection area can be judged according to the center point distance of the detection area edge wireframe and the sample area edge wireframe to obtain a target detection result of the detection card image, thereby improving the accuracy of antigen detection card recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A schematic diagram of an embodiment of the antigen detection card identification method provided by the present invention; Figure 2 A schematic diagram of a flow chart of an embodiment of the recognition result judgment provided by the present invention; Figure 3 For the present invention Figure 2 A schematic flow chart of an embodiment of step S202; Figure 4 For the present invention Figure 1 A schematic flow chart of an embodiment of step S104; Figure 5 This is a schematic structural diagram of an embodiment of the antigen detection card identification device provided by the present invention. DETAILED DESCRIPTION
[0018] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.
[0019] like Figure 1 As shown, a specific embodiment of the present invention discloses an antigen detection card identification method, comprising: S101, obtaining a test card image collected by an antigen detection device; S102, processing the detection card image based on a preset image detection algorithm to obtain an initial detection result; the initial detection result includes the detection area edge wireframe, the sample area edge wireframe, the number of straight lines in the detection area, and the straight line position; S103, obtaining the center point distance according to the edge wireframe of the detection area and the edge wireframe of the sample area; S104, when the number of straight lines in the detection area is 1, determine the straight line distance according to the straight line position, and judge the straight line distance according to the center point distance to obtain the target detection result of the detection card image.
[0020] It should be understood that: It should be understood that: It can be used with any antigen detection device, which may include an image acquisition unit, an embedded control unit, a visual propulsion unit, an antigen detection card adapter and a structural body, specifically: Image acquisition unit: includes visual camera, mounting base, adjustment bracket, and wire tube clamp. The visual camera is locked on the mounting base by adjusting the bracket, so that the tested target is at the best recognition focal length of the visual camera, meeting the necessary requirements for information collection and recognition.
[0021] Embedded control unit: includes image data acquisition, image recognition, QR code recognition, stepper motor drive, sensor signal acquisition, and Bluetooth module. Its main function is to acquire sensor signals, recognize that the user has placed the antigen test card into the test card adapter, control the stepper motor to move equidistantly, acquire image data, perform QR code recognition and image recognition on the acquired image data to meet the requirements of high-definition original images, and transmit the acquired valid data back to the server background through the Bluetooth module and the mobile client connection.
[0022] Visual propulsion unit: includes stepper motor, synchronous wheel, synchronous belt, propulsion module fixing frame, linear guide assembly, push accompanying plate, baffle, slot photoelectric, visual equidistant propulsion module. The main function is to keep the slot photoelectric original point of the visual equidistant propulsion module in place, and at the same time, the contact switch of the antigen detection card is triggered in place. After a 3-second delay, the visual equidistant propulsion module starts and propels forward equidistantly. The antigen detection card is dragged and moved according to the preset spacing to collect images until the complete image of the antigen detection card is collected. After effective information recognition, the current original image data and coordinate information are saved. After all valid information is collected, the antigen detection card is moved to the initial position.
[0023] Antigen test card adapter: It includes a frame, left and right springs, a top bumper, and a contact switch. It mainly enables the user to put the antigen test card into the adapter, triggering the contact switch signal to be collected by the embedded control unit. The left and right springs and the top bumper ensure that a variety of antigen test cards can be fixed.
[0024] Structural body: includes base plate and fixed seat, image acquisition mounting bracket installation, synchronous wheel installation, stepper motor linear guide installation to ensure structural stability.
[0025] The antigen test card is inserted into the equipment system entrance position, and the test card is directly inserted into the antigen test card adapter position through the entrance guide block and blocked by the adapter frame.
[0026] The slot photoelectric original point of the visual propulsion module is in place, and the contact switch of the antigen detection card adapter is in place. After a 3-second delay positioning time, the visual equidistant propulsion module starts and propels forward equidistantly, so that the antigen detection card is gradually moved into the visual camera acquisition position for effective identification. A single field of view obtains the detection card information according to the QR code recognition, removes the black handwriting in the image, and then performs binarization. The binarized image border area is detected. After the detection is completed, if the target information is identified, the center of gravity of the target area is obtained, and the center of gravity is moved to the center of the field of view by controlling the positioning push module to re-collect the signal, and then the image data and position information are saved after the same detection method is performed. The visual propulsion module continues to push the antigen detection card until all areas complete image acquisition and recognition, and then saves the valid image data. After all valid images are acquired, the Bluetooth module is connected to the APP client of the user's mobile phone to upload the original data to the server background. The antigen detection card after image acquisition is returned to its original position, and the user can take it out at any time.
[0027] The specific embodiment of the present invention can be a process in which the processor performs image recognition after the image acquisition unit and the visual propulsion unit effectively cooperate to acquire a complete detection card image. Specifically, after acquiring the detection card image, the detection card image can be detected and processed by a preset image detection algorithm, and then an initial detection result can be obtained; wherein the detection result can include the edge wireframe of the detection area, the edge wireframe of the sample area, the number of straight lines in the detection area, and the position of the straight lines. The preset image detection algorithm can be set according to actual conditions, and the embodiment of the present invention is not limited here. Then, the center point distance can be calculated based on the edge wireframe of the detection area and the edge wireframe of the sample area, and the number of straight lines in the detection area can be judged by the center point distance, and then the target detection result of the detection card image can be obtained. The target detection result can include invalid, negative, and positive.
[0028] Compared with the prior art, the present embodiment provides a method for obtaining a detection card image collected by an antigen detection device, and detects the detection area and the sample area of the detection card image through a preset image detection algorithm to obtain the detection area edge wireframe, the sample area edge wireframe, the number of straight lines in the detection area and the straight line position, so that the center point distance can be obtained according to the detection area edge wireframe and the sample area edge wireframe. When the number of straight lines in the detection area is 1, the straight line distance can be determined according to the straight line position, and the straight line distance can be judged according to the center point distance to obtain the target detection result of the detection card image; therefore, when the "C" and "T" characters are not recognized, the number of straight lines in the detection area can be judged according to the center point distance of the detection area edge wireframe and the sample area edge wireframe to obtain the target detection result of the detection card image, thereby improving the accuracy of antigen detection card recognition.
[0029] In some embodiments of the present invention, after step S101, the method further includes: Identify the detection area of the antigen detection card in the detection card image to obtain an identification result; According to the recognition result, the target detection result of the detection card image is obtained.
[0030] In a specific embodiment of the present invention, after the detection card image is collected, the "C" and "T" characters on the detection card image can be recognized, and then the recognition result can be obtained. The recognition structure can include whether the "C" and "T" characters can be recognized, and whether the initial straight line number exists.
[0031] In some embodiments of the present invention, Figure 2 As shown, according to the recognition result, the target detection result of the detection card image is obtained, including: S201, determining whether the recognition result is that the positions of "C" and "T" are recognized; S202: If yes, determine the target test result of the antigen test card according to the recognition result; S203: If not, the detection card image is processed based on a preset image detection algorithm to obtain a target detection result of the detection card image.
[0032] In a specific embodiment of the present invention, the recognition result can be judged to determine whether the positions of "C" and "T" are identified. If so, the test result of the antigen test card can be determined based on the recognition result. If not, step S102 and subsequent steps can be performed.
[0033] In some embodiments of the present invention, Figure 3 As shown, step S202 includes: S301, determining whether the recognition result includes the number of initial straight lines recognized at the positions of "C" and "T"; S302, if yes, then determine the target test result of the antigen test card according to the initial straight line number; S303: If not, collect a new test card image based on the antigen detection device and test the new test card image.
[0034] In a specific embodiment of the present invention, it can be determined whether the recognition result includes the initial number of straight lines identified at the positions of "C" and "T". If so, it means that the positions of "C" and "T" and the initial number of straight lines in the detection area are detected, and then the antigen detection card can be judged according to the initial number of straight lines, so that the detection result of the antigen detection card can be determined. For example, when the initial number of straight lines is 0, the target detection result is invalid, and when the initial number of straight lines is 1, the target detection result is invalid. The target detection result is determined according to the positions of "C" and "T". When the initial number of straight lines is 2, the target detection result is positive. If not, return to step S101, re-collect a new detection card image of the antigen detection card, and re-detect the new detection card image through the present invention. The subsequent process of the embodiment of the present invention will not be repeated.
[0035] Furthermore, the detection card image can be detected and processed by a preset image detection algorithm, and the detection area edge wireframe of the detection area, the sample area edge wireframe of the sample area and the number of detection area straight lines of the detection area can be detected. The specific preset image detection algorithm and detection process can be set according to actual conditions, and the embodiments of the present invention are not limited here.
[0036] In some embodiments of the present invention, step S103 includes: Based on the center point extraction algorithm, the edge wireframe of the detection area and the edge wireframe of the sample area are processed respectively to obtain a first center point of the detection area and a second center point of the sample area; The first center point and the second center point are calculated to obtain the center point distance.
[0037] In a specific embodiment of the present invention, the edge wireframe of the detection area can be calculated using a center point extraction algorithm to obtain a first center point A of the detection area, and the edge wireframe of the sample area can be calculated using a center point extraction algorithm to obtain a second center point B of the sample area. Then, the first center point A and the second center point B can be calculated to obtain a center point distance L between points AB.
[0038] In some embodiments of the present invention, the method further comprises: When the number of straight lines in the detection area is 0, the target detection result is determined to be invalid.
[0039] In a specific embodiment of the present invention, it can be determined whether the number of straight lines in the detection area is 0. If so, the target detection result can be invalid. If not, the number of straight lines in the detection area can be further determined.
[0040] In some embodiments of the present invention, Figure 4 As shown, step S104 includes: S401, when the number of straight lines in the detection area is 1, the straight line position of the detection area is calculated according to the second center point to obtain the straight line distance; S402, determining whether the straight-line distance is greater than the center point distance; S403, if yes, determine the straight line position as "C", and determine the target detection result as negative; S404: If not, determine the straight line position as "T" and determine the target detection result as invalid.
[0041] In a specific embodiment of the present invention, the straight-line position between the second center point and the detection area can be calculated to obtain the straight-line distance L', and then it can be determined whether the straight-line distance L' is greater than the center point distance L. If so, the straight-line position can be determined to be "C" and the target detection result can be determined to be negative; if not, the straight-line position can be determined to be "T" and the target detection result can be determined to be invalid.
[0042] In a specific embodiment of the present invention, it can be determined whether the number of straight lines in the detection area is 1. If so, the straight line position of the detection area can be processed according to the second center point and the center point distance to obtain the target detection result. Specifically, the straight line position of the second center point and the detection area can be calculated to obtain the straight line distance L', and then it can be determined whether the straight line distance L' is greater than the center point distance L. If so, the straight line position can be determined to be "C", and the target detection result can be determined to be negative; if not, the straight line position can be determined to be "T", and the target detection result can be determined to be invalid.
[0043] In some embodiments of the present invention, the method further comprises: When the number of straight lines in the detection area is 2, it is determined that the target detection result is positive.
[0044] In a specific embodiment of the present invention, it can also be determined whether the number of straight lines in the detection area is 2. If so, it can be determined that the target detection result is positive. If not, it can be determined that the target detection result is invalid.
[0045] The embodiment of the present invention mainly locates the relative positions of the sample area and the detection area on the antigen test card. The "T" line is close to the sample area, and the "C" line is far away from the sample area. The negative, positive and invalid results are identified by the relative positions of the sample area and the detection area; the preservation and traceability of the original data facilitates unified management and reduces workload, and the original data is sent to the server background for storage through the control unit.
[0046] In order to better implement the antigen detection card identification method in the embodiment of the present invention, based on the antigen detection card identification method, the embodiment of the present invention also provides an antigen detection card identification device, such as Figure 5As shown, the antigen detection card identification device 500 includes: An image acquisition module 501 is used to acquire the detection card image collected by the antigen detection device; The straight line detection module 502 is used to process the detection card image based on a preset image detection algorithm to obtain an initial detection result; the initial detection result includes the detection area edge wireframe, the sample area edge wireframe, the number of straight lines in the detection area, and the straight line position; A distance determination module 503 is used to obtain a center point distance according to the detection area edge wireframe and the sample area edge wireframe; The result determination module 504 is used to determine the straight line distance according to the straight line position when the number of straight lines in the detection area is 1, and to judge the straight line distance according to the center point distance to obtain the target detection result of the detection card image.
[0047] The antigen detection card identification device 500 provided in the above embodiment can implement the technical solution described in the above antigen detection card identification method embodiment. The specific implementation principles of the above modules or units can refer to the corresponding contents in the above antigen detection card identification method embodiment, which will not be repeated here.
[0048] Accordingly, an embodiment of the present application also provides a computer-readable storage medium, which is used to store computer-readable programs or instructions. When the program or instructions are executed by a processor, the antigen detection card identification method steps or functions provided in the above-mentioned method embodiments can be implemented.
[0049] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the computer program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0050] The antigen detection card identification method and device provided by the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. An antigen detection card identification method, characterized in that: include: Obtain the test card image captured by the antigen test device; Processing the detection card image based on a preset image detection algorithm to obtain an initial detection result; The initial detection result includes the detection area edge wireframe, the sample area edge wireframe, the number of straight lines in the detection area and the straight line positions; Obtaining a center point distance according to the detection area edge wireframe and the sample area edge wireframe; When the number of straight lines in the detection area is 1, the straight line distance is determined according to the straight line position, and the straight line distance is judged according to the center point distance to obtain the target detection result of the detection card image.
2. The antigen detection card identification method according to claim 1, characterized in that: After obtaining the detection card image collected by the antigen detection device, the method further includes: Identifying the detection area of the antigen detection card in the detection card image to obtain an identification result; According to the recognition result, the target detection result of the detection card image is obtained.
3. The antigen detection card identification method according to claim 2, characterized in that: The step of obtaining the target detection result of the detection card image according to the recognition result includes: Determining whether the recognition result is that the positions of "C" and "T" are recognized; If yes, determining the target test result of the antigen test card based on the recognition result; If not, the detection card image is processed based on a preset image detection algorithm to obtain a target detection result of the detection card image.
4. The antigen detection card identification method according to claim 3, characterized in that: Determining the target detection result of the antigen detection card according to the recognition result includes: Determining whether the recognition result includes the number of initial straight lines recognized at the positions of "C" and "T"; If yes, then determining the target test result of the antigen test card according to the initial straight line number; If not, a new test card image is collected based on the antigen detection device, and the new test card image is tested.
5. The antigen detection card identification method according to claim 1, characterized in that: The obtaining of the center point distance according to the detection area edge wireframe and the sample area edge wireframe comprises: Based on a center point extraction algorithm, the edge wireframe of the detection area and the edge wireframe of the sample area are processed respectively to obtain a first center point of the detection area and a second center point of the sample area; The first center point and the second center point are calculated to obtain a center point distance.
6. The antigen detection card identification method according to claim 1, characterized in that: The method further comprises: When the number of straight lines in the detection area is 0, it is determined that the target detection result is invalid.
7. The antigen detection card identification method according to claim 5, characterized in that: When the number of straight lines in the detection area is 1, the straight line distance is determined according to the straight line position, and the straight line distance is judged according to the center point distance to obtain the target detection result of the detection card image, including: When the number of straight lines in the detection area is 1, the straight line position of the detection area is calculated according to the second center point to obtain the straight line distance; Determine whether the straight-line distance is greater than the center point distance; If yes, the straight line position is determined to be "C", and the target detection result is determined to be negative; If not, the straight line position is determined to be "T", and the target detection result is determined to be invalid.
8. The antigen detection card identification method according to claim 1, characterized in that: The method further comprises: When the number of straight lines in the detection area is 2, it is determined that the target detection result is positive.
9. An antigen detection card recognition device, characterized in that: include: An image acquisition module, used to acquire the test card image collected by the antigen detection device; A straight line detection module, used to process the detection card image based on a preset image detection algorithm to obtain an initial detection result; the initial detection result includes a detection area edge wireframe, a sample area edge wireframe, the number of straight lines in the detection area, and the position of the straight lines; A distance determination module, used for obtaining a center point distance according to the detection area edge wireframe and the sample area edge wireframe; The result determination module is used to determine the straight line distance according to the straight line position when the number of straight lines in the detection area is 1, and to judge the straight line distance according to the center point distance to obtain the target detection result of the detection card image.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the antigen detection card identification method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Antigen detection data management system based on machine learning and big data
CN120451103A