A dry chemical adaptive detection and identification method based on a home self-test system for female vaginal secretions

By extracting the oblique edges and contours of the reagent plate, identifying the reagent blocks and calculating the HSV data value, the problem that the prior art cannot accurately identify and judge female vaginal secretion leucorrhea samples after scene changes, and realizes different lighting and equipment conditions Accurate detection under.

CN118941563BActive Publication Date: 2025-02-11SHANDONG SHIDASI BIOLOGICAL IND CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411424593.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2025-02-11
Estimated Expiration
2044-10-12

AI Technical Summary

Technical Problem

After the scene changes, the prior art cannot accurately identify and judge the leucorrhea samples of female vaginal secretions, resulting in inaccurate color judgment or inability to judge, which in turn leads to misjudgment.

Method used

By obtaining the width and height of the image, extracting the oblique edge of the reagent plate in the image, determining whether the oblique edge is in the upper right corner and within the field of view, and using a single or enhanced noise removal method to extract the contour of the reagent plate according to the lighting conditions, identifying the reagent block , calculate the HSV data value in the center area of ​​the reagent block, and compare the HSV data value within the corresponding range to judge the negative and positive properties of the detection item.

Benefits of technology

After scene transformation, the leucorrhea samples can be accurately identified and judged, which improves the accuracy and reliability of the detection and avoids misjudgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118941563B_ABST
    Figure CN118941563B_ABST
Patent Text Reader

Abstract

The present invention relates to a dry chemical adaptive detection and identification method based on a home self-test system for female vaginal secretions, wherein the leucorrhea sample is collected by the home medical staff or by the medical staff on site; the leucorrhea sample is added to the reagent block corresponding to the reagent plate according to the corresponding test item; the image is collected and uploaded by the home self-test system; the width and height of the image are obtained, and the hypotenuse of the reagent plate in the image is extracted; the placement position of the reagent plate is detected, and it is determined whether the hypotenuse is in the upper right corner and the field of view; the outline of the reagent plate in the image is detected, and if the illumination is relatively uniform, the outline of the reagent plate is extracted by a single denoising method, and if the illumination is uneven, the outline of the reagent plate is extracted by an enhanced denoising method; the position coordinates of the reagent plate are calculated; the reagent block is identified; a small rectangular area is introduced to calculate the HSV data value of the central area of ​​the reagent block; the HSV data value is compared within the corresponding range to determine the yin and yang of the test item. The present invention can still identify and accurately determine the leucorrhea sample after the scene is changed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent medical detection technology, and in particular to a dry chemical adaptive detection and identification method based on a female vaginal secretion home self-test system. Background Art

[0002] With the introduction of relevant documents such as hierarchical diagnosis and treatment, family doctor contract services, and technological advances, more and more testing projects can be performed at home. Dry chemical testing, which is widely used in home self-testing products, is a fast, simple, small sample usage and practical testing method. It uses chemical reagents to react with the substance being tested to produce visible color changes, which are then tested through color analysis.

[0003] The Chinese invention patent "Vaginal secretion detector, dry chemical detection device and dry chemical detection method" with publication number CN114441512A proposes the use of dry chemistry to detect vaginal secretions. It uses the HSV color space to read, analyze and judge the color data value after the chemical reaction. It does not require the human eye to recognize the color, which reduces the error rate of subjective judgment of color. However, this method is only applicable to specific scenes, that is, fixed lighting instruments and fixed shooting equipment collect images of specimens dyed by professionals, and use specific thresholds for judgment; if the scene changes, that is, different users' shooting equipment collects images of specimens dyed by users themselves under different lighting environments, the reagent strip will not be recognized, the HSV color value will not be read accurately, and the specific threshold will not be suitable for comparison. This phenomenon is caused by improper placement of the reagent strip and different lighting environments (relatively uniform lighting or uneven lighting), resulting in inaccurate color judgment or inability to judge the color, which leads to misjudgment. Therefore, it is particularly important to develop a dry chemical adaptive detection and recognition method based on a female vaginal secretion home self-examination system that can still recognize and judge accurately after the scene changes. Summary of the invention

[0004] The technical problem to be solved by the present invention is to overcome the above-mentioned defects of the prior art and provide a dry chemical adaptive detection and identification method based on a female vaginal discharge home self-test system. The method can still identify and accurately judge leucorrhea samples after the scene changes.

[0005] The present invention is achieved through the following technical solutions:

[0006] A dry chemical adaptive detection and identification method based on a female vaginal secretion home self-test system comprises the following steps:

[0007] Collect vaginal discharge samples at home or with the help of visiting medical personnel;

[0008] According to the test items corresponding to the leucorrhea sample, add the leucorrhea sample to the corresponding reagent block on the reagent plate;

[0009] Collect and upload images through the home self-examination system;

[0010] Get the width and height of the image and extract the bevel of the reagent plate in the image: if the illumination is relatively uniform, directly extract the bevel of the reagent plate; if the illumination is uneven, use a denoising method to extract the bevel of the reagent plate;

[0011] Check the placement of the reagent plate to determine whether the hypotenuse is in the upper right corner and within the field of view;

[0012] Detect the outline of the reagent plate in the image: If the illumination is relatively uniform, use the single denoising method to extract the outline of the reagent plate; if the illumination is uneven, use the enhanced denoising method to extract the outline of the reagent plate;

[0013] Calculate the position coordinates of the reagent plate;

[0014] Identify reagent blocks;

[0015] A small rectangular area is introduced to calculate the HSV data value of the central area of ​​the reagent block;

[0016] Compare the HSV data values ​​within the corresponding range to determine the positive or negative nature of the test item.

[0017] As an optimization, if the illumination is uneven, the specific steps of extracting the bevel of the reagent plate by denoising are as follows:

[0018] Denoising the original image: Get the original image and filter out a large number of noise points in the image through Gaussian filtering;

[0019] Image edge detection: Perform edge detection on the image obtained after denoising the original image;

[0020] Extract the hypotenuse of the reagent plate and obtain the coordinates of the two endpoints , : After performing image edge detection, use the Hough line detection algorithm to extract the coordinates of the two endpoints of the hypotenuse of the reagent plate in the image , , and finally filter according to the angle. The formula is as follows:

[0021] ,

[0022] in, To extract the slope angle, , The minimum and maximum values ​​for extracting the bevel angle.

[0023] As an optimization, the specific steps of detecting the placement of the reagent plate and determining whether the hypotenuse is in the upper right corner and within the field of view are:

[0024] By obtaining the width and height of the image less than, extract the coordinates of the two endpoints of the hypotenuse of the reagent plate in the image , , whether it is within the range of image width w, height h, Is it positive, greater than 0, to determine whether the hypotenuse is in the upper right corner and within the field of view, that is, the coordinates of the two endpoints , ,angle Are the following conditions met:

[0025] ,

[0026] ,

[0027] ,

[0028] ,

[0029] ,

[0030] in, To extract the slope angle, The maximum value of the y coordinates of the two endpoints of the hypotenuse is taken, and H is the height of the image;

