Antigen detection kit identification method, device, equipment and storage medium
By acquiring and matching the feature sub-map sets of antigen detection kits, using edge detection algorithms and color detection, the detection results of antigen detection kits are quickly and automatically recognized, solving the problem of low manual review efficiency in the prior art, improving processing efficiency and saving labor costs.
Patent Information
- Application Number
- CN202210844704.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-18
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2042-07-18
AI Technical Summary
In the prior art, the results of the new crown antigen detection require manual review, resulting in high labor costs and low efficiency.
By obtaining feature sub-picture groups of various types of antigen detection kits, including kit template pictures and ribbon recognition area template pictures, the edge detection algorithm and color detection can be used to automatically identify and match the images to be identified to determine the detection results.
It realizes the rapid and automatic identification of various types of antigen detection kits, improves the recognition and processing efficiency, and saves manual proofreading time and labor costs.
Smart Images

Figure CN115100418B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to an antigen detection kit identification method, device, equipment and storage medium. Background Art
[0002] At present, antigen detection is a commonly used detection method. It can realize self-detection by relying on antigen detection kits without the need for complex instruments and complex operations. It has the two characteristics of convenience and speed. For example, the new crown antigen test is a method for rapid detection of new crown antigens. Polyclonal antibodies against new coronavirus proteins are marked on test strips to detect new coronavirus antigens in samples. The results can be obtained in 10-20 minutes. It is used as a supplementary means for screening specific populations. People with abnormal antigens can be discovered more quickly and relevant measures can be taken in time. In the prior art, the new crown antigen test results are uploaded to the designated platform by the tester after taking a photo, and manually reviewed by the platform management personnel. The labor cost is high, a large amount of human resources are required, and the efficiency is low. Summary of the invention
[0003] In view of this, the purpose of the present invention is to provide an antigen detection kit identification method, device, equipment and medium, which can quickly and automatically identify the test results of various types of antigen detection kits, thereby improving the efficiency of antigen detection kit identification and processing. The specific scheme is as follows:
[0004] In a first aspect, the present application discloses an antigen detection kit identification method, comprising:
[0005] Obtaining characteristic sub-image groups corresponding to various types of antigen detection kits; the characteristic sub-image groups include a kit template image and a ribbon identification area template image;
[0006] Acquire an image to be identified, match the image to be identified with the feature sub-image group, and determine a target feature sub-image group from all the feature sub-image groups according to the matching result;
[0007] Determine a first region image from the image to be identified according to the reagent kit template image included in the target feature sub-image group, and then determine a second region image from the first region image according to the ribbon identification region template image included in the target feature sub-image group;
[0008] A color strip is determined from the second region image by using an edge detection algorithm, and color detection is performed on the color strip. A detection result corresponding to the image to be identified is determined according to the color detection result.
[0009] Optionally, the step of obtaining characteristic subgraph groups corresponding to various types of antigen detection kits includes:
[0010] Obtain images of various types of antigen test kits at different exposures;
[0011] The captured image is cropped according to the rectangular outline of the antigen detection kit to obtain a template image of the kit;
[0012] The photographed image is cropped according to the rectangular outline of the ribbon recognition area including the ribbon recognition mark to obtain a ribbon recognition area template image;
[0013] Based on the reagent kit template image and the color ribbon identification area template image, a characteristic sub-image group corresponding to each type of reagent kit is generated.
[0014] Optionally, matching the image to be identified with the feature sub-image groups, and determining a target feature sub-image group from all the feature sub-image groups according to the matching result, includes:
[0015] Calculating the SIFT features of each image in the feature sub-image group and the SIFT features of the image to be identified;
[0016] Matching the SIFT features of the image to be identified with the SIFT features of each picture in each set of the feature sub-image groups, and calculating the feature vector distance to obtain the sum of the distances between the image to be identified and each set of the feature sub-image groups;
[0017] A set of feature subgraph groups with the smallest sum of distances is selected as the target feature subgraph group.
[0018] Optionally, determining a first region image from the image to be identified according to the reagent kit template image included in the target feature sub-image group, and then determining a second region image from the first region image according to the ribbon identification region template image included in the target feature sub-image group, comprises:
[0019] Performing feature point matching on the reagent kit template image and the image to be identified, selecting four feature points that are closest to four vertices of the reagent kit template image from the image to be identified according to the matching result, generating corresponding rectangular frames through perspective transformation based on the four feature points and performing rectangular correction to obtain a first rectangular frame, and cropping the image to be identified according to the first rectangular frame to obtain the first area image;
[0020] Perform feature point matching on the color ribbon identification area template image and the first area image, select four feature points that are closest to the four vertices of the color ribbon identification area template image from the first area image according to the matching results, generate corresponding rectangular frames through perspective transformation based on the four feature points and perform rectangular correction to obtain a second rectangular frame, and crop the first area image according to the second rectangular frame to obtain the second area image.
[0021] Optionally, determining the color band from the second region image by using an edge detection algorithm includes:
[0022] Binarizing the second region image, and performing an opening operation on the processed binary image to obtain a filtered image;
[0023] Determine the corresponding foreground area and background area based on the filtered image, and perform regional connectivity processing on the overlapping area of the foreground area and the background area to obtain a connected image;
[0024] A watershed algorithm is used to segment the connected image into a color band strip area, and the color band strip area is rectangularized to obtain the color band strip.
[0025] Optionally, performing color detection on the color band strip and determining a detection result corresponding to the image to be identified according to the color detection result includes:
[0026] Performing denoising on the color band strips;
[0027] The color band strip is subjected to horizontal line detection according to the pixel accumulation feature, and the detection result corresponding to the image to be identified is determined according to the detection result and a preset color threshold.
[0028] Optionally, the performing horizontal line detection on the color band strip according to the pixel accumulation feature, and determining the detection result corresponding to the image to be identified according to the detection result and a preset color threshold, includes:
[0029] According to the detection display area characteristics of the antigen detection kit, the color band strip is divided into regions to obtain a first detection display area and a second detection display area;
[0030] According to the pixel accumulation characteristics, performing horizontal line detection on the first detection display area and the second detection display area respectively;
[0031] The detection result of each display area is determined according to the detection result and the preset color threshold, and the detection result corresponding to the image to be identified is determined according to the detection result and the detection display rule of the antigen detection kit.
[0032] In a second aspect, the present application discloses an antigen detection kit identification device, comprising:
[0033] A feature sub-image group acquisition module is used to acquire feature sub-image groups corresponding to various types of antigen detection kits; the feature sub-image groups include a kit template image and a ribbon identification area template image;
[0034] A target feature sub-image group determination module is used to obtain an image to be identified, match the image to be identified with the feature sub-image group, and determine a target feature sub-image group from all the feature sub-image groups according to the matching result;
[0035] A region image determination module, configured to determine a first region image from the image to be identified according to the reagent kit template image included in the target feature sub-image group, and then determine a second region image from the first region image according to the ribbon identification area template image included in the target feature sub-image group;
[0036] The recognition module is used to determine the color strip from the second area image by using an edge detection algorithm, perform color detection on the color strip, and determine the detection result corresponding to the image to be recognized according to the color detection result.
[0037] In a third aspect, the present application discloses an electronic device, comprising:
[0038] Memory, used to store computer programs;
[0039] A processor is used to execute the computer program to implement the aforementioned antigen detection kit identification method.
[0040] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned antigen detection kit identification method.
[0041] In the present application, characteristic sub-image groups corresponding to various types of antigen detection kits are obtained; the characteristic sub-image groups include a kit template image and a color band identification area template image; an image to be identified is obtained, the image to be identified is matched with the characteristic sub-image group, and a target characteristic sub-image group is determined from all the characteristic sub-image groups according to the matching results; a first area image is determined from the image to be identified according to the kit template image included in the target characteristic sub-image group, and then a second area image is determined from the first area image according to the color band identification area template image included in the target characteristic sub-image group; a color band strip is determined from the second area image by an edge detection algorithm, and color detection is performed on the color band strip, and a detection result corresponding to the image to be identified is determined according to the color detection result. It can be seen that by obtaining the kit template images and color ribbon identification area template images corresponding to different brands of antigen detection kits, the key area image templates of different types of antigen detection kits are obtained. After obtaining the image to be identified, the best target feature sub-image group is selected as the template through matching, and then the regional image and color ribbon strip are extracted in turn according to the target feature sub-image group. Finally, the test result is determined by identifying the color of the color ribbon strip. It can quickly and automatically identify the test results of various types of antigen detection kits, not limited to a certain brand, saving a lot of manual proofreading time and labor costs, and greatly improving the recognition processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0043] Figure 1 A flow chart of an antigen detection kit identification method provided in this application;
[0044] Figure 2a A schematic diagram of a specific reagent kit template image and a ribbon identification area template image provided in this application;
[0045] Figure 2b Another specific reagent kit template image and ribbon identification area template image schematic diagram provided in this application;
[0046] Figure 3 A flow chart of a specific target feature sub-graph group determination method provided in this application;
[0047] Figure 4 A flow chart of a specific method for determining a regional image provided in this application;
[0048] Figure 5 A flow chart of a specific method for determining a color band provided in this application;
[0049] Figure 6 A flow chart of a specific ribbon color detection method provided in this application;
[0050] Figure 7 A flow chart of a specific antigen detection kit identification method provided in this application;
[0051] Figure 8 A schematic diagram of the structure of an antigen detection kit identification device provided in this application;
[0052] Fig. 9 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] In the prior art, the COVID-19 antigen test results are uploaded to the designated platform by the tester after taking a photo, and manually reviewed by the platform manager, which has high labor costs, requires a lot of human resources, and is inefficient. In order to overcome the above technical problems, the present application proposes an antigen test kit recognition method, which can quickly and automatically recognize the test results of various types of antigen test kits, thereby improving the recognition and processing efficiency of antigen test kits.
[0055] The present application discloses an antigen detection kit identification method, see Figure 1 As shown, the method may include the following steps:
[0056] Step S11: Acquire characteristic sub-image groups corresponding to various types of antigen detection kits; the characteristic sub-image groups include a kit template image and a ribbon identification area template image.
[0057] In the present embodiment, firstly, characteristic sub-graph groups corresponding to various types of antigen detection kits are obtained; the characteristic sub-graph groups include a kit template image and a ribbon identification area template image. In the present embodiment, the obtaining of characteristic sub-graph groups corresponding to various types of antigen detection kits may include: obtaining photographs of various types of antigen detection kits at different exposures; cropping the photographs according to the rectangular outline of the antigen detection kit to obtain a kit template image; cropping the photographs according to the rectangular outline of the ribbon identification area including the ribbon identification mark to obtain a ribbon identification area template image; based on the kit template image and the ribbon identification area template image, a characteristic sub-graph group corresponding to each type of kit is generated. Taking the COVID-19 antigen detection kit as an example, vertical high-definition images of various brands of COVID-19 antigen detection kits at different exposures are collected, for example Figure 2a and Figure 2b As shown, the collected images are cropped from the original images according to the rectangular outline of the antigen detection kit and the rectangular outline of the color band identification area containing C and T marks to generate feature sub-image groups, and all the cropped feature sub-image groups are formed into a feature subset.
[0058] Step S12: acquiring an image to be identified, matching the image to be identified with the feature sub-image groups, and determining a target feature sub-image group from all the feature sub-image groups according to the matching result.
[0059] In this embodiment, after obtaining the image to be identified containing the antigen kit to be identified, the image to be identified is matched with all the feature sub-image groups, and then the target feature sub-image group is determined from all the feature sub-image groups based on the matching results, that is, an optimal template is selected so that the kit template area and the color band identification area in the image to be identified can be extracted based on the template.
[0060] In this embodiment, the matching of the image to be identified with the feature sub-graph group and determining the target feature sub-graph group from all the feature sub-graph groups according to the matching results may include: calculating the SIFT features of each image in the feature sub-graph group and the SIFT features of the image to be identified; matching the SIFT features of the image to be identified with the SIFT features of each image in each group of the feature sub-graph groups and calculating the feature vector distance to obtain the sum of the distances between the image to be identified and each group of the feature sub-graph groups; and selecting a group of feature sub-graph groups with the smallest sum of distances as the target feature sub-graph group. For example Figure 3As shown in the figure, the target feature sub-graph group selection algorithm operation steps include: respectively calculating the SIFT (Scale-invariant feature transform) feature points of two feature sub-graphs of different sizes for each brand, and calculating the SIFT feature points of the image to be identified; using the Brute Force matching algorithm to match the most similar feature points of each feature sub-graph with the input image, calculating the distance between similar matching points, and using two sub-graphs of different sizes of the same feature graph, respectively taking the distances of the 10 groups of feature points with the shortest distances to the feature points of the input image and summing them up, so as to improve the accuracy of brand matching and enhance the robustness of the algorithm; finally, selecting a group of feature sub-graph pairs with the smallest sum of distances as the sub-graph matching template.
[0061] Step S13: determining a first region image from the image to be identified according to the reagent kit template image included in the target feature sub-image group, and then determining a second region image from the first region image according to the ribbon identification area template image included in the target feature sub-image group.
[0062] In this embodiment, after determining the target feature sub-image group, a first area image, that is, the identified reagent kit area, is determined from the image to be identified based on the reagent kit template image included in the target feature sub-image group, and then a second area image, that is, the identified color ribbon identification area, is determined from the first area image based on the color ribbon identification area template image included in the target feature sub-image group.
[0063] In this embodiment, the determining of the first area image from the image to be identified according to the reagent kit template image included in the target feature sub-image group, and then determining the second area image from the first area image according to the ribbon identification area template image included in the target feature sub-image group, may include: performing feature point matching on the reagent kit template image and the image to be identified, selecting four feature points that are closest to four vertices of the reagent kit template image from the image to be identified according to the matching result, generating corresponding rectangular frames through perspective transformation based on the four feature points and performing rectangular correction to obtain a first rectangular frame, and cropping the image to be identified according to the first rectangular frame to obtain the first area image;
[0064] Perform feature point matching on the color ribbon identification area template image and the first area image, select four feature points that are closest to the four vertices of the color ribbon identification area template image from the first area image according to the matching results, generate corresponding rectangular frames through perspective transformation based on the four feature points and perform rectangular correction to obtain a second rectangular frame, and crop the first area image according to the second rectangular frame to obtain the second area image.
[0065] For example Figure 4As shown, the operation steps of the feature subgraph segmentation algorithm module include:
[0066] (1) Matching feature points between images using brand features according to the antigen test kit feature template;
[0067] (2) Sort the matching results and take the four feature vertices closest to the template for perspective transformation into a rectangular frame of a given size, perform rectangular correction on the transformed rectangular frame, and cut the antigen test kit out from the original image according to the rectangular frame.
[0068] (3) Using the feature template of the color band identification area with C and T marks, repeat steps (1) and (2) to obtain the sub-images of the C and T regions.
[0069] Step S14: determining a color strip from the second region image by using an edge detection algorithm, performing color detection on the color strip, and determining a detection result corresponding to the image to be identified according to the color detection result.
[0070] In this embodiment, after the second region image is extracted, that is, after the identified color band identification region is extracted, a color band strip is determined from the second region image by an edge detection algorithm, and the color band strip is subjected to color detection, and the detection result corresponding to the image to be identified is determined according to the color detection result. That is, the antigen detection result is determined according to the display on the color band strip and the detection rules of the antigen detection kit.
[0071] In this embodiment, determining the color band strip from the second area image by using an edge detection algorithm may include: binarizing the second area image and performing an opening operation on the processed binary image to obtain a filtered image; determining the corresponding foreground area and background area based on the filtered image, and performing regional connectivity processing on the overlapping area of the foreground area and the background area to obtain a connected image; using a watershed algorithm to segment the color band strip area from the connected image, and rectangularizing the color band strip area to obtain the color band strip.
[0072] For example Figure 5 As shown, the color band segmentation algorithm includes the following steps: (1) for the identified color band recognition area, the image is binarized into black and white parts by threshold segmentation method; (2) a kernel with a scale of 3 is used to filter the non-boundary small black dots on the image by opening operation, first erosion and then expansion; (3) the distance between the result of (2) and the background feature point (i.e., the point with pixel 0) is calculated to obtain the foreground object area, and then the result of (2) is expanded to obtain the background area; (4) the overlapping area of the foreground and background is calculated and obtained for regional connectivity operation; (5) the color band area is segmented by watershed algorithm; (6) the segmented irregular area is rectangularized to obtain a regular color band area.
[0073] In this embodiment, the color detection of the ribbon strip and the determination of the detection result corresponding to the image to be identified according to the color detection result may include: denoising the ribbon strip; performing horizontal line detection on the ribbon strip according to the pixel accumulation feature, and determining the detection result corresponding to the image to be identified according to the detection result and the preset color threshold. In order to improve the detection accuracy, the ribbon strip is denoised in advance, such as using median filtering to remove image noise, and then the ribbon strip is detected according to the pixel accumulation feature to detect the number and position of the horizontal lines, and finally the detection result corresponding to the image to be identified is determined according to the detection result and the preset color threshold. Taking the COVID-19 antigen test as an example, the ribbon strip of the COVID-19 antigen test kit includes a display area corresponding to the mark C and a display area corresponding to the mark T, wherein C and T both appear positive, C appears and T does not appear negative, and the others are invalid; thus, the final test result of the test kit can be identified according to the rule and the horizontal line detection result.
[0074] In this embodiment, the horizontal line detection of the color strip according to the pixel accumulation characteristics, and determining the detection result corresponding to the image to be identified according to the detection result and the preset color threshold, may include: dividing the color strip into regions according to the detection display area characteristics of the antigen detection kit to obtain a first detection display area and a second detection display area; performing horizontal line detection on the first detection display area and the second detection display area respectively according to the pixel accumulation characteristics; determining the detection result of each display area according to the detection result and the preset color threshold, and determining the detection result corresponding to the image to be identified according to the detection result and the detection display rule of the antigen detection kit.
[0075] In order to improve the accuracy of identification, before the horizontal line detection, the color band strip is divided into regions according to the detection display area characteristics of the antigen detection kit, e.g. Figure 6 As shown in the figure, taking COVID-19 antigen detection as an example: the image is divided into C zone and T zone; the pixel accumulation of the binary image is used to detect horizontal lines for the C zone image and the T zone image respectively, and the RGB color threshold is defined to determine the color of the color band for color detection. Only the horizontal lines that can be detected and are within the color threshold are returned as True, and the others are False; the antigen detection reagent result is judged according to the feedback of the C and T zones, that is, if both C and T are True, it is positive, if the C zone is True and the T zone is False, it is negative, and the others are invalid.
[0076] It can be seen, for example Figure 7As shown, in this embodiment, by establishing a brand feature picture set, the feature sub-image group of the corresponding brand is selected by matching the best feature sub-image group, and then the regional image is extracted, and the color band strips are segmented from the extracted regional image using the image edge detection algorithm, and the image horizontal line detection technology is used to determine whether the color band has produced a corresponding chemical reaction according to the RGB three-channel threshold to discriminate the test results of the kit contained in the image. It is only necessary to collect standard pictures of each brand as a template and no complicated annotation is required to effectively identify the test results of the new crown antigen detection kit, which can adapt to a variety of brands of new crown antigen detection kits, and can achieve rapid detection, and has a high accuracy rate, and has good detection effects and high robustness for formatted image data; compared with the deep learning algorithm, there is no need to annotate the data in large quantities, and at the same time, more attention is paid to the antigen kit itself, which can accurately locate the color band discrimination area, is not disturbed by complex background pictures, and the algorithm is simple to deploy, the hardware threshold is low, and it can be widely used to assist the new crown antigen self-test reporting results and image results verification work, greatly reducing time costs and labor costs.
[0077] As can be seen from the above, in this embodiment, characteristic sub-image groups corresponding to various types of antigen detection kits are obtained; the characteristic sub-image group includes a kit template image and a color band identification area template image; an image to be identified is obtained, the image to be identified is matched with the characteristic sub-image group, and a target characteristic sub-image group is determined from all the characteristic sub-image groups according to the matching results; a first area image is determined from the image to be identified according to the kit template image included in the target characteristic sub-image group, and then a second area image is determined from the first area image according to the color band identification area template image included in the target characteristic sub-image group; a color band strip is determined from the second area image by an edge detection algorithm, and color detection is performed on the color band strip, and a detection result corresponding to the image to be identified is determined according to the color detection result. It can be seen that by obtaining the kit template images and color ribbon identification area template images corresponding to different brands of antigen detection kits, the key area image templates of different types of antigen detection kits are obtained. After obtaining the image to be identified, the best target feature sub-image group is selected as the template through matching, and then the regional image and color ribbon strip are extracted in turn according to the target feature sub-image group. Finally, the test result is determined by identifying the color of the color ribbon strip. It can quickly and automatically identify the test results of various types of antigen detection kits, not limited to a certain brand, saving a lot of manual proofreading time and labor costs, and greatly improving the recognition processing efficiency.
[0078] Correspondingly, the present application also discloses an antigen detection kit identification device, see Figure 8 As shown, the device comprises:
[0079] The characteristic sub-image group acquisition module 11 is used to acquire characteristic sub-image groups corresponding to various types of antigen detection kits; the characteristic sub-image groups include a kit template image and a ribbon identification area template image;
[0080] A target feature sub-image group determination module 12 is used to obtain an image to be identified, match the image to be identified with the feature sub-image group, and determine a target feature sub-image group from all the feature sub-image groups according to the matching result;
[0081] A region image determination module 13, configured to determine a first region image from the image to be identified according to the reagent kit template image included in the target feature sub-image group, and then determine a second region image from the first region image according to the ribbon identification area template image included in the target feature sub-image group;
[0082] The recognition module 14 is used to determine the color strip from the second area image by using an edge detection algorithm, perform color detection on the color strip, and determine the detection result corresponding to the image to be recognized according to the color detection result.
[0083] As can be seen from the above, in this embodiment, characteristic sub-image groups corresponding to various types of antigen detection kits are obtained; the characteristic sub-image group includes a kit template image and a color band identification area template image; an image to be identified is obtained, the image to be identified is matched with the characteristic sub-image group, and a target characteristic sub-image group is determined from all the characteristic sub-image groups according to the matching results; a first area image is determined from the image to be identified according to the kit template image included in the target characteristic sub-image group, and then a second area image is determined from the first area image according to the color band identification area template image included in the target characteristic sub-image group; a color band strip is determined from the second area image by an edge detection algorithm, and color detection is performed on the color band strip, and a detection result corresponding to the image to be identified is determined according to the color detection result. It can be seen that by obtaining the kit template images and color ribbon identification area template images corresponding to different brands of antigen detection kits, the key area image templates of different types of antigen detection kits are obtained. After obtaining the image to be identified, the best target feature sub-image group is selected as the template through matching, and then the regional image and color ribbon strip are extracted in turn according to the target feature sub-image group. Finally, the test result is determined by identifying the color of the color ribbon strip. It can quickly and automatically identify the test results of various types of antigen detection kits, not limited to a certain brand, saving a lot of manual proofreading time and labor costs, and greatly improving the recognition processing efficiency.
[0084] In some specific embodiments, the characteristic sub-graph group acquisition module 11 may specifically include:
[0085] A picture acquisition unit, used to acquire pictures of various types of antigen detection kits at different exposure levels;
[0086] A first cropping unit, used to crop the photographed image according to the rectangular outline of the antigen detection kit to obtain a template image of the kit;
[0087] A second cropping unit, configured to crop the captured image according to a rectangular outline of the ribbon recognition area including the ribbon recognition mark, to obtain a ribbon recognition area template image;
[0088] The characteristic sub-image group determination unit is used to generate a characteristic sub-image group corresponding to each type of reagent kit based on the reagent kit template image and the ribbon identification area template image.
[0089] In some specific embodiments, the target feature subgraph group determination module 12 may specifically include:
[0090] A feature calculation unit, used to calculate the SIFT features of each image in the feature sub-image group and the SIFT features of the image to be identified;
[0091] A feature matching unit, used to match the SIFT features of the image to be identified with the SIFT features of each image in each group of the feature sub-image groups, and calculate the feature vector distance to obtain the sum of the distances between the image to be identified and each group of the feature sub-image groups;
[0092] The target feature subgraph group determining unit is used to select a set of feature subgraph groups with the smallest sum of distances as the target feature subgraph group.
[0093] In some specific embodiments, the area image determination module 13 may specifically include:
[0094] a first region image determination unit, configured to perform feature point matching on the reagent kit template image and the image to be identified, select four feature points that are closest to four vertices of the reagent kit template image from the image to be identified according to the matching result, generate corresponding rectangular frames through perspective transformation based on the four feature points, perform rectangular correction to obtain a first rectangular frame, and crop the image to be identified according to the first rectangular frame to obtain the first region image;
[0095] The second area image determination unit is used to perform feature point matching on the color ribbon identification area template image and the first area image, select four feature points that are closest to the four vertices of the color ribbon identification area template image from the first area image according to the matching results, generate corresponding rectangular frames through perspective transformation based on the four feature points and perform rectangular correction to obtain a second rectangular frame, and crop the first area image according to the second rectangular frame to obtain the second area image.
[0096] In some specific embodiments, the identification module 14 may specifically include:
[0097] An image processing unit, used for performing binarization processing on the second region image, and performing an opening operation on the processed binary image to obtain a filtered image;
[0098] A connectivity processing unit, used to determine the corresponding foreground area and background area based on the filtered image, and perform a region connectivity processing on the overlapping area of the foreground area and the background area to obtain a connected image;
[0099] The color band strip determination unit is used to segment the connected image into a color band strip area by using a watershed algorithm, and to perform rectangular processing on the color band strip area to obtain the color band strip.
[0100] In some specific embodiments, the identification module 14 may specifically include:
[0101] A denoising processing unit, used for performing denoising processing on the color band strip;
[0102] The horizontal line detection unit is used to perform horizontal line detection on the color band strip according to the pixel accumulation feature, and determine the detection result corresponding to the image to be identified according to the detection result and a preset color threshold.
[0103] In some specific embodiments, the horizontal line detection may specifically include:
[0104] A region division unit, used for dividing the color band strip into regions according to the detection display region characteristics of the antigen detection kit to obtain a first detection display region and a second detection display region;
[0105] A horizontal line detection unit, used to perform horizontal line detection on the first detection display area and the second detection display area respectively according to pixel accumulation characteristics;
[0106] The detection result determination unit is used to determine the detection result of each display area according to the detection result and a preset color threshold, and determine the detection result corresponding to the image to be identified according to the detection result and the detection display rule of the antigen detection kit.
[0107] Furthermore, the present application also discloses an electronic device, see Fig. 9 As shown, the contents in the drawings should not be considered as any limitation on the scope of use of the present application.
[0108] Fig. 9 The present invention provides a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the antigen detection kit identification method disclosed in any of the aforementioned embodiments.
[0109] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0110] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 221, a computer program 222, and data 223 including a feature sub-graph group, etc. The storage method can be temporary storage or permanent storage.
[0111] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, so as to realize the operation and processing of the massive data 223 in the memory 22 by the processor 21, and it can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the antigen detection kit identification method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0112] Furthermore, an embodiment of the present application also discloses a computer storage medium, in which computer executable instructions are stored. When the computer executable instructions are loaded and executed by a processor, the steps of the antigen detection kit identification method disclosed in any of the aforementioned embodiments are implemented.
[0113] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0114] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0115] Finally, it should be noted that, in this article, relational terms such as first and 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. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0116] The above is a detailed introduction to the antigen detection kit identification method, device, equipment and medium provided by the present invention. Specific examples are used herein 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. A method for identifying the detection results of an antigen detection kit, characterized in that: include: Obtain characteristic subgraph groups corresponding to various types of antigen detection kits; The characteristic sub-image group includes a reagent kit template image and a ribbon identification area template image; Acquire an image to be identified, match the image to be identified with the feature sub-image group, and determine a target feature sub-image group from all the feature sub-image groups according to the matching result; Determine a first region image from the image to be identified according to the reagent kit template image included in the target feature sub-image group, and then determine a second region image from the first region image according to the ribbon identification region template image included in the target feature sub-image group; Determine a color strip from the second region image by using an edge detection algorithm, perform color detection on the color strip, and determine a detection result corresponding to the image to be identified according to the color detection result; The method of determining a first region image from the image to be identified according to the reagent kit template image included in the target feature sub-image group, and then determining a second region image from the first region image according to the ribbon identification region template image included in the target feature sub-image group, comprises: Performing feature point matching on the reagent kit template image and the image to be identified, selecting four feature points that are closest to four vertices of the reagent kit template image from the image to be identified according to the matching result, generating corresponding rectangular frames through perspective transformation based on the four feature points and performing rectangular correction to obtain a first rectangular frame, and cropping the image to be identified according to the first rectangular frame to obtain the first area image; Perform feature point matching on the color ribbon identification area template image and the first area image, select four feature points that are closest to the four vertices of the color ribbon identification area template image from the first area image according to the matching results, generate corresponding rectangular frames through perspective transformation based on the four feature points and perform rectangular correction to obtain a second rectangular frame, and crop the first area image according to the second rectangular frame to obtain the second area image.
2. The antigen detection kit identification method according to claim 1, characterized in that: The method of obtaining characteristic subgraph groups corresponding to various types of antigen detection kits includes: Obtain images of various types of antigen test kits at different exposures; The captured image is cropped according to the rectangular outline of the antigen detection kit to obtain a template image of the kit; The photographed image is cropped according to the rectangular outline of the ribbon recognition area including the ribbon recognition mark to obtain a ribbon recognition area template image; Based on the reagent kit template image and the color ribbon identification area template image, a characteristic sub-image group corresponding to each type of reagent kit is generated.
3. The antigen detection kit identification method according to claim 1, characterized in that: The step of matching the image to be identified with the feature sub-image groups and determining a target feature sub-image group from all the feature sub-image groups according to the matching result includes: Calculating the SIFT features of each image in the feature sub-image group and the SIFT features of the image to be identified; Matching the SIFT features of the image to be identified with the SIFT features of each picture in each set of the feature sub-image groups, and calculating the feature vector distance to obtain the sum of the distances between the image to be identified and each set of the feature sub-image groups; A set of feature subgraph groups with the smallest sum of distances is selected as the target feature subgraph group.
4. The antigen detection kit identification method according to claim 1, characterized in that: Determining the color band from the second region image by using an edge detection algorithm includes: Binarizing the second region image, and performing an opening operation on the processed binary image to obtain a filtered image; Determine the corresponding foreground area and background area based on the filtered image, and perform regional connectivity processing on the overlapping area of the foreground area and the background area to obtain a connected image; A watershed algorithm is used to segment the connected image into a color band strip area, and the color band strip area is rectangularized to obtain the color band strip.
5. The antigen detection kit identification method according to any one of claims 1 to 4, characterized in that: The performing color detection on the color band strip and determining the detection result corresponding to the image to be identified according to the color detection result includes: Performing denoising on the color band strips; The color band strip is subjected to horizontal line detection according to the pixel accumulation feature, and the detection result corresponding to the image to be identified is determined according to the detection result and a preset color threshold.
6. The antigen detection kit identification method according to claim 5, characterized in that: The performing horizontal line detection on the color band strip according to the pixel accumulation feature, and determining the detection result corresponding to the image to be identified according to the detection result and a preset color threshold, includes: According to the detection display area characteristics of the antigen detection kit, the color band strip is divided into regions to obtain a first detection display area and a second detection display area; According to the pixel accumulation characteristics, performing horizontal line detection on the first detection display area and the second detection display area respectively; The detection result of each display area is determined according to the detection result and the preset color threshold, and the detection result corresponding to the image to be identified is determined according to the detection result and the detection display rule of the antigen detection kit.
7. An antigen detection kit identification device, characterized in that: include: A feature subgraph group acquisition module is used to acquire feature subgraph groups corresponding to various types of antigen detection kits; The characteristic sub-image group includes a reagent kit template image and a ribbon identification area template image; A target feature sub-image group determination module is used to obtain an image to be identified, match the image to be identified with the feature sub-image group, and determine a target feature sub-image group from all the feature sub-image groups according to the matching result; A region image determination module, configured to determine a first region image from the image to be identified according to the reagent kit template image included in the target feature sub-image group, and then determine a second region image from the first region image according to the ribbon identification area template image included in the target feature sub-image group; A recognition module, used for determining a color band from the second region image by using an edge detection algorithm, performing color detection on the color band, and determining a detection result corresponding to the image to be recognized according to the color detection result; The regional image determination module is used to perform feature point matching on the reagent kit template image and the image to be identified, select four feature points that are closest to the four vertices of the reagent kit template image from the image to be identified according to the matching result, generate corresponding rectangular frames through perspective transformation based on the four feature points, and perform rectangular correction to obtain a first rectangular frame, and crop the image to be identified according to the first rectangular frame to obtain the first regional image; Perform feature point matching on the color ribbon identification area template image and the first area image, select four feature points that are closest to the four vertices of the color ribbon identification area template image from the first area image according to the matching results, generate corresponding rectangular frames through perspective transformation based on the four feature points and perform rectangular correction to obtain a second rectangular frame, and crop the first area image according to the second rectangular frame to obtain the second area image.
8. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the antigen detection kit identification method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein when the computer program is executed by a processor, the antigen detection kit identification method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Data sharing method and device for remote sampling, electronic equipment and readable storage medium
CN114445759A