A method for identifying the centerline of a U-shaped groove based on Hough transform

Through the Hough transform-based identification method, the problem of low production efficiency caused by the recognition of U-shaped groove midlines is solved, and the rapid and accurate identification of U-shaped groove midlines is achieved, which improves production efficiency and reduces the risk of manual operation and environmental impact.

CN114332581BActive Publication Date: 2025-04-29BEIJING CHAOZHIKONGXIN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111441948.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-27
Publication Date
2025-04-29
Estimated Expiration
2041-11-27

AI Technical Summary

Technical Problem

In the prior art, the identification of the U-shaped groove midline relies on manual measurement, resulting in low production efficiency, and the welding work is harmful to the human body and the environment is harsh.

Method used

The recognition method based on Hough transform is adopted, and the bottom image in the U-shaped groove is obtained through the camera on the robotic arm, and grayscale, Gaussian filtering, binarization, closed operation and Hough transform linear detection are carried out to accurately identify the position of the midline of the U-shaped groove.

Benefits of technology

It realizes rapid and accurate identification of the U-shaped groove midline, improves production efficiency, and reduces the risk and environmental impact of manual operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114332581B_ABST
    Figure CN114332581B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for identifying the center line of a U-shaped groove based on Hough transform, comprising the following steps: S1: obtaining an image of the bottom of the U-shaped groove on the current workbench through a camera, and forming a corresponding picture; S2: performing grayscale processing and Gaussian filtering noise reduction processing on the picture in sequence; S3: performing binarization processing on the picture; S4: performing a closed operation processing on the picture, and connecting close points into a line at the same time; S5: performing Hough transform straight line detection on the picture after the closed operation processing, and obtaining the detected straight line; S6: obtaining the horizontal position of the currently detected straight line, and calculating the distance between the straight line and the middle of the picture to obtain the picture distance, and then converting the distance between the center position of the U-shaped groove and the center position of the camera according to the ratio of the picture distance to the actual distance. The present invention has the characteristics of convenient operation, safety, reliability and high efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for identifying a center line of a U-shaped groove based on Hough transformation. Background Art

[0002] U-shaped grooves are widely used in crane manufacturing. In order to enhance the load-bearing capacity of the boom, multiple ribs are often welded inside the U-shaped groove. The number of ribs varies depending on the lifting capacity of the boom. Currently, the process of manual measurement, plate placement, and welding is used to produce cranes. It is difficult to improve production efficiency, and electric welding is also very harmful to the human body, and the production environment is relatively harsh. Summary of the invention

[0003] In view of the above problems existing in the prior art, the main purpose of the present invention is to provide a method for identifying the centerline of a U-shaped groove based on Hough transform, which is easy to operate, safe, reliable and efficient, and can quickly and accurately determine the middle position of the U-shaped groove.

[0004] The technical solution of the present invention is as follows:

[0005] A method for identifying a center line of a U-shaped groove based on Hough transform comprises the following steps:

[0006] S1: The image of the bottom of the U-shaped groove on the current workbench is obtained by a camera fixed on the robotic arm, and a corresponding picture is formed. Each time a picture is taken, the robotic arm moves to a fixed position above the U-shaped groove to take a picture;

[0007] S2: performing grayscale processing and Gaussian filtering noise reduction processing on the image in sequence;

[0008] S3: Binarize the image after the Gaussian filter noise reduction process;

[0009] S4: performing a closing operation on the binary image and connecting the nearby points into lines;

[0010] S5: Perform Hough transform straight line detection on the image processed by the closing operation, and obtain the detected straight line;

[0011] S6: Obtain the horizontal position of the currently detected straight line, and calculate the distance between the straight line and the middle of the picture to obtain the picture distance, and then convert the distance between the center position of the U-shaped groove and the center position of the camera according to the ratio of the picture distance to the actual distance.

[0012] In step S2, the image is subjected to grayscale processing and Gaussian filtering noise reduction processing in sequence, wherein the grayscale processing is used to reduce the amount of original data of the image, and the Gaussian filtering noise reduction processing is used to eliminate Gaussian noise of the image.

[0013] In step S3, the image after the Gaussian filtering noise reduction process is binarized, wherein the binarization process specifically includes: setting the grayscale value of the pixel points on the image to 0 or 255, so that the image appears to be clearly black and white.

[0014] In step S4, a closing operation is performed on the binarized image, wherein the closing operation is specifically: first performing an expansion process, and then performing an erosion process. The closing operation can effectively fill small holes inside the object, connect adjacent objects, and smooth the boundaries of the object without changing the area of ​​the object.

[0015] In step S5, Hough transform straight line detection is performed on the image after the closing operation, and the detected straight line is obtained. Specifically, the straight line detection problem in the image space is converted into the point detection problem in the parameter space, and the straight line detection task is completed by finding the peak value in the parameter space.