[0031] If the coordinates of the two endpoints , ,angle , if the above conditions are met and the image width and height w and h are within the range, it can be determined that the reagent plate bevel is in the upper right corner, the placement is correct, and it is within the field of view; if the coordinates of the two endpoints , ,angle If the above conditions are not met, the test cannot be performed, that is, the test is exited, and the signal is transmitted back to the home self-test system. In the sampling interface of the home self-test system, the pre-selected reagent plate placement area interface is used to guide the user to take images until the bevel of the reagent plate is detected in the upper right position.

[0032] As an optimization, if the illumination is relatively uniform, the specific steps for extracting the outline of the reagent plate using the single denoising method are:

[0033] ,

[0034] Wherein, src(x,y) is the grayscale value of the single-channel grayscale image of the original image at the pixel coordinate point (x,y), threshvalue is the preset threshold, maxvalue is the result of the grayscale value src(x,y) of the original image at the pixel coordinate point (x,y) being greater than the preset threshold threshvalue, and 0 is the result of the grayscale value src(x,y) being less than or equal to the preset threshold threshvalue;

[0035] Smoothing, linear filtering, smoothing based on convolution kernel, i.e. mean filter kernel , remove the small contours generated by the excess noise, perform related operations, and obtain the new image smooth_img calculation formula as follows:

[0036] ,

[0037] in , Represent the coordinates of a point in the convolution kernel; anchor.x and anchor.y represent the preset anchor coordinates; x, y represent the position on the original image, kernel represents the value of the current position of the convolution kernel, and Represents the pixel value on the original image, according to the set convolution kernel kernel , Substitute into the above formula to get the smoothed image;

[0038] Find all contours, by area Compare and find the largest area , that is, the outline of the reagent plate, filter out the width and height w, h of the reagent plate outline, and the center coordinate point ,angle , and calculate the ratio of the height to the width of the contour ratio , the calculation formula is as follows:

[0039] ,

[0040] ,

[0041] in, is the area of ​​the largest contour among all detected contour areas. ratio It is the ratio of the height to the width of the reagent plate outline.

[0042] As an optimization, if the illumination is uneven, the specific steps of using the enhanced denoising method to extract the outline of the reagent plate are:

[0043] ,

[0044] Where f′(x, y) is the original image with noise, g(x, y) is the image obtained after mean filtering, s is the set of pixels in the template centered at point (i, j), and the template size is kernel x kernel;

[0045] Threshold segmentation, convert the single-channel grayscale image src into a binary image dst, input a denoised grayscale image, use threshold segmentation technology, set a threshold, convert the grayscale image into a binary image, set the pixel value greater than the threshold to white or black, and set the pixel value less than or equal to the threshold to black or white, and get a binary image dst after threshold segmentation;

[0046] Morphological processing, input a binary image dst, first perform an erosion operation, by defining a rectangular structure element B, remove the redundant noise and small burrs in the image, then perform an opening operation, use the same rectangular structure element B to restore the main features of the image and enhance the edge information, and get a morphologically processed image opened. The erosion method is as follows:

[0047] ,

[0048] in, It is an erosion operation, A is the original image, B is the structural element; drag the structural element B to move in the A domain. If every pixel in the structural element is exactly the same as the corresponding pixel in the same neighborhood centered on x, then the x pixel point is retained and the image is reduced; the opening operation method is as follows:

[0049] ,

[0050] in, For corrosion operations, It is a dilation operation, A is the original image, B is the structural element; firstly, the erosion operation is performed to remove all the pixels on the image boundary that cannot contain the structural element B, and then the dilation operation is performed to expand all the pixels in the image outward. The expansion distance and shape are determined by the structural element B to enlarge the image;

[0051] Edge detection, detect the contour edge, input a morphologically processed image opened, use the Canny edge detection algorithm, use the Gaussian filter to smooth the image, calculate the amplitude and direction of the image gradient, and extract the edge points in the image through non-maximum suppression and double threshold processing methods to form a complete contour edge, and obtain an image edge containing the contour edge;

[0052] ,

[0053] in, For corrosion operations, The expansion operation is performed, A is the original image, B is the structural element, and the expansion operation is performed first to expand all pixels in the image outward. The expansion distance and shape are determined by the structural element B, thereby enlarging the image. Then, the erosion operation is performed to remove all pixels on the image boundary that cannot contain the structural element B, thereby reducing the image.

[0054] Collect all contours, compare them by area, and find the largest area , that is, the outline of the reagent plate, filter out the width and height of the reagent plate outline w,h , center coordinate point ,angle , calculate the aspect ratio ratio , the calculation formula is as follows:

[0055] ,

[0056] ,

[0057] in, is the area of ​​the largest contour among all detected contour areas. ratio It is the ratio of the height to the width of the reagent plate outline.

[0058] As an optimization, the specific steps of calculating the position coordinates of the reagent plate are:

[0059] By extracting the outline of the reagent plate in the image, the width and height of the reagent plate outline are obtained w,h , center coordinate point , calculate the coordinates of the upper left vertex of the reagent plate outline , coordinates of the lower right vertex , the calculation formula is as follows:

[0060] if ,

[0061] but ;

[0062] if ,

[0063] but .

[0064] As an optimization, the specific steps of identifying the reagent block are: by calculating the coordinates of the two endpoints of the hypotenuse of the reagent plate , , reagent plate outline width w, h, aspect ratio ratio , reagent plate profile angle , to determine whether the reagent block can be identified, the calculation formula is as follows:

[0065] ,

[0066] ,

[0067] Among them, is the minimum value of the contour width-to-height ratio, is the maximum value of the contour width-to-height ratio, is the maximum value of the reagent plate contour angle, is the minimum value of the reagent plate contour angle, is determined by the value of ; , , the value of is determined by the width and height of the reagent plate contour. When w > h, ; when w < h, ;

[0068] If , then reagent block recognition can be performed;

[0069] If is not within the interval, or is not within the interval, then reagent block recognition cannot be performed, the recognition is exited, and the signal is sent back to the home self-test system. On the interface for sampling in the home self-test system, the user is guided to take an image using the preselected reagent plate placement area interface until successful.

[0070] As an optimization, the step of introducing a small rectangular area to calculate the HSV data value of the reagent block center area is as follows:

[0071] Calculate the position coordinates of each reagent block;

[0072] Obtain the position coordinates of the center area of each reagent block: The position coordinates of each reagent block area are reduced by M pixels from the outside to the inside to obtain the position coordinates of the center area of each reagent block;

[0073] Calculate the position coordinates of each small rectangular area: Extend D pixel values to the right of each reagent block itself, take the small rectangular area, and calculate the position coordinates of each small rectangular area;

[0074] Calculate the average value of the BGR data value of the small rectangular area: Obtain the BGR data value of each small rectangular area through the position coordinates of each small rectangular area, read the average value of the BGR data value of the small rectangular area, and then read the average value of the HSV data value of the small rectangular area;

[0075] Obtain the reference value: The average value of the BGR data value of the small rectangular area under the ideal condition of no noise and uniform illumination is used as the reference value;

[0076] Obtain the difference: Subtract the average value of the BGR data of the reference value from the average value of the BGR data of the small rectangular area to obtain the difference;

