Dry chemical self-adaptive detection and identification method based on female vaginal secretion home self-inspection system

By acquiring the image width and height, extracting the oblique edge or contour of the reagent plate, handling uneven lighting, calculating the position of the reagent plate, identifying the reagent block, and calculating the HSV data value, the problem of misjudgment in dry chemical detection after scene change is solved, and accurate detection in different environments is achieved.

CN118941563AActive Publication Date: 2024-11-12SHANDONG SHIDASI BIOLOGICAL IND CO LTD +1
View PDF 7 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies, when the scene changes, are prone to problems such as the test strip not being recognized and the HSV color value not being read accurately, leading to misjudgment in the dry chemical detection method of the home self-testing system for female vaginal secretions.

Method used

By acquiring the width and height of the image, the hypotenuse or outline of the reagent plate is extracted to determine the placement position of the reagent plate. Different noise reduction methods are used to handle uneven lighting conditions. The position coordinates of the reagent plate are calculated, the reagent block is identified, and the HSV data value is calculated within a small rectangular area for comparison to determine the positive or negative result of the test item.

Benefits of technology

It can accurately identify and judge vaginal discharge samples under different ambient lighting conditions, improving the accuracy of detection and avoiding misjudgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118941563A_ABST
    Figure CN118941563A_ABST
Patent Text Reader

Abstract

The invention relates to a dry chemical self-adaptive detection and identification method based on a female vaginal secretion home self-inspection system. The method comprises the following steps: collecting leucorrhea samples under the assistance of home or door-to-door medical personnel; according to the corresponding detection items, the leucorrhea samples are added to the corresponding reagent blocks of the reagent plate; images are collected and uploaded through the home self-checking system; acquiring width and height of the image, and extracting a bevel edge of the reagent plate in the image; detecting the placement position of the reagent plate, and judging whether the bevel edge is at the upper right corner and within the view range; detecting the contour of the reagent plate in the image, if the illumination is relatively uniform, extracting the contour of the reagent plate by adopting a single denoising method, and if the illumination is not uniform, extracting the contour of the reagent plate by adopting an enhanced denoising method; calculating position coordinates of the reagent plate; a recognition reagent block; introducing a small rectangular region to calculate an HSV data value of a central region of the reagent block; and comparing the HSV data values in a corresponding range, and judging whether the detection item is negative or positive. After the scene is changed, the leucorrhea sample can still be identified and accurately judged.
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: A dry chemical adaptive detection and identification method based on a female vaginal secretion home self-test system comprises the following steps: 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 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; 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 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; 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 the HSV data values ​​within the corresponding range to determine the positive or negative nature of the test item.

[0006] As an optimization, if the illumination is uneven, the specific steps of extracting the bevel of the reagent plate by denoising are as follows: 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 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: , in, To extract the slope angle, , The minimum and maximum values ​​for extracting the bevel angle.

[0007] 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: By obtaining the width and height w and h 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.

[0008] 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:

[0009] , 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;

[0010] 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 anchor coordinates we give; 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.

[0011] 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:

[0012] , 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, and convert the grayscale image into a binary image by setting a suitable threshold. Pixel values ​​greater than the threshold are set to white or black, and pixels less than or equal to the threshold are set to black or white, and a binary image dst after threshold segmentation is obtained; 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, 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; 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;

[0013] , 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.

[0014] As an optimization, the specific steps of calculating the position coordinates of the reagent plate are: 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: if , but ; If , then ; Wherein, w and h are the width and height of the reagent plate respectively, is the center coordinate point, , are the coordinates of the upper left vertex and the lower right vertex of the reagent plate contour respectively.

