Automatic hole position recognition method, device and equipment for a constant temperature heating instrument
The method improves the accuracy of well position recognition in thermal analyzers by using image processing techniques to standardize coordinates, addressing the inconsistency in existing systems.
Patent Information
- Application Number
- CN202210539486.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-18
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2042-05-18
AI Technical Summary
Existing constant temperature heating instruments cannot accurately identify the hole position specifications and hole locations.
The image of the hole plate is collected by the camera, binarization is performed, the first center coordinate of the dot is obtained, and the number of rows and rows of the hole plate is determined in combination with the color recognition algorithm, and standardized processing is performed to improve the recognition accuracy.
Accurate identification of the hole specifications and positions of the constant temperature heating instrument is achieved, reducing identification errors and improving identification rate.
Smart Images

Figure CN115131430B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of constant temperature heaters, and in particular to a method, device, and equipment for automatically identifying the hole positions of a constant temperature heater. Background Art
[0002] A fully automatic constant temperature heater is an instrument that can perform constant temperature heating on reagents and automatically identify the reaction results of the reagents according to the color changes of the reagents. The fully automatic constant temperature heater usually has multiple hole position specifications. The hole position plate in the instrument is transparent up and down. A light homogenizing lamp board is installed above the hole position plate, and a camera is installed below. The lights of the lamp board can pass through the test tube holes on the hole position plate, and the camera can capture the color at the bottom of the test tube. There are usually multiple hole position specifications in different specifications of fully automatic constant temperature heaters, such as 1*1 holes, 1*3 holes, 1*8 holes, 2*8 holes, 16*8 holes, etc. However, in the prior art, it is impossible to accurately identify the hole position specifications and the positions of the holes in the instrument. Summary of the Invention
[0003] In view of this, an object of the present invention is to provide a method, device, equipment, and storage medium for automatically identifying the hole positions of a constant temperature heater, aiming to solve the problem that the identification of the hole position specifications and the positions of the holes in the constant temperature heater in the prior art is inaccurate.
[0004] To achieve the above object, the present invention provides a method for automatically identifying the hole positions of a constant temperature heater, the method including:
[0005] Performing image acquisition on the hole position plate of the constant temperature heater through a camera;
[0006] Performing binarization processing on the acquired image to obtain a binarized image;
[0007] Obtaining the first center coordinates of each dot based on the binarized image;
[0008] Determining the correspondence between the first center coordinates and the hole positions in the hole position plate to perform positioning and identification of the hole positions.
[0009] Preferably, the method further includes:
[0010] Performing normalization processing on all the first center coordinates to obtain second center coordinates corresponding to the hole positions.
[0011] Preferably, the performing normalization processing on all the first center coordinates to obtain second center coordinates corresponding to the hole positions includes:
[0012] After removing the maximum value and the minimum value from the first center coordinates corresponding to the same hole position in multiple images, calculating the average values of the horizontal and vertical coordinates of the remaining first center coordinates to obtain the second center coordinates.
[0013] Preferably, obtaining the first center coordinates of each dot based on the binary image includes:
[0014] Performing erosion and dilation operations on the binary image;
[0015] Finding the contours of each dot by performing contour detection on the binary image after the erosion and dilation operations;
[0016] Obtaining the circumscribed circle of each contour, and obtaining the first center coordinates of the circumscribed circle corresponding to each dot.
[0017] Preferably, determining the correspondence between the first center coordinates and the holes in the hole plate includes:
[0018] Using a color recognition algorithm to find the number of colored dots in the binary image, and obtaining the number of rows n of the hole plate;
[0019] Dividing the total number of the center coordinates by the number of rows n to obtain the number of columns m of the hole plate;
[0020] Determining the correspondence between the first center coordinates and the holes according to the number of rows n, the number of columns m, and the first center coordinates of each dot.
[0021] Preferably, determining the correspondence between the first center coordinates and the holes according to the number of rows n, the number of columns m, and the first center coordinates of each dot includes:
[0022] Sorting the abscissas of all the first center coordinates to generate a sequence N;
[0023] Grouping n first center coordinates in the sequence N in order;
[0024] Sorting the ordinates of the first center coordinates in each group, and combining all the sequences N in order to obtain a sequence M.
[0025] To achieve the above object, the present invention also provides a hole position automatic recognition device for a constant temperature heater, the device includes:
[0026] An acquisition unit for collecting an image of the hole plate of the constant temperature heater through a camera;
[0027] A processing unit for performing binary processing on the collected image to obtain a binary image;
[0028] An obtaining unit for obtaining the first center coordinates of each dot based on the binary image;
[0029] An identification unit, configured to determine the correspondence between the first center coordinates and the hole positions in the hole position plate, so as to perform positioning and identification on the hole positions.
[0030] To achieve the above object, the present invention further provides a device, including a processor, a memory, and a computer program stored in the memory, where the computer program is executed by the processor to implement the steps of a method for automatically identifying the hole positions of a constant temperature heater as described in the above embodiments.
[0031] To achieve the above object, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the steps of a method for automatically identifying the hole positions of a constant temperature heater as described in the above embodiments.
[0032] Beneficial effects:
[0033] In the above solution, after image acquisition of the hole position plate of the constant temperature heater by a camera and corresponding processing, the hole position specifications and the positions of the positioning holes in the constant temperature heater can be accurately identified.
[0034] In the above solution, by performing standardization processing on all the first center coordinates to obtain the second center coordinates corresponding to the hole positions, the error between the obtained first center coordinates and the actual second center coordinates can be reduced, thereby improving the accuracy of hole position identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.
[0036] Figure 1 It is a schematic flowchart of a method for automatically identifying the hole positions of a constant temperature heater provided by an embodiment of the present invention.
[0037] Figure 2 It is a schematic diagram of an image collected by a camera provided by an embodiment of the present invention.
[0038] Figure 3 It is a schematic diagram of the comparison before and after binaryzation and morphological operations provided by an example of the present invention.
[0039] Figure 4 It is a schematic structural diagram of a device for automatically identifying the hole positions of a constant temperature heater provided by an embodiment of the present invention.
[0040] The realization of the invention object, functional features and advantages will be further described in conjunction with embodiments with reference to the accompanying drawings. Detailed implementation manners
[0041] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in 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. Apparently, the described embodiments are only a part rather than all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention. Therefore, the detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0042] In the description of the present invention, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features.
[0043] The content of the present invention will be elaborated in detail below in conjunction with embodiments.
[0044] Refer to Figure 1 The following shows a schematic flowchart of a method for automatically identifying the hole positions of a constant temperature heater provided by an embodiment of the present invention.
[0045] In this embodiment, the method includes:
[0046] S11, collecting an image of the hole position plate of the constant temperature heater through a camera.
[0047] Before the first use of different types of machines, algorithm adaptation work needs to be carried out. The specific operations and algorithm principles will be further illustrated by examples: Suppose there is a hole position plate with a specification of 8*8. First, place a test tube filled with a solution of the first color (such as red) at the leftmost hole position in each row of the hole position plate, and place a test tube filled with a solution of the second color (such as yellow) at the leftmost hole position in the last row; then turn on the light source switch and start collecting images through the camera. The collected image is as Figure 2 shown. In an 8*8 hole position plate shown in the figure, a test tube with a color is placed at the leftmost position in each row. According to the color of the solution in the test tube, a red dot or a yellow dot is presented, and the positions where no test tube is placed are white dots, and all other positions that are not transparent are black.
[0048] S12. Binarize the acquired image to obtain a binarized image.
[0049] S13. Obtain the first center coordinates of each dot based on the binarized image.
[0050] Among them, obtaining the first center coordinates of each dot based on the binarized image includes:
[0051] S13-1. Perform erosion and dilation operations on the binarized image;
[0052] S13-2. Find the contours of each dot by performing contour search on the binarized image after erosion and dilation operations;
[0053] S13-3. Obtain the maximum circumscribed circle of each contour to get the first center coordinates of the maximum circumscribed circle corresponding to each dot.
[0054] In this embodiment, first, the acquired image is binarized to obtain a binarized image. Since there will be many burrs and incomplete regions after image binarization (as shown in, where a is the binarized image, b is the image after erosion and then dilation operations, and c is the image after dilation and then erosion operations), morphological processing is required, that is, perform erosion and then dilation operations on the binarized image to remove burrs, and then perform another dilation and then erosion operation to remove small unconnected regions inside the target area to make the target area complete. Then, perform contour search on the processed binarized image to obtain the contours of each dot, and then find the maximum circumscribed circle of each contour to obtain the center coordinates P(x, y) of the maximum circumscribed circle of each dot. Figure 3 Shown, where a is the binarized image, b is the image after erosion and then dilation operations, and c is the image after dilation and then erosion operations), so morphological processing is required, that is, perform erosion and then dilation operations on the binarized image to remove burrs, and then perform another dilation and then erosion operation to remove small unconnected regions inside the target area to make the target area complete. Then, perform contour search on the processed binarized image to obtain the contours of each dot, and then find the maximum circumscribed circle of each contour to obtain the center coordinates P(x, y) of the maximum circumscribed circle of each dot.
[0055] S14. Determine the correspondence between the first center coordinates and the holes in the hole plate to perform positioning and identification of the holes.
[0056] Among them, determining the correspondence between the first center coordinates and the holes in the hole plate includes:
[0057] S14-1. Use a color recognition algorithm to find the number of colored dots in the binarized image to obtain the number of rows n of the hole plate;
[0058] S14-2. Divide the total number of the center coordinates by the number of rows n to obtain the number of columns m of the hole plate;
[0059] S14-3. Determine the correspondence between the first center coordinates and the holes according to the number of rows n, the number of columns m, and the first center coordinates of each dot.
[0060] Among them, determining the correspondence between the first center coordinates and the hole positions according to the number of rows n, the number of columns m, and the first center coordinates of each dot includes:
[0061] S14-3-1. Sort the abscissas of all the first center coordinates to generate a sequence N.
[0062] S14-3-2. Group n of the first center coordinates in the sequence N in order.
[0063] S14-3-3. Sort the ordinates of the first center coordinates in each group, and combine all the sequences N in order to obtain a sequence M.
[0064] In this embodiment, by corresponding the center coordinates in each image to the specific hole positions in the hole position plate, the positioning and adaptation of the hole positions can be realized. First, use the color recognition algorithm on the images captured by the camera to find the number of red dots and yellow dots, and obtain the total number of test tubes filled with color solutions placed in the hole position plate, that is, the number of rows n of the hole position plate. Then divide the total number of center coordinates by n to obtain the number of columns m of the hole position plate. Then sort the abscissas x of all the center coordinates P(x, y) to form a new sequence N. Then divide every n center coordinates in this sequence N into a group in order. Next, sort the ordinates y of the center coordinates P(x, y) in each group sequence. Finally, combine all the sequences in the original order to obtain a new sequence M, and the correspondence between all the center coordinates and the actual hole position plate is obtained. That is, the first coordinate in the M sequence represents the hole position in the upper left corner of the hole position plate, and the last coordinate represents the hole position in the lower right corner of the hole position plate. Starting from the first coordinate, every n coordinates represent a column.
[0065] Further, the method further includes:
[0066] S15. Perform normalization processing on all the first center coordinates to obtain second center coordinates corresponding to the hole positions.
[0067] Among them, in this step S15, it further includes:
[0068] After removing the maximum and minimum values of the first center coordinates corresponding to the same hole positions in multiple images, calculate the average values of the abscissas and ordinates of the remaining first center coordinates to obtain the second center coordinates.
[0069] In this embodiment, after obtaining the correspondence between the center coordinates and the hole positions on the hole plate, the center coordinates of all holes are standardized to reduce the error between the obtained center coordinates and the actual center coordinates. First, after processing the above steps on multiple images collected by the camera, the center coordinates of each image and the correspondence between the center coordinates and the hole positions on the hole plate are obtained. Then, by removing one maximum value and one minimum value and then calculating the average, the average of the horizontal and vertical coordinates of the center coordinates of the same hole position in multiple images is calculated. Finally, the average of the horizontal and vertical coordinates of all center coordinates in multiple images is obtained.
[0070] Based on the above processing, the specifications of the hole plate are obtained as n rows and m columns; the correspondence between all the dots in the camera and the hole positions on the actual hole plate, that is, the first coordinate in the M sequence represents the hole position in the upper left corner of the hole plate, the last coordinate represents the hole position in the lower right corner of the hole plate, and every n coordinates starting from the first coordinate represent one column; the accurate actual center coordinates of each hole position on the hole plate.
[0071] Refer to Figure 4 The following is a schematic structural diagram of a hole position automatic recognition device for a constant temperature heating instrument provided by an embodiment of the present invention.
[0072] In this embodiment, the device 30 includes:
[0073] An acquisition unit 31, configured to collect images of the hole plate of the constant temperature heating instrument through a camera;
[0074] A processing unit 32, configured to perform binarization processing on the collected image to obtain a binarized image;
[0075] An acquisition unit 33, configured to obtain the first center coordinates of each dot based on the binarized image;
[0076] Wherein, the acquisition unit 33 includes:
[0077] An erosion and dilation unit, configured to perform erosion and dilation operations on the binarized image;
[0078] A contour search unit, configured to search for contours of the binarized image after the erosion and dilation operations to obtain the contours of each dot;
[0079] An inscribed circle acquisition unit, configured to obtain the largest inscribed circle of each contour to obtain the first center coordinates of the largest inscribed circle corresponding to each dot.
[0080] An identification unit 34, configured to determine the correspondence between the first center coordinates and the hole positions on the hole plate to perform positioning and identification of the hole positions.
[0081] Among them, the recognition unit 34 includes:
[0082] A dot searching unit, configured to use a color recognition algorithm to search for the number of colored dots in the binary image, and obtain the number of rows n of the hole position plate;
[0083] A calculation unit, configured to divide the total number of the center coordinates by the number of rows n to obtain the number of columns m of the hole position plate;
[0084] A relationship determining unit, configured to determine the correspondence between the first center coordinates and the hole positions according to the number of rows n, the number of columns m, and the first center coordinates of each dot.
[0085] Further, the relationship determining unit includes:
[0086] A sorting unit, configured to sort the abscissas of all the first center coordinates to generate a sequence N;
[0087] A grouping unit, configured to group the n first center coordinates in the sequence N in order;
[0088] A combining unit, configured to sort the ordinates of the first center coordinates in each group, and combine all the sequences N in order to obtain a sequence M.
[0089] In another embodiment, the device 40 further includes:
[0090] A standard processing unit, configured to perform standardization processing on all the first center coordinates to obtain second center coordinates corresponding to the hole positions.
[0091] Among them, the standard processing unit is further configured to:
[0092] By removing the maximum value and the minimum value from the first center coordinates corresponding to the same hole position in multiple images, and calculating the average values of the abscissas and ordinates of the remaining first center coordinates, the second center coordinates are obtained.
[0093] Each unit module of the device 30 / 40 can respectively execute the corresponding steps in the above method embodiments, so the unit modules will not be elaborated here. For details, please refer to the descriptions of the corresponding steps above.
[0094] An embodiment of the present invention further provides a device, which includes the hole position automatic recognition device of the constant temperature heater as described above. Among them, the hole position automatic recognition device of the constant temperature heater can adopt Figure 4 the structure of the embodiment, and correspondingly, can execute Figure 1The technical solutions of the method embodiments shown have similar implementation principles and technical effects. For details, reference can be made to the relevant descriptions in the above embodiments, and will not be elaborated here.
[0095] The device includes: devices with a photographing function such as mobile phones, digital cameras or tablet computers, or devices with an image processing function, or devices with an image display function. The device may include components such as a memory, a processor, an input unit, a display unit, and a power supply.
[0096] Among them, the memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as an image playback function, etc.); the data storage area can store data created according to the use of the device, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory may further include a memory controller to provide access to the memory by the processor and the input unit.
[0097] The input unit can be used to receive input digital or character or image information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. Specifically, the input unit of this embodiment, in addition to including a camera, may further include a touch-sensitive surface (such as a touch display screen) and other input devices.
[0098] The display unit can be used to display information input by the user or information provided to the user and various graphical user interfaces of the device. These graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. The display unit may include a display panel. Optionally, the display panel can be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface can cover the display panel. When the touch-sensitive surface detects a touch operation on or near it, it is transmitted to the processor to determine the type of touch event. Subsequently, the processor provides a corresponding visual output on the display panel according to the type of touch event.
[0099] An embodiment of the present invention also provides a computer-readable storage medium. The computer-readable storage medium may be the computer-readable storage medium included in the memory in the above embodiment; or it may exist alone and be a computer-readable storage medium not assembled into the device. At least one instruction is stored in the computer-readable storage medium, and the instruction is loaded and executed by a processor to implement Figure 1 the method for automatically identifying the hole positions of the constant temperature heater shown. The computer-readable storage medium may be a read-only memory, a magnetic disk, an optical disc, or the like.
[0100] It should be noted that the embodiments in this specification are all described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the embodiments, reference can be made to each other. For the apparatus embodiments, device embodiments, and storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and reference can be made to the corresponding parts of the method embodiments for the relevant content.
[0101] Moreover, in this document, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, article or device including the said element.
[0102] The above description shows and describes the preferred embodiments of the present invention. It should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be changed within the scope of the inventive concept of this document through the above teachings or relevant technologies or knowledge in the field. And any changes and modifications made by those skilled in the art without departing from the spirit and scope of the present invention shall fall within the protection scope of the appended claims of the present invention.
Claims
1. An automatic hole position recognition method for a constant temperature heating instrument, characterized in that The method includes: Performing image acquisition on the hole position plate of the constant temperature heater through a camera; Performing binarization processing on the acquired image to obtain a binarized image; Obtaining the first center coordinates of each dot based on the binarized image; Determining the correspondence between the first center coordinates and the hole positions in the hole position plate to perform positioning and identification of the hole positions; this step further includes: Using a color recognition algorithm to find the number of colored dots in the binarized image to obtain the number of rows n of the hole position plate; Dividing the total number of the center coordinates by the number of rows n to obtain the number of columns m of the hole position plate; Determining the correspondence between the first center coordinates and the hole positions according to the number of rows n, the number of columns m, and the first center coordinates of each dot; wherein, determining the correspondence between the first center coordinates and the hole positions according to the number of rows n, the number of columns m, and the first center coordinates of each dot includes: Sorting the abscissas of all the first center coordinates to generate a sequence N; Grouping the n first center coordinates in the sequence N in order; Sorting the ordinates of the first center coordinates of each group and combining all the sequences N in order to obtain a sequence M.
2. The automatic hole position recognition method of a constant temperature heater according to claim 1, characterized in that, The method further includes: Performing normalization processing on all the first center coordinates to obtain second center coordinates corresponding to the hole positions.
3. The automatic hole position recognition method of a constant temperature heater according to claim 2, characterized in that The performing normalization processing on all the first center coordinates to obtain second center coordinates corresponding to the hole positions includes: After removing the maximum value and the minimum value from the first center coordinates corresponding to the same hole position in multiple images, calculating the average of the abscissa and ordinate of the remaining first center coordinates to obtain the second center coordinates.
4. The automatic hole position recognition method of a constant temperature heater according to claim 1, characterized in that The obtaining the first center coordinates of each dot based on the binarized image includes: Performing erosion and dilation operations on the binarized image; Performing contour search on the binarized image after erosion and dilation operations to obtain the contour of each dot; Obtaining the maximum circumscribed circle of each contour to obtain the first center coordinates of the maximum circumscribed circle corresponding to each dot.
5. An automatic hole position recognition device for a constant temperature heating instrument, characterized in that, The device includes: An acquisition unit for performing image acquisition on the hole position plate of the constant temperature heater through a camera; A processing unit for performing binarization processing on the acquired image to obtain a binarized image; An obtaining unit for obtaining the first center coordinates of each dot based on the binarized image; An identification unit for determining the correspondence between the first center coordinates and the hole positions in the hole position plate to perform positioning and identification of the hole positions; the identification unit includes: A dot search unit for using a color recognition algorithm to find the number of colored dots in the binarized image to obtain the number of rows n of the hole position plate; A calculation unit for dividing the total number of the center coordinates by the number of rows n to obtain the number of columns m of the hole position plate; A relationship determination unit for determining the correspondence between the first center coordinates and the hole positions according to the number of rows n, the number of columns m, and the first center coordinates of each dot; Further, the relationship determination unit includes: A sorting unit, configured to sort the abscissas of all the first center coordinates to generate a sequence N; A grouping unit, configured to group n of the first center coordinates in the sequence N in order; A combining unit, configured to sort the ordinates of the first center coordinates in each group, and combine all the sequences N in order to obtain a sequence M.
6. A device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory. The computer program is executed by the processor to implement the steps of a method for automatically identifying the hole positions of a constant temperature heater according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium. The computer program is executed by the processor to implement the steps of a method for automatically identifying the hole positions of a constant temperature heater according to any one of claims 1 to 4.
Citation Information
Patent Citations
Part hole site intelligent identification and positioning method
CN113554695A