An egg tray grabbing method and device based on machine vision and electronic equipment
Patent Information
- Application Number
- CN202411507905.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2044-10-28
AI Technical Summary
传统的禽蛋加工过程依赖人工进行蛋托的搬运,不仅需要大量的劳动成本,且搬运效率较低,为了顺应机械化和自动化加工的发展趋势,目前已尝试采用用机械臂进行蛋托的搬运,但是受限于蛋托的识别准度不高,无法进行蛋托的有效抓取
[0041]本发明中基于机器视觉的蛋托抓取方法及装置的有益效果是:在获取蛋托拍摄图像后,利用HSV分割模型对蛋托中的禽蛋进行分割识别,并通过连通域算法剔除禽蛋识别中的噪声,以得到禽蛋区域,再将禽蛋区域的中心点作为蛋托的中心点从而确定蛋托的位姿数据,与蛋托相比,禽蛋具备体积小、颜色特征突出的特点,更易于识别,本发明通过禽蛋区域中心点间接获取蛋托中心点,能够克服直接进行蛋托识别中由于背景色或光线影响导致识别准度不高的问题;再者,本发明利用蛋托中心点和蛋托几何特征数据得到蛋托位姿数据的方式,能够避免深度图识别易受环境影响的问题,从而实现蛋托的有效识别和定位;最后,本发明仅需拍摄禽蛋区域即可进行蛋托的精准定位,使得摄像组件与蛋托保持较近的距离就可满足拍摄需求,禽蛋区域的识别较直接识别蛋托的方式更加精准,有利于蛋托的精准定位。
Smart Images