[0015] As an optimization, the specific steps for identifying the reagent block are: by calculating the coordinates of the two end points of the hypotenuse of the reagent plate , , the width w, height h of the reagent plate contour, the width-to-height ratio ratio , and the angle of the reagent plate contour , to determine whether reagent block identification can be performed. The calculation formula is as follows: , , Wherein, 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, ; If , then reagent block identification can be performed; If is not within the interval, or is not within the interval, then reagent block identification cannot be performed, the identification is exited, and the signal is transmitted 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 interface for the preselected placement area of the reagent plate until successful.

[0016] As an optimization, the steps for introducing a small rectangular area to calculate the HSV data value of the center area of the reagent block are: Calculate the position coordinates of each reagent block; 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; 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 of the small rectangular area: Obtain the BGR data of each small rectangular area through the position coordinates of each small rectangular area, read the average value of the BGR data of the small rectangular area, and then read the average value of the HSV data of the small rectangular area; Obtain the reference value: The average value of the BGR data of the small rectangular area under the ideal condition of no noise and uniform illumination is used as the reference value; Obtain the difference: Subtract the average value of the BGR data of the small rectangular area from the reference value to obtain the difference; 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; Supply 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; Obtain the HSV data 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.

[0017] 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: 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; 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; 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: , 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 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; 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: , 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; 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: , 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, D is the pixel value extending to the right, and n is the n rows or n columns of the square matrix nxn.

[0018] 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 ; 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 , the lower right coordinate position ; 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: , 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 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: , in, is the coordinate of the upper left vertex of the reagent plate outline, D is the pixel value extending to the right, n is the nth row or nth column of the square matrix nxn, Small rectangular areas The upper left coordinate point and lower right coordinate point position information.

[0019] 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: 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; 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 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 ; 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.

[0020] 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: 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 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; 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, 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 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 , H, S, V are The result after conversion is hue, saturation and brightness values.

[0021] 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: 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.

[0022] The beneficial effects of the present invention are: 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

[0023] 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: 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; Figure 2 Flowcharts of Embodiment 1 and Embodiment 2; Figure 3 This is an example image after threshold segmentation when the lighting is relatively uniform; Figure 4 for Figure 3 Example image after smoothing; Figure 5 It is an example diagram showing the reagent plate outline coordinate frame and reagent block coordinate frame under relatively uniform lighting conditions; Figure 6 This is an example image after threshold segmentation in the case of uneven lighting; Figure 7 for Figure 6 Example images after morphological transformation; 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

[0024] 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.

[0025] Embodiment 1: 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: 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.

[0026] 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.

[0027] Step 3: The illumination is relatively uniform. Directly extract the hypotenuse of the reagent plate: 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 endpoints are (498, 220) and (539, 255).

[0028] Step 4: From Step 3, the width and height of the image are W = 710 and H = 1600. Check whether the two endpoint coordinate values (498, 220) and (539, 255) selected are within the range of the image width and height w, 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 within the field of view; , If the coordinate values of the two endpoints 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.

[0029] 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, and the position is correct, and the illumination is relatively uniform. Use the single denoising method to extract the contour of the reagent plate: 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; Perform morphological processing on the binary image dst. Perform closing operation to close the concentrated black areas to form a new contour, and obtain a new image result; Perform smoothing processing on the image result, 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 redundant noise, perform related operations, and obtain a new image smooth_img. The new image is as Figure 4 shown; 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 and height of the reagent plate contour, w = 437, h = 1129, the center coordinate point (354, 779), the angle , and calculate the aspect ratio of the height to the width of the contour, ratio = 0.39.

