Method and apparatus for identifying and sorting circular workpieces in a random stack movement

By combining a 3D camera and an improved Canny edge detection algorithm with an industrial robot and a flexible magnetic suction head, the problem of identifying and sorting disordered stacked circular workpieces on a slatted board machine was solved, achieving efficient and safe automated production.

CN116977642BActive Publication Date: 2026-04-10JIANGSU JUNSHANG INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JIANGSU JUNSHANG INTELLIGENT TECH CO LTD
Filing Date
2023-08-03
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing technologies struggle to efficiently identify and sort randomly stacked circular workpieces on slatted machines, especially in complex scenarios with uneven surfaces and random positions, resulting in low recognition rates and safety risks.

Method used

Image data is acquired using a 3D camera, and workpiece features are identified through adaptive filtering and an improved Canny edge detection algorithm. Automatic gripping is achieved by combining an industrial robot and a flexible magnetic suction head, and position compensation is performed using a digital encoder.

Benefits of technology

The workpiece recognition rate was increased from 92.3% to 95.9%, enabling accurate grasping in complex scenarios, meeting the needs of large-scale continuous production, and reducing labor intensity and safety risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116977642B_ABST
    Figure CN116977642B_ABST
Patent Text Reader

Abstract

The application relates to the fields of artificial intelligence and mechanical manufacturing, and provides a recognition and sorting method and device for circular workpieces in disorderly stacking motion, wherein the recognition method comprises the following steps in sequence: model library establishment, data preprocessing and a recognition algorithm, and the recognition algorithm adopts an improved Canny edge detection algorithm, the calculation of the amplitude of a diagonal line direction is added, and the original fixed upper and lower threshold selection is modified into adaptive dynamic threshold selection, so that the recognition rate of workpieces in a production site can be improved from 92.3% to 95.9%.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of artificial intelligence and mechanical manufacturing, in particular to a kind of identification, sorting method and device of circular workpiece of disordered stacking movement. BACKGROUND

[0002] In the traditional mass continuous casting workpiece production, after forming cooling, the workpiece is transported to the working surface by the scale plate machine (similar to the conveyor belt), and then sorted by manual. Since the workpiece has a certain weight, the continuous picking labor intensity is large, and there is a certain safety risk when the workpiece falls by accident. Since the sorting post has high labor intensity, it needs to operate in three shifts, and the labor force is relatively insufficient in China at present, while the labor cost is increasing year by year, so the sorting automation of this post is imperative.

[0003] In recent years, there are many researches in related fields at home and abroad, and various principle and technology based grabbing systems have emerged, including: the product has a fixed position on the conveyor belt, single variety, the product is placed flat or the movement is paused when grabbing, etc. These have solved the problem of product grabbing to some extent and improved the automation degree of production, but there is no example for grabbing the complex scene of multi-variety disordered stacking movement workpiece of scale plate machine, mainly existing the following technical problems:

[0004] The scale plate surface of scale plate machine is not flat, and there are wave-shaped protrusions on it (because the scale plate machine of dozens of meters long has a large slope, the uplink section needs to have wave-shaped protrusions to prevent the workpiece from sliding down), and the workpiece is placed on the protrusions of the scale plate, which will be inclined;

[0005] The position of the workpiece placed on the scale plate is random, and there may be workpiece stacking, and the shape of the workpiece stacking is irregular, which will be inclined;

[0006] There are multiple varieties of workpieces to be sorted in the same scene, and different varieties of workpieces have differences in diameter and thickness.

[0007] Therefore, we propose a kind of grabbing method for disordered stacking movement of circular workpiece. SUMMARY

[0008] (I) Technical problems solved

[0009] In view of the shortcomings of the prior art, the present application provides a kind of identification, sorting method and device of disordered stacking movement of circular workpiece, mainly for the workpiece with circular cross section, overcome the shortcomings of prior art, design is reasonable, recognition rate is high, meet the process requirements of mass, continuous production.

[0010] (II) Technical scheme

[0011] In order to achieve the above object, the present application is realized by the following technical scheme:

[0012] A method for recognizing the disordered stacked movement of circular workpieces, comprising the following steps performed in sequence:

[0013] A model library is established

[0014] Characteristic values of the workpieces under different inclinations are obtained, and a model library is established;

[0015] The characteristic values include diameter, height and structure;

[0016] The characteristic values are obtained as follows: image data information of the workpieces is obtained by 3D camera shooting, and the characteristic values of the workpieces are extracted from the image data information;

[0017] B data preprocessing

[0018] First step, digital filtering