[0077] Calculate the average value of the BGR data of the reagent block: Obtain the BGR data of each reagent block through the position coordinates of the central area of the reagent block, read the average value of the BGR data of the reagent block, and then read the average value of the HSV data of the reagent block area;

[0078] Supplement the difference to the average value of the BGR data of the central area of the reagent block to obtain a new BGR data value;

[0079] Obtain the HSV data value of the central area of the reagent block: Convert the new BGR data value into the average value of the HSV data value to obtain the HSV data value of the central area of the reagent block.

[0080] As an optimization, the specific steps for calculating the position coordinates of each reagent block and the position coordinates of each small rectangular area are as follows:

[0081] In the case of recognizable reagent blocks, according to the angle of the reagent plate placement , the proportion of the reagent block in the reagent plate, calculate the upper left coordinate position and the lower right coordinate position of N reagent blocks in the image;

[0082] Extend D pixel values to the right of each of the N reagent block areas respectively, take N nxn small rectangular areas, and calculate the upper left coordinate position and the lower right coordinate position of the N small rectangular areas;

[0083] Calculate the proportion of the reagent block to the reagent plate. When w < h, the formula is as follows:

[0084] ,

[0085] When w > h, the formula is as follows:

[0086] ,

[0087] Among them, w 、 h are the width and height of the reagent plate contour respectively, is the diameter of the reagent block, is the horizontal distance between the reagent block and the reagent plate, is the vertical distance between the reagent block and the reagent plate, is the distance between reagent blocks, is the proportion of the reagent block in the horizontal direction of the reagent plate, is the proportion of the reagent block in the vertical direction of the reagent plate, is the proportion of the reagent block diameter in the horizontal direction of the reagent plate, is the ratio of the reagent block diameter in the vertical direction of the reagent plate, is the ratio of the distance between reagent blocks in the vertical direction of the reagent plate, is the horizontal pixel width of the reagent block from the edge of the reagent plate outline in the image, is the pixel height of the reagent block in the vertical direction from the edge of the reagent plate outline in the image, is the pixel length in the horizontal direction of the reagent block diameter, is the pixel length in the direction perpendicular to the diameter of the reagent block, is the pixel length of the interval between reagent blocks in the image;

[0088] The area positions of N reagent blocks are obtained by the ratio of the reagent block to the reagent plate. The coordinate position formula of the reagent block area is as follows:

[0089] ,

[0090] in, is the coordinate of the upper left vertex of the reagent plate outline, is the horizontal pixel width of the reagent block from the edge of the reagent plate outline in the image, is the vertical pixel height, is the pixel length in the horizontal direction of the reagent block diameter, is the pixel length in the direction perpendicular to the diameter of the reagent block, =0, 1, 2...N-1, N is the number of reagent blocks, is the pixel length of the interval between reagent blocks in the image;

[0091] The area positions of N small rectangles are obtained by the ratio of the reagent block to the reagent plate. The coordinate position formula of the small rectangular area is as follows:

[0092] ,

[0093] Where D is the pixel value extending to the right, and n is the n rows or n columns of the square matrix nxn.

[0094] As an optimization, N is 6. When the reagent block can be identified, the angle at which the reagent plate is placed is , the proportion of reagent blocks in the reagent plate, 6 reagent blocks are calculated in the image The upper left coordinate position , the lower right coordinate position ;

[0095] Extend D pixels to the right of the 6 reagent block areas, and take 6 small nxn rectangular areas. , calculate the upper left coordinate position of the 6 small rectangular areas Lower right coordinate position ;

[0096] Substitute the ratio of the reagent block to the reagent plate into the coordinate position formula of the reagent block area. The coordinate position formula of the reagent block area is as follows:

[0097] ,

[0098] in, is the coordinate of the upper left vertex of the reagent plate outline, Reagent Block The upper left coordinate point and the lower right coordinate point position information;

[0099] Substitute the ratio of the reagent block to the reagent plate into the formula for the position of the small rectangular area. The formula for the position of the small rectangular area is as follows:

[0100] ,

[0101] Where D is the pixel value extending to the right, n is the n rows or n columns of the square matrix nxn, Small rectangular areas The upper left coordinate point and lower right coordinate point position information.

[0102] As an optimization, the specific steps for introducing a small rectangular area to calculate the HSV data value of the central area of ​​the reagent block are as follows:

[0103] The position coordinates of each reagent block area are reduced by M pixels from the outside to the inside to obtain the position coordinates of the central area of ​​each reagent block;

[0104] Get the BGR data value of each small rectangular area through the position coordinates of each small rectangular area, and read the average value of the BGR data value of the small rectangular area , and then read the average value of the HSV data value in the small rectangular area ;

[0105] Get the reference value: the average value of the BGR data value in a small rectangular area under ideal conditions without any noise and uniform lighting As a reference value;

[0106] Get the difference: Set the reference value The average value of the BGR data value in the small rectangular area Make a difference and get the difference ;

[0107] Obtain the BGR data value of each reagent block through the position coordinates of the center area of ​​the reagent block, and read the average value of the BGR data value of the reagent block , and then read the average value of the HSV data value of the reagent block area ;

[0108] The difference The average value of the BGR data value in the center area of ​​the replenishment reagent block , get the new BGR data value ;

[0109] The new BGR data value Convert to the average HSV data value H, S, V to obtain the HSV data value of the center area of ​​the reagent block. The calculation formula is as follows:

[0110] ,

[0111] ,

[0112] like <0, then ;

[0113] in, =0, 1, 2...N-1, N is the number of reagent blocks, M is the reduced pixel value, The center area of ​​the reagent block The upper left and lower right coordinate point position information, is the average value of the BGR data value in the small rectangular area White with reference value The difference, The difference is Replenish the average value of BGR data of each reagent block Get the new BGR data value, H, S, V are The result after conversion is hue, saturation and brightness values.

[0114] As an optimization, N is 6, and the specific steps for calculating the average value of the HSV data values ​​in the central area of ​​the 6 reagent blocks are as follows:

[0115] 6 reagent block areas , From outside to inside, reduce M pixels to get the central area of ​​the reagent block ;

[0116] Get the BGR data value of each small rectangular area through the position coordinates of the 6 small rectangular areas, and read the average value of the BGR data value of the small rectangular area , and then read the average value of the HSV data value in the small rectangular area ;

[0117] Get the reference value: the average value of the BGR data value of a small rectangular area under ideal conditions without any noise and uniform lighting. Get the reference value: the average value of the BGR data value of a small rectangular area under ideal conditions without any noise and uniform lighting. As a reference value;

[0118] Get the difference: Set the reference value The average value of the BGR data value in the small rectangular area Make a difference and get the difference ;

[0119] Obtain the BGR data value of each reagent block through the position coordinates of the center area of ​​the reagent block, and read the average value of the BGR data value of the reagent block , and then read the average value of the HSV data value of the reagent block area ;

[0120] The difference The average value of the BGR data value in the center area of ​​the replenishment reagent block , get the new BGR data value ;

[0121] The new BGR data value Convert to the average HSV data value H, S, V, so as to calculate the center area of ​​each reagent block The HSV data value in the formula is as follows:

[0122] ,

