CN113592775B - Suction head image processing method and device and suction head image processing equipment - Google Patents

Suction head image processing method and device and suction head image processing equipment Download PDF

Info

Publication number
CN113592775B
CN113592775B CN202110728007.5A CN202110728007A CN113592775B CN 113592775 B CN113592775 B CN 113592775B CN 202110728007 A CN202110728007 A CN 202110728007A CN 113592775 B CN113592775 B CN 113592775B
Authority
CN
China
Prior art keywords
suction head
defect
contour
map
profile
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110728007.5A
Other languages
Chinese (zh)
Other versions
CN113592775A (en
Inventor
林贵文
严欢
汪建德
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Jinrui Biotechnology Co ltd
Original Assignee
Shenzhen Jinrui Biotechnology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Jinrui Biotechnology Co ltd filed Critical Shenzhen Jinrui Biotechnology Co ltd
Priority to CN202110728007.5A priority Critical patent/CN113592775B/en
Publication of CN113592775A publication Critical patent/CN113592775A/en
Application granted granted Critical
Publication of CN113592775B publication Critical patent/CN113592775B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Abstract

The embodiment of the invention relates to a suction head image processing method, a suction head image processing device and suction head image processing equipment, wherein the method comprises the following steps: acquiring a suction head image; performing primary binarization on the suction head image to obtain an effective area map; performing gradient edge detection on the effective area graph to obtain an edge detection graph, and performing gradient binarization processing on the edge detection graph to obtain a gradient binarization graph; when the existence of a suction head is determined in the gradient binarization map, suction head characteristic extraction is carried out on the effective area map, so as to obtain suction head characteristics, wherein the suction head characteristics comprise suction head contours and suction head liquid level positions; judging whether effective defects exist in the edge detection diagram according to the suction head profile; if the effective defect exists, judging the sample sucking quality according to the characteristics of the effective defect and the liquid level position of the suction head. The embodiment of the invention can judge the sample sucking condition inside the suction head and judge the sample sucking quality.

Description

Suction head image processing method and device and suction head image processing equipment
Technical Field
The embodiment of the invention relates to the technical field of medical equipment, in particular to a suction head image processing method and device and suction head image processing equipment.
Background
The nucleic acid detection procedure can be roughly divided into three steps: sample collection, nucleic acid extraction, PCR amplification and analysis. After sample collection is completed, the sample to be tested in the virus sampling tube is required to be split-packed into a deep hole plate for subsequent nucleic acid extraction.
The existing automatic cup separating system can reduce contact between experimenters and virus samples, and reduce error probability and biological exposure risk.
However, the conductive suction head adopted by the existing automatic cup separating system can realize the split charging treatment of virus samples, but cannot judge the sample sucking condition inside the suction head in the split charging process.
Disclosure of Invention
The embodiment of the invention aims to provide a suction head image processing method, a suction head image processing device and suction head image processing equipment, which can judge the suction sample condition inside a suction head and judge the suction sample quality.
In a first aspect, an embodiment of the present invention provides a method for processing a suction head image, the method including:
acquiring a suction head image;
performing primary binarization on the suction head image to obtain an effective area map;
performing gradient edge detection on the effective area graph to obtain an edge detection graph, and performing gradient binarization processing on the edge detection graph to obtain a gradient binarization graph;
When the existence of a suction head is determined in the gradient binarization map, suction head characteristic extraction is carried out on the effective area map, so as to obtain suction head characteristics, wherein the suction head characteristics comprise suction head contours and suction head liquid level positions;
judging whether effective defects exist in the edge detection diagram according to the suction head profile;
if the effective defect exists, judging the sample sucking quality according to the characteristics of the effective defect and the liquid level position of the suction head.
In some embodiments, the method further comprises:
if the pixel sum of the gradient binary image is larger than a first threshold value, judging that a suction head exists in the gradient binary image;
and if the pixel sum of the gradient binarization map is not larger than the first threshold value, judging that a suction head is not present in the gradient binarization map.
In some embodiments, the extracting the suction head feature from the effective area map to obtain a suction head feature, wherein the suction head feature comprises a suction head profile and a suction head liquid level position, and the extracting comprises:
determining a suction head root node searching range in the gradient binarization map, and searching a suction head root node in the effective area map;
the root node of the suction head is taken as a starting point, the direction of the top point of the suction head is toward, and a local gray minimum value is searched in the effective area diagram by using the pixel range of a second threshold value where the contours of the two sides are positioned, so that the contours of the two sides of the suction head are obtained;
And determining the peak of the suction head according to the contours of the two sides of the suction head, determining the contours of the suction head according to the contours of the two sides of the suction head and the peak of the suction head, and determining the liquid level position of the suction head according to the contours of the two sides of the suction head and the characteristics of gray scale mutation at the junction of liquid and air.
In some embodiments, the determining a tip root node search range in the gradient binarization map and searching for a root node in the active area map includes:
determining a searching range of a root node in the effective area graph at the row of the root position of the suction head of the gradient binarization graph;
and finding the suction head root node in the searching range of the effective area graph by utilizing the characteristic of the gray local minimum value of the root node.
In some embodiments, the determining tip vertices according to the tip side contours comprises:
determining the intersection point of the contours of the two sides of the suction head as the suction head vertex;
in some embodiments, the two-sided profile includes an upper profile and a lower profile; determining the liquid level position of the suction head according to the contours of the two sides of the suction head and the characteristics of gray abrupt change at the junction of liquid and air, comprising:
Calculating the gray level first-order difference of the gray level sequences of the upper contour and the lower contour to obtain a gray level first-order difference sequence;
calculating liquid level position candidate points of the upper outline and the lower outline according to the gray level first-order differential sequence;
if the first-order difference values meeting the preset conditions are found in the gray-level first-order difference sequences of the upper profile and the lower profile respectively, judging that the sample is sucked, wherein the preset conditions are points of which the first-order difference values in the gray-level first-order difference sequences are smaller than a negative peak of a third threshold, and the corresponding position distance of the negative peak points of the upper profile or the lower profile is not more than 2;
and (3) averaging the negative peak point positions of the upper outline and the negative peak point positions of the lower outline in the gray level first-order difference meeting the preset condition to obtain the liquid level position of the suction head.
In some embodiments, the calculating the liquid level position candidate points of the upper contour and the lower contour according to the gray level first-order differential sequence includes:
and taking the negative peak in the gray level first-order differential sequence as a liquid level position candidate point of the upper contour and the lower contour.
In some embodiments, the method further comprises:
and if the point of the negative peak sequence with the first-order difference value smaller than the third threshold value is not found in the gray-level first-order difference sequence, judging that the sample is not sucked.
In some embodiments, the determining whether a valid defect exists in the edge detection map according to the suction head profile includes:
removing the suction head profile in the edge detection map to obtain a defect profile map;
calculating the area of each contour in the defect contour map, and judging that effective defects exist in the defect contour map if contours with contour areas not smaller than a fifth threshold exist in the defect contour map;
and if the contour with the contour area smaller than the fifth threshold value exists in the defect contour map, judging that the contour with the contour area smaller than the fifth threshold value is an invalid defect, and if the contour with the contour area not smaller than the fifth threshold value does not exist after the invalid defect is removed, judging that the suction sample is qualified.
In some embodiments, the removing the tip profile in the edge detection map to obtain a defect profile map includes:
in the edge detection map, the adjacent pixel value in the fourth threshold range where the suction head profile is located is set to 0, and a defect profile map is obtained.
In some embodiments, the determining the sample suction quality based on the characteristics of the effective defect and the tip fluid level position comprises:
Marking the effective defect;
if the center of the effective defect is outside the suction head profile or is a position outside the position between the suction head liquid level and the suction head vertex, judging that the sample is hung;
if the center of the effective defect is positioned in the interior of the suction head profile or between the suction head liquid level position and the suction head vertex, calculating the defect characteristic of the effective defect;
and if the roundness of the defect outline corresponding to the defect feature is larger than the fifth threshold, judging that the defect outline is bubble, otherwise judging that the defect outline is sample wall hanging.
In some embodiments, the performing primary binarization on the tip image to obtain an effective area map includes:
and filtering the suction head image.
In some embodiments, the performing primary binarization on the tip image to obtain an effective area map includes:
performing primary binarization on the suction head image to obtain a binary image;
carrying out pixel summation on the binary images in the horizontal direction and the vertical direction respectively to obtain a horizontal projection sequence and a vertical projection sequence;
searching a starting point position and a terminal position which are not zero in the horizontal projection sequence and the vertical projection sequence respectively and taking the starting point position and the terminal position as boundaries of an effective area of the suction head image;
And obtaining the effective area map according to the boundary of the effective area of the suction head image.
In a second aspect, embodiments of the present invention provide a suction head image processing apparatus, the apparatus comprising:
the acquisition module is used for acquiring the suction head image;
the binarization module is used for carrying out primary binarization on the suction head image to obtain an effective area diagram;
the gradient detection module is used for carrying out gradient edge detection on the effective area graph to obtain an edge detection graph, and carrying out gradient binarization processing on the edge detection graph to obtain a gradient binarization graph;
the feature extraction module is used for extracting the feature of the suction head from the effective area graph when the existence of the suction head is determined in the gradient binary image, so as to obtain the feature of the suction head, wherein the feature of the suction head comprises a suction head profile and a suction head liquid level position;
the defect judging module is used for judging whether effective defects exist in the edge detection map according to the suction head profile;
and the sample sucking quality judging module is used for judging the sample sucking quality according to the characteristics of the effective defects and the liquid level position of the suction head if the effective defects exist.
In a third aspect, an embodiment of the present invention provides a tip image processing apparatus, including:
At least one processor, and
and a memory communicatively coupled to the at least one processor, the memory storing instructions executable by the at least one processor, the instructions executable by the at least one processor to enable the at least one processor to perform the method described above.
In a fourth aspect, embodiments of the present invention provide a non-transitory computer-readable storage medium storing computer-executable instructions that, when executed by a tip image processing apparatus, cause the tip image processing apparatus to perform a method as described above.
According to the suction head image processing method, the suction head image processing device and the suction head image processing equipment, after the suction head image is acquired, the suction head image is subjected to primary binarization, and an effective area map with the suction head is positioned; performing gradient edge detection on the effective area graph to obtain an edge detection graph, and performing gradient binarization processing on the edge detection graph to obtain a gradient binarization graph; when the existence of the suction head is determined by utilizing the gradient binarization map, suction head characteristic extraction is carried out on the effective area map, so as to obtain suction head characteristics comprising suction head contours and suction head liquid level positions; then, judging whether effective defects exist in the edge detection graph according to the suction head profile, so that whether the suction sample condition corresponding to the suction head image is qualified or not can be judged; if the effective defect exists, the sample sucking quality can be judged according to the characteristics of the effective defect and the liquid level position of the suction head, so that the sample sucking quality can be accurately judged.
Drawings
One or more embodiments are illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements, and in which the figures of the drawings are not to be taken in a limiting sense, unless otherwise indicated.
FIG. 1 is a schematic view of a scene of one embodiment of the tip image processing method of the present invention;
FIG. 2 is a flow chart of one embodiment of a tip image processing method of the present invention;
FIG. 3 is a raw image of a tip image of one embodiment of the tip image processing method of the present invention;
FIG. 4 is a filtered image of a tip image of one embodiment of the tip image processing method of the present invention;
FIG. 5 is a binarized image of a filtered image of one embodiment of a tip image processing method of the present invention;
FIG. 6 is a view of the active area of one embodiment of the tip image processing method of the present invention;
FIG. 7 is a gradient edge detection map of one embodiment of a tip image processing method of the present invention;
FIG. 8 is a gradient binarization map of one embodiment of a tip image processing method of the present invention;
FIG. 9 is an edge detection map of one embodiment of a tip image processing method of the present invention;
FIG. 10 is a defect map of one embodiment of the tip image processing method of the present invention;
FIG. 11 is a defect localization map of one embodiment of the tip image processing method of the present invention;
FIG. 12 is a schematic view of the construction of an embodiment of the suction head image processing apparatus of the present invention;
FIG. 13 is a schematic view of the construction of an embodiment of the suction head image processing apparatus of the present invention;
FIG. 14 is a schematic diagram showing the hardware configuration of a controller in one embodiment of the tip image processing apparatus of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The suction head image processing method and the suction head image processing device provided by the embodiment of the invention can be applied to suction head image processing equipment.
It can be understood that the suction head image processing device is provided with a controller as a main control center for judging the suction condition inside the suction head and judging the suction quality.
In addition, in the sucker image processing equipment, a camera is further arranged for sucker image acquisition, as shown in fig. 1, the camera is arranged on one side surface of a sucker part of a sampling component of the automatic cup separating system and is used for shooting images of the sucker part of the sampling component of the automatic cup separating system, and a backlight source is arranged on the other side of the sucker part of the sampling component so as to meet the shooting environment of the camera on the sucker part of the sampling component.
The automatic cup separating system can realize the functions of uncovering a disease sampling tube, sucking and transferring samples, closing the cover of a virus sampling tube, sterilizing, filtering and the like, and the camera is utilized to collect real-time images of the suction head part of a sample adding component of the automatic cup separating system, so that real-time analysis can be carried out on the suction sample condition, whether the suction sample amount is accurate or not is judged, whether a sample hanging liquid is arranged on the outer wall of the suction head or not, whether bubbles are sucked or not is judged, and a foundation is laid for the accuracy of subsequent PCR amplification and DNA analysis.
Referring to fig. 2, fig. 2 is a flowchart of a method for processing a suction head image according to an embodiment of the present invention, where the method may be performed by a controller 13 in a suction head image processing apparatus, as shown in fig. 1, and the method includes:
101: a tip image is acquired.
Specifically, a suction head image can be obtained through a camera as shown in fig. 1, wherein the suction head image is an image corresponding to a suction head part of a sample adding component of the automatic cup separating system.
After the camera acquires the suction head image, as shown in fig. 3, the original suction head image is acquired, and the suction head image is preprocessed.
In some embodiments, since noise is typically present in the image, the method may further include, in order to reduce the effect of the noise, preprocessing the image of the tip:
and filtering the suction head image.
More specifically, when the suction head image is subjected to filtering, a processing mode of combining median filtering and mean filtering can be adopted. After acquiring the suction head image, removing the gray level abnormal jump points by using a median filtering mode, wherein the adopted median filtering formula 1 is as follows:
wherein f1 (x, y) represents the output gray value at the (x, y) point in the tip image; s is S xy A set of coordinates representing a rectangular sub-image window of size m x n centered at point (x, y); media is an operation of taking a set of median values of data; g1 (s, t) represents the input gray value at the point of the pre-filter image (s, t).
After the output gray value f1 (x, y) is obtained, in order to further reduce the influence of noise on the subsequent operation, the output gray value f1 (x, y) is subjected to an average filtering process, where the average filtering is as follows in formula 2:
Wherein f1 (s, t) is a median filtered Image, and is used as an input of mean filtering, a filtered Image Blur_image is obtained after filtering, as shown in fig. 4, an original suction head Image is compared with a suction head Image after filtering, and Image noise can be obviously inhibited by filtering.
102: and performing primary binarization on the suction head image to obtain an effective area diagram.
After obtaining the suction head image after the filtering process, performing primary binarization processing on the suction head image after the filtering process to obtain a binary image, as shown in fig. 5, and then determining an effective area diagram to be analyzed in the binary image, which specifically may include:
carrying out pixel summation on the binary images in the horizontal direction and the vertical direction respectively to obtain a horizontal projection sequence and a vertical projection sequence;
searching a starting point position and a terminal position which are not zero in the horizontal projection sequence and the vertical projection sequence respectively and taking the starting point position and the terminal position as boundaries of an effective area of the suction head image;
and obtaining the effective area map according to the boundary of the effective area of the suction head image.
Specifically, the two-value images are respectively subjected to pixel summation in the horizontal direction and the vertical direction to obtain a horizontal projection sequence and a vertical projection sequence, the calculation mode of the horizontal projection sequence is shown as a formula 3, and the calculation mode of the vertical projection sequence is shown as a formula 4:
Wherein, the binary_image is a binarized Image; the binary_image (i, j) is the pixel gray value of the ith row and the jth column of the binarized Image; width is the image width and height is the image height; i is an integer between 1 and the image width; j is an integer between 1 and image Height.
Then, the starting point position and the end point position with the numerical value not being zero in the two sequences of the horizontal_array and the vertical_array are respectively searched and used as the boundary of the effective area of the suction head image. And intercepting an effective region to be analyzed from the filtered Image to obtain an effective region map ROI_image, as shown in fig. 6.
103: and performing gradient edge detection on the effective area graph to obtain an edge detection graph, and performing gradient binarization processing on the edge detection graph to obtain a gradient binarization graph.
The gradient binarization map can be used to determine the presence or absence of a tip and to locate the tip root node.
The edge detection map is used for detecting defects.
Specifically, the scharr operator may be used to perform gradient edge detection on the effective region map roi_image to be analyzed. Namely, respectively calculating the Gradient graphs in the horizontal direction and the vertical direction to obtain a horizontal Gradient result and a vertical Gradient result, and then carrying out Image fusion on the horizontal Gradient result and the vertical Gradient result according to a preset weight (such as a weight of 0.5), namely, overlapping the two Gradient graphs to obtain a complete Gradient edge detection graph gradient_image, as shown in fig. 7.
More gradient details of the image can be acquired by using the scharr operator, so that the root node of the suction head can be searched in the subsequent operation. If the Canny algorithm is directly adopted for edge detection, the information of the position of the root node can be removed, so that the root node cannot be positioned, and the upper contour and the lower contour of the suction head cannot be searched further.
After the Gradient edge detection map gradient_image shown in fig. 7 is obtained, since there is a lot of ring noise in the Gradient binarization map gradient_image, an Image morphology process is required, that is, an on operation process is performed on the Gradient edge detection map gradient_image to reduce interference caused by the impurity lines, and a morphology Image morph_image after the impurity lines are removed is obtained.
After the morphological Image morph_image with the impurity removed is obtained, binarizing the morphological Image morph_image to obtain a Binary morphological Image Binary_Image2, wherein the Binary morphological Image Binary_Image2 is used as the gradient binarization map. As shown in fig. 8, the binarized image retains tip portion valid data.
And 104, when the existence of the suction head is determined in the gradient binarization map, extracting suction head characteristics from the effective area map to obtain suction head characteristics, wherein the suction head characteristics comprise suction head contours and suction head liquid level positions.
Because of the detection of suction within a tip, it is desirable to detect the presence of a tip in a gradient binary map, and in some embodiments, the method may further comprise:
if the pixel sum of the gradient binary image is larger than a first threshold value, judging that a suction head exists in the gradient binary image;
and if the pixel sum of the gradient binarization map is not larger than the first threshold value, judging that a suction head is not present in the gradient binarization map.
Specifically, calculating the sum of all pixels in a gradient Binary Image (Binary morphology Image 2), and if the sum of the pixels is larger than a first threshold Th1, judging that a suction head exists in the gradient Binary Image; if the sum of pixels is not greater than the first threshold Th1, determining that there is no tip in the gradient binarization map, and giving a tip-free indication. The pixel sum is equation 5:
whether the suction head exists in the suction head image is judged by utilizing the gradient binarization map, so that the accuracy of suction head inspection is effectively improved.
In some embodiments, extracting the suction head characteristic from the effective area map to obtain a suction head characteristic, where the suction head characteristic includes a suction head profile and a suction head liquid level position, may include:
Determining a searching range of a suction head root node in the gradient binarization graph, and searching the suction head root node in the effective area graph;
the root node of the suction head is taken as a starting point, the direction of the top point of the suction head is toward, and a local gray minimum value is searched in the effective area diagram by using the pixel range of a second threshold value where the contours of the two sides are positioned, so that the contours of the two sides of the suction head are obtained;
and determining the peak of the suction head according to the contours of the two sides of the suction head, determining the contours of the suction head according to the contours of the two sides of the suction head and the peak of the suction head, and determining the liquid level position of the suction head according to the contours of the two sides of the suction head and the characteristics of gray scale mutation at the junction of liquid and air.
Specifically, after obtaining a gradient Binary Image (Binary Image 2) as shown in fig. 8, determining a search range of a root node of a suction head in the Binary Image2, and determining the search range of the root node in the active area graph in a column where the root position of the suction head of the gradient Binary Image (Binary Image 2) is located, namely, the last column; and finding the suction head root node in the searching range of the effective area graph by utilizing the characteristic of the gray local minimum value of the root node.
Further, in the column where the root position of the suction head is located, searching the first non-zero pixel position p_upper from top to bottom, searching the first non-zero pixel position p_lower from bottom to top, and assuming that the midpoint position between p_upper and p_lower is p_mid, the searching range of the upper root node is [ p_upper, p_mid ], and the searching range of the lower root node is [ p_mid, p_lower ]. And searching the Root node root_upper and the Root node root_lower of the suction head in a searching range according to the characteristic that the contour is the gray local minimum value, so as to obtain the suction head Root node comprising the Root node root_upper and the Root node root_lower of the suction head.
After finding out the Root node root_upper and the Root node root_lower on the suction head, respectively taking the Root node root_upper and the Root node root_lower on the suction head as starting points, and searching the next contour point of the suction head in the suction head direction. The determined search range is: and expanding the range of a second threshold Th2 pixels on the upper side and the lower side respectively in the vertical direction by taking the position of the contour point as a reference, and longitudinally searching the next local gray minimum point, namely the contour point, until the point within the width of the ROI_image is traversed. The calculation method of the contour point sequence is as follows:
Boundary_upper [ i ] =min (roi_image (i, j-Th 2),. The roi_image (i, j+th2)) formula 6;
boundary_lower [ i ] =min (roi_image (i, j-Th 2),. Roi_image (i, j+th2)) formula 7;
wherein min is the operation of taking the minimum value in the data sequence, bound_upper is the upper contour of the suction head, and bound_lower is the lower contour of the suction head; i is an integer between 1 and the width of the roi_image; j is the ordinate where the last contour point is located, and the range is an integer between 1 and the height of the ROI_image.
The upper contour of the tip and the lower contour of the tip are obtained and then used as both side contours of the tip.
Then, according to the two side contours of the suction head, the suction head vertex is determined, the intersection point of the two side contours is determined as the suction head vertex, namely, the intersection point between the upper contour boundary_upper of the suction head and the lower contour boundary_lower of the suction head is determined as the suction head vertex_Top.
And determining the suction head profile according to the profiles of the two sides of the suction head and the suction head vertexes, namely, enclosing the upper profile boundary_upper of the suction head, the lower profile boundary_lower of the suction head and the suction head vertexes root_Top to form the suction head profile.
And meanwhile, determining the liquid level position of the suction head according to the contours of the two sides of the suction head and the characteristics of gray scale mutation at the junction of liquid and air. Specifically, in some embodiments, determining the position of the liquid surface of the suction head according to the two-side profile and the characteristics of gray scale abrupt change at the boundary between the liquid and the air may include:
Calculating the gray level first-order difference of the gray level sequences of the upper contour and the lower contour to obtain a gray level first-order difference sequence;
calculating liquid level position candidate points of the upper outline and the lower outline according to the gray level first-order differential sequence;
if the first-order difference values meeting the preset conditions are found in the gray-level first-order difference sequences of the upper profile and the lower profile respectively, judging that the sample is sucked, wherein the preset conditions are points of which the first-order difference values in the gray-level first-order difference sequences are smaller than a negative peak of a third threshold, and the corresponding position distance of the negative peak points of the upper profile or the lower profile is not more than 2;
and (3) averaging the negative peak point positions of the upper outline and the negative peak point positions of the lower outline in the gray level first-order difference meeting the preset condition to obtain the liquid level position of the suction head.
When determining the liquid level position of the suction head, firstly, calculating the gray level first difference of the gray level sequences of the upper contour and the lower contour to obtain a gray level first difference sequence, namely, respectively solving the gray level first difference sequence of the upper contour boundary_upper of the suction head and the gray level first difference sequence of the lower contour boundary_lower of the suction head, wherein the specific formulas 8 and 9 are as follows:
GrayDelta_upper [ i ] = Gray_array_upper [ i+1] -Gray_array_upper [ i ] equation 8;
GrayDelta_lower [ i ] = Gray_array_lower [ i+1] -Gray_array_lower [ i ] equation 9;
the GrayDelta_upper is a gray level first-order differential sequence of the upper contour boundary_upper, and GrayDelta_lower is a first-order differential sequence of the lower contour boundary_lower; the value of i is an integer ranging from 1 to the contour length of the upper contour boundary_upper or the contour length-1 of the lower contour boundary_lower.
After the gray level first-order difference sequence of the upper contour boundary_upper of the suction head and the gray level first-order difference sequence of the lower contour boundary_lower of the suction head are obtained, liquid level position candidate points of the upper contour and the lower contour are calculated according to the gray level first-order difference sequences. When the sample sucking component sucks the sample, the sample firstly reaches the top of the suction head and then passes through the root of the suction head, the gray value of the part containing liquid is larger, and the gray value of the part not containing liquid is smaller, as shown in fig. 6, so that the liquid level position can generate a remarkable gray increase from the root of the suction head to the top, a negative number with a larger absolute value is generated in the corresponding gray level first-order difference sequence, namely, the gray level first-order difference of the outline can generate a negative peak at the position of the liquid level, and the negative peak in the gray level first-order difference is used as a liquid level position candidate point. Specifically, the positions of the gray level first-order differential sequence gray delta_upper of the upper contour and the gray level first-order differential sequence gray delta_lower of the lower contour, of which the values are smaller than the third threshold value Th3, are searched and can be used as liquid level position candidate points.
After the liquid level position candidate point is obtained, determination of the liquid level position can be performed. Due to factors such as hanging liquid or bubbles, there may be a plurality of negative peaks where the gray level first order difference is smaller than the third threshold. Assuming that m and n negative peaks with gray levels smaller than the third threshold Th3 are found in the gray level first-order differential sequence gray delta upper and gray level first-order differential sequence gray delta lower of the upper and lower contours, respectively, the liquid level position is calculated by the following equation 10, wherein the difference between the two liquid level position candidate point positions of the upper and lower contours cannot exceed 2 based on the symmetry of the upper and lower contours:
i deltaPos_upper [ i ] -deltaPos_lower [ j ]. Ltoreq.2 formula 10
Wherein deltapos_upper is a negative spike sequence with an upper contour gray level smaller than a third threshold Th 3; deltapos_lower is a negative spike sequence with a lower contour gray scale less than a third threshold Th 3; i is an integer between 1 and m, and j is an integer between 1 and n.
And if the points of the negative peak sequence, of which the first-order difference value is smaller than the third threshold value, in the gray level first-order difference cannot be found, namely, the negative peaks, of which the upper contour first-order difference value is smaller than the third threshold value Th3, and the negative peaks, of which the lower contour first-order difference value is smaller than the third threshold value Th3, cannot be found, judging that the sample is not sucked.
Otherwise, if the point of the negative peak sequence with the first-order difference value smaller than the third threshold value is found in the gray level first-order difference, that is, the point of the negative peak sequence with the upper contour first-order difference smaller than the third threshold value Th3 and the point of the negative peak sequence with the lower contour first-order difference smaller than the third threshold value Th3 are found, the distance between the positions corresponding to the upper contour negative peak point and the lower contour negative peak point is not more than 2, and the preset condition is met, the suction of the sample is judged.
After the suction sample is determined, the positions of the negative peak points of the upper and lower contours, which meet the preset conditions, of the gray level first-order difference are averaged to obtain the liquid level position of the suction head, namely, the positions of the upper and lower contour points, which meet the requirements, are output to be subjected to average processing to serve as the liquid level position of the suction head.
The sample sucking quality of the cup separating system can be primarily judged through a gradient binarization mode, and the situation that the suction head is not loaded or sucked into a sample can be detected.
And 105, judging whether effective defects exist in the edge detection diagram according to the suction head profile.
After determining the suction head profile, judging whether an effective defect exists in the edge detection diagram, wherein the effective defect can be air bubbles or hanging liquid. As can be seen from the gradient edge detection diagram in fig. 7, due to the problems of light source distribution and camera acquisition, annular noise is formed, and the periphery of the effective area diagram roi_image is more obvious, so after the characteristic points and the suction head contour of the suction head are determined, more accurate suction head parts need to be intercepted in the effective area diagram roi_image to eliminate the influence of the annular noise.
When ring noise is eliminated, in the transverse direction, the tip vertex is taken as a starting point, the root node is taken as an end point, and in the longitudinal direction, the tip Image pip_image with accurate positioning is obtained by outwards expanding a certain width on the basis of the upper root node and the lower root node respectively.
In some embodiments, determining whether a valid defect exists in the edge detection map according to the tip profile may include:
removing the suction head profile in the edge detection map to obtain a defect profile map;
calculating the area of each contour in the defect contour map, and judging that effective defects exist in the defect contour map if contours with contour areas not smaller than a fifth threshold exist in the defect contour map;
and if the contour with the contour area smaller than the fifth threshold value exists in the defect contour map, judging that the contour with the contour area smaller than the fifth threshold value is an invalid defect, and if the contour with the contour area not smaller than the fifth threshold value does not exist after the invalid defect is removed, judging that the suction sample is qualified.
Specifically, after the effective area map is accurately positioned, a suction head Image pip_image is obtained, and edge detection is performed on the suction head Image pip_image, so that an edge detection map is obtained. The edge detection can adopt a Canny edge detection mode to obtain a Canny edge detection Image canny_image so as to locate the edge of the suction head, as shown in fig. 9.
And then removing the suction head contour in the edge detection diagram to obtain a Defect contour diagram, namely setting the adjacent pixel value in the fourth threshold range of the suction head contour to be 0 in the edge detection diagram to obtain the Defect contour diagram, specifically, in the edge detection diagram canny_image, along the upper contour boundary_upper and the lower contour boundary_lower of the suction head contour, taking a contour point as a center, and setting the adjacent pixel value in the fourth threshold Th4 range to be 0 in the longitudinal direction respectively, and then setting the rest non-zero pixels to be Defect contours to obtain the Defect contour diagram defect_image, as shown in fig. 10.
After the defect profile is obtained, defect localization can be performed. Since the Defect contour map defect_image includes some smaller contours, at this time, calculating the areas of the contours in the Defect contour map, and if there is a contour with a contour area not smaller than a fifth threshold value in the Defect contour map, determining that there is a valid Defect in the Defect contour map; and if the contour with the contour area smaller than the fifth threshold value exists in the defect contour map, judging that the contour with the contour area smaller than the fifth threshold value is an invalid defect, and if the contour with the contour area not smaller than the fifth threshold value does not exist after the invalid defect is removed, judging that the suction sample is qualified. That is, the contour with the area smaller than the fifth threshold Th5 is regarded as an interference contour, the interference contour can be removed, and the rest contours are all effective defects; contours with areas greater than the fifth threshold Th5 are considered as valid defects that are ultimately detected.
106: if the effective defect exists, judging the sample sucking quality according to the characteristics of the effective defect and the liquid level position of the suction head.
In some embodiments, determining the sample sucking quality according to the characteristics of the effective defect and the position of the liquid surface of the suction head may include:
marking the effective defect;
if the center of the effective defect is outside the suction head profile or is a position outside the position between the suction head liquid level and the suction head vertex, judging that the sample is hung;
if the center of the effective defect is positioned in the interior of the suction head profile or between the suction head liquid level position and the suction head vertex, calculating the defect characteristic of the effective defect;
and if the roundness of the defect outline corresponding to the defect feature is larger than the fifth threshold, judging that the defect outline is bubble, otherwise judging that the defect outline is sample wall hanging.
Specifically, after the finally detected valid defect is obtained, the type of the valid defect is determined. The minimum bounding rectangle of the valid defect can be obtained by using the function minAreRect in OpenCV, and the valid defect finally detected is marked with the minimum bounding rectangle box as shown in FIG. 11.
Then, the center of the smallest circumscribed rectangular frame is obtained as the center of the effective defect, and if the center of the effective defect is outside the suction head profile or is a position outside the position between the suction head liquid level position and the suction head vertex, the sample wall is judged. If the center of the effective defect is located inside the suction head profile or at a position within the position from the suction head liquid level to the suction head vertex, further analysis is required, for example, when the water drop on the wall is located on the surface of the suction head close to the light source, the defect cannot be directly determined as a bubble due to the fact that the defect is located below the liquid level and inside the suction head profile, at this time, further calculation of defect characteristics is required to determine whether the defect is a bubble or a hanging liquid, and roundness can be adopted as defect characteristics to calculate the defect characteristics of the effective defect; and if the roundness of the defect outline corresponding to the defect feature is larger than the fifth threshold, judging that the defect outline is bubble, otherwise judging that the defect outline is sample wall hanging. The roundness is calculated as a defect feature in the following formula 11:
Where Afa is the roundness value of the contour, S is the area of the contour, and C is the perimeter of the contour.
And when the roundness of the defect outline is larger than a fifth threshold Th5, judging that the defect outline is judged to be bubbles, and otherwise judging that the defect outline is hung.
After the effective defects are positioned, the defect type can be judged by utilizing the characteristics of the defects, so that inaccurate sample sucking quantity of a sample caused by the conditions of liquid hanging of the suction head, suction of bubbles by the suction head and the like is prevented, and the accuracy of subsequent nucleic acid detection is ensured.
In the embodiment of the application, after a suction head image is acquired, the suction head image is subjected to primary binarization, and an effective area map with the suction head is positioned; performing gradient edge detection on the effective area graph to obtain an edge detection graph, and performing gradient binarization processing on the edge detection graph to obtain a gradient binarization graph; when the existence of the suction head is determined by utilizing the gradient binarization map, suction head characteristic extraction is carried out on the effective area map, so as to obtain suction head characteristics comprising suction head contours and suction head liquid level positions; then, judging whether effective defects exist in the edge detection graph according to the suction head profile, so that whether the suction sample condition corresponding to the suction head image is qualified or not can be judged; if the effective defect exists, the sample sucking quality can be judged according to the characteristics of the effective defect and the liquid level position of the suction head, so that the sample sucking quality can be accurately judged.
Accordingly, as shown in fig. 12, an embodiment of the present invention further provides a suction head image processing apparatus, which may be used in a suction head image processing device, the suction head image processing apparatus 600 includes:
an acquisition module 601, configured to acquire a suction head image;
the binarization module 602 is configured to perform primary binarization on the suction head image to obtain an effective area map;
the gradient detection module 603 is configured to perform gradient edge detection on the active area map to obtain an edge detection map, and perform gradient binarization processing on the edge detection map to obtain a gradient binarization map;
a feature extraction module 604, configured to perform a tip feature extraction on the effective area map when it is determined that a tip exists in the gradient binary map, to obtain a tip feature, where the tip feature includes a tip profile and a tip liquid level position;
a defect judging module 605, configured to judge whether a valid defect exists in the edge detection map according to the suction head profile;
and the sample sucking quality judging module 606 is used for judging the sample sucking quality according to the characteristics of the effective defects and the liquid level position of the suction head if the effective defects exist.
In the embodiment of the invention, after acquiring the suction head image, performing primary binarization on the suction head image, and positioning an effective area map with the suction head; performing gradient edge detection on the effective area graph to obtain an edge detection graph, and performing gradient binarization processing on the edge detection graph to obtain a gradient binarization graph; when the existence of the suction head is determined by utilizing the gradient binarization map, suction head characteristic extraction is carried out on the effective area map, so as to obtain suction head characteristics comprising suction head contours and suction head liquid level positions; then, judging whether effective defects exist in the edge detection graph according to the suction head profile, so that whether the suction sample condition corresponding to the suction head image is qualified or not can be judged; if the effective defect exists, the sample sucking quality can be judged according to the characteristics of the effective defect and the liquid level position of the suction head, so that the sample sucking quality can be accurately judged.
In other embodiments, as shown in fig. 13, the tip image processing apparatus 600 includes: a suction head judging module 607 for:
if the pixel sum of the gradient binary image is larger than a first threshold value, judging that a suction head exists in the gradient binary image;
and if the pixel sum of the gradient binarization map is not larger than the first threshold value, judging that a suction head is not present in the gradient binarization map.
In other embodiments, the feature extraction module 604 is further configured to:
determining a searching range of a suction head root node in the gradient binarization graph, and searching the suction head root node in the effective area graph;
the root node of the suction head is taken as a starting point, the direction of the top point of the suction head is toward, and a local gray minimum value is searched in the effective area diagram by using the pixel range of a second threshold value where the contours of the two sides are positioned, so that the contours of the two sides of the suction head are obtained;
and determining the peak of the suction head according to the contours of the two sides of the suction head, determining the contours of the suction head according to the contours of the two sides of the suction head and the peak of the suction head, and determining the liquid level position of the suction head according to the contours of the two sides of the suction head and the characteristics of gray scale mutation at the junction of liquid and air.
In some of these embodiments, the feature extraction module 604 is further configured to:
Determining a searching range of a root node in the effective area graph at the row of the root position of the suction head of the gradient binarization graph;
and finding the suction head root node in the searching range in the effective area graph by utilizing the characteristic of the gray local minimum value of the root node.
In some of these embodiments, the feature extraction module 604 is further configured to:
and determining the intersection point of the two side contours of the suction head as the suction head vertex.
In some of these embodiments, the two-sided profile includes an upper profile and a lower profile; the feature extraction module 604 is further configured to:
calculating the gray level first-order difference of the gray level sequences of the upper contour and the lower contour to obtain a gray level first-order difference sequence;
calculating liquid level position candidate points of the upper outline and the lower outline according to the gray level first-order differential sequence;
if the first-order difference values meeting the preset conditions are found in the gray-level first-order difference sequences of the upper profile and the lower profile respectively, judging that the sample is sucked, wherein the preset conditions are points of which the first-order difference values in the gray-level first-order difference sequences are smaller than a negative peak of a third threshold, and the corresponding position distance of the negative peak points of the upper profile or the lower profile is not more than 2;
And (3) averaging the negative peak point positions of the upper outline and the negative peak point positions of the lower outline in the gray level first-order difference meeting the preset condition to obtain the liquid level position of the suction head.
In some of these embodiments, the feature extraction module 604 is further configured to:
and taking the negative peak in the gray level first-order differential sequence as a liquid level position candidate point of the upper contour and the lower contour.
In some embodiments, as shown in fig. 13, the apparatus 600 further includes a sample suction judging module 608, configured to:
and if the point of the negative peak sequence with the first-order difference value smaller than the third threshold value is not found in the gray-level first-order difference sequence, judging that the sample is not sucked.
In some of these embodiments, the defect determination module 605 is further configured to:
removing the suction head profile in the edge detection map to obtain a defect profile map;
and calculating the area of each contour in the defect contour map, and judging that effective defects exist in the defect contour map if the contour with the contour area not smaller than a fifth threshold value exists in the defect contour map.
In some embodiments, the apparatus 600 further comprises a sample qualification module 609 for:
and if the contour with the contour area smaller than the fifth threshold value exists in the defect contour map, judging that the contour with the contour area smaller than the fifth threshold value is an invalid defect, and if the contour with the contour area not smaller than the fifth threshold value does not exist after the invalid defect is removed, judging that the suction sample is qualified.
In some embodiments, the sample quality determination module 606 is further configured to:
in the edge detection map, the adjacent pixel value in the fourth threshold range where the suction head profile is located is set to 0, and a defect profile map is obtained.
In some of these embodiments, the defect determination module 605 is further configured to:
marking the effective defect;
if the center of the effective defect is outside the suction head profile or is a position outside the position between the suction head liquid level and the suction head vertex, judging that the sample is hung;
if the center of the effective defect is positioned in the interior of the suction head profile or between the suction head liquid level position and the suction head vertex, calculating the defect characteristic of the effective defect;
and if the roundness of the defect outline corresponding to the defect feature is larger than the fifth threshold, judging that the defect outline is bubble, otherwise judging that the defect outline is sample wall hanging.
In some of these embodiments, the apparatus 600 further comprises a filtering module 610 configured to:
and filtering the suction head image.
In some of these embodiments, the binarization module 602 is further configured to:
performing primary binarization on the suction head image to obtain a binary image;
Carrying out pixel summation on the binary images in the horizontal direction and the vertical direction respectively to obtain a horizontal projection sequence and a vertical projection sequence;
searching a starting point position and a terminal position which are not zero in the horizontal projection sequence and the vertical projection sequence respectively and taking the starting point position and the terminal position as boundaries of an effective area of the suction head image;
and obtaining the effective area map according to the boundary of the effective area of the suction head image.
It should be noted that, the device can execute the method provided by the embodiment of the application, and has the corresponding functional modules and beneficial effects of executing the method. Technical details which are not described in detail in the device embodiments may be found in the methods provided by the embodiments of the present application.
Fig. 14 is a schematic diagram showing a hardware configuration of a controller in one embodiment of the tip image processing apparatus, and as shown in fig. 14, the controller 13 includes:
one or more processors 131, a memory 132. In fig. 14, a processor 131 and a memory 132 are taken as an example.
The processor 131 and the memory 132 may be connected by a bus or other means, and in fig. 14, a bus connection is exemplified.
The memory 132 is used as a non-volatile computer readable storage medium, and may be used to store a non-volatile software program, a non-volatile computer executable program, and modules, such as program instructions/modules corresponding to the tip image processing method in the embodiment of the present application (for example, the acquisition module 601, the binarization module 602, the gradient detection module 603, the feature extraction module 604, the defect judgment module 605, the sample quality judgment module 606, the tip judgment module 607, the sample judgment module 608, the sample qualification module 609, and the filtering module 610 shown in fig. 12-13). The processor 131 executes various functional applications of the controller and data processing, namely, implements the tip image processing method of the above-described method embodiment by running nonvolatile software programs, instructions, and modules stored in the memory 132.
The memory 132 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created according to the use of the tip image processing apparatus, or the like. In addition, memory 132 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 132 optionally includes memory remotely located relative to processor 131, which may be connected to the tip image processing device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more modules are stored in the memory 132, which when executed by the one or more processors 131, perform the tip image processing method in any of the method embodiments described above, e.g., perform method steps 101-106 in fig. 2 described above; the functions of blocks 601-606 in fig. 12, blocks 601-610 in fig. 13 are implemented.
The product can execute the method provided by the embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method. Technical details not described in detail in this embodiment may be found in the methods provided in the embodiments of the present application.
Embodiments of the present application provide a non-transitory computer readable storage medium storing computer executable instructions for execution by one or more processors, such as one of the processors 131 in fig. 14, to cause the one or more processors to perform the tip image processing method in any of the method embodiments described above, such as performing the method steps 101-106 in fig. 2 described above; the functions of blocks 601-606 in fig. 12, blocks 601-610 in fig. 13 are implemented.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
From the above description of embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus a general purpose hardware platform, but may also be implemented by means of hardware. Those skilled in the art will appreciate that all or part of the processes implementing the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and where the program may include processes implementing the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (RandomAccessMemory, RAM), or the like.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; the technical features of the above embodiments or in the different embodiments may also be combined within the idea of the invention, the steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (15)

1. A tip image processing method, the method comprising:
acquiring a suction head image;
performing primary binarization on the suction head image to obtain an effective area map;
performing gradient edge detection on the effective area graph to obtain an edge detection graph, and performing gradient binarization processing on the edge detection graph to obtain a gradient binarization graph;
when the existence of a suction head is determined in the gradient binarization map, suction head characteristic extraction is carried out on the effective area map, so as to obtain suction head characteristics, wherein the suction head characteristics comprise suction head contours and suction head liquid level positions;
judging whether effective defects exist in the edge detection diagram according to the suction head profile;
if the effective defect exists, judging the sample sucking quality according to the characteristics of the effective defect and the liquid level position of the suction head;
extracting the suction head characteristic from the effective area map to obtain the suction head characteristic, wherein the suction head characteristic comprises a suction head profile and a suction head liquid level position, and the suction head characteristic comprises the following components:
determining a searching range of a suction head root node in the gradient binarization graph, and searching the suction head root node in the effective area graph;
the root node of the suction head is taken as a starting point, the direction of the top point of the suction head is toward, and a local gray minimum value is searched in the effective area diagram by using the pixel range of a second threshold value where the contours of the two sides are positioned, so that the contours of the two sides of the suction head are obtained;
Determining suction head vertexes according to the two side contours of the suction head, determining suction head contours according to the two side contours of the suction head and the suction head vertexes, and determining suction head liquid level positions according to the two side contours of the suction head and the characteristics of gray scale mutation at the boundary of liquid and air;
determining the liquid level position of the suction head according to the contours of the two sides of the suction head and the characteristics of gray abrupt change at the junction of liquid and air, comprising:
calculating the gray level first-order difference of the gray level sequences of the upper contour and the lower contour to obtain a gray level first-order difference sequence;
calculating liquid level position candidate points of the upper outline and the lower outline according to the gray level first-order differential sequence;
if the first-order difference values meeting the preset conditions are found in the gray-level first-order difference sequences of the upper profile and the lower profile respectively, judging that the sample is sucked, wherein the preset conditions are points of which the first-order difference values in the gray-level first-order difference sequences are smaller than a negative peak of a third threshold, and the corresponding position distance of the negative peak points of the upper profile or the lower profile is not more than 2;
and (3) averaging the negative peak point positions of the upper outline and the negative peak point positions of the lower outline in the gray level first-order difference meeting the preset condition to obtain the liquid level position of the suction head.
2. The method according to claim 1, wherein the method further comprises:
if the pixel sum of the gradient binary image is larger than a first threshold value, judging that a suction head exists in the gradient binary image;
and if the pixel sum of the gradient binarization map is not larger than the first threshold value, judging that a suction head is not present in the gradient binarization map.
3. The method of claim 1, wherein determining a lookup range for a tip root node in the gradient binarization map and looking up a tip root node in the active area map comprises:
determining a searching range of a root node in the effective area graph at the row of the root position of the suction head of the gradient binarization graph;
and finding the suction head root node in the searching range in the effective area graph by utilizing the characteristic of the gray local minimum value of the root node.
4. The method of claim 1, wherein said determining tip vertices based on the two-sided contours of the tip comprises:
and determining the intersection point of the two side contours of the suction head as the suction head vertex.
5. The method according to claim 1, wherein calculating liquid level position candidate points of the upper and lower contours from the gradation first-order differential sequence, respectively, comprises:
And taking the negative peak in the gray level first-order differential sequence as a liquid level position candidate point of the upper contour and the lower contour.
6. The method according to claim 1, wherein the method further comprises:
and if the point of the negative peak sequence with the first-order difference value smaller than the third threshold value is not found in the gray-level first-order difference sequence, judging that the sample is not sucked.
7. The method of claim 1, wherein said determining whether a valid defect exists in the edge map based on the tip profile comprises:
removing the suction head profile in the edge detection map to obtain a defect profile map;
and calculating the area of each contour in the defect contour map, and judging that effective defects exist in the defect contour map if the contour with the contour area not smaller than a fifth threshold value exists in the defect contour map.
8. The method of claim 7, wherein the method further comprises:
and if the contour with the contour area smaller than the fifth threshold value exists in the defect contour map, judging that the contour with the contour area smaller than the fifth threshold value is an invalid defect, and if the contour with the contour area not smaller than the fifth threshold value does not exist after the invalid defect is removed, judging that the suction sample is qualified.
9. The method of claim 7, wherein said removing said tip profile in said edge detection map to obtain a defect profile comprises:
in the edge detection map, the adjacent pixel value in the fourth threshold range where the suction head profile is located is set to 0, and a defect profile map is obtained.
10. The method of claim 7, wherein said determining a sample suction quality based on the characteristics of said effective defect and said tip fluid level position comprises:
marking the effective defect;
if the center of the effective defect is outside the suction head profile or is a position outside the position between the suction head liquid level and the suction head vertex, judging that the sample is hung;
if the center of the effective defect is positioned in the interior of the suction head profile or between the suction head liquid level position and the suction head vertex, calculating the defect characteristic of the effective defect;
and if the roundness of the defect outline corresponding to the defect feature is larger than the fifth threshold, judging that the defect outline is bubble, otherwise judging that the defect outline is sample wall hanging.
11. The method according to any one of claims 1 to 10, wherein after the acquisition of the tip image, the method further comprises:
And filtering the suction head image.
12. The method of claim 11, wherein said performing a primary binarization of said tip image results in an effective area map, comprising:
performing primary binarization on the suction head image to obtain a binary image;
carrying out pixel summation on the binary images in the horizontal direction and the vertical direction respectively to obtain a horizontal projection sequence and a vertical projection sequence;
searching a starting point position and an end point position which are not zero in the horizontal projection sequence and the vertical projection sequence respectively and taking the starting point position and the end point position as boundaries of an effective area of the suction head image;
and obtaining the effective area map according to the boundary of the effective area of the suction head image.
13. A tip image processing apparatus, the apparatus comprising:
the acquisition module is used for acquiring the suction head image;
the binarization module is used for carrying out primary binarization on the suction head image to obtain an effective area diagram;
the gradient detection module is used for carrying out gradient edge detection on the effective area graph to obtain an edge detection graph, and carrying out gradient binarization processing on the edge detection graph to obtain a gradient binarization graph;
the feature extraction module is used for extracting the feature of the suction head from the effective area graph when the existence of the suction head is determined in the gradient binary image, so as to obtain the feature of the suction head, wherein the feature of the suction head comprises a suction head profile and a suction head liquid level position;
The defect judging module is used for judging whether effective defects exist in the edge detection map according to the suction head profile;
the sample sucking quality judging module is used for judging the sample sucking quality according to the characteristics of the effective defects and the liquid level position of the suction head if the effective defects exist;
the feature extraction module is further used for:
determining a searching range of a suction head root node in the gradient binarization graph, and searching the suction head root node in the effective area graph;
the root node of the suction head is taken as a starting point, the direction of the top point of the suction head is toward, and a local gray minimum value is searched in the effective area diagram by using the pixel range of a second threshold value where the contours of the two sides are positioned, so that the contours of the two sides of the suction head are obtained;
determining suction head vertexes according to the two side contours of the suction head, determining suction head contours according to the two side contours of the suction head and the suction head vertexes, and determining suction head liquid level positions according to the two side contours of the suction head and the characteristics of gray scale mutation at the boundary of liquid and air;
the feature extraction module is further used for:
calculating the gray level first-order difference of the gray level sequences of the upper contour and the lower contour to obtain a gray level first-order difference sequence;
calculating liquid level position candidate points of the upper outline and the lower outline according to the gray level first-order differential sequence;
If the first-order difference values meeting the preset conditions are found in the gray-level first-order difference sequences of the upper profile and the lower profile respectively, judging that the sample is sucked, wherein the preset conditions are points of which the first-order difference values in the gray-level first-order difference sequences are smaller than a negative peak of a third threshold, and the corresponding position distance of the negative peak points of the upper profile or the lower profile is not more than 2;
and (3) averaging the negative peak point positions of the upper outline and the negative peak point positions of the lower outline in the gray level first-order difference meeting the preset condition to obtain the liquid level position of the suction head.
14. A tip image processing apparatus, characterized in that the tip image processing apparatus comprises:
at least one processor, and
a memory communicatively coupled to the processor, the memory storing instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-12.
15. A non-transitory computer readable storage medium storing computer executable instructions which, when executed by a tip image processing apparatus, cause the tip image processing apparatus to perform the method of any one of claims 1-12.
CN202110728007.5A 2021-06-29 2021-06-29 Suction head image processing method and device and suction head image processing equipment Active CN113592775B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110728007.5A CN113592775B (en) 2021-06-29 2021-06-29 Suction head image processing method and device and suction head image processing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110728007.5A CN113592775B (en) 2021-06-29 2021-06-29 Suction head image processing method and device and suction head image processing equipment

Publications (2)

Publication Number Publication Date
CN113592775A CN113592775A (en) 2021-11-02
CN113592775B true CN113592775B (en) 2023-09-12

Family

ID=78245128

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110728007.5A Active CN113592775B (en) 2021-06-29 2021-06-29 Suction head image processing method and device and suction head image processing equipment

Country Status (1)

Country Link
CN (1) CN113592775B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03175343A (en) * 1989-09-14 1991-07-30 Matsushita Electric Works Ltd Method for extracting flaw by inspection appearance
CN101507861A (en) * 2009-03-06 2009-08-19 清华大学深圳研究生院 Method for generating digitization breath gate-control signal based on abdomen body-surface skeleton line
CN106871786A (en) * 2017-03-23 2017-06-20 杭州兆深科技有限公司 A kind of detection method and system for liquid-transfering sucker port
CN107121439A (en) * 2017-03-23 2017-09-01 杭州兆深科技有限公司 The method of inspection and system of a kind of liquid-transfering sucker
CN107340305A (en) * 2017-06-14 2017-11-10 杭州兆深科技有限公司 A kind of testing agency and detection method for liquid-transfering sucker

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03175343A (en) * 1989-09-14 1991-07-30 Matsushita Electric Works Ltd Method for extracting flaw by inspection appearance
CN101507861A (en) * 2009-03-06 2009-08-19 清华大学深圳研究生院 Method for generating digitization breath gate-control signal based on abdomen body-surface skeleton line
CN106871786A (en) * 2017-03-23 2017-06-20 杭州兆深科技有限公司 A kind of detection method and system for liquid-transfering sucker port
CN107121439A (en) * 2017-03-23 2017-09-01 杭州兆深科技有限公司 The method of inspection and system of a kind of liquid-transfering sucker
CN107340305A (en) * 2017-06-14 2017-11-10 杭州兆深科技有限公司 A kind of testing agency and detection method for liquid-transfering sucker

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于图像识别的吸量管液位检测方法研究;张宁 等;现代电子技术;第42卷(第23期);第40-43页 *

Also Published As

Publication number Publication date
CN113592775A (en) 2021-11-02

Similar Documents

Publication Publication Date Title
CN108830873B (en) Depth image object edge extraction method, device, medium and computer equipment
RU2595495C2 (en) Image processing device, image processing method and image processing system
CN109472761B (en) Cell counting method and system based on fluorescence image
CN114693610A (en) Welding seam surface defect detection method, equipment and medium based on machine vision
CN109253722A (en) Merge monocular range-measurement system, method, equipment and the storage medium of semantic segmentation
CN105389793B (en) A kind of method of automatic identification body surface fracture strike and width
CN106529551B (en) Intelligent recognition counting detection method for round-like objects in packaging industry
CN111724354B (en) Image processing-based method for measuring wheat ear length and wheat ear number of multiple wheat plants
CN114331986A (en) Dam crack identification and measurement method based on unmanned aerial vehicle vision
CN105913425B (en) A kind of more pig contour extraction methods based on adaptive oval piecemeal and wavelet transformation
CN103852034A (en) Elevator guide rail perpendicularity detection method
CN104036514A (en) Circle detection method based on histogram peak value search
CN113592775B (en) Suction head image processing method and device and suction head image processing equipment
CN116563298B (en) Cross line center sub-pixel detection method based on Gaussian fitting
CN111008960B (en) Aluminum electrolytic capacitor bottom appearance detection method and device based on machine vision
CN111738936A (en) Image processing-based multi-plant rice spike length measuring method
CN108898584B (en) Image analysis-based full-automatic veneered capacitor welding polarity discrimination method
CN113554688B (en) O-shaped sealing ring size measurement method based on monocular vision
CN115690089A (en) Image enhancement preprocessing method and system for weak defect detection
JP2006170635A (en) Detector of flaw by image processing and flaw detecting method using it
CN109544513A (en) A kind of steel pipe end surface defect extraction knowledge method for distinguishing
CN111508017B (en) Method and system for positioning mark center with weak contrast
CN109215068B (en) Image magnification measuring method and device
CN111768384A (en) Cell counting method and system based on three-dimensional scanning imaging
CN111986169A (en) Door and window detection method, system, terminal and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 518000 floors 4-10, building 3, Geya science and Technology Park, mashantou community clock base, Matian street, Guangming New Area, Shenzhen, Guangdong

Applicant after: Shenzhen Jinrui Biotechnology Co.,Ltd.

Address before: 518106 4-10 / F, building 3, Geya science and Technology Park, mashantou community clock base, Matian street, Guangming New District, Shenzhen City, Guangdong Province

Applicant before: GENRUI BIOTECH Inc.

GR01 Patent grant
GR01 Patent grant