[0019] (1) Adaptive zero removal filtering: after the 3D camera is installed, a standard surface is first set on the working surface, at this time a group of data is obtained by shooting with the 3D camera, the first scanning is performed on the data, and the largest neighborhood and the second largest neighborhood of zero data are adaptively obtained, then the data in the larger rectangular interval than the largest neighborhood and the second largest neighborhood are used respectively, the interpolation operation of non-zero value average is performed on the zero area of the largest neighborhood and other zero areas, and all zero value areas are filled to complete the zero removal filtering;

[0020] (2) Median filtering;

[0021] Second step, data correction

[0022] On the basis of the above digital filtering data, the mean value of the middle area data is used as a standard value, then the standard value is divided by each pixel point to obtain the correction coefficient of each pixel point, and the correction coefficient is saved;

[0023] C recognition algorithm

[0024] First step, data processing

[0025] The real-time data obtained by the 3D camera shooting is first subjected to digital filtering, including adaptive zero removal filtering and median filtering, which is the same as the first step in the data preprocessing step; then the correction coefficient obtained in the second step of the B data preprocessing is used to correct each pixel to obtain the current value; on this basis, Gaussian filtering is further performed to obtain the final current scene height data;

[0026] Second step, improved Canny edge detection algorithm

[0027] Rule 1:

[0028] ,

[0029] Wherein, (i, j) is the coordinate of the pixel point, x, y represent horizontal direction and vertical direction respectively, Cx(i, j) is the differential of the pixel point in horizontal direction, Cy(i, j) is the differential of the pixel point in vertical direction, C(i, j), θ(i, j) are the gradient amplitude and gradient direction of the pixel point (i, j) respectively, f(i, j) is the pixel value of the pixel point with coordinate (i, j).

[0030] Rule 2: Non-maximum suppression

[0031] After the gradient value and the gradient direction are calculated, the image is scanned comprehensively to remove the pixel points that do not constitute the edge; that is, for each pixel, it is checked whether it is the local maximum value in the adjacent pixel points in the gradient direction; if yes, the point is retained, otherwise the point is set to 0.

[0032] Rule 3: Detecting and determining the edge according to the upper and lower thresholds

[0033] If the gradient value of the edge pixel point is greater than the upper threshold, it is considered to be a strong edge point, and the point is set to 1.

[0034] If the gradient value of the edge is less than the upper threshold and greater than the lower threshold, it is marked as a weak edge point, and the point is set to 0.

[0035] And the edge pixel point between the upper and lower thresholds is a pending edge, if it is connected with the strong edge, it is considered to be a valid edge, the point is set to 1, otherwise it is set to 0, to obtain a complete edge image.

[0036] Third step, workpiece and distribution identification

[0037] The calculation formula of the circle is used ,

[0038] The edge image obtained in the second step of the C identification algorithm is scanned, the coordinates and radius of all possible circles are calculated, and then all possible circles are obtained according to the radius value and the number of pixel points, as candidate workpiece positions, to determine the actual distribution of the workpiece, wherein as the candidate workpiece position, when there are concentric circles, the circle with the largest radius is retained, and the rest is deleted.

[0039] Fourth step, according to the distribution and number of edge point pixels, the upper and lower thresholds are adaptively and dynamically selected, the lower threshold selection range is 1~7, and the upper threshold selection range is 5~12, to obtain the best edge.

[0040] Further, in the C recognition algorithm, the fourth step is to perform adaptive dynamic selection of upper and lower thresholds once a day according to the distribution and quantity of edge point pixels, and the specific method is as follows: place the workpiece on the scale board machine, make the scale board machine move, continuously shoot 5 images, then in the selection range of upper and lower thresholds, use double loops to traverse all upper and lower threshold combinations, run the first step, the second step and the third step of the C recognition algorithm to obtain recognition data, and then select the best upper and lower thresholds according to the maximum ratio of the pixel points of the circular edge (the value must be greater than a given value) to other edge points, and the fourth step is not needed in normal production recognition.

[0041] A sorting method of circular workpieces in disordered stacking motion, characterized in that:

[0042] First, the workpiece is identified by the above-mentioned identification method, then the most suitable workpiece is determined according to the actual distribution of the workpiece and the maximum ratio of the pixel points of the workpiece to the radius, and the best grabbing point is determined according to the height data and the distribution of the surrounding workpieces and the sprue.

[0043] A sorting device of circular workpieces in disordered stacking motion, which is used to perform the above-mentioned sorting method, characterized in that: the device mainly consists of a 3D camera, an industrial control computer (referred to as an industrial computer), an image recognition module, an industrial robot, a flexible magnetic suction head and a digital encoder.

