Egg tray grabbing method and device based on machine vision and electronic equipment
By using machine vision technology, combining HSV segmentation model and connected component algorithm with egg tray geometric feature data, accurate identification and positioning of egg trays are achieved, solving the problem of accurate egg tray grasping, and is suitable for the mechanization and automation of poultry egg processing.
Patent Information
- Application Number
- CN202411507905.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-10-28
AI Technical Summary
In existing technologies, the recognition accuracy of egg trays is not high, making it difficult for robotic arms to effectively grasp them, which affects the mechanization and automation of poultry egg processing.
A machine vision-based approach was adopted, using the HSV segmentation model and connected component algorithm to segment the initial image of the egg tray, extract the coordinates of the geometric center point of the egg region, and combine the geometric feature data of the egg tray to determine the pose data of the egg tray, and control the robotic arm to grasp it.
It achieves accurate identification and positioning of egg trays, improves the accuracy of grasping, overcomes the influence of background color and light, reduces noise interference, and is suitable for efficient automatic egg tray grasping.
Smart Images

Figure CN119399275A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of machine vision, and in particular to an egg tray grabbing method, device and electronic equipment based on machine vision. Background Art
[0002] With the continuous development of poultry farming, the scale of poultry farming has been expanding day by day, and the output of poultry eggs has increased significantly. Egg tray is a tool used to hold chicken eggs, duck eggs and other poultry eggs. It not only has good vibration reduction function, but also is easy to transport and carry.
[0003] In the egg production process, eggs are usually stored and arranged on egg trays to facilitate batch handling and processing of eggs. The traditional egg processing process relies on manual handling of egg trays, which not only requires a lot of labor costs, but also has low handling efficiency. In order to comply with the development trend of mechanized and automated processing, attempts have been made to use robotic arms to handle egg trays. However, due to the low recognition accuracy of egg trays, effective grasping of egg trays is impossible. Therefore, how to achieve automatic and efficient grasping of egg trays has become an urgent problem that technicians in this field need to solve. Summary of the invention
[0004] The problem solved by the present invention is how to accurately identify and locate the egg tray and realize intelligent grabbing of the egg tray.
[0005] In order to solve the above problems, the present invention provides an egg tray grabbing method, device and electronic equipment based on machine vision.
[0006] In a first aspect, the present invention provides an egg tray grabbing method based on machine vision, comprising:
[0007] Collecting and preprocessing the egg tray image in the target area to obtain the initial image of the egg tray;
[0008] Segmenting the egg tray initial image based on the HSV segmentation model and the connected domain algorithm to obtain the egg region, extracting the geometric center point coordinates of the egg region and performing mean processing to obtain the target center point coordinates;
[0009] Based on the target center point coordinates and the egg tray geometric feature data, the egg tray position and posture data are obtained;
[0010] The egg tray grasping posture information is determined based on the egg tray posture data, and the robot arm is controlled to perform an egg tray grasping operation according to the egg tray grasping posture information.
[0011] Optionally, segmenting the egg tray initial image based on the HSV segmentation model and the connected domain algorithm to obtain the egg region includes:
[0012] Performing HSV transformation on the egg tray initial image to obtain an egg tray conversion image;
[0013] Segmenting the egg tray conversion image based on a preset HSV threshold to obtain an egg connected domain;
[0014] The poultry and egg connected domain is screened based on a preset connected domain threshold to obtain a poultry and egg region.
[0015] Optionally, extracting the coordinates of the geometric center point of the egg area includes:
[0016] Based on the expansion algorithm, the egg region is expanded along a first direction to obtain a first expanded region;
[0017] Based on the expansion algorithm, the egg region is expanded along a second direction to obtain a second expanded region, wherein the first direction is perpendicular to the second direction;
[0018] Performing an AND operation on the first expansion area and the second expansion area to obtain an egg target area;
[0019] The geometric center point coordinates of the poultry and egg target area are extracted as the geometric center point coordinates of the poultry and egg area.
[0020] Optionally, the geometric center point coordinates of the egg area are averaged to obtain the target center point coordinates, including:
[0021] Collect multiple groups of egg tray images of the target area, calculate the geometric center point coordinates of the poultry egg area in the multiple groups of egg tray images respectively, and calculate the average value of the geometric center point coordinates of the poultry egg area in the multiple groups of egg tray images to obtain the target center point coordinates.
[0022] Optionally, obtaining the egg tray position data based on the target center point coordinates includes:
[0023] Using the target center point coordinates as the egg tray center point coordinates;
[0024] The egg tray position data is obtained based on the egg tray center point coordinates, the platform height data and the egg tray geometric feature data.
[0025] Optionally, the target center point coordinates are two-dimensional coordinates, and obtaining the egg tray posture data based on the egg tray center point coordinates and the egg tray geometric feature data includes:
[0026] Acquire egg tray geometric feature data and egg tray support platform height data based on a preset database, wherein the egg tray geometric feature data includes egg tray shape data, size data and support point data;
[0027] Based on the egg tray center point data, the platform height data and the geometric feature data, a three-dimensional transformation processing of the target center point coordinates is performed to obtain the egg tray initial data, and the egg tray initial posture data is changed by using the change matrix between the camera component coordinate system and the robot arm coordinate system to obtain the egg tray posture data.
[0028] Optionally, determining the egg tray grabbing posture information based on the egg tray posture data, and controlling the robot arm to perform the egg tray grabbing operation according to the egg tray grabbing posture information, comprises:
[0029] Determine egg tray grabbing posture information based on the egg tray posture data, wherein the egg tray grabbing posture information includes egg tray grabbing point coordinates;
[0030] Determine the robot arm movement trajectory and the gripping point coordinates of the gripper based on the egg tray posture data and the egg tray gripping point coordinates;
[0031] The robot arm is controlled to move according to the movement trajectory of the robot arm, and the egg tray grabbing operation is performed after the gripper reaches the gripping point coordinates of the gripper.
[0032] In a second aspect, the present invention provides an egg tray grabbing device based on machine vision, comprising:
[0033] An image acquisition module is used to acquire images of egg trays in a target area and filter the images;
[0034] A center point extraction module is used to segment the egg tray image after filtering based on a preset segmentation model to obtain an egg area, extract the geometric center point coordinates of the egg area and perform mean processing to obtain the target center point coordinates;
[0035] A posture data calculation module, used to obtain the posture data of the egg tray based on the coordinates of the target center point;
[0036] The grabbing module is used to determine the egg tray grabbing posture information based on the egg tray posture data, and control the mechanical arm to perform the egg tray grabbing operation according to the egg tray grabbing posture information.
[0037] In a third aspect, the present invention provides an electronic device, including a memory and a processor;
[0038] The memory is used to store computer programs;
[0039] The processor is used to implement the above-mentioned egg tray grasping method based on machine vision when executing the computer program.
[0040] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the above-mentioned egg tray grasping method based on machine vision is implemented.
[0041] The beneficial effects of the egg tray grasping method and device based on machine vision in the present invention are as follows: after obtaining the captured image of the egg tray, the poultry eggs in the egg tray are segmented and identified by using the HSV segmentation model, and the noise in the poultry egg identification is eliminated by the connected domain algorithm to obtain the poultry egg area, and then the center point of the poultry egg area is used as the center point of the egg tray to determine the posture data of the egg tray. Compared with the egg tray, the poultry eggs have the characteristics of small volume and prominent color characteristics, and are easier to identify. The present invention indirectly obtains the center point of the egg tray through the center point of the poultry egg area, which can overcome the problem of low recognition accuracy caused by the background color or light in direct egg tray identification; furthermore, the present invention obtains the posture data of the egg tray by using the center point of the egg tray and the geometric feature data of the egg tray, which can avoid the problem that the depth map identification is easily affected by the environment, thereby realizing the effective identification and positioning of the egg tray; finally, the present invention only needs to shoot the poultry egg area to accurately locate the egg tray, so that the camera assembly and the egg tray are kept at a close distance to meet the shooting requirements, and the identification of the poultry egg area is more accurate than the method of directly identifying the egg tray, which is conducive to the accurate positioning of the egg tray. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of a process of grabbing an egg tray based on machine vision according to an embodiment of the present invention;
[0043] Figure 2 A schematic diagram of a scene of a poultry egg area according to an embodiment of the present invention;
[0044] Figure 3a-3c A schematic diagram of a scene of obtaining a poultry egg target area based on an expansion algorithm according to an embodiment of the present invention;
[0045] Figure 4 The figure is a schematic structural diagram of an egg tray grasping device based on machine vision according to an embodiment of the present invention. DETAILED DESCRIPTION
[0046] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0047] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein.
[0048] The intelligent grabbing of egg tray is a key step in the mechanization of egg processing, and the accurate identification of egg tray is the basis of the intelligent grabbing of egg tray. At present, the pixel coordinates of the centroid of the egg tray are generally determined after the egg tray is segmented from the background environment by color screening, and the depth information of the centroid pixel coordinates is returned using the egg tray depth map, so as to realize the position recognition of the egg tray, but in the actual operation process, there is a problem of insufficient accuracy due to the influence of the background environment and light factors. There is also a method of coloring the key points on the egg tray to increase the accuracy of the position recognition of the egg tray, but in order to avoid the coloring points being blocked by eggs in the actual process, the coloring points are generally set in the non-egg area of the egg tray, so that the camera needs to keep a certain distance from the egg tray to be displayed in the captured image, which will cause the coloring points to be displayed too small in the camera image, increasing the difficulty of color screening. In general, considering the needs of actual production and processing, the egg trays in the technical scheme are all loaded with eggs to be transported and transferred, and the technical scheme of the present invention is specifically described below.
[0049] like Figure 1 As shown, in order to solve the above technical problems, an embodiment of the present invention provides an egg tray grabbing method based on machine vision, comprising:
[0050] S11, collecting and preprocessing the egg tray image in the target area to obtain an initial image of the egg tray.
[0051] Specifically, step S11 can use the camera assembly on the robot arm to shoot the egg tray to obtain the egg tray shooting image, where the target area is the area where the egg tray is located, and the specific range can be set according to the actual situation. Before shooting the egg tray, the following steps are also included:
[0052] The internal parameters of the shooting component are obtained, and the shooting component is calibrated; the transformation matrix between the coordinate system of the shooting component and the coordinate system of the mechanical arm is obtained; the initial position of the mechanical arm is determined based on the preset shooting points of the shooting component and the transformation matrix; the mechanical arm is controlled to move to the initial position so that the egg tray is within the shooting range of the shooting component, providing necessary data and conditions for subsequent image processing and analysis.
[0053] Preferably, preprocessing the egg tray image specifically includes:
[0054] Gaussian filtering is performed on the egg tray images to remove noise interference. This step is achieved by convolution with a Gaussian kernel. Usually, a 3x3 or 5x5 Gaussian kernel can be used. By reasonably designing the size of the Gaussian kernel, the image can have better smoothness.
[0055] Adjust image brightness, contrast, and color balance to ensure consistent image quality;
[0056] Image enhancement is performed to highlight the features of the egg tray and improve the distinguishability of the image.
[0057] S12, segmenting the egg tray initial image based on the HSV segmentation model and the connected domain algorithm to obtain the egg region, extracting the geometric center point coordinates of the egg region and performing mean processing to obtain the target center point coordinates.
[0058] Specifically, the HSV segmentation model (i.e., Hue, Saturation, Value segmentation model) refers to a model that uses the HSV color space for image segmentation. In the HSV segmentation model, hue (Hue) represents the type of color, saturation (Saturation) represents the vividness of the color, and value (Value) represents the brightness of the color.
[0059] In the HSV segmentation model, a specific hue, saturation and brightness range are usually selected to divide the pixels in the image into different categories or regions. The connected domain algorithm is an image processing algorithm used to identify and analyze connected regions or connected components in an image. It generally finds adjacent pixels in an image and combines them into regions with the same attributes. The HSV segmentation model can segment eggs from the background according to color features, and the connected domain algorithm can effectively identify and extract the egg region. By extracting and averaging the coordinates of the geometric center point, the center position of the egg region can be accurately determined, thereby improving the accuracy of positioning. Furthermore, by averaging the geometric center point of the egg region, the position offset caused by image noise or irregular shapes can be reduced, thereby improving the stability of positioning. This embodiment performs calculations through simple color features and geometric center points, has the characteristics of small amount of calculation and fast response speed, and is suitable for application scenarios with high real-time requirements.
[0060] S13, obtaining egg tray position data based on the target center point coordinates and egg tray geometric feature data.
[0061] Specifically, the egg tray posture data includes the position and direction information of the egg tray. Generally, the egg tray is placed on the egg tray support or on the production line. At this time, the direction of the egg tray is relatively fixed. The target center point coordinates are used as the egg tray center point coordinates, and combined with the egg tray geometric feature data, the egg tray can be positioned and identified. The egg tray geometric feature data here includes the egg tray size information, shape information and direction information.
[0062] S14, determining egg tray grabbing posture information based on the egg tray posture data, and controlling the robot arm to perform an egg tray grabbing operation according to the egg tray grabbing posture information.
[0063] Specifically, according to the egg tray posture data, the grasping posture that the robot needs to perform is determined. This grasping posture includes the position and posture of the end of the robot arm, so that the robot arm can accurately grasp the egg tray. Based on the determined grasping posture information, a path from the current position of the robot arm to the grasping position is planned. The path planning takes into account the dynamic constraints of the robot arm, obstacle avoidance requirements, and safety during the grasping process. When the robot arm successfully grasps the egg tray, it moves the egg tray to the specified position to complete the grasping task.
[0064] The beneficial effects of the egg tray grasping method and device based on machine vision in the present invention are as follows: after obtaining the captured image of the egg tray, the poultry eggs in the egg tray are segmented and identified by using the HSV segmentation model, and the noise in the poultry egg identification is eliminated by the connected domain algorithm to obtain the poultry egg area, and then the center point of the poultry egg area is used as the center point of the egg tray to determine the posture data of the egg tray. Compared with the egg tray, the poultry eggs have the characteristics of small volume and prominent color characteristics, and are easier to identify. The present invention indirectly obtains the center point of the egg tray through the center point of the poultry egg area, which can overcome the problem of low recognition accuracy caused by the background color or light in direct egg tray identification; furthermore, the present invention obtains the posture data of the egg tray by using the center point of the egg tray and the geometric feature data of the egg tray, which can avoid the problem that the depth map identification is easily affected by the environment, thereby realizing effective identification and positioning of the egg tray; finally, the present invention only needs to shoot the poultry egg area to accurately locate the egg tray, so that the camera assembly and the egg tray are kept at a close distance to achieve the shooting requirement, so that the identification of the poultry egg area is more accurate than the direct identification of the egg tray, which is conducive to the accurate positioning of the egg tray.
[0065] In one embodiment, segmenting the egg tray initial image based on the HSV segmentation model and the connected domain algorithm to obtain the egg region specifically includes:
[0066] The egg tray initial image is subjected to HSV transformation to obtain an egg tray conversion image. After the HSV transformation, each pixel in the image will contain three components: hue, saturation and lightness. In the egg tray initial image, a specific range of hue, saturation and lightness can be selected to be retained to highlight the color characteristics of the egg tray.
[0067] Segmenting the egg tray conversion image based on a preset HSV threshold to obtain an egg connected domain;
[0068] The poultry and egg connected domain is screened based on a preset connected domain threshold to obtain the poultry and egg region, that is, according to the preset HSV threshold range, the pixels in the HSV image are divided into two categories: pixels that meet the threshold condition (poultry and egg region) and pixels that do not meet the threshold condition (background region), the pixels that meet the threshold condition are set to white (255), and the pixels that do not meet the condition are set to black (0), to obtain a binary image, and the binary image is subjected to connected domain analysis, and adjacent white pixels are combined into a connected region (connected domain). Each connected domain represents a poultry and egg region.
[0069] The poultry and egg connected domain is screened based on a preset connected domain threshold to obtain a poultry and egg region.
[0070] Specifically, the threshold of the connected domain feature can be set according to specific application requirements, for example, the threshold can be determined according to the size range and shape characteristics of the eggs. The screened connected domain is marked as the egg region, and the final egg region is obtained. Figure 2 This is a scene schematic diagram of a poultry egg area according to an embodiment of the present invention. The poultry egg area obtained in this way can more accurately represent the position and shape of the egg tray, providing reliable data support for subsequent egg tray grabbing operations.
[0071] It should be noted that Figure 2 The white area in the figure indicates the egg area, and the black area indicates the non-egg area, which can also be called the background area. Figure 3a-3b The white area in the figure is the area after the egg area is expanded, and the black area is the background area; Figure 3c The black area in the figure is the target area for eggs, and the white area is the background area.
[0072] Reference Figure 3a-3c As shown, the step of extracting the geometric center coordinates of the egg area includes:
[0073] like Figure 3a As shown, the egg area is expanded along a first direction based on an expansion algorithm to obtain a first expanded area.
[0074] Specifically, the dilation algorithm is one of the morphological operations in image processing, which is used to expand and increase the target area in the image. It is assumed here that the first direction is one of the row direction or the column direction of the image.
[0075] like Figure 3b As shown, based on the expansion algorithm, the egg area is expanded along the second direction to obtain a second expanded area, and the first direction is perpendicular to the second direction.
[0076] like Figure 3c As shown, an AND operation is performed on the first expansion area and the second expansion area to obtain the egg target area.
[0077] Perform a pixel-level AND operation on the first and second expansion areas. This means that the corresponding pixels of the two expansion areas are logically ANDed. If both areas are white (255) at the same position, the corresponding position of the result image is white (255), otherwise it is black (0). After the AND operation, the result image is the target area of the egg, which contains the pixels in both expansion areas. This area represents the final position of the egg tray. Its shape and size may be slightly different from the original egg tray area, but it more accurately reflects the actual position of the egg tray.
[0078] The geometric center point coordinates of the poultry and egg target area are extracted as the geometric center point coordinates of the poultry and egg area.
[0079] Specifically, after obtaining the target egg area, the geometric features of the contour of the target egg area can be used to calculate the coordinates of its geometric center point. A common method is to calculate the centroid of the contour, that is, the average value of all contour points, as the coordinates of the geometric center point, and the calculated coordinates of the geometric center point can be used as the coordinates of the geometric center point of the egg area.
[0080] Further, the geometric center point coordinates of the egg area are processed by averaging to obtain the target center point coordinates, including:
[0081] Collect multiple groups of egg tray images of the target area, calculate the geometric center point coordinates of the poultry egg area in the multiple groups of egg tray images respectively, and calculate the average value of the geometric center point coordinates of the poultry egg area in the multiple groups of egg tray images to obtain the target center point coordinates.
[0082] Specifically, multiple groups of egg tray images of the target area are collected. It is ensured that each group of images contains the target egg tray and the image quality is good. For each group of images, the geometric center point coordinates of the egg area are calculated using the method described above. The geometric center point coordinates of the egg area calculated for each group of images are added together and divided by the number of image groups to obtain the average value of the geometric center point coordinates of the egg area in all images, which is the target center point coordinates.
[0083] Optionally, obtaining the egg tray position data based on the target center point coordinates includes:
[0084] Using the target center point coordinates as the egg tray center point coordinates;
[0085] The egg tray position data is obtained based on the egg tray center point coordinates, the platform height data and the egg tray geometric feature data.
[0086] It should be explained that the calculated target center point coordinates are directly used as the center point coordinates of the egg tray. According to specific needs and the working environment of the robot arm, the egg tray's posture data can be calculated based on the egg tray's center point coordinates, the platform height data, and the egg tray's geometric feature data (such as the egg tray's size, shape, etc.). The posture data usually includes position and attitude information, which can be expressed in the form of three-dimensional coordinates and rotation matrices or quaternions.
[0087] Optionally, the target center point coordinates are two-dimensional coordinates, and obtaining the egg tray posture data based on the egg tray center point coordinates and the egg tray geometric feature data includes:
[0088] Acquire egg tray geometric feature data and egg tray support platform height data based on a preset database, wherein the egg tray geometric feature data includes egg tray shape data, size data and support point data;
[0089] Based on the egg tray center point data, the platform height data and the geometric feature data, a three-dimensional transformation processing of the target center point coordinates is performed to obtain the egg tray initial data, and the egg tray initial posture data is changed by using the change matrix between the camera component coordinate system and the robot arm coordinate system to obtain the egg tray posture data.
[0090] First, the geometric feature data and the platform height data of the egg tray are obtained from the preset database. These data include information such as the shape, size and support points of the egg tray. Three-dimensional transformation processing is performed according to the target center point coordinates, the platform height data and the egg tray geometric feature data. This step involves converting the two-dimensional target center point coordinates into position information in three-dimensional space, taking into account factors such as the platform height. According to the transformation matrix between the camera component coordinate system and the robot arm coordinate system, the initial posture data of the egg tray is transformed to obtain the final egg tray posture data. By converting the target center point coordinates in the two-dimensional image captured by the camera component into the three-dimensional egg tray position information in the robot arm workspace, and transforming the egg tray posture data to adapt to the operation requirements of the robot arm, the accurate execution of the egg tray grasping task is achieved.
[0091] In one embodiment, determining the egg tray grasping posture information based on the egg tray posture data, and controlling the robot arm to perform the egg tray grasping operation according to the egg tray grasping posture information, comprises:
[0092] Determine egg tray grabbing posture information based on the egg tray posture data, wherein the egg tray grabbing posture information includes egg tray grabbing point coordinates;
[0093] Determine the robot arm movement trajectory and the gripping point coordinates of the gripper based on the egg tray posture data and the egg tray gripping point coordinates;
[0094] The robot arm is controlled to move according to the movement trajectory of the robot arm, and the egg tray grabbing operation is performed after the gripper reaches the gripping point coordinates of the gripper.
[0095] According to the egg tray posture data, the grabbing point coordinates of the egg tray are determined. The grabbing point of the egg tray can be fixed or flexibly set according to the characteristics of the robot arm to ensure that the robot arm can accurately grasp the egg tray. The position of the grabbing point can be determined according to the specific grabbing strategy and the characteristics of the egg tray. According to the egg tray posture data and the grabbing point coordinates of the egg tray, the movement trajectory of the robot arm and the grabbing point coordinates of the gripper are determined. This includes determining the starting position and target position of the robot arm, as well as the grabbing point coordinates of the gripper. According to the determined movement trajectory of the robot arm, the robot arm is controlled to move. When the gripper of the robot arm reaches the required grabbing point coordinates, the egg tray grabbing operation is performed.
[0096] Reference Figure 4 The present invention provides an egg tray grabbing device based on machine vision, comprising:
[0097] An image acquisition module is used to acquire images of egg trays in a target area and filter the images;
[0098] A center point extraction module is used to segment the egg tray image after filtering based on a preset segmentation model to obtain an egg area, extract the geometric center point coordinates of the egg area and perform mean processing to obtain the target center point coordinates;
[0099] A posture data calculation module, used to obtain the posture data of the egg tray based on the coordinates of the target center point;
[0100] The grabbing module is used to determine the egg tray grabbing posture information based on the egg tray posture data, and control the mechanical arm to perform the egg tray grabbing operation according to the egg tray grabbing posture information.
[0101] An embodiment of the present invention provides an electronic device including a memory and a processor; the memory is used to store a computer program; the processor is used to implement the above-mentioned machine vision-based egg tray grasping method when executing the computer program. The electronic device can be a computer or a server, etc.
[0102] A computer-readable storage medium provided in yet another embodiment of the present invention stores a computer program, and when the computer program is executed by a processor, the above-mentioned method for grabbing an egg tray based on machine vision is implemented.
[0103] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc. In the present application, the unit described as a separate component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or it may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment of the present invention. In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0104] Although the present invention is disclosed as above, the protection scope of the present invention is not limited thereto. Those skilled in the art may make various changes and modifications without departing from the spirit and scope of the present invention, and these changes and modifications will fall within the protection scope of the present invention.
Claims
1. An egg tray grabbing method based on machine vision, characterized in that: include: Collecting and preprocessing the egg tray image in the target area to obtain the initial image of the egg tray; Segmenting the egg tray initial image based on the HSV segmentation model and the connected domain algorithm to obtain the egg region, extracting the geometric center point coordinates of the egg region and performing mean processing to obtain the target center point coordinates; Based on the target center point coordinates and the egg tray geometric feature data, the egg tray position and posture data are obtained; The egg tray grasping posture information is determined based on the egg tray posture data, and the robot arm is controlled to perform an egg tray grasping operation according to the egg tray grasping posture information.
2. The egg tray grabbing method based on machine vision according to claim 1, characterized in that: The egg tray initial image is segmented based on the HSV segmentation model and the connected domain algorithm to obtain the egg area, including: Performing HSV transformation on the egg tray initial image to obtain an egg tray conversion image; Segmenting the egg tray conversion image based on a preset HSV threshold to obtain an egg connected domain; The poultry and egg connected domain is screened based on a preset connected domain threshold to obtain the poultry and egg area.
3. The egg tray grabbing method based on machine vision according to claim 1, characterized in that: The step of extracting the geometric center coordinates of the egg area includes: Based on the expansion algorithm, the egg region is expanded along a first direction to obtain a first expanded region; Based on the expansion algorithm, the egg region is expanded along a second direction to obtain a second expanded region, wherein the first direction is perpendicular to the second direction; Performing an AND operation on the first expansion area and the second expansion area to obtain an egg target area; The geometric center point coordinates of the poultry and egg target area are extracted as the geometric center point coordinates of the poultry and egg area.
4. The egg tray grabbing method based on machine vision according to claim 1, characterized in that: The step of performing mean processing on the geometric center point coordinates of the egg area to obtain the target center point coordinates includes: Collect multiple groups of egg tray images of the target area, calculate the geometric center point coordinates of the poultry egg area in the multiple groups of egg tray images respectively, and calculate the average value of the geometric center point coordinates of the poultry egg area in the multiple groups of egg tray images to obtain the target center point coordinates.
5. The egg tray grabbing method based on machine vision according to claim 1, characterized in that: The step of obtaining the egg tray position data based on the target center point coordinates includes: Using the target center point coordinates as the egg tray center point coordinates; The egg tray position data is obtained based on the egg tray center point coordinates, the platform height data and the egg tray geometric feature data.
6. The method for grabbing egg trays based on machine vision according to claim 5, characterized in that: The target center point coordinates are two-dimensional coordinates, and the egg tray posture data is obtained based on the egg tray center point coordinates and the egg tray geometric feature data, including: Acquire egg tray geometric feature data and egg tray support platform height data based on a preset database, wherein the egg tray geometric feature data includes egg tray shape data, size data and support point data; Based on the egg tray center point data, the platform height data and the geometric feature data, a three-dimensional transformation processing of the target center point coordinates is performed to obtain the egg tray initial data, and the egg tray initial posture data is changed by using a change matrix between the camera component coordinate system and the robot arm coordinate system to obtain the egg tray posture data.
7. The egg tray grabbing method based on machine vision according to claim 6, characterized in that: The method of determining the egg tray grasping posture information based on the egg tray posture data and controlling the mechanical arm to perform the egg tray grasping operation according to the egg tray grasping posture information comprises: Determine egg tray grabbing posture information based on the egg tray posture data, wherein the egg tray grabbing posture information includes egg tray grabbing point coordinates; Determine the robot arm movement trajectory and the gripping point coordinates of the gripper based on the egg tray posture data and the egg tray gripping point coordinates; The robot arm is controlled to move according to the movement trajectory of the robot arm, and the egg tray grabbing operation is performed after the gripper reaches the gripping point coordinates of the gripper.
8. An egg tray grabbing device based on machine vision, characterized in that: include: An image acquisition module is used to acquire images of egg trays in a target area and filter the images; A center point extraction module is used to segment the egg tray image after filtering based on a preset segmentation model to obtain an egg area, extract the geometric center point coordinates of the egg area and perform mean processing to obtain the target center point coordinates; A posture data calculation module, used to obtain the posture data of the egg tray based on the coordinates of the target center point; The grabbing module is used to determine the egg tray grabbing posture information based on the egg tray posture data, and control the mechanical arm to perform the egg tray grabbing operation according to the egg tray grabbing posture information.
9. An electronic device, characterized in that: including memory and processor; The memory is used to store computer programs; The processor is used to implement the egg tray grasping method based on machine vision according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the egg tray grasping method based on machine vision according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Stereoscopic vision locating mechanical arm grabbing system and method based on automatic shape fitting
CN108453739A
Manipulator grabbing method based on deep learning target detection and image segmentation
CN115816460A
Mechanical arm 6D pose grabbing method based on vision
CN117911359A
Mechanical arm autonomous mobile grabbing method under complex illumination conditions based on visual-tactile fusion
WO2023056670A1
Cited By
Large-scale mechanical arm livestock and poultry feeding method and device based on machine vision
CN120147600A
Method and device for feeding livestock and poultry by large-scale robot based on machine vision
CN120147600B
AI-based Smart Egg Palletizing Automation System
KR102959548B1