[0016] In step S6, the horizontal position of the currently detected straight line is obtained, and the distance between the straight line and the middle of the picture is calculated to obtain the picture distance, and then according to the ratio of the picture distance to the actual distance, specifically: draw two black dots with a spacing of x on the white paper in the horizontal direction, put it on the workbench and take a picture with a camera, detect the two black dots, and calculate the pixel value a between them; then set the pixel value between the detected straight line and the corresponding center line of the picture to b, then the actual distance y=x*b / a between the robotic arm located at the center of the camera and the U-groove marking line, wherein a is 0-10000, b is 0-10000, and x is 0-1000mm.

[0017] The a is 2924, b is 3512, and x is 100 mm.

[0018] In step S3, after the image subjected to the Gaussian filtering noise reduction process is binarized, discontinuous points appear on the image.

[0019] In step S5, Hough transform straight line detection is performed on the image after the closing operation, and the detected straight line is obtained, including marking the detection area on the image and marking the detected straight line, and the straight line is the final recognition result.

[0020] The present invention has the following advantages and beneficial effects: the U-groove centerline identification method based on Hough transform provided by the embodiment of the present invention can not only accurately identify the position of the U-groove centerline without causing errors, but also can work for a long time without fear of harsh production environments, thereby greatly improving production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 This is a schematic diagram of a picture after Gaussian filtering and denoising in the method for identifying the center line of a U-shaped groove based on Hough transform provided in an embodiment of the present invention.

[0022] Figure 2 A schematic diagram of a picture after binarization processing in the method for identifying the center line of a U-shaped groove based on Hough transform provided in an embodiment of the present invention.

[0023] Figure 3 A schematic diagram of a closed operation performed on a binarized image in a method for identifying a centerline of a U-shaped groove based on Hough transform provided in an embodiment of the present invention.

[0024] Figure 4 This is a schematic diagram of a picture after Hough transform straight line detection processing is performed in the U-shaped groove centerline recognition method based on Hough transform provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0026] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0027] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0028] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.

[0029] like Figures 1 to 4 As shown: a method for identifying the center line of a U-shaped groove based on Hough transform according to an embodiment of the present invention, comprising the following steps:

[0030] S1: Obtain an image of the bottom of the U-shaped groove on the current workbench through a camera and form a corresponding picture, wherein the camera can be fixed on a robotic arm, and each time a picture is taken, the robotic arm moves to a fixed position above the U-shaped groove to take a picture, and each time a picture is taken, the robotic arm moves to a fixed position above the U-shaped groove to take a picture;

[0031] S2: performing grayscale processing and Gaussian filtering noise reduction processing on the image in sequence;

[0032] S3: Binarization is performed on the image after the Gaussian filter noise reduction process. After the binarization process, discontinuous points will appear in the image, that is, the line will become discontinuous points. Figure 3 As shown;

[0033] S4: performing a closing operation on the binary image and connecting the nearby points into lines;

[0034] S5: Perform Hough transform straight line detection on the image processed by the closing operation, and obtain the detected straight line;

[0035] S6: Obtain the horizontal position of the currently detected straight line, and calculate the distance between the straight line and the middle of the picture to obtain the picture distance, and then convert the distance between the center position of the U-shaped groove and the center position of the camera according to the ratio of the picture distance to the actual distance.

[0036] In step S2, the image is subjected to grayscale processing and Gaussian filtering noise reduction processing in turn, wherein grayscale processing of the image can reduce the amount of original data of the image and speed up the processing of the image; the Gaussian filtering noise reduction processing can be used to eliminate Gaussian noise. Normally taken images will have certain noise, so the image needs to be subjected to noise reduction processing before recognition.

[0037] In step S3, the image after Gaussian filtering and noise reduction is binarized, wherein the binarization is to set the grayscale value of the pixel on the image to 0 or 255, so that the image presents a clear black and white effect; at the same time, after the image is binarized, the amount of image data on the image can be greatly reduced, highlighting the outline of the target image.

[0038] In step S4, the image after the binary processing is closed, wherein the closing operation is to first perform dilation processing and then perform erosion processing. The closing operation can effectively fill the small holes inside the object, connect adjacent objects, and smooth the boundaries of the object without significantly changing the area of ​​the object. It is used here to connect the originally intermittent straight lines together to improve the success rate of straight line detection.

[0039] In step S5, the image after the closed operation is subjected to Hough transform line detection, and the detected line is obtained. The basic principle of Hough transform line detection is to use the duality of points and lines, that is, the lines in the image space correspond one-to-one to the points in the parameter space, and the lines in the parameter space correspond one-to-one to the points in the image space. Therefore, the Hough line detection algorithm converts the line detection problem in the image space into the point detection problem in the parameter space, and completes the line detection task by finding the peak in the parameter space.