[0123] ,

[0124] like <0, then ;

[0125] The HSV data values ​​of the central areas of the six reagent blocks are , ;

[0126] Among them, M is the reduced pixel value, , The center areas of the six reagent blocks The upper left and lower right coordinate point position information, The average value of the BGR data value in the 6 small rectangular areas White with reference value The difference, The difference is Replenish the average value of the BGR data of 6 reagent blocks Get the new BGR data value, H, S, V are The result after conversion is hue, saturation and brightness values.

[0127] As an optimization, the specific steps of comparing the HSV data values ​​within the corresponding range and determining the positive and negative of the test items are:

[0128] The HSV data values ​​of the six reagent blocks are compared with the HSV data values ​​in the multiple color ranges in the table of the HSV value range of the test item. The six test items are respectively corresponding to pH, hydrogen peroxide, leukocyte esterase, sialidase, coagulase, and β-glucuronidase. 6 HSV data values ​​are used to determine whether the six test items are within the HSV data value range indicated by positive, thereby determining the positive and negative nature of the six test items.

[0129] The beneficial effects of the present invention are:

[0130] The present invention provides a dry chemical adaptive detection and identification method based on a home self-test system for female vaginal secretions, comprising the following steps: collecting leucorrhea samples at home or with the assistance of visiting medical personnel; adding the leucorrhea samples to the reagent blocks corresponding to the reagent board according to the detection items corresponding to the leucorrhea samples; collecting and uploading images through the home self-test system; obtaining the width and height of the image, extracting the hypotenuse of the reagent board in the image, if the illumination is relatively uniform, directly extracting the hypotenuse of the reagent board, if the illumination is uneven, taking a denoising method to extract the hypotenuse of the reagent board; detecting the placement position of the reagent board, and judging whether the hypotenuse is in the upper right corner and within the field of view; detecting the outline of the reagent board in the image, the steps are: if the illumination is relatively uniform, taking a single denoising method to extract the outline of the reagent board; if the illumination is uneven, taking an enhanced denoising method to extract the outline of the reagent board; calculating the position coordinates of the reagent board; identifying the reagent block; introducing a small rectangular area to calculate the HSV data value of the central area of ​​the reagent block; comparing the HSV data values ​​within the corresponding range to judge the yin and yang of the detection item. For the existing method, after the scene is changed, there will be a phenomenon that the reagent strip cannot be recognized, the HSV color value is not accurately read, and the specific threshold is not suitable for comparison. The present invention obtains the width and height of the image, extracts the hypotenuse of the reagent plate in the image, detects the reagent plate placement position, and determines whether the hypotenuse is in the upper right corner and within the field of view, effectively solving the problem of improper placement of the reagent plate; In addition, the present invention adopts different detection images for the reagent plate contour method in different environments, that is, if the illumination is relatively uniform, a single denoising method is used to extract the contour of the reagent plate; If the illumination is uneven, the contour of the reagent plate is extracted by an enhanced denoising method, effectively improving the accurate recognition and detection accuracy under the condition of uneven illumination; In addition, the present invention calculates the HSV data value of the central area of ​​the reagent block by introducing a small rectangular area, effectively solving the problem of inaccurate color judgment or inability to judge the color caused by directly reading the central area of ​​the reagent block, thereby causing the problem of misjudgment. After the scene is changed, the present invention, that is, the shooting equipment of different users collects images of the specimens dyed by the user himself under the illumination of different environments, and can still identify and judge accurately. BRIEF DESCRIPTION OF THE DRAWINGS

[0131] The following is a further description of a dry chemical adaptive detection and identification method based on a female vaginal secretion home self-test system in conjunction with the accompanying drawings:

[0132] Figure 1 It is a flow chart of a dry chemical adaptive detection and identification method based on a female vaginal secretion home self-test system of the present invention;

[0133] Figure 2 Flowcharts of Embodiment 1 and Embodiment 2;

[0134] Figure 3 This is an example image after threshold segmentation when the lighting is relatively uniform;

[0135] Figure 4 for Figure 3 Example image after smoothing;

[0136] Figure 5 This is an example diagram showing the reagent plate outline coordinate frame and reagent block coordinate frame under relatively uniform lighting conditions;

[0137] Figure 6 This is an example image after threshold segmentation in the case of uneven lighting;

[0138] Figure 7 for Figure 6 Example images after morphological transformation;

[0139] Figure 8 This is an example of the display of the reagent plate outline coordinate frame and the reagent block coordinate frame under uneven lighting conditions. DETAILED DESCRIPTION

[0140] The present application is further described in detail below in conjunction with the accompanying drawings and implementation methods. It is particularly noted that the following implementation methods are only used to illustrate the present application, but do not limit the scope of the present application. Similarly, the following implementation methods are only some implementation methods of the present application rather than all implementation methods. All other implementation methods obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0141] Embodiment 1:

[0142] like Figure 1-Figure 5 As shown, a dry chemical adaptive detection and identification method based on a female vaginal secretion home self-test system comprises the following steps:

[0143] Step 1: Collect vaginal secretion samples at home or with the help of visiting medical staff, and drop the vaginal secretions into the six circular areas of the reagent block on the reagent plate Wait for the dry chemicals in the six reagent blocks to change color at room temperature.

[0144] Step 2: Open the home self-test system program and enter the image acquisition interface. According to the instructions and guidance of the interface, use the camera to shoot and upload the image in the image placement template area in the center of the interface under appropriate lighting.

[0145] Step 3: The illumination is relatively uniform, and the hypotenuse of the reagent plate is directly extracted: read the width and height of the image grayImage W=710, H=1600, extract the hypotenuse l of the reagent plate contour, and the coordinate values ​​of the two end points are (498,220), (539,255).

[0146] Step 4: Given the image width W = 710 and height H = 1600 obtained in Step 3, check whether the two endpoint coordinate values (498, 220) and (539, 255) selected are within the range of the image width w and height h, and whether θ is positive and greater than 0, that is, whether the conditions are met. Determine whether the hypotenuse of the reagent plate is in the upper right corner and within the field of view.

[0147] ,

[0148] If the two endpoint coordinates of the hypotenuse both meet the above conditions, it can be determined that the hypotenuse of the reagent plate is in the upper right corner of the image and is also within the field of view.

[0149] Step 5: Detect the reagent plate. Based on the conclusion obtained in Step 4, the contour of the reagent plate in the image can be extracted. It can be directly extracted on the hypotenuse of the reagent plate, with the correct position and relatively uniform illumination. Use the single denoising method to extract the contour of the reagent plate:

[0150] Threshold segmentation: Convert the original image into a single-channel grayscale image src, and convert the single-channel grayscale image src into a binary image dst. threshvalue = 1. The converted image is as Figure 3 shown;

[0151] Morphological processing of the binary image dst. Perform closing operation to close the concentrated black areas to form a new contour, and obtain a new image result;

[0152] Smooth the image result. Perform linear filtering and smooth it according to the convolution kernel, that is, the mean filter kernel is kernel , remove the small contours generated by the excess noise, perform related operations, and obtain a new image smooth_img. The new image is as Figure 4 shown;