[0044] The 3D camera is connected with the industrial control computer through network lines, and under the control of the industrial control computer, it shoots real-time 3D images of the workpieces in motion on the scale board machine, and transmits the data to the industrial control computer through the network.

[0045] The industrial control computer is connected with the 3D camera and the industrial robot through network lines, and connected with the digital encoder through a dedicated cable, and the industrial control computer can monitor real-time images and control conditions through its display screen, keyboard and mouse, etc., and carry out man-machine dialogue.

[0046] The image recognition module first uses prior knowledge to pre-learn all workpieces to build a model library, and when running, it starts the shooting of the 3D camera through the network line, receives the three-dimensional image information sent by the 3D camera, then analyzes and processes the three-dimensional image signal combined with the knowledge of the model library to obtain the plane position coordinates and height of the best workpiece to be grabbed in the current scene, where the best has two meanings, one is to find a workpiece most suitable for grabbing in the scene of multiple workpieces, and the other is to find the most favorable grabbing position of the suitable workpiece, and finally the position and height data are transmitted to the industrial robot through the network line.

[0047] The industrial robot, on its mechanical arm, is equipped with the flexible magnetic suction head, after receiving the position and height data transmitted from the network cable, the industrial robot moves to the specified position and height, uses the flexible magnetic suction head to grab / absorb the corresponding workpiece, and releases at the specified position;

[0048] The digital encoder converts the rotating speed of the motor into the number of pulses, and uses the number of pulses given by the digital encoder to multiply a given coefficient to obtain the forward distance of the workpiece during the operation of the image recognition module to identify the algorithm, as the position compensation of the flexible magnetic suction head to grab / absorb the corresponding workpiece.

[0049] (Three) beneficial effects

[0050] The application provides a kind of identification and grabbing method of circular workpiece of disorder stacking movement, with the following beneficial effects:

[0051] (1) through the analysis and processing operation of 3D camera shooting and identification module, the best grabbing point plane position coordinate and height data most suitable for grabbing workpiece in the current scene can be obtained in motion, thereby providing reliable guarantee for accurate grabbing;

[0052] (2) overcome the shortcomings that products can only be fixed position, single variety, product flat or paused motion when grabbing, the application can accurately identify workpiece under the background of product stacking, disorder and wavy scale plate machine;

[0053] (3) through the improvement of rule 1 in the second step of the C identification algorithm and the implementation of the dynamic selection of adaptive upper and lower threshold in the fourth step, the identification rate of workpiece in production site can be improved from 92.3% to 95.9%;

[0054] (4) using industrial robot and flexible magnetic suction head, under the instruction of industrial computer, plus the compensation information of digital encoder, the specified workpiece can be accurately and reliably grabbed, which meets the process requirements of mass production and continuous production. BRIEF DESCRIPTION OF DRAWINGS

[0055] Figure 1 is the system function module block diagram of the application.

[0056] Figure 2 is the original image and edge detection result image of the canny classic algorithm under the conventional scene.

[0057] Figure 3 is the original image and edge detection result image of the canny improved algorithm of the application under the same scene as Figure 2

[0058] Figure 4 is the original image and edge detection result image of the canny classic algorithm under the scene with strong reflection.​

[0059] Figure 5 is the same scene as Figure 2 The original image and the edge detection result image of the improved Canny algorithm of the application in the same scene.

[0060] In the figure: 101-image intelligent recognition module, 102-3D camera, 103-industrial control computer, 104-digital encoder, 105-industrial robot, 106-flexible magnetic suction head. DETAILED DESCRIPTION

[0061] In order to make the purpose, technical scheme and advantages of the embodiments of the application clearer, the technical scheme in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are part of the embodiments of the application, rather than all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the application.

[0062] Embodiment 1

[0063] A method for recognizing circular workpieces in disordered stacking motion, comprising the following steps performed in sequence:

[0064] A model library is established

[0065] Characteristic values of the workpieces under different inclinations are obtained and a model library is established, specifically from 0° to 30°, every 5°, characteristic values of the workpieces are obtained and a model library is established;

[0066] The characteristic values include diameter, height and structure;

[0067] The characteristic values are obtained as follows: image data information of the workpieces is obtained by photographing with a 3D camera, and the characteristic values of the workpieces are extracted from the image data information;

[0068] During the conveying process of the workpieces by the scale plate machine, the workpieces are mixed with sprues. The sprues are slender rollers, and the diameter thereof is much smaller than that of the workpieces. Even if a certain workpiece is covered by a sprue by less than 1 / 6, it can still be recognized. Because the complete curve is not required during recognition, a certain pixel point on the circumference is recognized to determine a circle. Therefore, during the process of establishing the model library, the sprue characteristics are not modeled.

