Position identification method and medium for pipette tips
Through image processing of the pipette tip box, including matching coordinate system correction and grid splitting, the position of the tip in the cavity array is identified, which solves the problem of difficulty in distinguishing the tips in the tip box and improves the recognition accuracy. and efficiency.
Patent Information
- Application Number
- CN202410915707.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2044-07-09
AI Technical Summary
In the pipette tip box, the process of distinguishing whether there are tips placed on the chamber array is too time-consuming. Especially when multiple tips are sucked at the same time, it is impossible to ensure that each tip corresponds to the chamber. Suction tips are provided.
By obtaining the original image of the box end surface, correct the matching coordinate system and split the grid, enhance the contrast, set the dark area grayscale threshold and the tip area threshold, perform image comparison and screening, and mark the grid as Class A or B category, thereby identifying the position of the suction head and improving identification accuracy and efficiency.
It achieves more accurate identification of the positional relationship between the cavity and the suction head, improves the accuracy and efficiency of identifying the suction head, reduces misjudgments, and adapts to the identification needs in different situations.
Smart Images

Figure CN118470439B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of identification technology, and in particular to a method and medium for identifying the position of a pipette tip. Background Art
[0002] The tip box is provided with a cavity array composed of a plurality of cavity arrays, and a tip can be placed in each cavity; in the process of sucking tips from the tip box, the number of tips on the tip box gradually decreases, so there are two types of cavities on the cavity array on the tip box, one with a tip and the other without a tip. In order for the pipette to successfully suck up the tip, it is possible to visually distinguish whether there is a tip in each cavity on the cavity array, move the pipette to the position where the tip is placed, and perform the sucking operation; it is also possible to detect in real time when the pipette is moved whether there is a tip in the cavity corresponding to the gun tip through an electronic device, and perform the sucking operation when it is detected that there is a tip in the cavity corresponding to the gun tip; when the pipette is provided with multiple gun tips, and the multiple gun tips need to perform the sucking operation at the same time, the above method consumes a lot of time, and if the pipette sucks the tip for too long, it will affect the detection progress; and it is impossible to ensure that there is a tip in the cavity corresponding to each gun tip in a short time. Summary of the invention
[0003] The purpose of the present invention is to provide a method and medium for position recognition of a pipette tip, and the technical problem to be solved is how to accurately distinguish whether a tip is placed on each cavity of a cavity array.
[0004] The present invention is achieved through the following technical solutions:
[0005] A first aspect provides a method for identifying the position of a pipette tip, the method being used to identify whether a pipette tip is placed in a plurality of cavities on a box body, comprising the following steps:
[0006] Step 100, obtaining an original image of the end face of the box body, and correcting the original image using a matching coordinate system to obtain a ROI image;
[0007] Step 200, grid-splitting the ROI image to obtain a first image, so that a plurality of working grids corresponding to the cavity contour on the ROI image are formed on the first image; the cavity contour is the contour of the cavity top surface;
[0008] Step 300, enhancing the contrast of the first image to obtain an output image;
[0009] Step 400, setting the grayscale threshold of the dark area of the output image, obtaining the circular image in the working grid and the image grayscale value of the circular image;
[0010] Compare the above dark area grayscale threshold with the image grayscale value;
[0011] Step 410: When the image grayscale value of the circular image in the working grid is less than the dark area grayscale threshold, the working grid is marked as a type A grid;
[0012] Step 420: When the grayscale value of the circular image in the working grid is greater than or equal to the dark area grayscale threshold, the working grid is marked as a Class B grid.
[0013] Classify the A-type grid and the B-type grid on the first image, wherein the A-type grid indicates that there is a suction head in the working grid; and the B-type grid indicates that there is no suction head in the working grid; save the coordinates of the A-type grid to the suction head area, and save the coordinates of the B-type grid to the suction head-free area;
[0014] Step 500, setting a tip area threshold, obtaining the image area of the circular image in the B-type grid, and performing a secondary screening on the image area of the circular image in the B-type grid and the tip area threshold;
[0015] Step 510: When the image area of the B-type grid is less than or equal to the tip area threshold, the B-type grid is re-marked as an A-type grid and the coordinates are saved in the tip area.
[0016] The original image is corrected by the above-mentioned matching coordinate system, and the grid is split so that each cavity corresponds to the grid one by one, and the position of each cavity and the correspondence between the cavity and the tip can be located more accurately, thereby improving the accuracy of identifying the tip; enhancing the contrast of the first image is helpful to better identify the characteristics of the cavity and the tip, and improve the accuracy of subsequent identification; through the dark area grayscale threshold and the image grayscale value of the circular image on each grid, the cavity with the tip with obvious characteristics can be quickly screened out to improve the recognition efficiency; using the tip area threshold and the image area of the circular image in the B-type grid for secondary screening can further reduce misjudgment and improve the recognition accuracy; the method can adjust parameters according to actual needs, such as the dark area grayscale threshold, the tip area threshold, etc., to adapt to the recognition needs in different situations.
[0017] Furthermore, the specific steps of performing grid splitting on the above ROI image to obtain the first image are as follows:
[0018] Step 210, obtaining the nth row of circular images from the ROI image, where n is a positive integer; extracting two adjacent circular images with equal areas from the nth row of circular images, and the extracted two circular images constitute a second image;
[0019] Step 220, extracting X-axis adjacent point coordinates from the second image, where the X-axis adjacent point coordinates are adjacent points of two circular images in the second image;
[0020] Step 230, determining the X-axis midpoint coordinates of the two X-axis adjacent point coordinates by the difference between the two X-axis adjacent point coordinates;
[0021] Step 240, determining the longitudinal edge of the grid parallel to the Y axis of the matching coordinate system through the above X-axis midpoint coordinates;
[0022] Step 250, obtaining the circular image in the mth column from the ROI image, where m is a positive integer; extracting two adjacent circular images with equal areas from the circular image in the mth column, and the extracted two circular images constitute a third image;
[0023] Step 260, extracting Y-axis adjacent point coordinates from the third image, where the Y-axis adjacent point coordinates are adjacent points of two circular images in the third image;
[0024] Step 270, determining the Y-axis midpoint coordinates of the two Y-axis adjacent point coordinates by the difference between the two Y-axis adjacent point coordinates;
[0025] Step 280: Determine the horizontal edge of the grid parallel to the X-axis of the matching coordinate system through the Y-axis midpoint coordinate.
[0026] Taking into account the actual arrangement and size of the cavity, the above ROI image is grid-segmented through the above steps, so that the position and size of each grid can be determined more accurately, the accuracy and reliability of identifying the tip are improved, and more accurate information is provided for the subsequent identification of the tip and cavity.
[0027] Furthermore, after extracting two adjacent circular images with equal areas from the circular images in the nth row, it is also necessary to
[0028] Step 211, marking two adjacent circular images with different areas on the nth row of circular images, the marked two circular images forming a marked group row, and counting the marked group rows to obtain the number of marked group rows;
[0029] After extracting two adjacent circular images with equal areas from the circular images in the mth column above, we also need
[0030] Step 251 : Mark two adjacent circular images with different areas on the mth column of circular images, the two marked circular images constitute a marked group column, and count the marked group columns to obtain the number of marked group columns.
[0031] Not only adjacent circular images with equal areas are extracted, but also adjacent circular images with unequal areas are marked. This is done to distinguish and process separately those circular images with different areas, because there are two states of circular images, the first is that the circular image has only the end face of the cavity, the cavity is used to load a suction head, and the end face of the cavity is the top surface image of the cavity; the second is that the circular image has both the end face of the cavity and the end face of the suction head, and the end face of the suction head is the top surface image of the suction head; when two adjacent circular images have only the end face of the cavity, the longitudinal edge and the transverse edge of the grid can be directly obtained by using steps 210 to 280, and the longitudinal edge and the transverse edge of the grid obtained in this case are accurate; but when one circular image has only the end face of the cavity, and the other circular image has both the end face of the cavity and the end face of the suction head, the longitudinal edge and the transverse edge of the grid directly obtained by using steps 210 to 280 will be offset, and the offset direction is close to the circular image with the end face of the suction head. Therefore, the longitudinal edge and the transverse edge of the grid obtained in this case are inaccurate, and the inaccurate grid division will affect the recognition accuracy of the suction head and the cavity in the grid; in addition, the state of the circular image cannot be accurately distinguished at this time, so it is necessary to perform separate grid division on adjacent circular images with different areas.
[0032] Furthermore, after determining the longitudinal edge of the grid parallel to the Y axis of the matching coordinate system,
[0033] Step 241, obtaining the number of rows of the above-mentioned marking groups, if the number of rows of the above-mentioned marking groups is greater than 0, obtaining the (n+1)th row of circular images;
[0034] Step 242: when the n+1th row of circular images is acquired, two circular images whose X coordinates are equal to the X coordinates of the marking group are extracted from the n+1th row of circular images, and the extracted two circular images constitute a fourth image;
[0035] Step 243, determining whether the areas of the two circular images in the fourth image are equal;
[0036] Step 244: If the areas are equal, substitute the fourth image as the second image into step 220 for execution;
[0037] Step 245: If the areas are not equal, substitute the circular image of the n+1th row as the circular image of the nth row and execute in step 211;
[0038] Step 246: When the n+1th row of circular images is not obtained, obtain the grid adjacent to the mark group from the nth row of circular images, obtain the two grid longitudinal edges constituting the grid, and determine the spacing between the two grid longitudinal edges. The grid longitudinal edge between the two circular images in the mark group is determined by the spacing.
[0039] In order to ensure that each marked group row can be processed individually and take into account the actual arrangement of the cavities, when the next row of circular images is obtained, only the circular images related to the marked group row are processed to improve the accuracy and efficiency of the processing; when the next row of circular images is not obtained, the lateral spacing of the adjacent grids is used, even if there is a production error in the tip box, it can ensure that the cavities in the marked group row can fall into the corresponding divided grids; this method can construct the grid more accurately, thereby providing more accurate information for subsequent tip and cavity identification. This method can adapt to various actual situations and improve the accuracy and reliability of tip identification.
[0040] Further, after determining the horizontal edge of the grid parallel to the X-axis of the matching coordinate system,
[0041] Step 281, obtaining the number of columns of the above-mentioned marking group, if the number of columns of the above-mentioned marking group is greater than 0, obtaining the circular image of the m+1th column;
[0042] Step 282: when the m+1th column of circular images is acquired, two circular images whose Y coordinates are equal to the Y coordinates of the mark group column are extracted from the m+1th column of circular images, and the extracted two circular images constitute a fifth image;
[0043] Step 283, determining whether the areas of the two circular images in the fifth image are equal;
[0044] Step 284: If the areas are equal, substitute the fifth image as the third image into step 260 for execution;
[0045] Step 285: If the areas are not equal, substitute the circular image in the m+1th column as the circular image in the mth column into step 251 and continue to execute;
[0046] Step 286: When the circular image of the m+1th column is not obtained, obtain the grid adjacent to the mark group column from the above-mentioned circular image of the mth column, obtain the two grid horizontal edges that constitute the grid, and determine the spacing between the two grid horizontal edges. The horizontal edge of the grid between the two circular images in the mark group column is determined by the spacing.
[0047] In order to ensure that each marked group column can be processed separately and take into account the actual arrangement of the cavities, when the next column of circular images is obtained, only the cavities related to the marked group column are processed to improve the accuracy and efficiency of the processing; when the next column of circular images is not obtained, the longitudinal spacing of the adjacent grids is used, even if there is a production error in the tip box, it can ensure that the cavities in the marked group column can fall into the corresponding divided grids; this method can construct the grid more accurately, thereby providing more accurate information for subsequent tip and cavity identification. This method can adapt to various actual situations and improve the accuracy and reliability of tip identification.
[0048] Furthermore, after the image area of the circular image in the B-type grid is collated and screened again with the tip area threshold, it is also necessary to
[0049] Step 600, screening the above-mentioned type B grid three times;
[0050] The specific steps of the above three screenings include:
[0051] Step 610: Obtain the circular outline coordinates of the circular image in the above-mentioned type B grid, and determine the center coordinates of the circular outline through the circular outline coordinates;
[0052] Step 620, counting the coordinates of the center of the circle in the above-mentioned type B grid to obtain the number of the coordinates of the center of the circle;
[0053] Step 630, determining whether the number of circle center coordinates in the above-mentioned type B grid is equal to 2;
[0054] Step 631: If the number of the center coordinates in the above-mentioned type B grid is equal to 2, then the type B grid is re-marked as a type A grid and the coordinates are saved in the suction head area;
[0055] Step 632: If the number of the center coordinates in the above-mentioned B-type grid is not equal to 2, then the B-type grid is re-marked as a C-type grid and the coordinates are saved in the non-suction head area; the above-mentioned C-type grid indicates that there is no suction head in the working grid.
[0056] When the area and grayscale value of the circular image are not much different, the state of the circular image is determined by using the number of circle center coordinates in each grid. When the number of circle center coordinates in the grid is equal to 1, it means that there is only one circular contour in the grid, which is the end face of the cavity; when the number of circle center coordinates in the grid is equal to 2, it means that there are two circular contours in the grid, one circular contour is the end face of the cavity, and the other circular contour is the end face of the tip, so as to screen out the cavity with the tip.
[0057] Furthermore, after three screenings, the following steps are also included:
[0058] Step 700, obtaining the ath row of grids from the tip area, where a is a positive integer; obtaining the circular contour coordinates of the circular image from the ath row of grids, and determining the center coordinates of the circular contour through the circular contour coordinates;
[0059] Step 710, save the center coordinates of the circles with the same Y coordinates to the midpoint area of the cavity, and save the center coordinates of the circles with different Y coordinates to the midpoint area of the tip;
[0060] Step 720, obtaining two circle center coordinates with the same X coordinate and the same Y coordinate from the midpoint area of the cavity, and moving any one of the two circle center coordinates to the midpoint area of the suction head for storage;
[0061] Step 730, obtain the a+1th row of grids, and substitute the a+1th row of grids as the ath row of grids into step 700 for execution; and terminate when the a+1th row of grids cannot be obtained.
[0062] Furthermore, after three screenings, the following steps are also included:
[0063] Step 800, obtaining the b-th column of grids from the tip area, where b is a positive integer; obtaining the circular contour coordinates of the circular image from the b-th column of grids, and determining the center coordinates of the circular contour through the circular contour coordinates;
[0064] Step 810, save the center coordinates of the circles with the same X coordinates to the midpoint area of the cavity, and save the center coordinates of the circles with different X coordinates to the midpoint area of the tip;
[0065] Step 820, obtaining two circle center coordinates with the same X coordinate and the same Y coordinate from the midpoint area of the cavity, and moving any one of the two circle center coordinates to the midpoint area of the suction head for storage;
[0066] Step 830, obtain the b+1th column grid, and substitute the b+1th column grid as the bth column grid into step 800 for execution; and terminate when the b+1th column grid cannot be obtained.
[0067] The cavities on the tip box are arranged along the X-axis and Y-axis array of the matching coordinate system, so the Y coordinates of the center coordinates of the end faces of the cavities in the same row are equal, and the X coordinates of the center coordinates of the end faces of the cavities in the same row are equal; and the tips are inserted into the cavities at will, so the center coordinates of the end faces of the tips can be at any position on the end faces of the cavities;
[0068] In the above steps: first, preliminarily distinguish the cavity end face and the tip end face whose center coordinates do not overlap in the circular image, and the center coordinates with the same X coordinate and the same Y coordinate indicate that the corresponding circular contour is the cavity end face, and the center coordinates with different X coordinates and Y coordinates indicate that the corresponding circular contour is the tip end face; then distinguish the cavity end face and the tip end face whose center coordinates overlap in the circular image, and at this time, the center coordinates of the cavity end face and the tip end face are the same coordinates. In order to ensure the integrity of the tip center coordinates in the tip midpoint area, the center coordinates are moved to the tip midpoint area.
[0069] Furthermore, the formula for obtaining the output image pixels is
[0070] ( )
[0071] in, represents the output image pixel; Represents ROI image pixels; Indicates gain; Indicates bias.
[0072] A second aspect provides a computer-readable storage medium having computer program instructions stored thereon, and the computer program instructions implement the above-mentioned location identification method when executed by a processor.
[0073] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0074] The original image is corrected by the above-mentioned matching coordinate system, and the grid is split so that each cavity corresponds to the grid one by one, and the position of each cavity and the correspondence between the cavity and the tip can be located more accurately, thereby improving the accuracy of identifying the tip; enhancing the contrast of the first image is helpful to better identify the characteristics of the cavity and the tip, and improve the accuracy of subsequent identification; through the dark area grayscale threshold and the image grayscale value of the circular image on each grid, the cavity with the tip with obvious characteristics can be quickly screened out to improve the recognition efficiency; using the tip area threshold and the image area of the circular image in the B-type grid for secondary screening can further reduce misjudgment and improve the recognition accuracy; the method can adjust parameters according to actual needs, such as the dark area grayscale threshold, the tip area threshold, etc., to adapt to the recognition needs in different situations. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without creative work. In the drawings:
[0076] Figure 1 It is a flow chart;
[0077] Figure 2 The output image of the cavity array is 12*4;
[0078] Figure 3 for Figure 2 A partial enlarged view of middle A;
[0079] Figure 4 for Figure 2 A partial enlarged view of B. DETAILED DESCRIPTION
[0080] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.
[0081] Example 1
[0082] Before the pipette receives the suction instruction, the distribution of the tips on the tip box is determined to shorten the time for the pipette to detect whether there are tips in a single cavity; for a cavity array with a cavity distribution of 12*4 on the tip box, the cavity end surface area of this type of cavity is significantly different from the end surface area of the tip, and the recognition method of Example 1 is used for this type of cavity array.
[0083] Combination Figure 1 , this embodiment 1 provides a method for position identification of a pipette tip, comprising the following steps:
[0084] Step 100, obtaining an original image of the end face of the box body, and correcting the original image using a matching coordinate system to obtain a ROI image;
[0085] Step 200, grid-splitting the ROI image to obtain a first image, so that a plurality of working grids corresponding to the cavity contour on the ROI image are formed on the first image;
[0086] Step 300: Enhance the contrast of the first image to obtain an output image (eg Figure 2 shown);
[0087] Step 400, setting the grayscale threshold of the dark area of the output image, obtaining the circular image in the working grid and the image grayscale value of the circular image;
[0088] Compare the above dark area grayscale threshold with the image grayscale value;
[0089] Step 410: When the image grayscale value of the circular image in the working grid is less than the dark area grayscale threshold, the working grid is marked as a type A grid;
[0090] Step 420: When the grayscale value of the circular image in the working grid is greater than or equal to the dark area grayscale threshold, the working grid is marked as a Class B grid.
[0091] Classify the A-type grid and the B-type grid on the first image, wherein the A-type grid indicates that there is a suction head in the working grid; and the B-type grid indicates that there is no suction head in the working grid; save the coordinates of the A-type grid to the suction head area, and save the coordinates of the B-type grid to the suction head-free area;
[0092] Step 500, setting a tip area threshold, obtaining the image area of the circular image in the B-type grid, and performing a secondary screening on the image area of the circular image in the B-type grid and the tip area threshold;
[0093] Step 510: When the image area of the B-type grid is less than or equal to the tip area threshold, the B-type grid is re-marked as an A-type grid and the coordinates are saved in the tip area.
[0094] The circular image has two states, the first is that the circular image has only the cavity end face, and the second is that the circular image has both the cavity end face and the tip end face; the matching coordinate system is mapped to the top surface of the tip box by a mechanical device, and the acquisition device is configured with the matching coordinate system to ensure the acquisition angle of the original image; the original image is corrected by the matching coordinate system and the grid is split, so that each cavity corresponds to the grid one by one, and the position of each cavity and the correspondence between the cavity and the tip can be more accurately located, thereby improving the accuracy of identifying the tip; enhancing the contrast of the first image is helpful to better identify the characteristics of the cavity and the tip, and improving the accuracy of subsequent identification; through the dark area grayscale threshold and the image grayscale value of the circular image on each grid, the cavity with the tip with obvious characteristics can be quickly screened out to improve the recognition efficiency; using the tip area threshold and the image area of the circular image in the B-type grid for secondary screening, it can further reduce misjudgment and improve the recognition accuracy; the method can adjust parameters according to actual needs, such as the dark area grayscale threshold, the tip area threshold, etc., to adapt to the recognition needs in different situations.
[0095] Example 2
[0096] Based on Example 1, Figure 3 and Figure 4 , the specific steps of grid splitting the above ROI image are as follows:
[0097] Step 210: To ensure that the rows of the grid can be along the arrangement direction of the cavities in the image, so as to better reflect the real layout of the cavities, the nth row of circular images is obtained from the ROI image, where n is a positive integer; in actual use, the circular images are obtained sequentially from the first row; two adjacent circular images with equal areas are extracted from the nth row of circular images, and the two extracted circular images constitute the second image;
[0098] Step 220: extract the X-axis neighboring point coordinates from the second image. The extraction of the neighboring point coordinates is based on the principle of equal area, which can ensure that the position of each adjacent cavity in the X-axis direction is accurate; the X-axis neighboring point coordinates are the adjacent points of the two circular images in the second image (such as Figure 3 shown);
[0099] Step 230, determining the X-axis midpoint coordinates of the two X-axis adjacent point coordinates by the difference between the two X-axis adjacent point coordinates;
[0100] Step 240: To clarify the row direction of the grid and ensure that the grid is aligned with the cavity in the image, determine the longitudinal edge of the grid parallel to the Y axis of the matching coordinate system through the X-axis midpoint coordinates.
[0101] Step 250: To ensure that the grid columns are aligned with the arrangement direction of the cavities in the image, obtain the circular image in the mth column from the ROI image, where m is a positive integer; in actual use, obtain them sequentially from the circular images in the first column; extract two adjacent circular images with equal areas from the circular image in the mth column, and the two extracted circular images constitute a third image;
[0102] Step 260: extracting Y-axis neighboring point coordinates from the third image. Similar to step 220, the extraction of neighboring point coordinates is also based on the principle of equal area. The Y-axis neighboring point coordinates are the adjacent points of the two circular images in the third image (such as Figure 4 shown);
[0103] Step 270, determining the Y-axis midpoint coordinates of the two Y-axis adjacent point coordinates by the difference between the two Y-axis adjacent point coordinates;
[0104] Step 280: To clarify the column direction of the grid and ensure that the grid is aligned with the cavity in the image, the horizontal edge of the grid parallel to the X axis of the matching coordinate system is determined by the Y axis midpoint coordinate.
[0105] Taking into account the actual arrangement and size of the cavity, the above ROI image is grid-segmented through the above steps, so that the position and size of each grid can be determined more accurately, the accuracy and reliability of identifying the tip are improved, and more accurate information is provided for the subsequent identification of the tip and cavity.
[0106] Example 3
[0107] On the basis of Example 2, which only divides the grids between adjacent circular images of equal area, this Example 3 divides the grids between adjacent circular images of unequal area;
[0108] After extracting two adjacent circular images with equal areas from the above nth row of circular images, we also need
[0109] Step 211, marking two adjacent circular images with different areas on the nth row of circular images, the marked two circular images forming a marked group row, and counting the marked group rows to obtain the number of marked group rows;
[0110] After extracting two adjacent circular images with equal areas from the circular images in the mth column above, we also need
[0111] Step 251 : Mark two adjacent circular images with different areas on the mth column of circular images, the two marked circular images constitute a marked group column, and count the marked group columns to obtain the number of marked group columns.
[0112] Not only adjacent circular images with equal areas are extracted, but also adjacent circular images with unequal areas are marked. This is done to distinguish and process those circular images with unequal areas separately, because there are two states of circular images, the first is that the circular image has only the cavity end face, and the second is that the circular image has both the cavity end face and the suction head end face; when two adjacent circular images have only the cavity end face, the longitudinal and transverse edges of the grid can be directly obtained by using steps 210 to 280, and the longitudinal and transverse edges of the grid obtained in this case are accurate; but when one circular image has only the cavity end face, and the other circular image has both the cavity end face and the suction head end face, the longitudinal and transverse edges of the grid directly obtained by using steps 210 to 280 will be offset, and the offset direction is close to the circular image with the suction head end face. Therefore, the longitudinal and transverse edges of the grid obtained in this case are inaccurate, and inaccurate grid division will affect the recognition accuracy of the suction head and the cavity in the grid; in addition, the state of the circular image cannot be accurately distinguished at this time, so it is necessary to perform separate grid division on adjacent circular images with unequal areas.
[0113] In a specific embodiment, the columns of the grid are divided, after the longitudinal edges of the grid parallel to the Y axis of the matching coordinate system are determined as described above,
[0114] Step 241, obtaining the number of rows of the above-mentioned marking groups, if the number of rows of the above-mentioned marking groups is greater than 0, obtaining the (n+1)th row of circular images;
[0115] Step 242: when the n+1th row of circular images is acquired, two circular images whose X coordinates are equal to the X coordinates of the marking group are extracted from the n+1th row of circular images, and the extracted two circular images constitute a fourth image;
[0116] Step 243, determining whether the areas of the two circular images in the fourth image are equal;
[0117] Step 244: If the areas are equal, substitute the fourth image as the second image into step 220 for execution;
[0118] Step 245: If the areas are not equal, substitute the circular image of the n+1th row as the circular image of the nth row and execute in step 211;
[0119] Step 246: When the n+1th row of circular images is not obtained, obtain the grid adjacent to the mark group from the nth row of circular images, obtain the two grid longitudinal edges constituting the grid, and determine the spacing between the two grid longitudinal edges. The grid longitudinal edge between the two circular images in the mark group is determined by the spacing.
[0120] In order to ensure that each marked group row can be processed individually and take into account the actual arrangement of the cavities, when the next row of circular images is obtained, only the circular images related to the marked group row are processed to improve the accuracy and efficiency of the processing; when the next row of circular images is not obtained, the lateral spacing of the adjacent grids is used, even if there is a production error in the tip box, it can ensure that the cavities in the marked group row can fall into the corresponding divided grids; this method can construct the grid more accurately, thereby providing more accurate information for subsequent tip and cavity identification. This method can adapt to various actual situations and improve the accuracy and reliability of tip identification.
[0121] In a specific embodiment, the rows of the grid are divided, after the horizontal edges of the grid parallel to the X-axis of the matching coordinate system are determined as described above,
[0122] Step 281, obtaining the number of columns of the above-mentioned marking group, if the number of columns of the above-mentioned marking group is greater than 0, obtaining the circular image of the m+1th column;
[0123] Step 282: when the m+1th column of circular images is acquired, two circular images whose Y coordinates are equal to the Y coordinates of the mark group column are extracted from the m+1th column of circular images, and the extracted two circular images constitute a fifth image;
[0124] Step 283, determining whether the areas of the two circular images in the fifth image are equal;
[0125] Step 284: If the areas are equal, substitute the fifth image as the third image into step 260 for execution;
[0126] Step 285: If the areas are not equal, substitute the circular image in the m+1th column as the circular image in the mth column into step 251 and continue to execute;
[0127] Step 286: When the circular image of the m+1th column is not obtained, obtain the grid adjacent to the mark group column from the above-mentioned circular image of the mth column, obtain the two grid horizontal edges that constitute the grid, and determine the spacing between the two grid horizontal edges. The horizontal edge of the grid between the two circular images in the mark group column is determined by the spacing.
[0128] In order to ensure that each marked group column can be processed separately and take into account the actual arrangement of the cavities, when the next column of circular images is obtained, only the cavities related to the marked group column are processed to improve the accuracy and efficiency of the processing; when the next column of circular images is not obtained, the longitudinal spacing of the adjacent grids is used, even if there is a production error in the tip box, it can ensure that the cavities in the marked group column can fall into the corresponding divided grids; this method can construct the grid more accurately, thereby providing more accurate information for subsequent tip and cavity identification. This method can adapt to various actual situations and improve the accuracy and reliability of tip identification.
[0129] Example 4
[0130] For a 24*16 cavity array, the difference between the cavity end surface area of this type of cavity and the end surface area of the suction head is small, and the identification method of Example 4 is used for this type of cavity array.
[0131] On the basis of Example 3, after the image area of the circular image in the B-type grid is collated and screened again with the tip area threshold, it is also necessary to
[0132] Step 600, screening the above-mentioned type B grid three times;
[0133] The specific steps of the above three screenings include:
[0134] Step 610: Obtain the circular outline coordinates of the circular image in the above-mentioned type B grid, and determine the center coordinates of the circular outline through the circular outline coordinates;
[0135] Step 620, counting the coordinates of the center of the circle in the above-mentioned type B grid to obtain the number of the coordinates of the center of the circle;
[0136] Step 630, determining whether the number of circle center coordinates in the above-mentioned type B grid is equal to 2;
[0137] Step 631: If the number of the center coordinates in the above-mentioned type B grid is equal to 2, then the type B grid is re-marked as a type A grid and the coordinates are saved in the suction head area;
[0138] Step 632: If the number of the center coordinates in the above-mentioned B-type grid is not equal to 2, then the B-type grid is re-marked as a C-type grid and the coordinates are saved in the non-suction head area; the above-mentioned C-type grid indicates that there is no suction head in the working grid.
[0139] When the area and grayscale value of the circular image are not much different, the state of the circular image is determined by using the number of circle center coordinates in each grid. When the number of circle center coordinates in the grid is equal to 1, it means that there is only one circular contour in the grid, which is the end face of the cavity; when the number of circle center coordinates in the grid is equal to 2, it means that there are two circular contours in the grid, one circular contour is the end face of the cavity, and the other circular contour is the end face of the tip, so as to screen out the cavity with the tip.
[0140] Example 5
[0141] On the basis of Example 4, in order to determine the suction position of the suction tip, after three screenings, the following steps are further included:
[0142] Step 700, obtaining the ath row of grids from the tip area, where a is a positive integer; obtaining the circular contour coordinates of the circular image from the ath row of grids, and determining the center coordinates of the circular contour through the circular contour coordinates;
[0143] Step 710, save the center coordinates of the circles with the same Y coordinates to the midpoint area of the cavity, and save the center coordinates of the circles with different Y coordinates to the midpoint area of the tip;
[0144] Step 720, obtaining two circle center coordinates with the same X coordinate and the same Y coordinate from the midpoint area of the cavity, and moving any one of the two circle center coordinates to the midpoint area of the suction head for storage;
[0145] Step 730, obtain the a+1th row of grids, and substitute the a+1th row of grids as the ath row of grids into step 700 for execution; and terminate when the a+1th row of grids cannot be obtained.
[0146] A specific embodiment, after performing three screenings, further comprises the following steps:
[0147] Step 800, obtaining the b-th column of grids from the tip area, where b is a positive integer; obtaining the circular contour coordinates of the circular image from the b-th column of grids, and determining the center coordinates of the circular contour through the circular contour coordinates;
[0148] Step 810, save the center coordinates of the circles with the same X coordinates to the midpoint area of the cavity, and save the center coordinates of the circles with different X coordinates to the midpoint area of the tip;
[0149] Step 820, obtaining two circle center coordinates with the same X coordinate and the same Y coordinate from the midpoint area of the cavity, and moving any one of the two circle center coordinates to the midpoint area of the suction head for storage;
[0150] Step 830, obtain the b+1th column grid, and substitute the b+1th column grid as the bth column grid into step 800 for execution; and terminate when the b+1th column grid cannot be obtained.
[0151] The cavities on the tip box are arranged along the X-axis and Y-axis array of the matching coordinate system, so the Y coordinates of the center coordinates of the end faces of the cavities in the same row are equal, and the X coordinates of the center coordinates of the end faces of the cavities in the same row are equal; and the tips are inserted into the cavities at will, so the center coordinates of the end faces of the tips can be at any position on the end faces of the cavities;
[0152] In the above steps: first, preliminarily distinguish the cavity end face and the tip end face whose center coordinates do not overlap in the circular image, and the center coordinates with the same X coordinate and the same Y coordinate indicate that the corresponding circular contour is the cavity end face, and the center coordinates with different X coordinates and Y coordinates indicate that the corresponding circular contour is the tip end face; then distinguish the cavity end face and the tip end face whose center coordinates overlap in the circular image, and at this time, the center coordinates of the cavity end face and the tip end face are the same coordinates. In order to ensure the integrity of the tip center coordinates in the tip midpoint area, the center coordinates are moved to the tip midpoint area.
[0153] Example 6
[0154] Based on any of the above embodiments, the contrast of the split ROI image is enhanced using the following formula to obtain an output image;
[0155] ( )
[0156] in, represents the output image pixel; Represents ROI image pixels; Represents gain, which is used to control the contrast of the image. In this embodiment ; Represents bias, which is used to control image brightness.
[0157] Example 7
[0158] This embodiment 7 provides a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the location identification method of any of the above embodiments is implemented.
[0159] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for identifying the position of a pipette tip, the method being used to identify whether a pipette tip is placed in a plurality of cavities on a box body, characterized in that: The following steps are involved: Step 100, obtaining an original image of the end face of the box body, and correcting the original image using a matching coordinate system to obtain a ROI image; Step 200, grid-splitting the ROI image to obtain a first image, so that a plurality of working grids corresponding to the cavity contour on the ROI image are formed on the first image; Step 300, enhancing the contrast of the first image to obtain an output image; Step 400, setting the grayscale threshold of the dark area of the output image, obtaining the circular image in the working grid and the image grayscale value of the circular image; Comparing the dark area grayscale threshold with the image grayscale value; Step 410: When the image grayscale value of the circular image in the working grid is less than the dark area grayscale threshold, the working grid is marked as a type A grid; Step 420: When the grayscale value of the circular image in the working grid is greater than or equal to the dark area grayscale threshold, the working grid is marked as a Class B grid. Classify the A-type grid and the B-type grid on the first image, wherein the A-type grid indicates that there is a suction tip in the working grid; and the B-type grid indicates that there is no suction tip in the working grid; save the coordinates of the A-type grid to the suction tip area, and save the coordinates of the B-type grid to the suction tip-free area; Step 500, setting a tip area threshold, obtaining the image area of the circular image in the B-type grid, and performing a secondary screening on the image area of the circular image in the B-type grid and the tip area threshold; Step 510: When the image area of the B-type grid is less than or equal to the tip area threshold, the B-type grid is re-marked as an A-type grid and the coordinates are saved to the tip area; The specific steps of performing grid splitting on the ROI image to obtain the first image are as follows: Step 210, obtaining the nth row of circular images from the ROI image, where n is a positive integer; extracting two adjacent circular images with equal areas from the nth row of circular images, and the extracted two circular images constitute a second image; Step 220: extracting X-axis adjacent point coordinates from the second image, where the X-axis adjacent point coordinates are adjacent points of two circular images in the second image; Step 230, determining the X-axis midpoint coordinates of the two X-axis adjacent point coordinates by the difference between the two X-axis adjacent point coordinates; Step 240, determining the longitudinal edge of the grid parallel to the Y axis of the matching coordinate system through the X-axis midpoint coordinate; Step 250, obtaining the circular image in the mth column from the ROI image, where m is a positive integer; extracting two adjacent circular images with equal areas from the circular image in the mth column, and the extracted two circular images constitute a third image; Step 260: extracting Y-axis adjacent point coordinates from the third image, wherein the Y-axis adjacent point coordinates are adjacent points of two circular images in the third image; Step 270, determining the Y-axis midpoint coordinates of the two Y-axis adjacent point coordinates by the difference between the two Y-axis adjacent point coordinates; Step 280, determining the horizontal edge of the grid parallel to the X axis of the matching coordinate system through the Y axis midpoint coordinate; After extracting two adjacent circular images with equal areas from the nth row of circular images, it is also necessary to Step 211, marking two adjacent circular images with different areas on the nth row of circular images, the two marked circular images forming a marked group row, and counting the marked group rows to obtain the number of marked group rows; After extracting two adjacent circular images with equal areas from the circular images in the mth column, it is also necessary to Step 251, marking two adjacent circular images with different areas on the mth column of circular images, the two marked circular images constitute a marked group column, and counting the marked group columns to obtain the number of marked group columns; After determining the longitudinal edge of the grid parallel to the Y axis of the matching coordinate system, Step 241, obtaining the number of rows of the mark group, if the number of rows of the mark group is greater than 0, obtaining the (n+1)th row of circular images; Step 242: when the n+1th row of circular images is acquired, two circular images whose X coordinates are equal to the X coordinates of the marking group are extracted from the n+1th row of circular images, and the extracted two circular images constitute a fourth image; Step 243, determining whether the areas of the two circular images in the fourth image are equal; Step 244: If the areas are equal, substitute the fourth image as the second image into step 220 for execution; Step 245: If the areas are not equal, substitute the circular image of the n+1th row as the circular image of the nth row and execute in step 211; Step 246: when the n+1th row of circular images is not obtained, a grid adjacent to the mark group is obtained from the nth row of circular images, two grid longitudinal edges constituting the grid are obtained, and a spacing between the two grid longitudinal edges is determined, and the grid longitudinal edge between the two circular images in the mark group is determined by the spacing; After determining the horizontal edge of the grid parallel to the X-axis of the matching coordinate system, Step 281, obtaining the number of columns of the marking group, if the number of columns of the marking group is greater than 0, obtaining the circular image of the m+1th column; Step 282: when the m+1th column of circular images is acquired, two circular images whose Y coordinates are equal to the Y coordinates of the mark group column are extracted from the m+1th column of circular images, and the extracted two circular images constitute a fifth image; Step 283, determining whether the areas of the two circular images in the fifth image are equal; Step 284: If the areas are equal, substitute the fifth image as the third image into step 260 for execution; Step 285: If the areas are not equal, substitute the circular image in the m+1th column as the circular image in the mth column into step 251 and continue to execute; Step 286: When the circular image of the m+1th column is not obtained, obtain the grid adjacent to the mark group column from the circular image of the mth column, obtain the two grid horizontal edges that constitute the grid, and determine the spacing between the two grid horizontal edges. The grid horizontal edge between the two circular images in the mark group column is determined by the spacing.
2. The method for position identification of a pipette tip according to claim 1, characterized in that: After the image area of the circular image in the B-type grid is compared with the tip area threshold and secondary screening is performed, it is also necessary to Step 600, screening the B-type grid three times; The specific steps of the three screenings include: Step 610: Obtain the circular outline coordinates of the circular image in the B-type grid, and determine the center coordinates of the circular outline through the circular outline coordinates; Step 620, counting the coordinates of the center of the circle in the B-type grid to obtain the number of the coordinates of the center of the circle; Step 630, determining whether the number of circle center coordinates in the type B grid is equal to 2; Step 631: If the number of the center coordinates in the B-type grid is equal to 2, then re-mark the B-type grid as an A-type grid and save the coordinates to the suction head area; Step 632: If the number of the center coordinates in the B-type grid is not equal to 2, the B-type grid is re-marked as a C-type grid and the coordinates are saved in the non-suction head area; the C-type grid indicates that there is no suction head in the working grid.
3. The method for position identification of a pipette tip according to claim 2, characterized in that: After three screenings, the following steps are also included: Step 700, obtaining the ath row of grids from the suction head area, where a is a positive integer; obtaining the circular contour coordinates of the circular image from the ath row of grids, and determining the center coordinates of the circular contour through the circular contour coordinates; Step 710, save the center coordinates of the circles with the same Y coordinates to the midpoint area of the cavity, and save the center coordinates of the circles with different Y coordinates to the midpoint area of the tip; Step 720, obtaining two circle center coordinates with the same X coordinate and the same Y coordinate from the midpoint area of the cavity, and moving any one of the two circle center coordinates to the midpoint area of the suction head for storage; Step 730, obtain the a+1th row of grids, and substitute the a+1th row of grids as the ath row of grids into step 700 for execution; and terminate when the a+1th row of grids cannot be obtained.
4. The method for position identification of a pipette tip according to claim 3, characterized in that: After three screenings, the following steps are also included: Step 800, obtaining the b-th column of grids from the tip area, where b is a positive integer; obtaining the circular contour coordinates of the circular image from the b-th column of grids, and determining the center coordinates of the circular contour through the circular contour coordinates; Step 810, save the center coordinates of the circles with the same X coordinates to the midpoint area of the cavity, and save the center coordinates of the circles with different X coordinates to the midpoint area of the tip; Step 820, obtaining two circle center coordinates with the same X coordinate and the same Y coordinate from the midpoint area of the cavity, and moving any one of the two circle center coordinates to the midpoint area of the suction head for storage; Step 830, obtain the b+1th column grid, and substitute the b+1th column grid as the bth column grid into step 800 for execution; and terminate when the b+1th column grid cannot be obtained.
5. The method for position identification of a pipette tip according to claim 1, characterized in that: The formula to get the output image pixels is; ; in, represents the output image pixel; Represents ROI image pixels; Indicates gain; Indicates bias.
6. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the location identification method described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Off-line handwritten form Chinese character recognition method
CN102750556A
Image character recognition method
CN109753958A
Weld joint image processing method based on line structured light
CN117237308A
Grid graph detection method and device, additive manufacturing equipment and storage medium
CN117408986A
Electronic component inspecting method, electronic component mounting method, and electronic component mounting device
JP2017147360A