[0153] Find all contours, calculate the area values of all contours, compare according to the area size, find the maximum area area_max = 493373, which is the contour of the reagent plate. Use the minimum bounding rectangle algorithm to calculate the width w = 437, height h = 1129, and the center coordinate point (354, 779), and the angle , and calculate the ratio of the height to the width of the contour ratio = 0.39.

[0154] Step 6: Given the width w = 437, height h = 1129, and center coordinate point (354, 779) of the reagent plate contour obtained in Step 5, since w = 437 < h = 1129, calculate the upper left corner coordinates and upper right corner coordinates of the reagent plate as:

[0155] ,

[0156] Step 7: Identify the reagent blocks. From Step 3, Step 5, and Step 6, the coordinates of the two endpoints of the hypotenuse are (498, 220) and (539, 255). The coordinates of the upper left corner and the lower right corner of the reagent plate are (135, 204) and (582, 1343). The width and height of the reagent plate outline are w = 437 and h = 1129, and the width-to-height ratio ratio = 0.39, , because < 45°, so , it is concluded that , which satisfies this condition, and the reagent blocks can be identified.

[0157] Step 8: Under the conclusion of Step 7, identify the reagent blocks. Given the width and height of the reagent plate outline w = 437 and h = 1129, and also under the condition of w < h, = 0.13, = 0.08, = 0.32, = 0.135, = 0.14, = 56, = 90, = 139, = 152, then the coordinates of the six reagent blocks are:

[0158] ,

[0159] Extend 100 pixel values to the right of the six reagent block areas towards themselves, and take six 20x20 small rectangular areas. Then the coordinates of the six small rectangular areas are:

[0160] ,

[0161] The display of the frames for the six reagent block coordinates and the display of the frames for the six small rectangular coordinates are as Figure 5 shown.

[0162] Step 9: From the six reagent block areas in Step 8 , , , , , , set M = 50 and calculate the central areas of the reagent blocks respectively as:

[0163] ,

[0164] Read the average value of the HSV data values of the reagent block areas , as shown in Table 1 below; the average value of the HSV data values of the six small rectangular areas , as shown in Table 2 below; the coordinates of the central area of ​​the six reagent blocks and the reference values ​​of the BGR data values ​​of the six small rectangular areas under the ideal condition of no noise and uniform illumination are respectively , and obtain the HSV data values ​​of the central areas of the six reagent blocks.

[0165] Table 1

[0166]

[0167] Table 2

[0168]

[0169] According to the difference The HSV data values ​​of the central areas of the six reagent blocks are .

[0170] Step 10: Compare the HSV data values ​​of the center area of ​​the six reagent blocks with the HSV data values ​​of the various color ranges in the table of the HSV value range of the test item. The six test items are respectively corresponding to pH, hydrogen peroxide, leukocyte esterase, sialidase, coagulase, and β-glucuronidase. The 6 HSV data values ​​are judged as negative and positive for the six test items according to the interpretation criteria in Table 3 and Table 4, and compared with the manual interpretation results. The test results of uniform illumination are shown in Table 5.

[0171] Table 3

[0172]

[0173] Table 4

[0174]

[0175] Table 5

[0176]

[0177] It can be seen from Table 5 above that the reading results of the present invention under uniform illumination are consistent with the manual reading results.

[0178] Embodiment 2:

[0179] like Figure 1-Figure 2 , Figure 6-Figure 8 As shown, a dry chemical adaptive detection and identification method based on a female vaginal secretion home self-test system comprises the following steps:

[0180] Step 1: Collect vaginal secretion samples at home or with the help of visiting medical staff, and drop the vaginal secretions into the six circular areas of the reagent block on the reagent plate Wait for the dry chemicals in the six reagent blocks to change color at room temperature.

[0181] Step 2: Open the home self-test system program and enter the image acquisition interface. According to the instructions and guidance of the interface, use the camera to shoot and upload the image in the image placement template area in the center of the interface under appropriate lighting.

[0182] Step 3: Extract the bevel of the reagent plate in the image: Read the width and height of the image grayImage W=3472, H=4624, extract the bevel of the reagent plate outline l, and use the denoising method due to uneven lighting. The steps are as follows:

[0183] De-noise the original image; obtain the original image grayImage, and filter out a large number of noise points in the image through Gaussian filtering;

[0184] Image edge detection: Perform edge detection on the image obtained after executing step a);

[0185] Extract the hypotenuse l of the reagent plate and obtain the coordinates of the two endpoints; after edge detection, use the Hough line detection algorithm and angle screening again to extract the hypotenuse l and the two endpoint values;

[0186] Extract the two endpoint coordinates of 17 sets of straight lines from the image, and then filter them according to the angle to set , ,

[0187] ,

[0188] ,

[0189] exist When the coordinates of the endpoints of the hypotenuse are , that is, the coordinate values ​​of the two endpoints of a set of straight lines are selected .

[0190] Step 4: The image width and height W=3472 and H=4624 are obtained from step 3, and the coordinate values ​​of the two endpoints are selected. Is it within the range of image width and height w and h, is θ positive and greater than 0, that is, does it meet the condition , , , , ,Determine whether the hypotenuse of the reagent plate is in the upper right corner,within the field of view;

[0191] ,

[0192] If the coordinates of both endpoints of the hypotenuse satisfy the above conditions, it can be determined that the hypotenuse of the reagent plate is in the upper right corner of the image and is also within the field of view.

[0193] Step Five: Detect the contour of the reagent plate. Based on the conclusion obtained in Step Four, the contour of the reagent plate in the image can be extracted. The hypotenuse is extracted under the denoising method with the correct position, and the contour of the reagent plate is extracted using the enhanced denoising method:

[0194] Image preprocessing, using mean filtering for denoising;

[0195] Threshold segmentation, converting the single-channel grayscale image src to a binary image dst, as Figure 6 shown;

[0196] Morphological processing, first eroding to remove the burrs formed by redundant noise, and then dilating;

[0197] Edge detection, detecting the contour edges;

[0198] Morphological closing operation, connecting the disconnected contour edges, as Figure 7 shown;

[0199] Find all the contours, calculate the area values of all the contours, compare according to the area size, find the maximum area area_max = 3089712, which is the contour of the reagent plate. Use the minimum bounding rectangle algorithm to calculate the width and height of the reagent plate contour w = 1091, h = 2832, the center coordinate point (1647, 2666), the angle = 1.2°, and calculate the ratio of the height to the width of the contour ratio = 0.38.

[0200] Step Six: From Step Five, the width and height of the reagent plate contour are w = 1091, h = 2832, and the center coordinate point is (1647, 2666). Since w = 1091 < h = 2832, the upper left and upper right coordinates of the reagent plate are calculated as:

[0201] ,

[0202] Step Seven: Reagent block recognition. From the coordinates of the two endpoints of the hypotenuse calculated in Step Three, Step Five, and Step Six , the coordinates of the upper left and lower right corners of the reagent plate are (1101, 1250), (2192, 4082), the width and height of the reagent plate contour are w = 1091, h = 2832, and the width-to-height ratio ratio = 0.38, , because < 45°, so , it is concluded that , , , , meet the condition, and the reagent block can be recognized.