[0069] B data preprocessing

[0070] Due to the specific shooting principle of 3D camera and the installation level, etc., the height data obtained by the camera shooting exists the situation that the local data is zero and the height data of the periphery and the middle is inconsistent under the same height condition. Therefore, the data needs to be filtered and corrected. This is a unique problem of 3D camera data. If the problem is not handled well, the subsequent recognition problem will be out of the question. The specific algorithm is as follows:

[0071] First step, digital filtering

[0072] (1) Adaptive zero filtering. The distance in the actual shooting data cannot be zero, so the zero data is all error data. After the 3D camera is installed, a standard surface is set on the working surface. Specifically, a non-reflective flat plate is used to calibrate the shooting area of the camera. At this time, a set of data is obtained by shooting with the 3D camera. The first scanning is performed on the data to adaptively obtain the largest neighborhood and the second largest neighborhood of the zero data. Then, the long rectangular interval data larger than the largest neighborhood and the second largest neighborhood are used to perform non-zero value average interpolation operation on the zero area of the largest neighborhood and other zero areas, to fill all zero value areas and complete the zero filtering.

[0073] Among them, the non-zero value average interpolation operation is to obtain the average value of all non-zero values in the rectangular area, and then replace all zero values in the area with the average value.

[0074] (2) Median filtering to eliminate data disturbance.

[0075] Second step, data correction

[0076] A standard surface is set on the working surface, and a set of data is obtained by shooting with the 3D camera. Theoretically, the data at this time should be consistent, but due to various influences, in fact, they are not completely the same, and the height data difference between the periphery and the middle is also relatively large. On the basis of the above digital filtering data, the average value of the 10*10 area data in the middle is used as a standard value. Then, the standard value is divided by each pixel point to obtain the correction coefficient of each pixel point and is saved.

[0077] C recognition algorithm

[0078] First step, data processing

[0079] The real-time data obtained by the 3D camera shooting is first subjected to digital filtering, including adaptive zero filtering and median filtering, as in the first step of the data preprocessing step. Then, the correction coefficient obtained in the second step of the B data preprocessing is used to correct each pixel to obtain the current value. On this basis, Gaussian filtering is further performed to obtain the final current scene height data.

[0080] Second step, improved Canny edge detection algorithm

[0081] (The conventional Canny algorithm usually uses a gray scale image to detect edges to obtain an edge image. In the present algorithm, edges of a target are directly detected using height data, and then improved Canny edge detection is performed on the data based on the data processing of the first step of the C recognition algorithm.)

[0082] Since the workpiece is inclined on the working surface and some workpieces have circular arc edges, the original Canny edge detection algorithm has certain deficiencies in calculating the amplitude in the up-down and left-right directions and using fixed up-down thresholds to detect edges, which may result in certain missed detection or over-detection. Therefore, the Canny edge detection algorithm of the present application increases the calculation of the amplitude in the diagonal direction and modifies the original fixed up-down thresholds to adaptively select dynamic thresholds. The improved algorithm is described as follows:

[0083] Rule 1: ,

[0084] wherein (i, j) is the coordinate of a pixel point, x and y represent the horizontal direction and the vertical direction respectively, Cx(i, j) is the differential in the horizontal direction of the pixel point, Cy(i, j) is the differential in the vertical direction of the pixel point, C(i, j) and θ(i, j) are the gradient amplitude and the gradient direction of the pixel point (i, j) respectively, and f(i, j) is the pixel value of the pixel point (i, j).

[0085] Rule 2: Non-maximum suppression

[0086] After the gradient value and the gradient direction are calculated, the image is comprehensively scanned to remove the pixel points that do not constitute edges; that is, for each pixel, it is checked whether it is the local maximum value among the adjacent pixel points in the gradient direction; if yes, the point is retained, otherwise the point is set to 0;

[0087] Rule 3: Detecting and determining edges according to the up-down thresholds

[0088] If the gradient value of the edge pixel point is greater than the upper threshold, it is considered to be a strong edge point, and the point is set to 1;

[0089] If the gradient value of the edge is less than the upper threshold and greater than the lower threshold, it is marked as a weak edge point, and the point is set to 0;

[0090] The edge pixel point between the upper and lower thresholds is a pending edge, which is considered to be a valid edge if it is connected with a strong edge, and the point is set to 1, otherwise it is set to 0 to obtain a complete edge image;