[0030] Step 6: From Step 5, the width and height of the reagent plate contour are w = 437 and h = 1129, and the center coordinate point is (354, 779). Since w = 437 < h = 1129, calculate the upper left corner coordinates and upper right corner coordinates of the reagent plate as: , Step 7: Identify the reagent block. From Step 3, Step 5, and Step 6, the coordinates of the two endpoints of the hypotenuse are calculated as (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 , satisfying this condition, the reagent block can be identified.

[0031] Step 8: Under the conclusion of Step 7, identify the reagent block. 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: , Extend 100 pixel values to the right of each of the six reagent block areas, and take six 20x20 small rectangular areas. Then the coordinates of the six small rectangular areas are: , The coordinate frames of the six reagent blocks and the coordinate frames of the six small rectangles are shown as Figure 5 shown.

[0032] Step 9: From the six reagent block areas in Step 8 , , , , , , set M = 50 to calculate the central areas of the reagent blocks as: , Read the average HSV data values of the reagent block areas , as shown in Table 1 below; the average HSV data values of the six small rectangular areas , as shown in Table 2 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 condition of no noise and uniform illumination are respectively , and obtain the HSV data values ​​of the central areas of the six reagent blocks.

[0033] Table 1

[0034] Table 2

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

[0036] 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.

[0037] Table 3

[0038]

[0039] Table 4

[0040] Table 5

[0041] 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.

[0042] Embodiment 2: 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: 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.

[0043] 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.

[0044] 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: 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; Image edge detection: Perform edge detection on the image obtained after executing step a); 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; Extract the two endpoint coordinates of 17 sets of straight lines from the image, and then filter them according to the angle to set , , , , exist When the coordinate value of the hypotenuse endpoint is , that is, the coordinate values ​​of the two endpoints of a set of straight lines are selected .

[0045] 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 w and height 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; , If the coordinates of the two endpoints of the hypotenuse 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.

[0046] Step 5: Detect the outline of the reagent plate. Based on the conclusions drawn in step 4, the outline of the reagent plate in the image can be extracted. The bevel is extracted under the denoising method, and the position is correct. The outline of the reagent plate is extracted using the enhanced denoising method: Image preprocessing, using mean filtering for denoising; Threshold segmentation, convert the single-channel grayscale image src into a binary image dst, as Figure 6 shown; Morphological processing, first erode to remove the burrs formed by redundant noise, and then dilate; Edge detection, detect the contour edges; Morphological closing operation, connect the disconnected contour edges, as Figure 7 shown; 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, and 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), and the angle = 1.2°, and calculate the aspect ratio of the contour height to width ratio = 0.38.

[0047] Step 6: From Step 5, 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, then calculate the upper left and upper right coordinates of the reagent plate as: , Step 7: Reagent block recognition. From the coordinates of the two endpoints of the hypotenuse calculated in Step 3, Step 5, and Step 6 , 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 , , , , This condition is satisfied, and the reagent block can be recognized.

[0048] Step 8: Under the conclusion of Step 7, perform reagent block recognition. Given the width and height of the reagent plate contour w = 1091, 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: , Extend 100 pixels to the right of the six reagent block areas and take six 20x20 small rectangular areas. The coordinates of the six small rectangular areas are: , Six reagent block coordinate frames and six small rectangular coordinate frames are displayed as follows: Figure 8 shown.

[0049] Step 9: The six reagent block areas from step 8 , , , , , , setting M=50, the central areas of the reagent block are calculated as follows: , Read the average value of HSV data value of reagent block area , 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 coordinates of the center 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.

[0050] Table 6

[0051] Table 7

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

[0053] 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.

[0054] Table 8

[0055] Table 9

[0056] Table 10

[0057] 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.

[0058] 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, It is 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 the HSV data values ​​within the corresponding range to determine the positive or negative nature of the test item.

2. A dry chemical adaptive detection and identification method based on a female vaginal secretion home self-test system as claimed in claim 1, It is 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, It is 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 w and h 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, It is 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 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 anchor coordinates we give; 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, It is characterized in that If the illumination is uneven, the specific steps to extract 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 suitable 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, and convert the grayscale image into a binary image by setting a suitable threshold. Pixel values ​​greater than the threshold are set to white or black, and pixels less than or equal to the threshold are set to black or white, and a binary image dst after threshold segmentation is obtained; 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 connects the broken contour edges. Input an edge-detected image edge and perform morphological closing operation on the image. First, dilation operation is performed to fill the gaps between the broken contour edges, and then erosion operation is performed to restore the original shape and size of the image, thereby connecting the broken contour edges and obtaining 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, It is characterized in that The specific steps of calculating the position coordinates of the reagent plate are: 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 ; in, w , h are the width and height of the reagent plate, is the center coordinate point, , They are respectively the coordinates of the upper left vertex and the lower right vertex of the reagent plate outline.