[0203] Step Eight: Under the conclusion of Step Seven, perform the recognition of the reagent block. Given that the width and height of the reagent plate outline are w = 1091 and h = 2832, and also under the condition of w < h, = 0.13, = 0.08, = 0.32, = 0.135, = 0.14, = 141, = 226, = 349, = 382, then the coordinates of the six reagent blocks are:

[0204] ,

[0205] Extend 100 pixel values to the right of the six reagent block areas, and take six small rectangular areas of 20x20. Then the coordinates of the six small rectangular areas are:

[0206] ,

[0207] The coordinate frame display of the six reagent blocks and the coordinate frame display of the six small rectangles are as Figure 8 shown.

[0208] Step Nine: From the six reagent block areas in Step Eight , , , , , , set M = 50 to calculate the central areas of the reagent blocks respectively as:

[0209] ,

[0210] Read the average value of the HSV data values of the reagent block areas , as shown in Table 6 below; the average value of the HSV data values of the six small rectangular areas , as shown in Table 7 below; the central area coordinates of the six reagent blocks and the reference values of the BGR data values of the six small rectangular areas under the ideal conditions of no noise and uniform illumination are all , and the HSV data values of the central areas of the six reagent blocks are obtained.

[0211] Table 6

[0212]

[0213] Table 7

[0214]

[0215] According to the difference , the HSV data values ​​of the central areas of the six reagent blocks are , , , , , .

[0216] Step 10: Compare the HSV data values ​​of the six reagent blocks with the HSV data values ​​of the multiple color ranges in the HSV value range of the test item. The six test items are respectively corresponding to pH, hydrogen peroxide, leukocyte esterase, sialidase, coagulase, and β-glucuronidase. , , , , , The 6 HSV data values ​​are used to judge the negative and positive of the six test items according to the interpretation criteria in Table 8 and Table 9, and compared with the manual interpretation results. The uneven illumination detection results are shown in Table 10.

[0217] Table 8

[0218]

[0219] Table 9

[0220]

[0221] Table 10

[0222]

[0223] It can be seen from Table 10 above that the interpretation results of the present invention under uneven illumination are consistent with the manual interpretation results.

[0224] The above description shows the main features, basic principles, and advantages of the present invention. For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments or examples, and the present invention can be implemented in other specific forms without departing from the spirit or basic features of the present invention. Therefore, the above embodiments or examples should be regarded as exemplary and non-restrictive. The scope of the present invention is defined by the attached claims rather than the above description, and it is intended to include all changes within the meaning and scope of the equivalent elements of the claims in the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved. Any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention without departing from the technical principle of the present invention shall fall within the scope of patent protection of the present invention.

Claims

1. A dry chemical adaptive detection and identification method based on a home self-test system for female vaginal secretions, characterized in that: The following steps are involved: Collect vaginal discharge samples at home or with the help of visiting medical personnel; According to the test items corresponding to the leucorrhea sample, add the leucorrhea sample to the corresponding reagent block on the reagent plate; Collect and upload images through the home self-examination system; Get the width and height of the image and extract the bevel of the reagent plate in the image: If the lighting is relatively uniform, directly extract the bevel of the reagent plate; If the illumination is uneven, a denoising method is used to extract the bevel of the reagent plate; Check the placement of the reagent plate to determine whether the hypotenuse is in the upper right corner and within the field of view; Detect the outline of the reagent plate in the image: If the illumination is relatively uniform, use a single denoising method to extract the outline of the reagent plate; If the illumination is uneven, the enhanced denoising method is used to extract the outline of the reagent plate; Calculate the position coordinates of the reagent plate; Identify reagent blocks; A small rectangular area is introduced to calculate the HSV data value of the central area of ​​the reagent block; Compare HSV data values ​​within the corresponding range to determine the positive or negative nature of the test item; The step of introducing a small rectangular area to calculate the HSV data value of the central area of ​​the reagent block is: Calculate the position coordinates of each reagent block; Obtaining the position coordinates of the central area of ​​each reagent block: the position coordinates of each reagent block area are reduced by M pixels from the outside to the inside to obtain the position coordinates of the central area of ​​each reagent block; Calculate the position coordinates of each small rectangular area: extend D pixel values ​​to the right of each reagent block, take the small rectangular area, and calculate the position coordinates of each small rectangular area; Calculate the average value of the BGR data value of the small rectangular area: obtain the BGR data value of each small rectangular area through the position coordinates of each small rectangular area, read the average value of the BGR data value of the small rectangular area, and then read the average value of the HSV data value of the small rectangular area; Get the reference value: The average value of the BGR data value in the small rectangular area under ideal conditions without any noise and uniform lighting is used as the reference value; Get the difference: subtract the reference value from the average value of the BGR data value in the small rectangular area to get the difference; Calculate the average value of the BGR data value of the reagent block: obtain the BGR data value of each reagent block through the position coordinates of the central area of ​​the reagent block, read the average value of the BGR data value of the reagent block, and then read the average value of the HSV data value of the reagent block area; The difference is added to the average value of the BGR data value in the central area of ​​the reagent block to obtain a new BGR data value; Obtain the HSV data value of the central area of ​​the reagent block: convert the new BGR data value into the average value of the HSV data value to obtain the HSV data value of the central area of ​​the reagent block.

2. A dry chemical adaptive detection and identification method based on a female vaginal secretion home self-test system as claimed in claim 1, characterized in that: If the illumination is uneven, the specific steps for extracting the bevel of the reagent plate using the denoising method are: Denoising the original image: Get the original image and filter out a large number of noise points in the image through Gaussian filtering; Image edge detection: Perform edge detection on the image obtained after denoising the original image; Extract the hypotenuse of the reagent plate and obtain the coordinates of the two endpoints: After image edge detection, use the Hough line detection algorithm to extract the coordinates of the two endpoints of the hypotenuse of the reagent plate in the image , , and finally filter according to the angle. The formula is as follows: , in, To extract the slope angle, , The minimum and maximum values ​​for extracting the bevel angle.

3. A dry chemical adaptive detection and identification method based on a female vaginal secretion home self-test system as claimed in claim 1, characterized in that: The specific steps of detecting the placement position of the reagent plate and determining whether the hypotenuse is in the upper right corner and within the field of view are as follows: By obtaining the width and height of the image, the coordinates of the two endpoints of the hypotenuse of the reagent plate in the image are extracted , , whether it is within the range of image width w, height h, Is it positive, greater than 0, to determine whether the hypotenuse is in the upper right corner and within the field of view, that is, the coordinates of the two endpoints , ,angle Are the following conditions met: , , , , , in, To extract the slope angle, The maximum value of the y coordinates of the two endpoints of the hypotenuse is taken, and H is the height of the image; If the coordinates of the two endpoints , ,angle , if the above conditions are met and the image width and height w and h are within the range, it can be determined that the reagent plate bevel is in the upper right corner, the placement is correct, and it is within the field of view; if the coordinates of the two endpoints , ,angle If the above conditions are not met, the test cannot be performed, that is, the test is exited, and the signal is transmitted back to the home self-test system. In the sampling interface of the home self-test system, the pre-selected reagent plate placement area interface is used to guide the user to take images until the bevel of the reagent plate is detected in the upper right position.