[0091] Third step, workpiece and distribution recognition

[0092] Using the calculation formula of a circle ,

[0093] The edge image obtained in the second step of the C recognition algorithm is scanned, the coordinates and radius of all possible circles are calculated, and then the candidate workpiece positions are obtained according to the radius value and the number of pixel points, so as to determine the actual distribution of the workpieces, wherein, as the candidate workpiece position, the circle with the largest radius is retained when there are concentric circles, and the rest are deleted.

[0094] In the fourth step, the upper and lower thresholds are adaptively and dynamically selected according to the distribution and number of edge point pixels, the lower threshold is selected in the range of 1-7, and the upper threshold is selected in the range of 5-12, so as to obtain the best edge.

[0095] In the C recognition algorithm, in the fourth step, according to the distribution and number of edge point pixels, due to the changes of floating dust, temperature and humidity and other conditions in the production site, the data of the 3D camera will have a certain influence, in order to more correctly identify the workpieces, the adaptive and dynamic selection of the upper and lower thresholds is performed once a day, and the specific method is as follows: the workpieces are placed on the scale board machine, the scale board machine is moved, and 5 images are continuously shot, then in the selection range of the upper and lower thresholds, all combinations of the upper and lower thresholds are traversed by using double loops, the first step, the second step and the third step of the C recognition algorithm are run to obtain the recognition data, and then the best upper and lower thresholds are selected according to the maximum ratio of the circular edge pixel point (the value must be greater than a given value) to other edge points. In normal production identification, the fourth step does not need to be run.

[0096] Example 2

[0097] A sorting method of circular workpieces in disordered stacking motion

[0098] First, the workpieces are identified by using the above-mentioned identification method, then according to the actual distribution of the workpieces, the workpieces in the front half area of the motion direction are preferentially considered, and the workpiece with the largest ratio of pixel point to radius is determined as the most suitable workpiece for grabbing, and then according to the height data and the distribution of the surrounding workpieces and the sprue (generally, the highest point of the workpiece is taken as the grabbing center point, but the height of other workpieces or sprues near the workpiece may be higher than the height of the grabbing point, so the flexible magnetic suction head will be hit if directly grabbed, therefore, it needs to be retracted to avoid), the best grabbing point is determined.

[0099] The industrial control computer (203) is a high-reliability computer suitable for use in an industrial environment, which is composed of a host computer, a display screen, a network card, a motion signal input card, a keyboard, a mouse and the like. The industrial control computer (203) is connected with the 3D camera (202) and the industrial robot (205) through a network cable, and is connected with the digital encoder (204) through a dedicated cable. A technician can monitor real-time images and control conditions through the display screen, keyboard and mouse of the industrial control computer (203), and can perform human-computer dialogue. The industrial control computer (203) can also statistically store real-time working conditions and the number of workpieces extracted. The image intelligent recognition module (201) is installed in the industrial control computer (203), and the entire system can be continuously operated for 24 hours without interruption.

[0100] The image intelligent recognition module (201) is the most important part of the present application. All work of the present application is performed under the coordination of the image intelligent recognition module (201). Since the workpieces targeted by the present application are round castings, including iron ring type, middle convex or concave type, and the diameters vary greatly, there are more than one hundred types. Therefore, on the basis of analyzing the actual distribution of all workpiece types on the scale machine in production, first, the related workpiece type data is preprocessed to obtain the corresponding model library. In actual operation, the 3D camera (202) is started to shoot 3D images at a certain rhythm, and receives the data information of the images, then performs multiple digital filtering, including special filtering for 3D camera data, and then processes according to the mathematical model and the pre-built model library to obtain the distribution and height data of the workpieces in the current scene. Finally, comparison and optimization analysis are performed to obtain the plane position coordinates and height data of the most suitable workpiece grabbing and the best grabbing point in the current scene, and the data is transmitted to the industrial robot (205).

[0101] The 3D camera (202) is a camera that can obtain 3D digital signals after shooting. The 3D camera (202) is connected with the industrial control computer (203) through a network cable, and shoots 3D digital images of the real-time scene of the scale machine in the field at a rhythm under the control of the industrial control computer (203), and transmits the data to the industrial control computer (203) through the network. Since the height data precision of the 3D camera (202) is not very high, and is affected by the certain direction slope of the background surface, the height of the camera installation should be appropriate, which can ensure the actual precision and have a certain shooting range, and the obtained height data should be subjected to specific digital filtering.

