Visual positioning method and device for seed slots of degradable pallets used in automated production lines
By constructing the lighting abnormality score and correction depth value in the binocular visual positioning system, the problem of excessive light affecting positioning accuracy is solved, and high-precision visual positioning of the degradable pallet grooves on the automated production line is achieved.
Patent Information
- Application Number
- CN202411560251.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-04
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-11-04
AI Technical Summary
In the binocular visual positioning system, due to excessive light illumination, the shape of the trough and the edge clarity decrease, which in turn affects the accuracy of the calculation of depth value information and reduces the positioning accuracy.
By collecting the left image of the pallet, the right image of the pallet and the stereoscopic result matching diagram, the local edge lines are obtained using the edge detection algorithm, the edge clarity and edge regularity coefficient of the trench are calculated, the lighting abnormality score is constructed, and the depth value is corrected according to the correction index, and the accurate visual positioning of the trench of the degradable trench is finally achieved.
It improves the accuracy of visual positioning of the degradable pallets on the automated production line, reduces the need for manual intervention, and reduces material losses caused by inaccurate positioning.
Smart Images

Figure CN119494879B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of visual positioning technology, and in particular to a method and device for visual positioning of a seed slot of a degradable pallet used in an automated production line. Background Art
[0002] In the automated production line, the seed slot positioning of the biodegradable pallet is an important link, which involves the precise placement of the pallet and the efficient transportation of materials. The realization of this positioning depends on advanced automated logistics systems, precise mechanical design and efficient visual recognition technology, especially the application of binocular vision positioning system. The binocular vision positioning system can accurately obtain the spatial relationship between the pallet and the seed slot by using two cameras to simultaneously capture the image of the pallet seed slot. This system analyzes the depth value information in the image and calculates the three-dimensional position and posture of the seed slot in real time, thereby providing accurate data support for the automatic alignment of the pallet. This highly automated positioning method not only improves production efficiency and reduces the need for manual intervention, but also reduces material loss caused by inaccurate positioning.
[0003] In the process of positioning the seed slots of biodegradable pallets in an automated production line using a binocular vision algorithm, the existing technology causes the shape of the seed slots to change and the edge clarity to decrease due to the influence of excessive light, which in turn leads to inaccurate calculation of depth value information and affects positioning accuracy. Summary of the invention
[0004] In order to solve the above technical problems, the purpose of this application is to provide a visual positioning method and device for a biodegradable pallet seed slot for an automated production line. The technical solutions adopted are as follows:
[0005] In a first aspect, an embodiment of the present application provides a visual positioning method for a biodegradable pallet seed slot for an automated production line, the method comprising the following steps:
[0006] Collecting a left image of each degradable pallet, a right image of each pallet, and a stereo result matching image; the stereo result matching image includes a disparity value and a depth value of each pixel point;
[0007] Use edge detection algorithm to obtain each local edge line in the edge image of the left image of the pallet and the right image of the pallet;
[0008] Based on the gradient of the grayscale value of the pixel points of the local edge line and the difference between the gradients, the edge clarity of the seed groove of each local edge line of each edge image is obtained;
[0009] Based on the difference between the disparity values of the pixel points, the edge regularization coefficient of the stereo result matching image is obtained;
[0010] Obtain the illumination anomaly score of the stereo result matching image based on the seed groove edge clarity and edge regularity coefficient;
[0011] The stereo result matching graph with a lighting anomaly score greater than or equal to a preset normal threshold is used as the stereo result matching graph of the biodegradable tray with abnormal seed slot positioning;
[0012] Based on the depth values of the pixel points and the differences between the depth values, the abnormality degree of the depth values of the stereo result matching image of the biodegradable tray with abnormal seed slot positioning is obtained;
[0013] Obtaining abnormal depth value pixel points of the stereo result matching image of the biodegradable tray with abnormal seed slot positioning based on the magnitude of the abnormal depth value;
[0014] Obtaining a correction index for abnormal depth value pixels based on abnormal illumination scores and abnormal depth value pixels;
[0015] The depth values of the pixels of the stereo result matching image are corrected based on the correction index, and the seed slots of the degradable pallet are visually positioned according to the depth values of the corrected pixels.
[0016] Furthermore, the method for obtaining each local edge line is:
[0017] Use edge detection algorithm to obtain edge images of the left and right images of the pallet;
[0018] For each edge image, the edge lines in the edge image are evenly divided into a preset number of local edge lines.
[0019] Furthermore, the method for obtaining the edge clarity of the seed groove is:
[0020] For each edge image, the sum of the gradient values of the grayscale values of the pixel points on each local edge line in the edge image is calculated as the first sum, the mean of the first sums of all local edge lines in the edge image is calculated, the difference between the maximum and minimum values of the first sums of all local edge lines is calculated, and the ratio between the mean and the difference is used as the seed groove edge clarity of each edge image.
[0021] Furthermore, the method for obtaining the edge warping coefficient is:
[0022] For each pixel in the stereo result matching image, the absolute value of the difference between the disparity values of the pixel and other pixels in its eight neighborhoods is calculated, and the average of all the absolute values of the difference of the pixel is calculated as the adjacent disparity difference of each pixel;
[0023] The mean of adjacent disparity differences of all pixels in the stereo result matching image is calculated as a first mean, a difference result between the maximum value and the minimum value of the disparity values of all pixels is calculated, and a ratio between the first mean and the difference result is calculated as an edge regularization coefficient of the stereo result matching image.
[0024] Furthermore, the method for obtaining the illumination anomaly score is:
[0025] Calculate the average of the edge clarity of all edge images as the comprehensive clarity of the stereo result matching image;
[0026] The product of the comprehensive clarity and edge regularization coefficient of the stereo result matching image is calculated as the illumination anomaly score of the stereo result matching image.
[0027] Furthermore, the method for obtaining the abnormality degree of the depth value is:
[0028] For each pixel point in the stereo result matching image of the biodegradable tray with abnormal seed slot positioning, a neighborhood window of preset size is constructed; the constructed neighborhood window is divided into four sub-neighborhood windows according to the upper left corner, the upper right corner, the lower right corner, and the lower left corner;
[0029] The calculation formula of the abnormal degree of the depth value is: Where, X i is the abnormality of the depth value of the i-th pixel in the stereo result matching image; p i is the depth value of the i-th pixel in the stereo result matching image, is the mean depth value of all pixels in the neighborhood window of the i-th pixel in the stereo result matching image, p i,n It represents the mean of the depth values of all pixels in the nth sub-neighborhood window within the window constructed for the i-th pixel, N represents the number of neighborhood windows, max represents the maximum value function, and min represents the minimum value function.
[0030] Furthermore, the method for obtaining the abnormal depth value pixel point is:
[0031] For each pixel point in the stereo result matching image, when the abnormal degree of the depth value of the pixel point is greater than or equal to the preset depth value threshold, the pixel point is regarded as a pixel point with abnormal depth value.
[0032] Furthermore, the method for obtaining the correction index is: for each abnormal depth value pixel in the stereo result matching image, the product of the depth value abnormality degree of the abnormal depth value pixel and the illumination abnormality score of the stereo result matching image is calculated as the correction index for each abnormal depth value pixel in the stereo result matching image.
[0033] Furthermore, the depth value of the pixel point of the stereo result matching image is corrected based on the correction index, and the calculation formula is: h ′=τ h ×p h ; In the formula, p h ′ represents the depth value of the hth abnormal pixel after correction; τ his the correction index of the hth abnormal depth value pixel in the stereo result matching image, p h is the depth value of the hth pixel with abnormal depth value in the stereo result matching image.
[0034] In a second aspect, an embodiment of the present application further provides a visual positioning device for a biodegradable pallet seed slot for an automated production line, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of any one of the above-mentioned methods when executing the computer program.
[0035] This application has at least the following beneficial effects:
[0036] The present application obtains a tray drawing, a tray right image and a stereo result matching image of a degradable tray, obtains the seed slot edge clarity based on the gradient difference in the grayscale values of the pixels in the tray left image and the tray right image, and reflects the clarity of the seed slot edge in the image; obtains the edge regularity coefficient based on the difference between the parallax values of the pixels in the stereo result matching image, and reflects the regularity of the seed slot edge in the image; in order to reflect the influence of illumination on the clarity and regularity of the seed slot edge, a lighting anomaly score is constructed, and then the depth values of the pixels with abnormal seed slot positioning are corrected, and visual positioning is performed based on the corrected depth values.
[0037] The present application uses a binocular vision algorithm to obtain a stereo result of the seed slot, and then makes an abnormal judgment on the pixel points in the matching image, and then corrects it, thereby improving the visual positioning accuracy of the seed slot of the degradable pallet in the automated production line, reducing the need for manual intervention, and reducing material loss caused by inaccurate positioning. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0039] Figure 1 A flowchart of the steps of a method for visually locating a seed slot of a degradable pallet for an automated production line provided in one embodiment of the present application;
[0040] Figure 2 An edge line segmentation diagram provided by an embodiment of the present application;
[0041] Figure 3 A schematic diagram of a neighborhood window provided for one embodiment of the present application. DETAILED DESCRIPTION
[0042] In order to further explain the technical means and effects adopted by the present application to achieve the predetermined invention purpose, the following is a detailed description of the visual positioning method and device for the seed slot of the degradable pallet for the automated production line proposed by the present application, its specific implementation method, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0043] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0044] The specific scheme of the visual positioning method and device for the seed slot of the degradable pallet used in the automated production line provided by the present application is described in detail below with reference to the accompanying drawings.
[0045] See also Figure 1 , which shows a flowchart of a method for visually locating a seed slot of a degradable pallet for an automated production line provided by an embodiment of the present application, the method comprising the following steps:
[0046] Step S1, collecting a left image of each degradable pallet, a right image of each pallet, and a stereo result matching image; the stereo result matching image includes a disparity value and a depth value of each pixel point.
[0047] On the automated production line, the robot is responsible for clamping the pallet, and there is usually a recessed area at the bottom of the pallet. In the process of combining the recessed area at the bottom of the pallet with the seed slot, the position of the seed slot needs to be determined. Therefore, a binocular vision algorithm is used for visual positioning of the seed slot on the degradable pallet.
[0048] The binocular camera system consists of two monocular cameras of the same model and parameters. The two cameras are installed on both sides of the pallet, with the same distance between the two cameras and the pallet and at the same horizontal position as the pallet. This makes the captured images have the same perspective and scale, enhancing the stereoscopic vision effect.
[0049] A binocular camera is used to photograph the pallet and grayscale it to obtain a left image of the pallet and a right image of the pallet. The left image of the pallet and the right image of the pallet are processed using a binocular vision algorithm to obtain a stereo result matching image. The stereo result matching image includes a disparity value and a depth value of each pixel point. Among them, the binocular vision algorithm and the method for obtaining the disparity value are well-known technologies and are not described in detail in this embodiment. The stereo result matching image shows the position and three-dimensional information of the seed slot.
[0050] Step S2, using an edge detection algorithm to obtain each local edge line in the edge image of the left image of the tray and the right image of the tray; based on the gradient of the grayscale value of the pixel points of the local edge line and the difference between the gradients, obtain the seed groove edge clarity of each local edge line of each edge image; based on the difference between the parallax values of the pixel points, obtain the edge regularization coefficient of the stereo result matching image; based on the seed groove edge clarity and the edge regularization coefficient, obtain the lighting anomaly score of the stereo result matching image; use the stereo result matching image with a lighting anomaly score greater than or equal to a preset normal threshold as the stereo result matching image of the degradable tray with seed groove positioning abnormality.
[0051] In the process of visually locating the seed slots on the tray using the binocular vision algorithm, the image quality was significantly affected when the seed slots were photographed using two monocular cameras due to the strong lighting conditions in the environment. This strong lighting may cause light spots or reflections to appear in some areas of the image, making the edges of the seed slots blurred in the image. Light spots and reflections will interfere with the extraction of visual features of the image, causing the loss of important edge information in the image, making it difficult for the algorithm to accurately identify the actual contours of the seed slots when performing feature matching. This phenomenon directly affects the matching accuracy of the stereo results, resulting in increased positioning errors and affecting the accuracy of subsequent operations.
[0052] The edge images of the left and right images of the pallet are obtained using the Canny edge detection algorithm, wherein the Canny edge detection algorithm is a well-known technology and will not be described in detail here.
[0053] For the edge images of the left and right tray images, the edge lines in the edge images are divided into I local edge lines. In this embodiment, the value of I is 6, and the implementer can select other values according to the actual situation. Figure 2 As shown, in Figure 2 In the figure, the solid line is the edge line in the edge image, and the dotted line is the dividing line, which divides the edge line into local edge lines. The clarity of the seed groove edge is calculated according to the gradient value of the seed groove edge pixel point in each edge block. The clearer the seed groove edge is, the larger the gradient of the seed groove edge pixel point is.
[0054] For each local edge line in each edge image, a Sobel operator is used to obtain the gradient value of the grayscale value of each pixel point on the local edge line. The Sobel operator is a well-known technology and will not be described in detail here.
[0055] Based on the gradient of the grayscale value of the pixel points of the local edge line and the difference between the gradients, the edge line clarity of the seed groove of each local edge line in each edge image is calculated. The calculation formula is: Where Q represents the edge clarity of each edge image; D irepresents the sum of the gradient values of all pixels in the i-th local edge line; I represents the number of local edge lines in each edge image; the max function is the maximum value function, and the min function is the minimum value function.
[0056] It should be noted that when max i∈(1,I) D i With min i∈(1,I) D i The larger the difference between them, the more it means that there are edge blocks with uneven gradient distribution in the seed slot edge, and there may be unclear areas on the seed slot edge. At this time, the seed slot edge clarity of the edge image is smaller; conversely, the seed slot edge clarity of the edge image is larger.
[0057] Furthermore, strong light may also exacerbate the problem of irregular edge shapes of the seed slots in the left and right images of the tray, causing the edge shapes of the seed slots in the stereo result matching images to change, resulting in inaccurate positioning problems.
[0058] In the stereo result matching map generated by the binocular vision algorithm, the disparity reflects the displacement of the seed slot at different viewing angles. The uniformity of the pixels in the generated disparity map is used to evaluate the regularity of the seed slot edge. The more uneven the pixels are, the more inconsistent the displacement of each pixel on the seed slot edge at different viewing angles is, so the seed slot edge may be irregular.
[0059] Furthermore, for each pixel in the stereo result matching image, the absolute value of the difference between the disparity values of the pixel and other pixels in its eight neighborhoods is calculated, and the average of all the absolute values of the difference of the pixel is calculated as the adjacent disparity difference of each pixel.
[0060] According to the above analysis, based on the difference between adjacent disparity differences of pixel points and the difference between disparity values, the edge regularization coefficient of the stereo result matching image is calculated. The calculation formula is: Where G represents the edge regularization coefficient of the stereo result matching image; C j represents the adjacent disparity difference of the jth pixel in the stereo result matching image; J represents the number of pixels in the stereo result matching image; S j Indicates the disparity value of the j-th pixel in the stereo result matching image, max is the maximum value function, and min is the minimum value function.
[0061] It should be noted that when the disparity values between the pixels in the stereo result matching image are larger, the edges of the seed grooves in the stereo result matching image are more irregular, and the value of the obtained edge regularization coefficient is larger; otherwise, the value of the edge regularization coefficient is smaller.
[0062] Since the shooting angle and the distance between the camera and the tray have a huge impact on the extraction of edge features, if the camera distance is too close or too far, the edge of the seed slot will be blurred. Therefore, it is necessary to combine the comprehensive clarity of the seed slot edge with the regularity of the seed slot edge. The calculation method of the comprehensive clarity is: calculate the average of the seed slot edge clarity of all edge images as the comprehensive clarity of the stereo result matching image, and judge the positioning abnormality of the seed slot in the stereo result matching image.
[0063] According to the above analysis, the illumination anomaly score of the stereo result matching graph is calculated as follows: Y = Q ′ ×G; where Y represents the illumination anomaly score of the stereo result matching image; Q ′ It represents the comprehensive clarity of the stereo result matching image; G represents the edge regularization coefficient of the stereo result matching image.
[0064] It should be noted that when the clarity of the stereo result matching image is high and the edges of the seed grooves in the stereo result matching image are relatively regular, the values of the comprehensive clarity and edge regularity coefficient are large. At this time, the value of the lighting anomaly score of the stereo result matching image is large; otherwise, the value of the lighting anomaly score is small.
[0065] When the edge regularization coefficient of the stereo result matching graph is greater than or equal to the preset normal threshold, it indicates that the seed slot positioning of the degradable tray is abnormal; when the edge regularization coefficient of the stereo result matching graph is less than the preset normal threshold, it indicates that the seed slot positioning is normal. In this embodiment, the preset normal threshold value is 0.5, and the implementer can select other values according to actual conditions.
[0066] When the seed slot positioning is abnormal, the pixel points in the stereo result matching image are corrected.
[0067] Step S3, based on the depth values of the pixels and the differences between the depth values, obtaining the abnormality degree of the depth values of the stereo result matching image of the degradable tray with abnormal seed slot positioning; obtaining the abnormal depth value pixels of the stereo result matching image of the degradable tray with abnormal seed slot positioning based on the value of the abnormality degree of the depth values; obtaining the correction index of the abnormal depth value pixels based on the illumination abnormality score and the abnormal depth value pixels; and correcting the depth values of the pixels of the stereo result matching image based on the correction index.
[0068] Furthermore, for the seed slots with abnormal positioning, there are corresponding abnormal pixels in the stereo result matching map, and the depth values of the abnormal pixels are inconsistent with the depth values of normal pixels. The abnormal degree of the depth value of the pixel is calculated according to the change of the depth value between the pixels, and the abnormal pixel is further determined; and the illumination abnormality score of the seed slot is used as the weight of the abnormal degree of the depth value of the pixel, and the correction factor for correcting the abnormal pixel is calculated.
[0069] When there is an abnormality at the seed slot edge in the captured image, it will affect the seed slot positioning. The depth values of the pixels corresponding to the abnormal area at the seed slot edge in the stereo result matching image are significantly different from the depth values of the surrounding area, forming an abnormal depth value distribution.
[0070] Taking the i-th pixel in the stereo result matching image as an example, a ψ×ψ neighborhood window is constructed with the i-th pixel as the center. In this embodiment, the value of ψ is 5, and the implementer can select other values according to actual conditions.
[0071] For the neighborhood window of the i-th pixel, the constructed window is divided into four sub-neighborhood windows according to the upper left corner, upper right corner, lower right corner, and lower left corner, which are recorded as the first sub-neighborhood window, the second sub-neighborhood window, the third sub-neighborhood window, and the fourth sub-neighborhood window respectively; the pixels in the neighborhood window except the i-th pixel are recorded as neighborhood pixels. The schematic diagram of the neighborhood window is shown as follows: Figure 3 As shown, the abnormality degree of the depth value of the i-th pixel is obtained according to the change of the depth value of the pixel in the window.
[0072] Furthermore, the abnormality of the depth value of each pixel in the stereo result matching image is calculated, and the calculation formula is: Where, X i is the abnormality of the depth value of the i-th pixel in the stereo result matching image; p i is the depth value of the i-th pixel in the stereo result matching image, is the mean depth value of all pixels in the neighborhood window of the i-th pixel in the stereo result matching image, p i,n It represents the mean of the depth values of all pixels in the nth sub-neighborhood window within the window constructed for the i-th pixel, N represents the number of neighborhood windows, max represents the maximum value function, and min represents the minimum value function.
[0073] It should be noted that when max n∈(1,N) p i,n -min n∈(1,N) p i,n The larger the value of is, the more uneven the depth values of the pixels in the window constructed for the i-th pixel are, and the i-th pixel may be abnormal. The larger the value of , the greater the difference between the depth value of the i-th pixel and the depth values of the surrounding pixels, and the greater the possibility that the i-th pixel is abnormal. At this time, the greater the value of the abnormality degree of the obtained depth value; conversely, the smaller the value of the abnormality degree of the depth value.
[0074] For each pixel in the stereo result matching image, when the depth value abnormality of the pixel is greater than or equal to the preset depth value threshold, the pixel is regarded as a depth value abnormal pixel; otherwise, the pixel is a depth value normal pixel.
[0075] The above steps determine abnormal pixels by analyzing the depth values of the pixels. Each abnormal pixel needs to be corrected. First, a correction index needs to be calculated.
[0076] When there is an influence of lighting, the binocular vision algorithm will affect the positioning of the seed slot, resulting in errors in the depth value estimation of some pixels. That is, in the edge area of the seed slot with insufficient light, the binocular vision algorithm may lack sufficient features to calculate the depth value, resulting in inaccurate depth value estimation. Therefore, based on the above analysis, combined with the lighting anomaly score of the seed slot in the stereo result matching map and the depth value anomaly degree of each depth value abnormal pixel in the stereo result matching map, the correction index of each depth value abnormal pixel is calculated, and the calculation formula is: τ h =Y×X h ; In the formula, τ h represents the correction index of the hth abnormal depth value pixel in the stereo result matching map; Y represents the illumination anomaly score of the stereo result matching map; X h Indicates the abnormal degree of depth value of the hth abnormal depth value pixel in the stereo result matching image.
[0077] It should be noted that for the abnormal depth value pixels in the stereo result matching map, when the illumination abnormality and depth value abnormality of the abnormal depth value pixels are more obvious, the obtained illumination abnormality score and depth value abnormality are larger. At this time, the correction index of the abnormal depth value pixels is larger; otherwise, the correction index of the abnormal depth value pixels is smaller.
[0078] Furthermore, the depth value of the abnormal pixel is corrected according to the correction index, and the calculation formula is: h ′=τ h ×p h ; In the formula, p h ′ represents the depth value of the hth abnormal pixel after correction; τ h is the correction index of the hth abnormal depth value pixel in the stereo result matching image, p h is the depth value of the hth pixel with abnormal depth value in the stereo result matching image.
[0079] Step S4, visually positioning the seed slot of the degradable tray according to the corrected depth value of the pixel point.
[0080] Due to the influence of excessive light, the shape of the seed slot changes and the edge clarity decreases, which leads to inaccurate calculation of the depth value information. According to the above steps, the depth value of each abnormal pixel is corrected, and the binocular vision positioning is used to obtain the accurate seed slot position according to the corrected depth value to complete the visual positioning of the biodegradable tray seed slot of the automated production line.
[0081] Based on the same inventive concept as the above method, an embodiment of the present application also provides a visual positioning device for a degradable pallet seed slot for an automated production line, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, the steps of the visual positioning method for a degradable pallet seed slot for an automated production line are implemented in any one of the above-mentioned visual positioning methods for a degradable pallet seed slot for an automated production line.
[0082] It should be noted that the above sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above is a description of a specific embodiment of this specification. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0083] The various embodiments in the present application are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0084] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application should be included in the protection scope of the present application.
Claims
1. A visual positioning method for a biodegradable pallet seed slot for an automated production line, characterized in that: The method comprises the following steps: Collecting a left image of each degradable pallet, a right image of each pallet, and a stereo result matching image; the stereo result matching image includes a disparity value and a depth value of each pixel point; Use edge detection algorithm to obtain each local edge line in the edge image of the left image of the pallet and the right image of the pallet; Based on the gradient of the grayscale value of the pixel points of the local edge line and the difference between the gradients, the edge clarity of the seed groove of each local edge line of each edge image is obtained; Based on the difference between the disparity values of the pixel points, the edge regularization coefficient of the stereo result matching image is obtained; Obtain the illumination anomaly score of the stereo result matching image based on the seed groove edge clarity and edge regularity coefficient; The stereo result matching graph with a lighting anomaly score greater than or equal to a preset normal threshold is used as the stereo result matching graph of the biodegradable tray with abnormal seed slot positioning; Based on the depth values of the pixel points and the differences between the depth values, the abnormality degree of the depth values of the stereo result matching image of the biodegradable tray with abnormal seed slot positioning is obtained; Obtaining abnormal depth value pixel points of the stereo result matching image of the biodegradable tray with abnormal seed slot positioning based on the magnitude of the abnormal depth value; Obtaining a correction index for abnormal depth value pixels based on abnormal illumination scores and abnormal depth value pixels; The depth values of the pixels of the stereo result matching image are corrected based on the correction index, and the seed slots of the degradable pallet are visually positioned according to the depth values of the corrected pixels.
2. The visual positioning method for the seed slot of the degradable pallet for the automated production line according to claim 1, characterized in that: The method for obtaining each local edge line is: Use edge detection algorithm to obtain edge images of the left and right images of the pallet; For each edge image, the edge lines in the edge image are evenly divided into a preset number of local edge lines.
3. The visual positioning method for the seed slot of the degradable pallet for the automated production line according to claim 1, characterized in that: The method for obtaining the edge clarity of the seed groove is as follows: For each edge image, the sum of the gradient values of the grayscale values of the pixel points on each local edge line in the edge image is calculated as the first sum, the mean of the first sums of all local edge lines in the edge image is calculated, the difference between the maximum and minimum values of the first sums of all local edge lines is calculated, and the ratio between the mean and the difference is used as the seed groove edge clarity of each edge image.
4. The visual positioning method for the seed slot of the degradable pallet for the automated production line according to claim 1, characterized in that: The method for obtaining the edge regularization coefficient is: For each pixel in the stereo result matching image, the absolute value of the difference between the disparity values of the pixel and other pixels in its eight neighborhoods is calculated, and the average of all the absolute values of the difference of the pixel is calculated as the adjacent disparity difference of each pixel; The mean of adjacent disparity differences of all pixels in the stereo result matching image is calculated as a first mean, a difference result between the maximum value and the minimum value of the disparity values of all pixels is calculated, and a ratio between the first mean and the difference result is calculated as an edge regularization coefficient of the stereo result matching image.
5. The visual positioning method for the seed slot of the degradable pallet for the automated production line according to claim 1, characterized in that: The method for obtaining the illumination anomaly score is as follows: Calculate the average of the edge clarity of all edge images as the comprehensive clarity of the stereo result matching image; The product of the comprehensive clarity and edge regularization coefficient of the stereo result matching image is calculated as the illumination anomaly score of the stereo result matching image.
6. The visual positioning method for the seed slot of the degradable pallet for the automated production line according to claim 1, characterized in that: The method for obtaining the abnormality degree of the depth value is: For each pixel point in the stereo result matching image of the biodegradable tray with abnormal seed slot positioning, a neighborhood window of preset size is constructed; the constructed neighborhood window is divided into four sub-neighborhood windows according to the upper left corner, the upper right corner, the lower right corner, and the lower left corner; The calculation formula of the abnormal degree of the depth value is: Where, X i is the abnormality of the depth value of the i-th pixel in the stereo result matching image; p i is the depth value of the i-th pixel in the stereo result matching image, is the mean depth value of all pixels in the neighborhood window of the i-th pixel in the stereo result matching image, p i,n It represents the mean of the depth values of all pixels in the nth sub-neighborhood window within the window constructed for the i-th pixel, N represents the number of neighborhood windows, max represents the maximum value function, and min represents the minimum value function.
7. The visual positioning method for the seed slot of a degradable pallet for an automated production line according to claim 1, characterized in that: The method for obtaining the abnormal depth value pixel point is: For each pixel point in the stereo result matching image, when the abnormal degree of the depth value of the pixel point is greater than or equal to the preset depth value threshold, the pixel point is regarded as a pixel point with abnormal depth value.
8. The visual positioning method for the seed slot of a degradable pallet for an automated production line according to claim 1, characterized in that: The method for obtaining the correction index is: for each depth value abnormal pixel point in the stereo result matching image, the product of the depth value abnormality degree of the depth value abnormal pixel point and the illumination abnormality score of the stereo result matching image is calculated as the correction index for each depth value abnormal pixel point in the stereo result matching image.
9. The visual positioning method for the seed slot of a degradable pallet for an automated production line according to claim 1, characterized in that: The depth value of the pixel point of the stereo result matching image is corrected based on the correction index, and the calculation formula is: h ′=τ h ×p h ; In the formula, p h ′ represents the depth value of the hth abnormal pixel after correction; τ h is the correction index of the hth abnormal depth value pixel in the stereo result matching image, p h is the depth value of the hth pixel with abnormal depth value in the stereo result matching image.
10. A visual positioning device for a biodegradable pallet seed slot for an automated production line, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the visual positioning method for the seed slot of the degradable pallet used in the automated production line are implemented.
Citation Information
Patent Citations
Sensing module working state detection method and refrigerator
CN111476194A
Spatial positioning method for multiple circular targets based on binocular vision
CN118052883A