4. A dry chemical adaptive detection and identification method based on a female vaginal secretion home self-test system as claimed in claim 1, characterized in that: If the illumination is relatively uniform, the specific steps to extract the outline of the reagent plate using the single denoising method are: Threshold segmentation, the single-channel grayscale image src is converted to a binary image dst. If the grayscale value of the pixel coordinate point (x, y) is greater than the threshold threshvalue, white is selected, and if it is less than or equal to the threshold, black is selected. The expression formula is as follows: , Wherein, src(x,y) is the grayscale value of the single-channel grayscale image of the original image at the pixel coordinate point (x,y), threshvalue is the preset threshold, maxvalue is the result of the grayscale value src(x,y) of the original image at the pixel coordinate point (x,y) being greater than the preset threshold threshvalue, and 0 is the result of the grayscale value src(x,y) being less than or equal to the preset threshold threshvalue; Morphological processing, performing closing operation, closing the concentrated black area to form a new contour, and obtaining a new image result; Smoothing, linear filtering, smoothing based on convolution kernel, i.e. mean filter kernel , remove the small contours generated by the excess noise, perform related operations, and obtain the new image smooth_img calculation formula as follows: , in , Represent the coordinates of a point in the convolution kernel; anchor.x and anchor.y represent the preset anchor coordinates; x, y represent the position on the original image, kernel represents the value of the current position of the convolution kernel, and Represents the pixel value on the original image, according to the set convolution kernel kernel , Substitute into the above formula to get the smoothed image; Find all contours, by area Compare and find the largest area , that is, the outline of the reagent plate, filter out the width and height w, h of the reagent plate outline, and the center coordinate point ,angle , and calculate the ratio of the height to the width of the contour ratio , the calculation formula is as follows: , , in, is the area of ​​the largest contour among all detected contour areas. ratio It is the ratio of the height to the width of the reagent plate outline.

5. A dry chemical adaptive detection and identification method based on a female vaginal secretion home self-test system as claimed in claim 1, characterized in that: If the illumination is uneven, the specific steps for extracting the outline of the reagent plate using the enhanced denoising method are as follows: Image preprocessing, using mean filtering for denoising, input a grayscale image src, use mean filtering technology, define a filter kernel, that is, a rectangular kernel kernelxkernel, and perform weighted averaging on each pixel in the image to remove random noise in the image and obtain a denoised image. The formula is as follows: , Where f′(x, y) is the original image with noise, g(x, y) is the image obtained after mean filtering, s is the set of pixels in the template centered at point (i, j), and the template size is kernel x kernel; Threshold segmentation, convert the single-channel grayscale image src into a binary image dst, input a denoised grayscale image, use threshold segmentation technology, set a threshold, convert the grayscale image into a binary image, set the pixel value greater than the threshold to white or black, and set the pixel value less than or equal to the threshold to black or white, and get a binary image dst after threshold segmentation; Morphological processing, input a binary image dst, first perform an erosion operation, by defining a rectangular structure element B, remove the redundant noise and small burrs in the image, then perform an opening operation, use the same rectangular structure element B to restore the main features of the image and enhance the edge information, and get a morphologically processed image opened. The erosion method is as follows: , in, It is an erosion operation, A is the original image, B is the structural element; drag the structural element B to move in the A domain. If every pixel in the structural element is exactly the same as the corresponding pixel in the same neighborhood centered on x, then the x pixel point is retained and the image is reduced; the opening operation method is as follows: , in, For corrosion operations, For the dilation operation, A is the original image, B is the structural element, and the erosion operation is first performed to remove all pixels on the image boundary that cannot contain the structural element B. Then the dilation operation is performed to expand all pixels in the image outward. The expansion distance and shape are determined by the structural element B to enlarge the image. Edge detection, detect the contour edge, input a morphologically processed image opened, use the Canny edge detection algorithm, use the Gaussian filter to smooth the image, calculate the amplitude and direction of the image gradient, and extract the edge points in the image through non-maximum suppression and double threshold processing methods to form a complete contour edge, and obtain an image edge containing the contour edge; Morphological closing operation is used to connect the broken contour edges. Input an edge-detected image edge, and perform morphological closing operation on the image. First, perform dilation operation to fill the gaps between the broken contour edges, and then perform erosion operation to restore the original shape and size of the image, so as to connect the broken contour edges and obtain the repaired image result. The closing operation method is as follows: , in, For corrosion operations, The expansion operation is performed, A is the original image, B is the structural element, and the expansion operation is performed first to expand all pixels in the image outward. The expansion distance and shape are determined by the structural element B, thereby enlarging the image. Then, the erosion operation is performed to remove all pixels on the image boundary that cannot contain the structural element B, thereby reducing the image. Collect all contours, compare them by area, and find the largest area , that is, the outline of the reagent plate, filter out the width and height of the reagent plate outline w, h , center coordinate point ,angle , calculate the aspect ratio ratio , the calculation formula is as follows: , , in, is the area of ​​the largest contour among all detected contour areas. ratio It is the ratio of the height to the width of the reagent plate outline.

6. A dry chemical adaptive detection and identification method based on a female vaginal secretion home self-test system as claimed in claim 3, characterized in that: The specific steps for calculating the position coordinates of the reagent plate are as follows: By extracting the outline of the reagent plate in the image, the width and height of the reagent plate outline are obtained w, h , the center coordinate point ( ), calculate the coordinates of the upper left vertex of the reagent plate outline , coordinates of the lower right vertex , the calculation formula is as follows: if , but ; if , but .

7. A dry chemical adaptive detection and identification method based on a female vaginal secretion home self-test system as claimed in claim 6, characterized in that: The specific steps of identifying the reagent block are: by calculating the coordinates of the two endpoints of the hypotenuse of the reagent plate , , reagent plate outline width w, h, aspect ratio ratio , reagent plate profile angle , to determine whether the reagent block can be identified, the calculation formula is as follows: , , Among them, is the minimum value of the contour aspect ratio, is the maximum value of the contour aspect ratio, is the maximum value of the reagent plate contour angle, is the minimum value of the reagent plate contour angle, is determined by the size of, , the value of is determined by the width and height of the reagent plate contour. When w > h, ; when w < h, ; like , the reagent block can be identified; like Not Available Within the range, or Not Available If the sample is within the specified range, the reagent block cannot be identified, the identification is exited, and the signal is transmitted back to the home self-test system. In the sampling interface of the home self-test system, the user is guided to take images using the pre-selected reagent plate placement area interface until success.