[0102] The industrial robot (205) is a digital actuator that can quickly and accurately perform corresponding operations. The industrial robot (205) is connected to the industrial control computer (203) through a network cable, and the flexible magnetic suction head (206) is installed at the front end of the mechanical arm thereof. After receiving the position and height data transmitted from the network cable, the flexible magnetic suction head (206) quickly and accurately moves to the specified position and height, uses the flexible magnetic suction head (206) to grab (suck) the corresponding workpiece, and then lifts the flexible magnetic suction head (206) to move to the specified position to release the workpiece.

[0103] The flexible magnetic suction head (206) is a self-designed flexible magnetic grabbing tool. Since the workpieces targeted by the present application are all round cast iron pieces, some of which are ring-shaped, some of which are convex or concave in the middle, some of which have large diameter variations, and there are more than one hundred varieties, the weight difference is also large, and the form is various, so it is difficult to use a general gripper to grab, and the success rate is low. In view of the characteristics that the workpieces are cast iron pieces, the present application designs the flexible magnetic suction head (206) by itself, which is a cuboid metal tool with a metal shell and an internal permanent magnet that can move up and down. The flexible magnetic suction head (206) is installed at the front end of the mechanical arm of the industrial robot (205), and the up-down movement of the magnet is controlled by a cylinder during work. When the cylinder is not in action, the magnet is at the lowest end of the flexible magnetic suction head (206) and can grab (suck) the corresponding workpiece. When moving to the release area, the cylinder is controlled to work, and the magnet is lifted, and the workpiece is blocked outside the metal shell of the flexible magnetic suction head (206). At this time, the suction force becomes very small and is not enough to suck the workpiece, so the workpiece is released. At the same time, in order to avoid hard contact as much as possible when grabbing the workpiece, improve the suction force, and slow down the damage of the flexible magnetic suction head (206), springs and other devices are installed on the flexible magnetic suction head (206) to make it have a certain flexibility and improve the reliability.

[0104] The digital encoder (204) is a digital device that can convert the rotating speed of the motor into pulses. A certain number of pulses represents a certain rotating speed, so that the distance moved by the object on the scale machine in a corresponding time period can be obtained by multiplying the number of pulses by a fixed coefficient. The digital encoder (204) is connected to the motion control card of the industrial control computer (203) through a dedicated cable, and the pulse signal is read by the industrial control computer (203) as needed. The operation of the image intelligent recognition module (201) requires time. From the time when the 3D camera (202) takes the on-site image to the time when the plane position coordinates and height of the best grabbing point most suitable for grabbing the workpiece are identified, there is a time difference. During this period, all the scene positions in the image have moved a distance. Since the scale machine cannot move completely uniformly during movement, therefore, even if the time interval is known, the displacement cannot be accurately determined. Therefore, at this time, the displacement can be obtained by multiplying the number of pulses of the digital encoder (204) during this period by a given coefficient, and then adding the displacement in the direction of movement to obtain the real position of the industrial robot (205) when it is executed.

[0105] Comparison of recognition rates

[0106] In order to meet the actual needs of production and improve the operation speed, the algorithm compresses the original image to half during operation, and then performs partition processing. Each image is divided into 5 regions. In order to prevent the identification of the workpiece on the edge of the partition region, the data of each region has a certain overlap.

[0107] I. Example 1

[0108] In this example, the threshold value of the improved canny algorithm is 2, and the upper threshold value is 10. The threshold value of the classic canny algorithm is fixed, and the lower threshold value is 3 and the upper threshold value is 7.

[0109] The following is the actual running result: z11 is the original algorithm, and z12 is the improved algorithm.

[0110] z11 DIJR33= 65 55 31 25 1 105 84 204 30 1 108 204 91 38 1 114 198 246 38 1 133 122 187 35 1

[0111] z12 DIJR33= 64 55 26 30 1 112 84 204 30 1 102 204 91 38 1 114 198 246 38 1 141 122 187 35 1

[0112] The meaning of each column (from left to right) of the data result is:

[0113] The pixel point on the edge of a certain circle is recognized;

[0114] X: longitudinal axis coordinate;

[0115] Y: horizontal axis coordinate;

[0116] Circle radius;

[0117] Whether a circle is recognized, 1 means yes, 0 means no.

[0118] Example 1 is a conventional scene, the reflection is not serious, and there is no other interference. From Figure 2 , Figure 3 It can be seen that the two ways of recognition all recognize five workpieces, and the coordinates and radii are also close. However, careful observation shows that the workpiece in the upper left corner, Figure 2 is different from Figure 3 in the y-axis and radius. It is analyzed that Figure 2 has an error because the radius should be 30. It can also be seen from the original drawing that the y-axis 52 (2*26) is also closer to the actual value, indicating that the classical algorithm has a certain error in this case.

