A profile detection method and system based on a deep hole accident door pull rod
By combining the Canny algorithm and Hough transform with morphological operations to perform contour detection, the problem of high-precision positioning and hole alignment of deep hole emergency door pull rods was solved, realizing automated detection and positioning, and improving detection accuracy and efficiency.
Patent Information
- Application Number
- CN202411890194.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2044-12-20
AI Technical Summary
Existing contour detection methods are insufficient to meet the high precision and stability requirements of deep hole emergency door pull rods, especially in cases of partial obstruction, where positioning and hole alignment accuracy are poor and operations are redundant.
A contour detection method based on deep-hole emergency door pull rods is adopted. By acquiring local images, edge detection is performed using the Canny algorithm and Hough transform is used for fitting. Combined with morphological operations and binarization processing, the pull rod is located and the hole position is completed, and the hole is automatically aligned.
It improves detection accuracy and hole alignment, reduces manual intervention, enhances work efficiency and system security, adapts to complex backgrounds and partial occlusion, and simplifies the operation process.
Smart Images

Figure CN120031902B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of contour detection technology, specifically to a contour detection method and system based on a deep-hole emergency door pull rod. Background Technology
[0002] With the continuous development of industrial automation and intelligent manufacturing, the demands on mechanical equipment to operate in complex environments are increasing. This is especially true in large industrial facilities such as nuclear power and petrochemical plants, where equipment and components involving deep-hole structures face increasingly stringent requirements for safety and precision. As a critical component, the positioning and connection accuracy of the deep-hole emergency door pull rod directly affects the safe operation of the system.
[0003] However, due to the unique nature of deep-hole structures, the visibility of the tie rod connection points is limited, making it difficult for traditional detection and positioning methods to meet the requirements of high precision and stability. Typically, the positioning of the tie rod, hole alignment, and angle calibration require manual operation, which is not only inefficient and prone to errors but also ill-suited to complex working environments and confined spaces. Summary of the Invention
[0004] In view of the above-mentioned problems, the present invention is proposed.
[0005] Therefore, the technical problem solved by the present invention is that existing contour detection methods have limitations in dealing with local occlusion, poor accuracy in detecting holes, and operational redundancy.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a contour detection method based on a deep-hole emergency door pull rod, comprising:
[0007] Acquire local images based on the pull rod of the deep-hole emergency door;
[0008] The edges of the tie rod are inspected, and the tie rod is positioned based on the results of the edge inspection.
[0009] After positioning is completed, the rod is aligned with the hole, and the pixels at the hole position are binarized.
[0010] Edge detection of the hole is performed using binarized pixels;
[0011] Based on the edge detection results, the edge of the circular hole in the pull rod is fitted to obtain the contour of the hole.
[0012] Simultaneously, based on the edge detection results, the tilt angles of the upper and lower pull rods are calculated.
[0013] As a preferred embodiment of the contour detection method based on the deep-hole emergency door lever described in this invention, the local image includes an image of a specific region obtained by locating visual features;
[0014] The two ends of the pull rod can be connected to each other, and two identical sheet-like structures extend from the upper and lower sections. The front of the sheet-like structure has a round hole, and the connection is made by inserting a pin into the round hole. The distance between the two upper sheet-like structures is less than the distance between the two lower sheet-like structures, and the inner distance between the two upper sheet-like structures is equal to the outer distance between the two lower sheet-like structures.
[0015] The specific area includes, during the positioning of the pull rod, the side image area of the sheet-like structure when the upper and lower pull rods are connected, and the front image area of the sheet-like structure when the pull rod is aligned with the hole, the upper and lower pull rods are connected.
[0016] As a preferred embodiment of the contour detection method based on the deep hole emergency door pull rod described in this invention, the pull rod edge detection includes: using the Canny algorithm, based on the edge gradient information extracted by the first-order differential operator, to achieve accurate edge positioning by performing non-maximum suppression processing and double threshold judgment on the edge gradient information;
[0017] The tie rod positioning includes: after obtaining the edge of the tie rod, calculating and marking the axis of the tie rod; calculating the distance between the axes of the two tie rods; establishing a two-dimensional reference coordinate system with the center axis of the upper tie rod as the origin; determining the distance between the axis of the lower tie rod and the reference coordinate system; if the lower axis is in the negative direction of the reference coordinate system, then the upper tie rod is moved in the negative direction of the coordinate system; otherwise, the upper tie rod is moved in the positive direction of the coordinate system; the horizontal distance at the vertical center line is 0, thus completing the tie rod positioning.
[0018] As a preferred embodiment of the contour detection method based on deep hole emergency door pull rod described in this invention, the edge detection of the hole position includes performing edge detection on the hole positions of the upper and lower pull rods throughout the entire process after the pull rod is positioned; the edge detection of the hole position includes generating a binary image through an adaptive threshold processing method.
[0019] For the binary image, the first connected component analysis is performed to find and mark the points with the same pixel value in the neighborhood, and the connected components with an area smaller than the preset value are removed.
[0020] Morphological dilation is performed on a binary image using morphological closing operations, followed by morphological erosion to connect disconnected regions in the binary image.
[0021] After completing the first morphological closing operation, a second connected component analysis is performed to eliminate non-target edge connected components.
[0022] Median filtering reduces the protruding parts of the edges, making them smoother;
[0023] The second morphological closing operation is used to eliminate holes inside the connected components and enhance the edges;
[0024] The edge detection results of the hole position are obtained.
[0025] As a preferred embodiment of the contour detection method based on deep-hole emergency door lever described in this invention, the fitting of the circular hole edge of the lever includes using Hough transform as a method for extracting geometric features of the image to extract the circular hole edge features.
[0026] In the process of extracting the edge features of the circular hole, the parameters of the Hough circle transform are set as follows: the radius range is set to [r]. min ,r max Set the angle range to (0, 360°); select edge points and vote, perform cumulative judgment, confirm the partial circle features, and obtain the feature parameters of the partial circle result; the feature parameters of the partial circle output include: the angle range of the center, radius and arc length;
[0027] Where, r min r represents the minimum recognition radius of the circular hole. max Indicates the maximum recognition radius of the circular hole;
[0028] When the angle range of the extracted partial circle is 360°, it is determined that there is no occlusion at the current hole position, and the fitting result of the hole edge is directly output; at the same time, the fitting results of n identifications of the current hole position as having no occlusion are obtained, and the radii among the n feature parameters are weighted and averaged to obtain the standard radius.
[0029] If the angle range of the extracted partial circle is less than 360°, it is determined that the hole of the pull rod is blocked by the sheet structure, and the hole is filled in according to the identified hole edge.
[0030] Where n represents the preset number of samplings; in the process of weighted averaging, the weight in each sampling result is related to the position of the detected target in the original sampled image and the stability of the detected target at the sampling time;
[0031] The original coefficients of the weights of the m-th sampling result are expressed as:
[0032]
[0033] Where, x m The x-axis position of the center coordinates of the m-th sample is represented by y. m Let x0 represent the vertical axis position of the center coordinates of the m-th sample, x0 represent the horizontal axis position of the midpoint coordinates of the original image captured by the camera, y0 represent the vertical axis position of the midpoint coordinates of the original image captured by the camera, D0 represent the standard distance, V0 represent the standard speed, and β and γ represent the preset adjustment coefficients, respectively. m This represents the estimated speed at the current sampling time.
[0034]
[0035] Where, x m-1 The x-axis represents the position of the center of the circle at the moment preceding the m-th sample. m+1 The horizontal axis position of the center of the circle at the next moment after the m-th sampling, y m-1 The y-axis represents the position of the center of the circle at the moment preceding the m-th sample. m+1 The position of the center of the circle on the vertical axis at the next moment after the m-th sampling, t m+1 Let t represent the time after the m-th sampling. m-1 This represents the moment preceding the m-th sample;
[0036] After calculating the results of n samplings, the original coefficients of the n weights are reduced proportionally so that their sum is equal to 1; after calculating the standard radius, the radius parameter in the feature parameters is updated.
[0037] As a preferred embodiment of the contour detection method based on deep hole emergency door pull rod described in this invention, the hole completion includes: completing the contour of the circular hole at the hole position based on the center and the updated radius in the feature parameters, and aligning the hole based on the completed circular hole.
[0038] During the hole-setting process, the radii of the upper and lower tie rods are compared. If the radii are equal, the hole-setting process is completed when the two circular hole outlines overlap.
[0039] If the radius lengths are not equal, the circular hole contour with the shorter radius is obtained as circular hole contour 1, and the circular hole contour with the larger radius is obtained as circular hole contour 2. Connect the dots of the circular hole contour 1 and the circular hole contour 2, move the pull rod according to the connection direction, and at the same time detect in real time whether the circular hole contour 1 still needs to be completed. If the circular hole contour 1 can obtain the complete circular hole contour without the need for the hole completion, then the hole is completed.
[0040] As a preferred embodiment of the contour detection method for deep-hole emergency door pull rods described in this invention, the method for solving the tilt angle of the upper and lower pull rods includes extracting the long side features of the marker using Hough line detection and calculating the included angle between the long side features of the upper and lower pull rods.
[0041] A contour detection system for a deep-hole emergency door pull rod employing any of the methods described in this invention, characterized in that:
[0042] The acquisition unit obtains local images based on the deep-hole emergency door pull rod;
[0043] The positioning unit detects the edge of the tie rod and positions the tie rod based on the detection results.
[0044] After the processing unit completes the positioning, it aligns the rod with the hole and performs binarization processing on the pixels at the hole position.
[0045] The detection unit uses binarized pixels to perform edge detection on the hole; based on the edge detection results, it fits the edge of the circular hole of the pull rod to obtain the outline of the hole.
[0046] The included angle analysis unit calculates the tilt angle of the upper and lower tie rods based on the edge detection results.
[0047] A computer device includes: a memory and a processor; the memory stores a computer program, wherein: when the processor executes the computer program, it implements the steps of the method described in any one of the present invention.
[0048] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of the present invention.
[0049] The beneficial effects of this invention are as follows: The contour detection method for deep-hole emergency door pull rods provided by this invention can accurately identify and locate the edges and holes of the pull rod, enabling automatic hole alignment. By combining image processing technologies such as Canny edge detection and Hough transform, it effectively addresses local occlusion and complex backgrounds, improving detection accuracy and hole alignment precision, reducing manual intervention, and enhancing work efficiency and system safety. Furthermore, it provides the simplest operation for situations with varying hole sizes, reducing redundancy. Attached Figure Description
[0050] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 The first embodiment of the present invention provides an overall flowchart of a contour detection method based on a deep-hole emergency door pull rod;
[0052] Figure 2 The first embodiment of the present invention provides a guideline detection method for a deep-hole emergency door pull rod, showing the pull rod edge detection diagram.
[0053] Figure 3A connected component analysis diagram for a contour detection method based on a deep-hole emergency door pull rod provided in the first embodiment of the present invention;
[0054] Figure 4 The flowchart illustrates the edge extraction process of a contour detection method for a deep-hole emergency door lever, as provided in the first embodiment of the present invention.
[0055] Figure 5 The diagram shows the Hough detection principle of a contour detection method based on a deep-hole emergency door pull rod, which is provided for the first embodiment of the present invention. Detailed Implementation
[0056] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0057] Example 1, referring to Figure 1-4 As an embodiment of the present invention, a contour detection method based on a deep-hole emergency door pull rod is provided, comprising:
[0058] S1: Obtain a local image based on the deep hole emergency door lever.
[0059] The local image includes an image of a specific region obtained by locating visual features. The two ends of the pull rod can be connected to each other, with two identical sheet-like structures extending from each of the upper and lower sections. Each sheet-like structure has a circular hole on its front side, and is connected by inserting a pin into the hole. The distance between the two upper sheet-like structures is less than the distance between the two lower sheet-like structures, and the inner distance between the two upper sheet-like structures is equal to the outer distance between the two lower sheet-like structures.
[0060] Furthermore, the specific area includes, during the positioning of the pull rod, the side image area of the sheet-like structure when the upper and lower pull rods are connected, and during the alignment of the pull rods with the holes, the front image area of the sheet-like structure when the upper and lower pull rods are connected.
[0061] It's important to note that focusing on key areas of the tie rod connection point in a localized image avoids interference from cluttered background information, facilitating more accurate extraction of detailed features such as tie rod edges and hole positions, thus ensuring detection precision. The overall image contains numerous irrelevant regions that can interfere with image processing algorithms, reducing the accuracy of edge and hole detection. Acquiring images in localized areas significantly reduces the amount of data, thereby lessening the computational burden of image processing and improving system response speed. This is particularly important for applications requiring real-time or near-real-time processing, significantly enhancing system efficiency.
[0062] S2: Detect the edge of the tie rod and position the tie rod based on the detection results.
[0063] Furthermore, using the Canny algorithm, based on the edge gradient information extracted by the first-order differential operator, precise edge localization was achieved by performing non-maximum suppression processing and double threshold judgment on the edge gradient information.
[0064] After obtaining the edge of the tie rod, calculate and mark its axis. Calculate the distance between the axes of the two tie rods. Establish a two-dimensional reference coordinate system with the center axis of the upper tie rod as the origin. Determine the distance between the lower tie rod's axis and the reference coordinate system. If the lower tie rod's axis is in the negative direction of the reference coordinate system, move the upper tie rod in the negative direction; otherwise, move it in the positive direction. The horizontal distance at the vertical center line is 0, thus completing the tie rod positioning. Figure 2 As shown.
[0065] It's important to understand that the sheet-like structures are built at both ends of the pull rod, and the two sheet-like structures are symmetrical about the pull rod's axis. Therefore, after aligning the axes, the positions of the sheet-like structures will naturally align as well. Using the Canny algorithm for edge detection, the contour edges of the pull rod can be accurately identified. The Canny algorithm calculates gradient changes through a first-order differential operator, combined with non-maximum suppression and double threshold judgment, effectively filtering out noise and obtaining clear pull rod edges. This provides high-precision edge information for subsequent positioning operations, ensuring the accuracy and reliability of the calculated pull rod axis. Based on the detected pull rod edges, the pull rod's axis is calculated and marked, essentially establishing an abstract linear reference at the pull rod's actual position. Through this axis, the offset distance between the upper and lower pull rods can be measured intuitively and effectively, providing a clear positioning target. When the horizontal distance of the vertical center line approaches 0, it means that the axes of the upper and lower pull rods coincide, thus completing precise positioning. This coincidence state serves as a stopping condition, ensuring the correct positioning of the pull rod.
[0066] S3: After positioning is completed, the rod is aligned with the hole, and the pixels at the hole position are binarized.
[0067] Furthermore, the binarization process includes adaptive thresholding: adaptive thresholding works well for images with large differences in brightness. It calculates the weighted average of the current pixel and its neighborhood as the threshold of the current pixel. Usually, the size of the neighborhood k needs to be adjusted according to the actual processing results of the image data.
[0068] S4: Use binarized pixels to perform edge detection on the hole positions.
[0069] The first connected component analysis is performed on the binary image to identify and mark points with the same pixel value in their neighborhood, and to remove connected components with an area smaller than a preset value. Connected component analysis: For the binary image, identify and mark points with the same pixel value in their neighborhood. Through connected component analysis, parameters such as the area and center position of each connected component can be obtained. Typically, 4-neighborhood or 8-neighborhood is used, as illustrated in the diagrams below. Figure 3 As shown on the left and right.
[0070] Morphological dilation of a binary image is performed using morphological closing operations, followed by morphological erosion to connect disconnected regions in the binary image, facilitating subsequent edge information extraction.
[0071] After completing the first morphological closing operation, a second connected component analysis is performed to eliminate non-target edge connected components.
[0072] Median filtering reduces the protruding parts of the edges, making them smoother.
[0073] The second morphological closing operation is used to eliminate holes inside the connected components and enhance the edges.
[0074] The edge detection results of the hole position are obtained, and the specific process is as follows: Figure 4 .
[0075] It's worth noting that connected component analysis is a standard method in binary image processing. It uses 4-neighbor or 8-neighbor analysis to find adjacent pixels and calculate the area and center of each connected component. This method is widely used for noise removal and target region extraction, and common image processing libraries (such as OpenCV) support direct implementations of connected component analysis. Closing is a classic method in morphological processing, involving dilation and erosion. It's used to fill small holes in binary images, enhancing edge connectivity and smoothness. Dilation and erosion operations can use different structuring elements, such as rectangles and circles, to adapt to different image structural features. Libraries like OpenCV provide direct calling interfaces for closing operations, enabling stable implementation of this step. Median filtering is a commonly used smoothing technique that effectively removes noise and reduces edge protrusions, resulting in smoother edges. Median filtering is very common in image processing applications, supporting various filter window sizes to adapt to different image smoothing needs. The above steps can be combined and executed step-by-step within the same image processing pipeline. Each step has low implementation complexity and is supported by readily available algorithms. When combined, they can easily achieve edge detection and enhancement of hole positions, ensuring the stability and accuracy of the results.
[0076] Based on the edge detection results, S5 fits the edge of the circular hole of the pull rod to obtain the contour of the hole.
[0077] Specifically, the Hough transform is used as a method to extract geometric features from an image, specifically to extract the edge features of a circular hole. In the process of extracting the edge features of the circular hole, the parameters of the Hough circular transform are set: the radius is set to [r...]. min ,r max Set the angle range to (0, 360°); select edge points and vote, perform cumulative judgment, confirm the partial circle features, and obtain the feature parameters of the partial circle result; the feature parameters of the output partial circle include: the angle range of the center, radius and arc length.
[0078] Where, r min r represents the minimum recognition radius of the circular hole. max This indicates the maximum recognition radius of the circular hole.
[0079] It should be noted that observing the features of the circular hole image reveals its circular shape. Therefore, based on the edge detection results from the previous section, relevant parameters are extracted by fitting the edge of the circular hole. In digital image processing, the Hough transform, as an important method for extracting geometric features of an image, is often used to extract features of lines, circles, and ellipses. The following section will analyze how the Hough transform is used to extract the edge features of a circular hole.
[0080] Hough detection is essentially a process of transforming related feature points in image space to a specific parameter space for clustering. Its basic idea is to convert pixels in image space into curves or surfaces in parameter space. Curves with the same features in image space will intersect in parameter space after the transformation. Image feature detection is usually achieved based on the cumulative degree of these intersections. Taking line detection using Hough transform as an example, assume the equation of the line in image space and the corresponding parameter space equation of the image space coordinates after the Hough transform are as follows.
[0081] y = kx + b
[0082] ρ=xcosθ+ysinθ
[0083] For a line feature y = k1x + b1 in the image space, after Hough transform, it will correspond to the point (θ1, ρ1) in the parameter space. The detection principles in both image space and parameter space are as follows: Figure 5 As shown. The principle of Hough circle detection is similar to that of line detection, which involves mapping the feature curve to the corresponding parameter space for solution. Unlike line detection, where the slope and intercept of the line determine the line, a circle requires the coordinates of its center (a, b) and its radius r. Therefore, during the transformation, it needs to be converted to a higher-dimensional three-dimensional parameter space H(a, b, r). Hough circle detection uses edge features for curve fitting, typically in conjunction with the Canny algorithm.
[0084] If the angle range of the extracted partial circle is 360°, it is determined that the current hole position is not obstructed, and the fitting result of the hole edge is directly output. Simultaneously, the fitting results of n identifications of the current hole position as unobstructed are obtained, and the radii among the n feature parameters are weighted and averaged to obtain the standard radius. If the angle range of the extracted partial circle is less than 360°, it is determined that the hole position of the pull rod is obstructed by the sheet-like structure, and hole position completion is performed based on the identified hole edge.
[0085] Where n represents the preset number of samplings; in the process of weighted averaging, the weight in each sampling result is related to the position of the detected target in the original sampled image and the stability of the detected target at the sampling time.
[0086] The original coefficients of the weights of the m-th sampling result are expressed as:
[0087]
[0088] Where, x m The x-axis position of the center coordinates of the m-th sample is represented by y. m The vertical axis represents the center coordinates of the m-th sample, x0 represents the horizontal axis represents the midpoint coordinates of the original image captured by the camera, y0 represents the vertical axis represents the midpoint coordinates of the original image captured by the camera, D0 represents the standard distance, V0 represents the standard speed, β and γ represent preset adjustment coefficients (set according to factors such as camera screen size, image quality, and frame rate; generally set to 1), V m This represents the estimated moving speed at the current sampling time.
[0089]
[0090] Where, x m-1 The x-axis represents the position of the center of the circle at the moment preceding the m-th sample. m+1 The horizontal axis position of the center of the circle at the next moment after the m-th sampling, y m-1 The y-axis represents the position of the center of the circle at the moment preceding the m-th sample. m+1 The position of the center of the circle on the vertical axis at the next moment after the m-th sampling, t m+1 Let t represent the time after the m-th sample. m-1 This represents the moment preceding the m-th sampling. After calculating the results of n samplings, the original coefficients of the n weights are proportionally reduced so that their sum equals 1; after calculating the standard radius, the radius parameter in the feature parameters is updated.
[0091] It should be noted that this process is a refitting process for the same object. Since there is a certain error in the circle fitting process, and there are also certain differences between different qualified sample individuals, 20 sample individuals are selected for circle fitting, and the data of various feature parameters after circle fitting are statistically analyzed to ensure that accurate circle hole parameters are obtained.
[0092] It's important to note that the weighting factor is calculated based on positional deviation and stability. Specifically, the closer the target is to the image center and the more stable it is, the greater its weight. This design effectively ensures that stable and centered images contribute more to the results, reducing errors caused by positional offsets or unstable sampling. After calculating the standard radius, the radius parameter in the system is updated to ensure that subsequent detections can use the latest and optimized parameters, which is crucial for maintaining the system's real-time effectiveness and accuracy.
[0093] Furthermore, the hole completion includes, based on the center and the updated radius in the feature parameters, completing the circular hole outline at the hole location with respect to the center, and then aligning the hole according to the completed circular hole. During the hole alignment process, the radii of the upper and lower pull rods are compared. If the radius lengths are equal, the hole alignment process analyzes whether the two circular hole outlines overlap. When the two circular hole outlines overlap, the hole alignment is completed.
[0094] If the radius lengths are not equal, the circular hole contour with the shorter radius is obtained as circular hole contour 1, and the circular hole contour with the larger radius is obtained as circular hole contour 2. Connect the dots of the circular hole contour 1 and the circular hole contour 2, move the pull rod according to the connection direction, and at the same time detect in real time whether the circular hole contour 1 still needs to be completed. If the circular hole contour 1 can obtain the complete circular hole contour without the need for the hole completion, then the hole is completed.
[0095] By using the center point and updated radius to complete the outline of the occluded circular hole, the portion obscured by the sheet-like structure can be restored, giving the hole complete outline information and facilitating subsequent hole alignment operations. This automatic completion method ensures hole alignment accuracy even under occlusion conditions, avoids manual intervention, and improves the automation level of inspection.
[0096] In practical applications, the radii of the holes in the upper and lower tie rods may differ. By comparing the radii of the holes in the upper and lower tie rods, different processing methods are adopted for different radii to ensure that the two can be successfully aligned. Even with dimensional differences, precise connection can be achieved, improving the system's compatibility and flexibility. Designating the hole with the shorter radius as Hole Profile 1 and the one with the larger radius as Hole Profile 2 clarifies the processing object, simplifies subsequent operation steps, and reduces the risk of errors. When the radii are unequal, the tie rod movement is guided by connecting the center points of the two holes, ensuring accurate movement direction and real-time detection of hole completion requirements, allowing for quick determination of whether the hole profile has reached a complete state. This dynamic adjustment and real-time detection method provides real-time feedback during the tie rod alignment process, avoiding alignment failures due to positional deviations and ensuring alignment accuracy.
[0097] By intelligently completing the outline of a circular hole, the system ensures the maximum restoration of the hole's complete edge even under occlusion conditions, facilitating precise hole alignment. Simultaneously, the system dynamically determines completion needs based on real-time detection results, avoiding over-completion and unnecessary operations. This achieves precise hole alignment while maximizing the exposed area of the hole. This method effectively reduces redundant operations during the completion process while maintaining accuracy, improving detection efficiency and system response speed.
[0098] S6: Based on the edge detection results, the tilt angle of the upper and lower pull rods is calculated.
[0099] Furthermore, Hough line detection is used to extract the long side features of the marker, and the included angle between the long side features of the upper and lower tie rods is calculated.
[0100] On the other hand, this embodiment also provides a contour detection system based on a deep-hole emergency door pull rod, which includes:
[0101] The acquisition unit obtains local images based on the deep-hole emergency door pull rod.
[0102] The positioning unit detects the edge of the tie rod and positions the tie rod based on the detection results.
[0103] After the processing unit completes the positioning, it aligns the rod with the hole and performs binarization processing on the pixels at the hole position.
[0104] The detection unit uses binarized pixels to perform edge detection on the hole position; based on the edge detection results, it fits the edge of the circular hole of the pull rod to obtain the outline of the hole position.
[0105] The included angle analysis unit calculates the tilt angle of the upper and lower tie rods based on the edge detection results.
[0106] If the above functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0107] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0108] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0109] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0110] Example 2 is an embodiment of the present invention, which provides a contour detection method based on the pull rod of a deep hole emergency door. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiment.
[0111] The experimental subject was a set of connecting components simulating a deep-hole emergency door pull rod. The experimental equipment included a high-resolution industrial camera, image processing software, a robotic arm control unit, energy consumption detection instruments, and traditional manual inspection methods for comparison. The experiment mainly consisted of four steps: data acquisition, intelligent detection and completion, hole operation, and energy consumption and accuracy assessment.
[0112] Experimental Subjects and Data Acquisition: The experimental subjects were tie rod connecting components under different occlusion conditions, simulating a real-world scenario of a deep hole structure. The experiment involved 10 consecutive image acquisitions using a high-resolution camera, with a 0.5-second interval between each sampling. The acquired data included key features such as the edge and center position of the circular hole. The occlusion level was set to a normal state to compare the performance of the intelligent detection and completion method and the traditional manual method under the same conditions.
[0113] Intelligent Detection and Edge Completion: The Canny edge detection algorithm is used to extract edge information from each sample. Accurate edge extraction is achieved through non-maximum suppression and dual thresholding. For cases with occlusion, morphological closing operations and quadratic connected component analysis are applied to remove non-target edges and noise. Intelligent completion technology is then used to complete the outline of the circular hole. When there is no occlusion, the edge fitting result of the circular hole is directly output; when occluded, the occluded portion is automatically completed based on the center and radius parameters to ensure maximum exposed area.
[0114] Hole Alignment and Automatic Control: The hole alignment operation for the upper and lower tie rods is performed based on the completed contour. If the radii of the holes in the upper and lower tie rods are the same, an overlap check is performed; if the radii are different, the smaller radius hole is designated as Hole 1 and the larger radius hole as Hole 2, the connection direction is determined, and the movement of the axis-shifting carriage is controlled. The completion of the hole alignment operation is determined by detecting whether the hole contour is completely completed. During this process, the energy consumption data of the axis-shifting carriage and the control unit are recorded.
[0115] Energy consumption, accuracy, and manual efficiency evaluation: Energy consumption, accuracy, and completion time during intelligent completion and hole setting operations were recorded and compared with the energy consumption and accuracy of traditional manual inspection methods. Manual hole setting methods include human eye inspection, manual hole setting, and manual calibration. The experiment mainly compared labor consumption, accuracy, and time efficiency.
[0116] Table 1 Experimental Data
[0117]
[0118] Experimental data shows that the intelligent detection and completion method based on this invention is superior to traditional manual detection methods in terms of hole accuracy, control unit energy consumption, manpower consumption, and hole accuracy.
[0119] Hole Alignment Accuracy: The hole alignment accuracy of intelligent detection is significantly higher than that of traditional detection. In the experiment, the hole alignment accuracy of intelligent detection remained between 97.8% and 99.2%, while the traditional detection method only reached between 85.6% and 87.3%. This accuracy advantage is attributed to the superior edge extraction and hole position completion capabilities of intelligent detection, ensuring the maximum exposure area of circular holes, thereby improving hole alignment accuracy. This higher accuracy also reflects the system's adaptive completion capability under occlusion, enabling the system to effectively avoid positioning deviations caused by occlusion.
[0120] Control Unit Energy Consumption and Energy Saving Effect: In all intelligent inspection tests, the average energy consumption of the control unit was 12.8 kJ, while the average energy consumption of the traditional manual inspection method was 18.4 kJ. Intelligent inspection reduces energy consumption by approximately 25% compared to traditional methods, mainly because the dynamic adjustment during intelligent completion minimizes redundant actions, thus effectively reducing the power consumption of the control unit. Furthermore, intelligent completion can quickly complete hole alignment without the energy consumption of multiple manual calibrations required in traditional methods. Therefore, the intelligent inspection and completion method saves significant energy resources during hole alignment, demonstrating excellent energy-saving effects.
[0121] Labor Costs and Efficiency Improvement: The intelligent inspection system is fully automated, requiring no human intervention, while traditional inspection methods necessitate manual hole alignment and multiple calibrations, averaging one person-time per experiment. The automated operation of intelligent inspection significantly reduces labor costs and operation time. For enterprises, reduced labor input translates to lower labor costs and increased work efficiency, especially in complex or hazardous deep-hole environments where intelligent inspection has greater practical value. Furthermore, automated completion and hole alignment operations also reduce human error, further ensuring the accuracy of the hole alignment results.
[0122] Overall accuracy improvement: The accuracy of the intelligent detection method is significantly improved. Intelligent detection improves the accuracy by approximately 20% compared to traditional methods, which is particularly significant under complex occlusion conditions. Intelligent completion ensures high precision in hole completion, while manual detection is less effective and more time-consuming in such complex situations. Therefore, intelligent detection and completion technology demonstrates superior adaptability and reliability.
[0123] Comprehensive analysis shows that the intelligent detection and completion method has significant advantages in terms of hole alignment accuracy, energy consumption, and manpower consumption. Traditional detection methods not only have lower accuracy but also require more manual operation and consume more energy. In contrast, the intelligent detection system can quickly and efficiently complete hole alignment under occlusion conditions, reducing energy consumption and saving human resources. The intelligent detection and completion method of this invention is innovative and novel, and its adaptive completion design makes it highly practical in industrial automation applications.
[0124] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A contour detection method based on a deep-hole emergency door pull rod, characterized in that, include: Acquire local images based on the pull rod of the deep-hole emergency door; The edges of the tie rod are inspected, and the tie rod is positioned based on the results of the edge inspection. After positioning is completed, the rod is aligned with the hole, and the pixels at the hole position are binarized. Edge detection of the hole is performed using binarized pixels; Based on the edge detection results, the edge of the circular hole in the pull rod is fitted to obtain the contour of the hole. Simultaneously, based on the edge detection results, the tilt angles of the upper and lower pull rods are calculated; The local image includes an image of a specific region obtained by locating visual features; The two ends of the pull rod can be connected to each other, and two identical sheet-like structures extend from the upper and lower sections respectively. The front of the sheet-like structure has a round hole, and the connection is made by inserting a pin into the round hole. The distance between the two upper sheet-like structures is less than the distance between the two lower sheet-like structures, and the inner distance between the two upper sheet-like structures is equal to the outer distance between the two lower sheet-like structures. The specific area includes, when positioning the pull rod, the side image area of the sheet-like structure is captured when the upper and lower pull rods are connected; and when aligning the pull rod with the hole, the front image area of the sheet-like structure is captured when the upper and lower pull rods are connected. The lever edge detection includes using the Canny algorithm, which, based on the edge gradient information extracted by the first-order differential operator, achieves precise edge localization by performing non-maximum suppression processing and double threshold judgment on the edge gradient information. The tie rod positioning includes: calculating and marking the tie rod's axis after obtaining its edge; calculating the distance between the axes of the two tie rods; establishing a two-dimensional reference coordinate system with the upper tie rod's center axis as the origin; determining the distance between the lower tie rod's axis and the reference coordinate system; if the lower tie rod's axis is in the negative direction of the reference coordinate system, then the upper tie rod is moved in the negative direction of the coordinate system; otherwise, the upper tie rod is moved in the positive direction of the coordinate system; the horizontal distance between the tie rod and the center axis is 0, thus completing the tie rod positioning. The edge detection of the hole positions includes performing edge detection on the hole positions of the upper and lower pull rods throughout the entire process after the pull rod is positioned; the edge detection of the hole positions includes generating a binary image through an adaptive thresholding method. For the binary image, the first connected component analysis is performed to find and mark the points with the same pixel value in the neighborhood, and the connected components with an area smaller than the preset value are removed. Morphological dilation is performed on a binary image using morphological closing operations, followed by morphological erosion to connect disconnected regions in the binary image. After completing the first morphological closing operation, a second connected component analysis is performed to eliminate non-target edge connected components. Median filtering reduces the protruding parts of the edges, making them smoother; The second morphological closing operation is used to eliminate holes inside the connected components and enhance the edges; The edge detection results of the hole position are obtained; The fitting of the circular hole edge of the pull rod includes using Hough transform as a method to extract geometric features of the image, thereby extracting the circular hole edge features; During the extraction of the edge features of the circular hole, the parameters of the Hough circle transform are set as follows: the radius range is set to... Set the angle range to (0, 360°); select edge points and vote, perform cumulative judgment, confirm the partial circle features, and obtain the feature parameters of the partial circle results; The characteristic parameters of the output circle include: the center, radius, and angular range of the arc length; in, This indicates the minimum recognizable radius of the circular hole. Indicates the maximum recognition radius of the circular hole; If the angle range of the extracted partial circle is 360°, it is determined that there is no occlusion at the current hole position, and the fitting result of the hole edge is directly output; at the same time, the value of the hole position is obtained. The next identified fitting result as having no occlusion is... The standard radius is obtained by taking a weighted average of the radii among the aforementioned feature parameters. If the angle range of the extracted partial circle is less than 360°, it is determined that the hole of the pull rod is blocked by the sheet structure, and the hole is filled in according to the identified hole edge. in, This indicates the preset number of sampling times; during the weighted averaging process, the weight in each sampling result is related to the position of the detected target in the original sampled image and the stability of the detected target at the sampling time; The original coefficients of the weights of the m-th sampling result are expressed as: , in, The x-axis position represents the center coordinates of the circle in the m-th sampling. The vertical axis represents the coordinates of the center of the circle in the m-th sampling. The horizontal axis represents the position of the midpoint of the original image captured by the camera. The vertical axis represents the position of the midpoint of the original image captured by the camera. Indicates the standard distance length. Indicates the standard speed. and These represent the preset adjustment coefficients. This represents the estimated speed at the current sampling time. , in, This indicates the horizontal axis position of the center of the circle at the moment preceding the m-th sample. The horizontal axis position of the center of the circle at the next moment after the m-th sampling. This represents the vertical axis position of the center of the circle at the moment preceding the m-th sample. The vertical axis position of the center of the circle at the next moment after the m-th sampling. This represents the time after the m-th sample. This represents the moment preceding the m-th sample; After completion After calculating the sampling results, for The original coefficients with a weight of -1 are proportionally reduced so that their sum equals 1; After the standard radius is calculated, the radius parameter in the characteristic parameters is updated.
2. The contour detection method based on deep-hole emergency door pull rod as described in claim 1, characterized in that: The hole completion includes, based on the center and the updated radius in the feature parameters, completing the outline of the circular hole at the hole location with respect to the center, and then aligning the hole based on the completed circular hole. During the hole-setting process, the radii of the upper and lower tie rods are compared. If the radii are equal, the hole-setting process is completed when the two circular hole outlines overlap. If the radius lengths are not equal, the circular hole contour with the shorter radius is obtained as circular hole contour 1, and the circular hole contour with the larger radius is obtained as circular hole contour 2. Connect the dots of the circular hole contour 1 and the circular hole contour 2, move the pull rod according to the connection direction, and at the same time detect in real time whether the circular hole contour 1 still needs to be completed. If the circular hole contour 1 can obtain the complete circular hole contour without the need for the hole completion, then the hole is completed.
3. The contour detection method based on the deep-hole emergency door pull rod as described in claim 2, characterized in that: The process of determining the tilt angle of the upper and lower tie rods includes extracting the long side features of the marker using Hough line detection and calculating the included angle between the long side features of the upper and lower tie rods.
4. A contour detection system based on a deep-hole emergency door pull rod, employing the method described in any one of claims 1-3, characterized in that: The acquisition unit obtains local images based on the deep-hole emergency door pull rod; The positioning unit detects the edge of the tie rod and positions the tie rod based on the detection results. After the processing unit completes the positioning, it aligns the rod with the hole and performs binarization processing on the pixels at the hole position. The detection unit uses binarized pixels to perform edge detection on the hole; based on the edge detection results, it fits the edge of the circular hole of the pull rod to obtain the outline of the hole. The included angle analysis unit calculates the tilt angle of the upper and lower tie rods based on the edge detection results.
5. A computer device, comprising: Memory and processor; The memory stores a computer program, characterized in that: when the processor executes the computer program, it implements the steps of the method as described in any one of claims 1-3.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1-3.
Citation Information
Patent Citations
Method for correcting azimuth errors of inner bore of part in process of assembling axle hole
CN102128589A