7. A dry chemical adaptive detection and identification method based on a female vaginal secretion home self-test system as claimed in claim 6, It is characterized in that The specific steps of identifying the reagent block are: 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 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 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 1, It is characterized in that 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; Obtain the position coordinates of the central region of each reagent block: The position coordinates of each reagent block region are decreased by M pixels from the outside to the inside to obtain the position coordinates of the central region of each reagent block; Calculate the position coordinates of each small rectangular region: Extend D pixel values to the right of each reagent block, take the small rectangular region, and calculate the position coordinates of each small rectangular region; Calculate the average value of the BGR data of the small rectangular region: Obtain the BGR data of each small rectangular region through the position coordinates of each small rectangular region, read the average value of the BGR data of the small rectangular region, and then read the average value of the HSV data of the small rectangular region; Obtain the reference value: The average value of the BGR data of the small rectangular region under the ideal condition of no noise and uniform illumination is used as the reference value; Obtain the difference: Subtract the average value of the BGR data of the small rectangular region from the reference value to obtain the difference; 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 region 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 region; Supplement the difference to the average value of the BGR data of the central region of the reagent block to obtain the new BGR data value; Obtain the HSV data value of the central region 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 region of the reagent block.

9. A dry chemical adaptive detection and recognition method for a home self-test system based on female vaginal secretions as described in claim 8, characterized in that, The specific steps for calculating the position coordinates of each reagent block and the position coordinates of each small rectangular region 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 regions respectively, take N nxn small rectangular regions, and calculate the upper left coordinate position and the lower right coordinate position of the N small rectangular regions; 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 regional positions of the N reagent blocks through the ratio of the reagent block to the reagent plate. The coordinate position formula of the reagent block region 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 regional positions of the N small rectangles through the ratio of the reagent block to the reagent plate. The coordinate position formula of the small rectangular region 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, D is the pixel value extending to the right, and n is the n rows or n columns of the square matrix nxn.

10. A dry chemical adaptive detection and recognition method for a home self-test system based on female vaginal secretions as described in claim 9, 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 , the 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 region. The coordinate position formula of the reagent block region 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 region position. The formula of the small rectangular region position is as follows: , in, is the coordinate of the upper left vertex of the reagent plate outline, D is the pixel value extending to the right, n is the nth row or nth column of the square matrix nxn, Small rectangular areas The upper left coordinate point and lower right coordinate point position information.

11. A dry chemical adaptive detection and recognition method for a home self-test system based on female vaginal secretions as described in claim 9, characterized in that: The specific steps for introducing the small rectangular region to calculate the HSV data value of the central region of the reagent block are as follows: The position coordinates of each reagent block region are decreased by M pixels from the outside to the inside to obtain the position coordinates of the central region 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, 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 , H, S, V are 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, Features: N is 6, and the specific steps for calculating the average value of the HSV data values ​​in the center area 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 , H, S, V are The result after conversion is hue, saturation and brightness values.

13. A dry chemical adaptive detection and identification method based on a female vaginal secretion home self-test system as claimed in claim 12, Features: The specific steps of comparing the HSV data values ​​within the corresponding range and determining the positive or negative nature of the test items are: 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

  • Portable quantitative analysis device capable of rapidly detecting test paper

    CN104215628A

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

    CN114441512A

  • Snap spring defect detection method based on image processing

    CN115082410A

  • Comprehensive determination method for agglutination reaction result P-HSV in blood type detection

    CN116703863A

  • Novel array type urine test paper instant detection analysis method

    CN117274295A