[0119] II. Example 2 illustrates

[0120] In this example, the threshold value of the improved canny algorithm is 5, and the upper threshold value is 11; the threshold value of the classical canny algorithm is fixed, and the lower threshold value is 3 and the upper threshold value is 7.

[0121] z11 DIJR33= 77 108 156 24 1 127 64 226 36 1 82 151 145 47 1 80 182 264 31 1 78 103 193 45 1

[0122] z12 DIJR33= 64 109 156 24 1 107 64 226 36 1 67 198 128 25 1 66 180 264 33 1 65 104 193 45 0

[0123] The meaning of each column (from left to right) of the data result is as follows:

[0124] Recognize a pixel point on the edge of a certain circle;

[0125] X: vertical axis coordinate;

[0126] Y: horizontal axis coordinate;

[0127] Circle radius;

[0128] Whether a circle is recognized, 1 means yes, 0 means no.

[0129] Example 2 is a situation where the reflection is relatively strong, which can be considered as a serious interference, so the image is not clear enough. In this case, from Figure 4 and Figure 5 It can be seen that the first, second, and fourth positions of the two algorithms all recognize the workpieces well, and the data is basically consistent. However, at the third position, the classical algorithm does not recognize the correct workpiece, and the position it gives is obviously without a workpiece, which is a misjudgment. However, the improved algorithm correctly recognizes the workpiece x: 198, y: 128 near the lower edge. For the fifth position, neither of the two algorithms recognizes the accurate workpiece position, but the classical algorithm gives an incorrect position, while the improved algorithm gives a sign of non-recognition, which is mainly because the classical algorithm gets more pixels on the edge of the circle, thus making a wrong judgment.

[0130] III. Overall recognition rate

[0131] The 10-day 10-site random actual images were tested, and the specific test results are shown in Table 1. As can be seen from Table 1, the recognition rate of the improved algorithm is 3.6% higher than that of the classic algorithm, indicating that the improved canny algorithm is higher than the classic canny algorithm in the recognition rate of the workpiece during the movement of the scale plate machine.

[0132] Table 1. Comparison of recognition rates of improved canny algorithm and classic canny algorithm

[0133] Algorithm Image Workpieces to be identified (pcs) Workpieces actually identified (pcs) Percentage (%) Classic canny 100 418 386 92.3 Improved canny 100 418 401 95.9

[0134] It should be noted that, in this document, relational terms such as first and second and the like can be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0135] The above embodiments are only used to illustrate the technical solutions of the present application, rather than limit the present application; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for identifying disordered stacked motion of circular workpieces, comprising the following steps in sequence: A. Establishing a model library Obtaining characteristic values of the workpieces at different inclinations and establishing a model library; The characteristic values include diameter, height and structure; The characteristic values are obtained as follows: image data information of the workpieces is obtained by photographing with a 3D camera, and the characteristic values of the workpieces are extracted from the image data information; B. Data preprocessing First step, digital filtering (1) Adaptive zero removal filtering: after the 3D camera is installed, a standard surface is set on the working surface, at this time a group of data is obtained by photographing with the 3D camera, the first scanning is performed on the data, and the largest neighborhood and the second largest neighborhood of the zero data are adaptively obtained, then the data in the rectangular interval larger than the largest neighborhood and the second largest neighborhood are used respectively to perform interpolation operation of average of non-zero values for the zero area of the largest neighborhood and other zero areas, and all zero value areas are filled to complete the zero removal filtering; (2) Median filtering; Second step, data correction On the basis of the first step of processing data, the average value of the middle area data is taken as a standard value, then the standard value is divided by each pixel point to obtain a correction coefficient of each pixel point, and is saved; C. Recognition algorithm First step, data processing For the real-time data obtained by the 3D camera, first, digital filtering is performed, including adaptive zero filtering and median filtering, which is the same as the first step in the data preprocessing; then, the correction coefficient obtained in the second step of the B data preprocessing is used to correct each pixel to obtain a current value; On this basis, Gaussian filtering is further performed to obtain the final current scene height data; Second step, improved Canny edge detection algorithm Rule 1: , Wherein, (i, j) is the coordinate of the pixel point, x and y respectively represent the horizontal direction and the vertical direction, Cx(i, j) is the difference in the horizontal direction of the pixel point, Cy(i, j) is the difference in the vertical direction of the pixel point, C(i, j) and θ(i, j) are respectively the gradient amplitude and the gradient direction of the pixel point (i, j), and f(i, j) is the pixel value of the pixel point at coordinate (i, j); Rule 2: Non-maximum suppression After the gradient value and the gradient direction are calculated, the image is comprehensively scanned to remove the pixel points that do not constitute an edge; that is, for each pixel, it is checked whether it is the local maximum value among the adjacent pixel points in the gradient direction; if yes, the point is retained, otherwise the point is set to 0; Rule 3: detecting and determining the edge according to the upper and lower thresholds If the gradient value of the edge pixel point is greater than the upper threshold, it is considered as a strong edge point, and the point is set to 1; If the edge gradient value is less than the upper threshold and greater than the lower threshold, it is marked as a weak edge point, and the point is set to 0; And the edge pixel point between the upper and lower thresholds is a pending edge, if it is connected with a strong edge, it is considered as an effective edge, and the point is set to 1, otherwise it is set to 0 to obtain a complete edge image; Third step, workpiece and distribution identification Using the formula for a circle , The edge image obtained by the C recognition algorithm in the second step is traversed and scanned, the coordinates and radius of all possible circles are calculated, then the candidate workpiece positions are obtained according to the radius value and the number of pixel points, and the actual distribution of the workpieces is determined, wherein, as a candidate workpiece position, when there are concentric circles, the circle with the largest radius is retained, and the rest are deleted. Fourth step, according to the edge point pixel distribution and quantity, adaptive dynamic selection of upper and lower threshold, the lower threshold selection range is 1~7, the upper threshold selection range is 5~12, so as to obtain the best edge.