[0040] In step S6, the horizontal position of the currently detected straight line is obtained, and the distance between the straight line and the middle of the picture is calculated to obtain the picture distance, and then according to the ratio of the picture distance to the actual distance, specifically: find a piece of white paper, draw two black dots with a spacing of x on the horizontal position, put it on the workbench and take a picture with a camera, detect the two black dots, and calculate the pixel value a between them. Set the pixel value between the previously detected straight line and the center line of its image as b, then the actual distance y=x*b / a between the manipulator located at the center of the camera and the U-groove marking line, where: a is 0-10000, b is 0-10000, and x is 0-1000mm, for example, a is 2924, b is 3512, and x is 100mm.

[0041] In step S3, after the image subjected to the Gaussian filtering noise reduction process is binarized, discontinuous points appear on the image.

[0042] In step S5, Hough transform straight line detection is performed on the image after the closing operation, and the detected straight line is obtained. The following steps are also included: the detection area on the image is marked, and the detected straight line is marked at the same time. For example, the detection area can be marked with a red border, and the detected line can be directly marked with green, and the straight line marked with green is the final recognition result.

[0043] The U-groove centerline identification method based on Hough transform provided by the embodiment of the present invention can not only accurately identify the position of the U-groove centerline without generating errors, but also can work for a long time without fear of harsh production environments, thereby greatly improving production efficiency.

[0044] Finally, it should be noted that the above-described embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some or all of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for identifying the centerline of a U-shaped groove based on Hough transform, characterized in that: The following steps are involved: S1: The image of the bottom of the U-shaped groove on the current workbench is obtained by a camera fixed on the robotic arm, and a corresponding picture is formed. Each time a picture is taken, the robotic arm moves to a fixed position above the U-shaped groove to take a picture; S2: performing grayscale processing and Gaussian filtering noise reduction processing on the image in sequence; S3: Binarize the image after the Gaussian filter noise reduction process; S4: performing a closing operation on the binary image and connecting the nearby points into lines; S5: Perform Hough transform straight line detection on the image processed by the closing operation, and obtain the detected straight line; S6: Obtain the horizontal position of the currently detected straight line, and calculate the distance between the straight line and the middle of the image to obtain the image distance, and then convert the distance between the center position of the U-shaped groove and the center position of the camera according to the ratio of the image distance to the actual distance; In step S6, the horizontal position of the currently detected straight line is obtained, and the distance between the straight line and the middle of the picture is calculated to obtain the picture distance, and then according to the ratio of the picture distance to the actual distance, specifically: draw two black dots with a spacing of x on the white paper in the horizontal direction, put it on the workbench and take a picture with a camera, detect the two black dots, and calculate the pixel value a between them; then set the pixel value between the detected straight line and the corresponding center line of the picture to b, then the actual distance y=x*b / a between the robotic arm located at the center of the camera and the U-groove marking line, wherein a is 0-10000, b is 0-10000, and x is 0-1000mm.

2. The method for identifying the center line of a U-shaped groove based on Hough transform according to claim 1 is characterized in that: In step S2, the image is subjected to grayscale processing and Gaussian filtering noise reduction processing in sequence, wherein the grayscale processing is used to reduce the amount of original data of the image, and the Gaussian filtering noise reduction processing is used to eliminate Gaussian noise of the image.

3. The method for identifying the center line of a U-shaped groove based on Hough transform according to claim 1 is characterized in that: In step S3, the image after the Gaussian filtering noise reduction process is binarized, wherein the binarization process specifically includes: setting the grayscale value of the pixel points on the image to 0 or 255, so that the image appears to be clearly black and white.

4. The method for identifying the center line of a U-shaped groove based on Hough transform according to claim 1, characterized in that: In step S4, a closing operation is performed on the binarized image, wherein the closing operation is specifically: first performing an expansion process, and then performing an erosion process. The closing operation can effectively fill small holes inside the object, connect adjacent objects, and smooth the boundaries of the object without changing the area of ​​the object.

5. The method for identifying the center line of a U-shaped groove based on Hough transform according to claim 1, characterized in that: In step S5, Hough transform straight line detection is performed on the image after the closing operation, and the detected straight line is obtained. Specifically, the straight line detection problem in the image space is converted into the point detection problem in the parameter space, and the straight line detection task is completed by finding the peak value in the parameter space.

6. The method for identifying the center line of a U-shaped groove based on Hough transform according to claim 1 is characterized in that: The a is 2924, b is 3512, and x is 100 mm.

7. The method for identifying the center line of a U-shaped groove based on Hough transform according to claim 1, characterized in that: In step S3, after the image subjected to the Gaussian filtering noise reduction process is binarized, discontinuous points appear on the image.

8. The method for identifying the center line of a U-shaped groove based on Hough transform according to claim 1, characterized in that: In step S5, Hough transform straight line detection is performed on the image after the closing operation, and the detected straight line is obtained, including marking the detection area on the image and marking the detected straight line, and the straight line is the final recognition result.

Citation Information

Patent Citations

  • Machine-vision-based online dimensional measurement method of precise instrument

    CN103292701A

  • Stop mark real-time detection and distance measurement method based on intelligent driving

    CN103488976A