8. A dry chemical adaptive detection and identification method based on a female vaginal secretion home self-test system as claimed in claim 7, characterized in that: The specific steps for calculating the position coordinates of each reagent block and the position coordinates of each small rectangular area are as follows: In the case of identifiable reagent blocks, the reagent plate is placed at an angle , the proportion of the reagent block in the reagent plate, calculate the upper left coordinate position and lower right coordinate position of N reagent blocks in the image; Extend D pixel values to the right of each of the N reagent block areas respectively, take N n×n small rectangular areas, and calculate the upper-left coordinate position and the lower-right coordinate position of the N small rectangular areas; Calculate the ratio of the reagent block to the reagent plate. When w < h, the formula is as follows: , When w > h, the formula is as follows: , in, w , h are the width and height of the reagent plate outline, is the diameter of the reagent block, is the horizontal distance between the reagent block and the reagent plate, is the vertical distance between the reagent block and the reagent plate, is the distance between the reagent blocks, is the proportion of the reagent block in the horizontal direction of the reagent plate, is the proportion of the reagent block in the vertical direction of the reagent plate, is the ratio of the reagent block diameter to the horizontal direction of the reagent plate, is the ratio of the reagent block diameter in the vertical direction of the reagent plate, is the ratio of the distance between reagent blocks in the vertical direction of the reagent plate, is the horizontal pixel width of the reagent block from the edge of the reagent plate outline in the image, is the pixel height of the reagent block in the vertical direction from the edge of the reagent plate outline in the image, is the pixel length in the horizontal direction of the reagent block diameter, is the pixel length in the direction perpendicular to the diameter of the reagent block, is the pixel length of the interval between reagent blocks in the image; Obtain the area positions of the N reagent blocks from the ratio value of the reagent block to the reagent plate. The coordinate position formula of the reagent block area is as follows: , in, is the coordinate of the upper left vertex of the reagent plate outline, is the horizontal pixel width of the reagent block from the edge of the reagent plate outline in the image, is the vertical pixel height, is the pixel length in the horizontal direction of the reagent block diameter, is the pixel length in the direction perpendicular to the diameter of the reagent block, =0, 1, 2...N-1, N is the number of reagent blocks, is the pixel length of the interval between reagent blocks in the image; Obtain the area positions of the N small rectangles from the ratio value of the reagent block to the reagent plate. The coordinate position formula of the small rectangular area is as follows: , Among them, D is the pixel value extended to the right, and n is the number of rows or columns of the square matrix n×n.

9. A dry chemical adaptive detection and identification method based on a female vaginal secretion home self-test system as claimed in claim 8, characterized in that: N is 6, when the reagent block can be identified, according to the angle of the reagent plate , the proportion of reagent blocks in the reagent plate, 6 reagent blocks are calculated in the image The upper left coordinate position , the lower right coordinate position ; Extend D pixels to the right of the 6 reagent block areas, and take 6 small nxn rectangular areas. , calculate the upper left coordinate position of the 6 small rectangular areas Lower right coordinate position ; Substitute the ratio value of the reagent block to the reagent plate into the coordinate position formula of the reagent block area. The coordinate position formula of the reagent block area is as follows: , in, is the coordinate of the upper left vertex of the reagent plate outline, Reagent Block The upper left coordinate point and the lower right coordinate point position information; Substitute the ratio value of the reagent block to the reagent plate into the formula of the small rectangular area position. The formula of the small rectangular area position is as follows: , Where D is the pixel value extending to the right, n is the n rows or n columns of the square matrix nxn, Small rectangular areas The upper left coordinate point and lower right coordinate point position information.

10. A dry chemical adaptive detection and identification method based on a female vaginal secretion home self-test system as claimed in claim 8, characterized in that: The specific steps for introducing the small rectangular area to calculate the HSV data value of the central area of the reagent block are as follows: From the outside to the inside of the position coordinates of each reagent block area, reduce by M pixels to obtain the position coordinates of the central area of each reagent block; Get the BGR data value of each small rectangular area through the position coordinates of each small rectangular area, and read the average value of the BGR data value of the small rectangular area , and then read the average value of the HSV data value in the small rectangular area ; Get the reference value: the average value of the BGR data value in a small rectangular area under ideal conditions without any noise and uniform lighting As a reference value; Get difference: Set the reference value The average value of the BGR data value in the small rectangular area Make a difference and get the difference ; Obtain the BGR data value of each reagent block through the position coordinates of the center area of ​​the reagent block, and read the average value of the BGR data value of the reagent block , and then read the average value of the HSV data value of the reagent block area ; The difference The average value of the BGR data value in the center area of ​​the replenishment reagent block , get the new BGR data value ; The new BGR data value Convert to the average HSV data value H, S, V to obtain the HSV data value of the center area of ​​the reagent block. The calculation formula is as follows: , , like <0, then ; in, =0, 1, 2...N-1, N is the number of reagent blocks, M is the reduced pixel value, The center area of ​​the reagent block The upper left and lower right coordinate point position information, The average value of the BGR data value in the small rectangular area White with reference value The difference, The difference is Replenish the average value of BGR data of each reagent block , H, S, V are The result after conversion is hue, saturation and brightness values.

11. A dry chemical adaptive detection and identification method based on a female vaginal secretion home self-test system as claimed in claim 10, characterized in that: N is 6. The specific steps for calculating the average value of the HSV data values in the central areas of the 6 reagent blocks are as follows: 6 reagent block areas , From outside to inside, reduce M pixels to get the central area of ​​the reagent block ; Get the BGR data value of each small rectangular area through the position coordinates of the 6 small rectangular areas, and read the average value of the BGR data value of the small rectangular area , and then read the average value of the HSV data value in the small rectangular area ; Get the reference value: the average value of the BGR data value in a small rectangular area under ideal conditions without any noise and uniform lighting As a reference value; Get difference: Set the reference value The average value of the BGR data value in the small rectangular area Make a difference and get the difference ; Obtain the BGR data values ​​of the six reagent blocks through the position coordinates of the center area of ​​the reagent block, and read the average value of the BGR data values ​​of the reagent blocks , and then read the average value of the HSV data value of the reagent block area ; The difference The average value of the BGR data value in the center area of ​​the replenishment reagent block , get the new BGR data value ; The new BGR data value Convert to the average HSV data value H, S, V, so as to calculate the center area of ​​each reagent block The HSV data value in the formula is as follows: , , like <0, then ; The HSV data values ​​of the central areas of the six reagent blocks are , ; Among them, M is the reduced pixel value, , The central area of ​​the reagent block The upper left and lower right coordinate point position information, The average value of the BGR data value in the 6 small rectangular areas White with reference value The difference, The difference is Replenish the average value of the BGR data of 6 reagent blocks Get the new BGR data value, H, S, V are respectively The result after conversion is hue, saturation and brightness values.

12. A dry chemical adaptive detection and identification method based on a female vaginal secretion home self-test system as claimed in claim 11, characterized in that: The specific steps for comparing the HSV data values within the corresponding range and judging the positive and negative of the detection item are as follows: The HSV data values ​​of the six reagent blocks are compared with the HSV data values ​​in the multiple color ranges in the table of the HSV value range of the test item. The six test items are respectively corresponding to pH, hydrogen peroxide, leukocyte esterase, sialidase, coagulase, and β-glucuronidase. 6 HSV data values ​​are used to determine whether the six test items are within the HSV data value range indicated by positive, thereby determining the positive and negative nature of the six test items.

Citation Information

Patent Citations

  • Vaginal secretion detector, dry chemical detection device and dry chemical detection method

    CN114441512A

  • Snap spring defect detection method based on image processing

    CN115082410A