2. A method of identifying out-of-sequence stacked motion of circular workpieces as claimed in claim 1, wherein: In the C recognition algorithm, the fourth step, according to the edge point pixel distribution and quantity, the adaptive dynamic selection of upper and lower threshold is carried out once a day, and the specific method is as follows: place the workpiece on the scale board machine, make the scale board machine move, continuously shoot 5 images, then in the selection range of upper and lower threshold, use double loop to traverse all upper and lower threshold combinations, run the first step, the second step and the third step of the C recognition algorithm to obtain the recognition data, then according to the maximum ratio of the circular edge pixel point to other edge points, the best upper and lower threshold is selected, and the fourth step is not needed to run in normal production recognition.

3. A sorting method of circular workpieces in disordered stack motion, characterized in that: First, the recognition method of claim 1 is used to recognize the workpieces, then according to the actual distribution of the workpieces, considering the maximum ratio of the pixel point of the workpiece to the radius, the most suitable workpiece for grabbing is determined, and then according to the height data and the distribution of the surrounding workpieces and the sprue, the best grabbing point is determined.

4. A singling device for singling out circular workpieces in a disorderly stack movement, the singling device being for carrying out the singling method as claimed in claim 3, characterized in that: The device mainly comprises a 3D camera, an industrial control computer, an image recognition module, an industrial robot, a flexible magnetic suction head and a digital encoder; The 3D camera is connected with the industrial control computer through network line, and under the control of the industrial control computer, it shoots real-time 3D images of workpieces in motion on the scale board machine, and transmits data to the industrial control computer through network; The industrial control computer is connected with the 3D camera and the industrial robot through network line, and connected with the digital encoder through special cable, and the industrial control computer can monitor real-time images and control conditions through its display screen, keyboard and mouse, and carry out man-machine dialogue; The image recognition module first uses prior knowledge to pre-learn all workpieces to build a model library, starts the shooting of the 3D camera through network line during running, receives three-dimensional image information sent by the 3D camera, then analyzes and processes the three-dimensional image signal combined with the knowledge of the model library to obtain the plane position coordinates and height of the best workpiece to be grabbed in the current scene, where the best has two meanings, one is to find a workpiece most suitable for grabbing in the scene of multiple workpieces, and the other is to find the most favorable grabbing position of the suitable workpiece, and finally the position and height data are transmitted to the industrial robot through network line; The industrial robot is provided with the flexible magnetic suction head on its mechanical arm, after receiving the position and height data transmitted from the network line, the industrial robot moves to the specified position and height, uses the flexible magnetic suction head to grab / suck the corresponding workpiece, and releases it at the specified position; The digital encoder converts the rotating speed of the motor into pulse number, and uses the pulse number given by the digital encoder multiplied by a given coefficient to obtain the forward distance of the workpiece during the running of the image recognition module recognition algorithm, as the position compensation of the flexible magnetic suction head grabbing / sucking the corresponding workpiece.

Citation Information

Patent Citations

  • Improved Canny-based automatic threshold edge detection method

    CN108109155A

  • Power plant instrument image detection and identification method and device

    CN111723821A