Figure CN119399275B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine vision technology, and more specifically, to a machine vision-based egg tray grasping method, apparatus, and electronic device. Background Technology
[0002] With the continuous development of the poultry farming industry, the scale of poultry farming is expanding day by day, and the production of poultry eggs has increased significantly. Egg trays are tools used to hold poultry eggs such as chicken eggs and duck eggs. They not only have good shock absorption functions, but are also convenient for transportation and carrying.
[0003] In poultry egg production, eggs are typically stored and arranged on egg trays for easy bulk handling and processing. Traditional egg processing relies on manual handling of these trays, which is not only labor-intensive but also inefficient. To adapt to the trend towards mechanized and automated processing, robotic arms have been used for tray handling; however, limitations in tray recognition accuracy prevent effective tray gripping. Therefore, achieving automated and efficient tray gripping has become a pressing problem for engineers in this field. Summary of the Invention
[0004] The problem solved by this invention is how to accurately identify and locate egg trays, and achieve intelligent grasping of egg trays.
[0005] To address the above problems, this invention provides a machine vision-based egg tray grasping method, device, and electronic device.
[0006] In a first aspect, the present invention provides a machine vision-based egg tray grasping method, comprising:
[0007] Images of the egg tray in the target area are captured and preprocessed to obtain the initial image of the egg tray;
[0008] The initial image of the egg tray is segmented based on the HSV segmentation model and connected component algorithm to obtain the egg region. The geometric center coordinates of the egg region are extracted and mean value is processed to obtain the target center coordinates.
[0009] Egg tray pose data are obtained based on the target center point coordinates and egg tray geometric feature data.
[0010] Based on the egg tray pose data, the egg tray grasping pose information is determined, and the robotic arm is controlled to perform the egg tray grasping operation according to the egg tray grasping pose information.
[0011] Optionally, the segmentation of the initial image of the egg tray based on the HSV segmentation model and connected component algorithm to obtain the egg region includes:
[0012] Perform HSV transformation on the initial image of the egg tray to obtain the transformed image of the egg tray;
[0013] The converted image of the egg tray is segmented based on a preset HSV threshold to obtain the connected components of the poultry egg.
[0014] The egg region is obtained by filtering the egg region based on a preset connected component threshold.
[0015] Optionally, extracting the coordinates of the geometric center point of the egg region includes:
[0016] The egg region is expanded along the first direction based on the expansion algorithm to obtain the first expanded region.
[0017] Based on the expansion algorithm, the egg region is expanded along the second direction to obtain a second expanded region, wherein the first direction is perpendicular to the second direction.
[0018] Perform a bitwise AND operation on the first expansion region and the second expansion region to obtain the target region of the poultry egg;
[0019] The geometric center coordinates of the target area of the poultry egg are extracted as the geometric center coordinates of the poultry egg area.
[0020] Optionally, the coordinates of the geometric center point of the egg region are averaged to obtain the target center point coordinates, including:
[0021] Multiple sets of egg tray images of the target area are acquired, and the geometric center coordinates of the egg area in each set of egg tray images are calculated. The average value of the geometric center coordinates of the egg area in each set of egg tray images is then calculated to obtain the target center coordinates.
[0022] Optionally, obtaining the egg tray pose data based on the target center point coordinates includes:
[0023] Use the coordinates of the target center point as the coordinates of the egg tray center point;
[0024] Egg tray pose data is obtained based on the coordinates of the center point of the egg tray, the height data of the support platform, and the geometric feature data of the egg tray.
[0025] Optionally, the target center point coordinates are two-dimensional coordinates, and obtaining the egg tray pose data based on the egg tray center point coordinates and the egg tray geometric feature data includes:
[0026] Based on a preset database, obtain geometric feature data of the egg tray and height data of the egg tray support. The geometric feature data of the egg tray includes egg tray shape data, size data and support point data.
[0027] Based on the center point data of the egg tray, the height data of the platform, and the geometric feature data, a three-dimensional transformation of the target center point coordinates is performed to obtain the initial data of the egg tray. Then, the initial pose data of the egg tray is transformed using the transformation matrix between the camera component coordinate system and the robotic arm coordinate system to obtain the pose data of the egg tray.
[0028] Optionally, the step of determining the egg tray grasping pose information based on the egg tray pose data and controlling the robotic arm to perform the egg tray grasping operation according to the egg tray grasping pose information includes:
[0029] Based on the egg tray pose data, the egg tray grasping pose information is determined, and the egg tray grasping pose information includes the coordinates of the egg tray grasping point;
[0030] The robotic arm's movement trajectory and the gripper's gripping point coordinates are determined based on the egg tray's pose data and the egg tray's gripping point coordinates.
[0031] The robotic arm is controlled to move according to the robotic arm's movement trajectory, and the egg tray is grasped after the gripper reaches the coordinates of the gripper's grasping point.
[0032] Secondly, the present invention provides an egg tray grasping device based on machine vision, comprising:
[0033] The image acquisition module is used to acquire images of the egg tray in the target area and to filter the images of the egg tray.
[0034] The center point extraction module is used to segment the filtered egg tray image based on a preset segmentation model to obtain the egg region, extract the geometric center point coordinates of the egg region and perform mean processing to obtain the target center point coordinates.
[0035] The pose data calculation module is used to obtain the egg tray pose data based on the coordinates of the target center point.
[0036] The grasping module is used to determine the egg tray grasping posture information based on the egg tray posture data, and control the robotic arm to perform the egg tray grasping operation according to the egg tray grasping posture information.
[0037] Thirdly, 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-described machine vision-based egg tray grasping method when executing the computer program.
[0040] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described machine vision-based egg tray grasping method.
[0041] The beneficial effects of the machine vision-based egg tray grasping method and device in this invention are as follows: After acquiring an image of the egg tray, the HSV segmentation model is used to segment and identify the eggs in the tray, and noise in the egg identification is removed by a connected component algorithm to obtain the egg region. The center point of the egg region is then used as the center point of the egg tray to determine the pose data of the egg tray. Compared with the egg tray, eggs have the characteristics of small size and prominent color features, making them easier to identify. This invention indirectly obtains the center point of the egg tray by using the center point of the egg region, which can overcome the problem of low recognition accuracy caused by background color or light influence in direct egg tray recognition. Furthermore, the method of obtaining the pose data of the egg tray by using the center point and geometric feature data of the egg tray can avoid the problem of depth map recognition being easily affected by the environment, thereby achieving effective recognition and positioning of the egg tray. Finally, this invention only needs to capture the egg region to accurately position the egg tray, so that the camera component can meet the shooting requirements by keeping a relatively close distance to the egg tray. The recognition of the egg region is more accurate than the direct recognition of the egg tray, which is conducive to the accurate positioning of the egg tray. Attached Figure Description
[0042] Figure 1 This is a flowchart illustrating a machine vision-based egg tray grasping method according to an embodiment of the present invention.
[0043] Figure 2 This is a schematic diagram of a poultry egg area according to an embodiment of the present invention;
[0044] Figures 3a-3c This is a schematic diagram of a scenario where a target region for poultry eggs is obtained based on a dilation algorithm according to an embodiment of the present invention;
[0045] Figure 4 This is a schematic diagram of the structure of an egg tray grasping device based on machine vision according to an embodiment of the present invention. Detailed Implementation
[0046] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0047] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein.
[0048] Intelligent egg tray gripping is a crucial step in the mechanization of poultry egg processing, and accurate egg tray identification is fundamental to intelligent egg tray gripping. Currently, egg trays are typically segmented from the background environment using color screening to determine the pixel coordinates of the egg tray's centroid, and depth information from the centroid pixel coordinates is returned using a depth map of the egg tray, thus achieving pose recognition. However, in actual operation, the accuracy is insufficient due to the influence of background environment and lighting factors. Another method is to color key points on the egg tray to increase the accuracy of egg tray position recognition. However, in practice, to avoid the colored points being obscured by poultry eggs, the colored points are generally placed in the non-egg area of the egg tray, requiring the camera to maintain a certain distance from the egg tray to be displayed in the captured image. This results in the colored points appearing too small in the image, increasing the difficulty of color screening. Generally, considering the needs of actual production and processing, the egg trays in this technical solution are all loaded with poultry eggs to be transported. The technical solution of this invention will be described in detail below.
[0049] like Figure 1 As shown, in order to solve the above-mentioned technical problems, this embodiment of the invention provides a machine vision-based egg tray grasping method, including:
[0050] S11. Collect images of the egg tray in the target area and perform preprocessing to obtain the initial image of the egg tray.
[0051] Specifically, step S11 can use a camera component on a robotic arm to photograph the egg tray to obtain an image of it. The target area here is the area where the egg tray is located, and the specific range can be set according to the actual situation. The following steps are included before photographing the egg tray:
[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 robotic arm is obtained; the initial position of the robotic arm is determined based on the preset shooting point of the shooting component and the transformation matrix; the robotic 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, the preprocessing of the egg tray images specifically includes:
[0054] Gaussian filtering is applied to the egg tray image to remove noise interference. This step is achieved by convolution with a Gaussian kernel. Typically, a 3x3 or 5x5 Gaussian kernel can be used. By properly designing the size of the Gaussian kernel, the image can have better smoothness.
[0055] Adjust the brightness, contrast, and color balance of the image to ensure consistent image quality;
[0056] Image enhancement was performed to highlight the features of the egg carton and improve image resolution.
[0057] S12. The initial image of the egg tray is segmented based on the HSV segmentation model and connected component algorithm to obtain the egg region. The geometric center coordinates of the egg region are extracted and mean value is processed to obtain the target center coordinates.
[0058] Specifically, the HSV segmentation model (i.e., Hue, Saturation, Value segmentation model) refers to an image segmentation model that uses the HSV color space. In the HSV segmentation model, hue represents the type of color, saturation represents the vividness of the color, and value represents the brightness of the color.
[0059] In the HSV segmentation model, specific hue, saturation, and brightness ranges are typically selected to classify pixels in an image into different categories or regions. Connected component analysis (CBI) is an image processing algorithm used to identify and analyze connected regions or components in an image. It generally involves finding adjacent pixels in an image and combining them into regions with similar attributes. The HSV segmentation model can segment eggs from the background based on color features, while CBI can effectively identify and extract the egg region. By extracting and averaging the geometric center point coordinates, the center position of the egg region can be accurately determined, thus improving positioning accuracy. Furthermore, averaging the geometric center point of the egg region reduces positional shifts caused by image noise or irregular shapes, improving positioning stability. This embodiment uses simple color features and geometric center points for calculation, featuring low computational load and fast response speed, making it suitable for applications with high real-time requirements.
[0060] S13. Based on the coordinates of the target center point and the geometric feature data of the egg tray, obtain the pose data of the egg tray.
[0061] Specifically, the egg tray pose data includes the position and orientation information of the egg tray. Generally, the egg tray is placed on an egg tray support or on an assembly line, where its orientation is relatively fixed. By using the coordinates of the target center point as the coordinates of the egg tray center point, and combining this with the egg tray's geometric feature data, the egg tray can be located and identified. This geometric feature data includes the egg tray's size, shape, and orientation information.
[0062] S14. Determine the egg tray grasping posture information based on the egg tray posture data, and control the robotic arm to perform the egg tray grasping operation according to the egg tray grasping posture information.
[0063] Specifically, based on the egg tray pose data, the grasping pose that the robotic arm needs to execute is determined. This grasping pose includes the position and orientation of the robotic arm's end effector, enabling the robotic arm to accurately grasp the egg tray. Based on the determined grasping pose information, a path is planned for the robotic arm from its current position to the grasping position. Path planning takes into account the robotic arm's dynamic constraints, obstacle avoidance requirements, and safety during the grasping process. Once the robotic arm successfully grasps the egg tray, it moves the egg tray to the designated position, thus completing the grasping task.
[0064] The beneficial effects of the machine vision-based egg tray grasping method and device in this invention are as follows: After acquiring an image of the egg tray, the HSV segmentation model is used to segment and identify the eggs in the tray, and noise in the egg identification is removed using a connected component algorithm to obtain the egg region. The center point of the egg region is then used as the center point of the egg tray to determine the pose data of the egg tray. Compared with the egg tray, eggs are smaller and have more prominent color features, making them easier to identify. This invention indirectly obtains the center point of the egg tray by using the center point of the egg region, which can overcome the problem of low recognition accuracy caused by background color or lighting in direct egg tray recognition. Furthermore, the method of obtaining the pose data of the egg tray by using the center point and geometric feature data of the egg tray can avoid the problem of depth map recognition being easily affected by the environment, thereby achieving effective recognition and positioning of the egg tray. Finally, this invention only needs to capture the egg region to accurately position the egg tray, allowing the camera component to be kept close to the egg tray to meet the shooting requirements. This makes the recognition of the egg region more accurate than direct recognition of the egg tray, which is beneficial to the accurate positioning of the egg tray.
[0065] In one embodiment, the segmentation of the initial image of the egg tray based on the HSV segmentation model and connected component algorithm to obtain the egg region specifically includes:
[0066] The initial image of the egg tray is subjected to HSV transformation to obtain the transformed image of the egg tray. After HSV transformation, each pixel in the image will contain three components: hue, saturation, and brightness. In the initial image of the egg tray, a specific range of hue, saturation, and brightness can be selectively retained to highlight the color characteristics of the egg tray.
[0067] The converted image of the egg tray is segmented based on a preset HSV threshold to obtain the connected components of the poultry egg.
[0068] The connected components of the poultry egg are filtered based on a preset connected component threshold to obtain the poultry egg region. Specifically, according to a preset HSV threshold range, the pixels in the HSV image are divided into two categories: pixels that meet the threshold conditions (poultry egg region) and pixels that do not meet the threshold conditions (background region). Pixels that meet the threshold conditions are set to white (255), and pixels that do not meet the conditions are set to black (0), resulting in a binarized image. Connected component analysis is then performed on the binarized image to form connected regions (connected components) from adjacent white pixels. Each connected component represents a poultry egg region.
[0069] The egg region is obtained by filtering the egg region based on a preset connected component threshold.
[0070] Specifically, the threshold for connected component features can be set according to specific application requirements. For example, the threshold can be determined based on the size range and shape characteristics of eggs. The filtered connected components are then marked as egg regions, thus obtaining the final egg regions. Figure 2 This is a 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 grasping operations.
[0071] It should be noted that, Figure 2 The white areas in the image represent egg areas, while the black areas represent non-egg areas, which can also be called background areas. Figures 3a-3b The white area in the image represents the expanded egg region, while the black area represents the background region. Figure 3c The black area in the image represents the target area for the eggs, while the white area represents the background area.
[0072] Reference Figures 3a-3c As shown, the extraction of the geometric center point coordinates of the egg region includes:
[0073] like Figure 3a As shown, the egg region is expanded along the first direction based on the expansion algorithm to obtain the first expanded region.
[0074] Specifically, the dilation algorithm is one of the morphological operations in image processing, used to expand and increase target regions in an image. Here, it is assumed that the first direction is one of the row or column directions of the image.
[0075] like Figure 3b As shown, the egg region is expanded along the second direction based on the expansion algorithm to obtain a second expanded region, wherein the first direction is perpendicular to the second direction.
[0076] like Figure 3c As shown, an AND operation is performed on the first expansion region and the second expansion region to obtain the target region of the poultry egg.
[0077] A pixel-level AND operation is performed on the first and second expansion regions. This means performing a logical AND operation on the corresponding pixels of the two expansion regions. If both regions are white (255) at the same location, the corresponding location in the resulting image is white (255); otherwise, it is black (0). After the AND operation, the resulting image is the target region of the egg, which contains the pixels that are simultaneously in both expansion regions. This region represents the final determined position of the egg tray. Its shape and size may be slightly different from the original egg tray region, but it more accurately reflects the actual position of the egg tray.
[0078] The geometric center coordinates of the target area of the poultry egg are extracted as the geometric center coordinates of the poultry egg area.
[0079] Specifically, after obtaining the target area of the poultry egg, the geometric features of the outline of the target area can be used to calculate the coordinates of its geometric center point. A common method is to calculate the centroid of the outline, that is, the average value of all outline points, as the coordinates of the geometric center point. Based on the calculated coordinates of the geometric center point, the coordinates of the geometric center point of the poultry egg area can be used.
[0080] Further, the coordinates of the geometric center point of the egg region are averaged to obtain the target center point coordinates, including:
[0081] Multiple sets of egg tray images of the target area are acquired, and the geometric center coordinates of the egg area in each set of egg tray images are calculated. The average value of the geometric center coordinates of the egg area in each set of egg tray images is then calculated to obtain the target center coordinates.
[0082] Specifically, multiple sets of images of egg trays are captured in the target area. Each set of images is ensured to include the target egg tray and to be of good quality. For each set of images, the geometric center coordinates of the egg area are calculated using the method described earlier. The calculated geometric center coordinates of the egg area in each set of images are summed and divided by the number of image sets to obtain the average value of the geometric center coordinates of the egg area across all images; this average value is the target center coordinate.
[0083] Optionally, obtaining the egg tray pose data based on the target center point coordinates includes:
[0084] Use the coordinates of the target center point as the coordinates of the egg tray center point;
[0085] Egg tray pose data is obtained based on the coordinates of the center point of the egg tray, the height data of the support platform, and the geometric feature data of the egg tray.
[0086] It should be explained that the calculated target center point coordinates are directly used as the center point coordinates of the egg tray. Depending on the specific needs and the working environment of the robotic arm, the pose data of the egg tray can be calculated based on the center point coordinates, platform height data, and geometric feature data of the egg tray (such as the size and shape of the egg tray). The pose data usually includes position and orientation information, which can be represented as three-dimensional coordinates and rotation matrices or quaternions.
[0087] Optionally, the target center point coordinates are two-dimensional coordinates, and obtaining the egg tray pose data based on the egg tray center point coordinates and the egg tray geometric feature data includes:
[0088] Based on a preset database, obtain geometric feature data of the egg tray and height data of the egg tray support. The geometric feature data of the egg tray includes egg tray shape data, size data and support point data.
[0089] Based on the center point data of the egg tray, the height data of the platform, and the geometric feature data, a three-dimensional transformation of the target center point coordinates is performed to obtain the initial data of the egg tray. Then, the initial pose data of the egg tray is transformed using the transformation matrix between the camera component coordinate system and the robotic arm coordinate system to obtain the pose data of the egg tray.
[0090] First, the geometric feature data and platform height data of the egg tray are obtained from a pre-set database. This data includes information such as the shape, size, and support points of the egg tray. A 3D transformation process is then performed based on the target center point coordinates, platform height data, and egg tray geometric feature data. This step involves converting the two-dimensional target center point coordinates into three-dimensional position information, taking into account factors such as platform height. The initial pose data of the egg tray is transformed according to the transformation matrix between the camera component coordinate system and the robotic arm coordinate system to obtain the final egg tray pose data. By converting the target center point coordinates in the two-dimensional image captured by the camera component into three-dimensional egg tray position information in the robotic arm's workspace, and transforming the egg tray pose data to adapt to the robotic arm's operational requirements, 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 robotic arm to perform an egg tray grasping operation according to the egg tray grasping posture information includes:
[0092] Based on the egg tray pose data, the egg tray grasping pose information is determined, and the egg tray grasping pose information includes the coordinates of the egg tray grasping point;
[0093] The robotic arm's movement trajectory and the gripper's gripping point coordinates are determined based on the egg tray's pose data and the egg tray's gripping point coordinates.
[0094] The robotic arm is controlled to move according to the robotic arm's movement trajectory, and the egg tray is grasped after the gripper reaches the coordinates of the gripper's grasping point.
[0095] Based on the egg tray pose data, the coordinates of the gripping point are determined. The gripping point can be fixed or flexibly set according to the characteristics of the robotic arm to ensure accurate gripping. The position of the gripping point can be determined based on the specific gripping strategy and the characteristics of the egg tray. Based on the egg tray pose data and the gripping point coordinates, the robotic arm's movement trajectory and the gripper's gripping point coordinates are determined. This includes determining the robotic arm's starting and target positions, as well as the gripper's gripping point coordinates. According to the determined robotic arm movement trajectory, the robotic arm is controlled to move. When the robotic arm's gripper reaches the required gripping point coordinates, the egg tray gripping operation is performed.
[0096] Reference Figure 4 This invention provides a machine vision-based egg tray gripping device, comprising:
[0097] The image acquisition module is used to acquire images of the egg tray in the target area and to filter the images of the egg tray.
[0098] The center point extraction module is used to segment the filtered egg tray image based on a preset segmentation model to obtain the egg region, extract the geometric center point coordinates of the egg region and perform mean processing to obtain the target center point coordinates.
[0099] The pose data calculation module is used to obtain the egg tray pose data based on the coordinates of the target center point.
[0100] The grasping module is used to determine the egg tray grasping posture information based on the egg tray posture data, and control the robotic arm to perform the egg tray grasping operation according to the egg tray grasping posture information.
[0101] This 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 machine vision-based egg tray grasping method described above when the computer program is executed. This electronic device can be a computer or a server, etc.
[0102] In another embodiment of the present invention, a computer-readable storage medium is provided on which a computer program is stored. When the computer program is executed by a processor, it implements the egg tray grasping method based on machine vision as described above.
[0103] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. In this application, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention according to actual needs. Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units can be implemented in hardware or as software functional units.
[0104] While the present invention has been disclosed above, its scope of protection is not limited thereto. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, and all such changes and modifications will fall within the scope of protection of the present invention.
Claims
1. A machine vision-based egg tray grasping method, characterized in that, include: Images of the egg tray in the target area are captured and preprocessed to obtain the initial image of the egg tray; The initial image of the egg tray is segmented based on the HSV segmentation model and connected component algorithm to obtain the egg region. The geometric center coordinates of the egg region are extracted and mean value processing is performed to obtain the target center coordinates. Specifically, the egg region is dilated along a first direction based on the dilation algorithm to obtain a first dilated region. Based on the expansion algorithm, the egg region is expanded along the second direction to obtain a second expanded region, wherein the first direction is perpendicular to the second direction. Perform a bitwise AND operation on the first expansion region and the second expansion region to obtain the target region of the poultry egg; Extract the geometric center coordinates of the target area of the poultry egg as the geometric center coordinates of the poultry egg area; Egg tray pose data are obtained based on the target center point coordinates and egg tray geometric feature data. Use the coordinates of the target center point as the coordinates of the egg tray center point; The egg tray pose data is obtained based on the coordinates of the center point of the egg tray, the height data of the support platform, and the geometric feature data of the egg tray. The target center point coordinates are two-dimensional coordinates. The process of obtaining the egg tray pose data based on the egg tray center point coordinates, platform height data, and egg tray geometric feature data includes: Based on a preset database, obtain geometric feature data of the egg tray and height data of the egg tray support. The geometric feature data of the egg tray includes egg tray shape data, size data and support point data. Based on the coordinates of the center point of the egg tray, the height data of the platform, and the geometric feature data of the egg tray, a three-dimensional transformation of the target center point coordinates is performed to obtain the initial data of the egg tray. Then, the initial data of the egg tray is transformed using the transformation matrix between the camera component coordinate system and the robotic arm coordinate system to obtain the pose data of the egg tray. Based on the egg tray pose data, the egg tray grasping pose information is determined, and the robotic arm is controlled to perform the egg tray grasping operation according to the egg tray grasping pose information.
2. The egg tray grasping method based on machine vision according to claim 1, characterized in that, The initial image of the egg tray is segmented using the HSV segmentation model and connected component algorithm to obtain the egg region, including: Perform HSV transformation on the initial image of the egg tray to obtain the transformed image of the egg tray; The converted image of the egg tray is segmented based on a preset HSV threshold to obtain the connected components of the poultry egg. The egg region is obtained by filtering the connected components of the poultry egg based on a preset connected component threshold.
3. The egg tray grasping method based on machine vision according to claim 1, characterized in that, The step of averaging the coordinates of the geometric center point of the egg region to obtain the target center point coordinates includes: Multiple sets of egg tray images of the target area are acquired, and the geometric center coordinates of the egg area in each set of egg tray images are calculated. The average value of the geometric center coordinates of the egg area in each set of egg tray images is then calculated to obtain the target center coordinates.
4. The egg tray grasping method based on machine vision according to claim 1, characterized in that, The step of determining the egg tray grasping posture information based on the egg tray posture data and controlling the robotic arm to perform the egg tray grasping operation according to the egg tray grasping posture information includes: Based on the egg tray pose data, the egg tray grasping pose information is determined, and the egg tray grasping pose information includes the coordinates of the egg tray grasping point; The robotic arm's movement trajectory and the gripper's gripping point coordinates are determined based on the egg tray's pose data and the egg tray's gripping point coordinates. The robotic arm is controlled to move according to the robotic arm's movement trajectory, and performs the egg tray grabbing operation after the gripper reaches the coordinates of the gripper's grasping point.
5. A machine vision-based egg tray gripping device, characterized in that, include: The image acquisition module is used to capture images of the egg tray in the target area and perform preprocessing to obtain the initial image of the egg tray; The center point extraction module is used to segment the initial image of the egg tray based on the HSV segmentation model and the connected component algorithm to obtain the egg region, extract the geometric center point coordinates of the egg region and perform mean processing to obtain the target center point coordinates; specifically, it includes: performing dilation processing on the egg region along a first direction based on the dilation algorithm to obtain a first dilated region; Based on the expansion algorithm, the egg region is expanded along the second direction to obtain a second expanded region, wherein the first direction is perpendicular to the second direction. Perform a bitwise AND operation on the first expansion region and the second expansion region to obtain the target region of the poultry egg; Extract the geometric center coordinates of the target area of the poultry egg as the geometric center coordinates of the poultry egg area; The pose data calculation module is used to obtain the pose data of the egg tray based on the coordinates of the target center point and the geometric feature data of the egg tray. Use the coordinates of the target center point as the coordinates of the egg tray center point; The egg tray pose data is obtained based on the coordinates of the center point of the egg tray, the height data of the support platform, and the geometric feature data of the egg tray. The target center point coordinates are two-dimensional coordinates. The process of obtaining the egg tray pose data based on the egg tray center point coordinates, platform height data, and egg tray geometric feature data includes: Based on a preset database, obtain geometric feature data of the egg tray and height data of the egg tray support. The geometric feature data of the egg tray includes egg tray shape data, size data and support point data. Based on the coordinates of the center point of the egg tray, the height data of the platform, and the geometric feature data of the egg tray, a three-dimensional transformation of the target center point coordinates is performed to obtain the initial data of the egg tray. Then, the initial data of the egg tray is transformed using the transformation matrix between the camera component coordinate system and the robotic arm coordinate system to obtain the pose data of the egg tray. The grasping module is used to determine the egg tray grasping posture information based on the egg tray posture data, and control the robotic arm to perform the egg tray grasping operation according to the egg tray grasping posture information.
6. An electronic device, characterized in that, Including memory and processor; The memory is used to store computer programs; The processor is configured to implement the machine vision-based egg tray grasping method as described in any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the machine vision-based egg tray grasping method as described in any one of claims 1 to 4.