Contour detection method and system based on deep hole accident door pull rod
Through the contour detection method based on the deep hole accident door pull rod, image processing technology is used to detect the edge and hole position of the pull rod, and automatic hole operation is realized, solving the problems of local occlusion and operation redundancy in the prior art, and improving detection accuracy and working efficiency.
Patent Information
- Application Number
- CN202411890194.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2044-12-20
AI Technical Summary
The existing contour detection methods have limitations when facing local occlusion, poor accuracy for holes, and have problems with operational redundancy.
The contour detection method based on the deep hole accident door pull rod is adopted. By acquiring local images, detecting the edge of the pull rod, positioning and binarizing the hole position, fitting the contour of the hole position using the edge detection results, and completing the hole position according to the results, finally realizing automatic hole alignment of the upper and lower pull rods.
It realizes accurate identification and positioning of the edges of the tie rod and hole positions, reduces manual intervention, improves detection accuracy and hole accuracy, and improves work efficiency and system safety.
Smart Images

Figure CN120031902A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of contour detection, and in particular to a contour detection method and system based on a deep hole emergency door pull rod. Background Art
[0002] With the continuous development of industrial automation and intelligent manufacturing, the demand for mechanical equipment to operate in complex environments is increasing. Especially in large industrial facilities such as nuclear power and petrochemicals, the requirements for safety and precision of equipment and components involving deep hole structures are increasing. As a key component, the positioning and connection accuracy of the deep hole emergency door pull rod is directly related to the safe operation of the system.
[0003] However, due to the particularity of the deep hole structure, the visibility of the tie rod connection is limited, and traditional detection and positioning methods are difficult to meet the requirements of high precision and high stability. Usually, the positioning of the tie rod, hole alignment and angle calibration require manual operation, which is not only inefficient and has large errors, but also difficult to adapt to the operating requirements of complex working environments and narrow 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 the existing contour detection method has limitations in the face of local occlusion, poor accuracy for holes, and operation redundancy.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: a contour detection method based on a deep hole emergency door pull rod, comprising:
[0007] Obtain a local image based on the deep hole accident door tie rod;
[0008] Detect the edge of the tie rod and position the tie rod according to the result of the tie rod edge detection;
[0009] After positioning is completed, the rod is pulled to align the hole, and the pixel points of the hole position are binarized;
[0010] Use binary pixel points to perform edge detection on the hole position;
[0011] Based on the edge detection result, the edge of the circular hole of the pull rod is fitted to obtain the contour of the hole position;
[0012] At the same time, the inclination angles of the upper and lower pull rods are solved according to the edge detection results.
[0013] As a preferred solution of the contour detection method based on the deep hole accident door pull rod of the present invention, wherein: the local image includes an image of a specific area obtained by positioning the visual features;
[0014] The two ends of the pull rod can be connected to each other, and the upper and lower sections each extend two identical sheet structures, the front of the sheet structure has a circular hole, and the connection is made by inserting a pin in the circular hole, the spacing between the two sheet structures at the upper end is smaller than the spacing between the two sheet structures at the lower end, and the inner spacing between the two sheet structures at the upper end is equal to the outer spacing between the two sheet structures at the lower end;
[0015] The specific area includes, when positioning the pull rod, collecting the side image area of the sheet structure when the upper and lower pull rods are connected; when aligning the pull rod holes, collecting the front image area of the sheet structure when the upper and lower pull rods are connected.
[0016] As a preferred solution of the contour detection method based on the deep hole accident door pull rod of the present 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 tie rod edge, calculating the tie rod axis and marking it, calculating the axis distance between the two tie rods, establishing a two-dimensional reference coordinate system with the center axis of the upper tie rod as the origin, judging the distance between the axis of the lower tie rod and the lower tie rod, if the lower axis is in the negative direction of the reference coordinate system, 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, thereby completing the tie rod positioning.
[0018] As a preferred solution of the contour detection method based on the deep hole accident door tie rod of the present invention, wherein: the edge detection of the hole position includes, after the tie rod is positioned, edge detection of the hole positions of the upper and lower tie rods is performed throughout the whole process; the edge detection of the hole position includes generating a binary image by an adaptive threshold processing method;
[0019] Perform the first connected domain analysis on the binary image, find out the points with the same pixel value in the neighborhood and mark them, and remove the connected domains with an area smaller than the preset value;
[0020] The binary image is morphologically expanded using the morphological closing operation, and then morphologically eroded to connect the non-connected areas in the binary image.
[0021] After completing the first morphological closing operation, the second connected domain analysis is performed to remove non-target edge connection domains;
[0022] Through median filtering, the protruding parts of the edge are reduced to make the edge smooth;
[0023] The second morphological closing operation is used to eliminate the internal holes of the connected domain and enhance the edges.
[0024] The edge detection result of the hole position is obtained.
[0025] As a preferred solution of the contour detection method based on the deep hole accident door pull rod of the present invention, wherein: the fitting of the circular hole edge of the pull rod includes using Hough transform as a method for extracting image geometric features to achieve the extraction of circular hole edge features;
[0026] In the process of extracting the edge features of the circular hole, set the parameters of the Hough circle transform: set the radius range to [r min ,r max ], set the angle range to (0, 360°]; select edge points and vote, after cumulative judgment, confirm the partial circle features, and obtain the feature parameters of the partial circle result; the output partial circle feature parameters include: the angle range of the center, radius and arc length;
[0027] Among them, r min Indicates the minimum identification radius of the circular hole, r max Indicates the maximum recognition radius of a 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 circular hole edge is directly output; at the same time, the fitting results of the current hole position that are identified as not having occlusion n times are obtained, and the radii in the n characteristic parameters are weighted averaged to obtain the standard radius;
[0029] When the angle range of the extracted partial circle is less than 360°, it is determined that the hole position of the tie rod is blocked by the sheet structure, and the hole position is completed according to the identified hole position edge;
[0030] Wherein, n represents the preset number of sampling times; in the weighted averaging process, the weight in each sampling result is related to the position of the detection target in the original sampling image and the stability of the detection target at the sampling moment;
[0031] The original coefficient of the weight of the mth sampling result is expressed as:
[0032]
[0033] Among them, x m Indicates the horizontal axis position of the center coordinate of the mth sampling, y m Indicates the vertical axis position of the center coordinate of the mth sampling, x 0 Indicates the horizontal axis position of the midpoint coordinates of the original image captured by the camera, y m Indicates the vertical axis position of the midpoint coordinates of the original image captured by the camera, D 0 Indicates the standard distance length, V 0represents the standard speed, β and γ respectively represent the preset adjustment coefficients, and V m represents the estimated value of the moving speed at the current sampling moment;
[0034]
[0035] where x m-1 represents the horizontal axis position of the center of the circle at the previous moment of the m-th sampling, and x m+1 the horizontal axis position of the center of the circle at the next moment of the m-th sampling, and y m-1 represents the vertical axis position of the center of the circle at the previous moment of the m-th sampling, and y m+1 the vertical axis position of the center of the circle at the next moment of the m-th sampling, and t m+1 represents the next moment of the m-th sampling, and t m-1 represents the previous moment of the m-th sampling;
[0036] After calculating the results of n samplings, the original coefficients of the n weights are reduced in geometric progression so that their sum is equal to 1; after calculating the standard radius, the radius parameter in the characteristic parameters is updated.
[0037] As a preferred solution of the contour detection method based on the pull rod of the deep-hole accident gate of the present invention, wherein: the hole position completion includes, according to the center of the circle and the updated radius in the characteristic parameters, complementing the circular hole contour at the hole position for the center of the circle, and aligning the holes according to the complemented circular hole;
[0038] During the hole alignment process, the radii of the upper and lower pull rods are compared. If the radius lengths are equal, when aligning the holes, analyze whether the two circular hole contours coincide. When the two circular hole contours coincide, the hole alignment is completed;
[0039] If the radius lengths are not equal, obtain the circular hole contour with the shorter radius as the circular hole contour 1, and obtain the circular hole contour with the larger radius as the circular hole contour 2; connect the centers of the circular hole contour 1 and the circular hole contour 2, move the pull rod in the connection direction, and simultaneously detect in real time whether the circular hole contour 1 still needs to perform the hole position completion. If the circular hole contour 1 does not need to perform the hole position completion to obtain the circular hole contour with the complete hole position, the hole alignment is completed.
[0040] As a preferred solution of the contour detection method based on the pull rod of the deep-hole accident gate of the present invention, wherein: the solution of the inclination angles of the upper and lower pull rods includes using the Hough line detection to extract the long side feature of the mark and calculating the included angle of the long side features of the upper and lower pull rods.
[0041] A contour detection system based on the pull rod of the deep-hole accident gate adopting any method as described in the present invention, characterized in that:
[0042] An acquisition unit, which obtains a local image based on the pull rod of the deep hole accident door;
[0043] The positioning unit detects the edge of the tie rod and positions the tie rod according to the result of the tie rod edge detection;
[0044] The processing unit, after completing the positioning, performs the rod alignment and performs binary processing on the pixel points of the hole position;
[0045] The detection unit performs edge detection on the hole position using the binarized pixel points; based on the edge detection result, the circular hole edge of the pull rod is fitted to obtain the contour of the hole position;
[0046] The angle analysis unit solves the inclination angle of the upper and lower pull rods according to the edge detection result.
[0047] A computer device comprises: a memory and a processor; the memory stores a computer program, wherein: the processor implements the steps of any one of the methods of the present invention when executing the computer program.
[0048] A computer-readable storage medium stores a computer program, wherein: when the computer program is executed by a processor, the steps of any one of the methods of the present invention are implemented.
[0049] Beneficial effects of the present invention: The contour detection method based on the deep hole accident door pull rod provided by the present invention can accurately identify and locate the pull rod edge and hole position, and realize the automatic hole alignment operation of the pull rod. By combining image processing technologies such as Canny edge detection and Hough transform, it can effectively deal with local occlusion and complex background, improve the detection accuracy and hole alignment accuracy, reduce manual intervention, and improve work efficiency and system safety. At the same time, the simplest operation can be given in the case of different hole sizes to reduce redundancy. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0051] Figure 1 An overall flow chart of a contour detection method based on a deep hole accident door pull rod provided in the first embodiment of the present invention;
[0052] Figure 2 A rod edge detection diagram of a method for detecting a contour of a deep hole accident door rod provided in the first embodiment of the present invention;
[0053] Figure 3 A connected domain analysis diagram of a contour detection method based on a deep hole accident door pull rod provided in the first embodiment of the present invention;
[0054] Figure 4 An edge extraction flow chart of a contour detection method based on a deep hole accident door pull rod provided in the first embodiment of the present invention;
[0055] Figure 5 A Hough detection principle diagram of a contour detection method based on a deep hole emergency door pull rod provided in the first embodiment of the present invention. DETAILED DESCRIPTION
[0056] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0057] Example 1, reference Figure 1-4 , as an embodiment of the present invention, provides a contour detection method based on a deep hole accident door pull rod, comprising:
[0058] S1: Obtain a local image based on the deep hole accident door pull rod.
[0059] The local image includes an image of a specific area obtained by positioning the visual features. The two ends of the pull rod can be connected to each other, and the upper and lower sections each extend two identical sheet structures, and the front of the sheet structure has a circular hole, which is connected by inserting a pin in the circular hole, and the spacing between the two sheet structures at the upper end is smaller than the spacing between the two sheet structures at the lower end, and the inner spacing between the two sheet structures at the upper end is equal to the outer spacing between the two sheet structures at the lower end.
[0060] Furthermore, the specific area includes, when positioning the pull rod, collecting the side image area of the sheet structure when the upper and lower pull rods are connected; when aligning the pull rods with holes, collecting the front image area of the sheet structure when the upper and lower pull rods are connected.
[0061] It should be noted that the local image focuses on the key area of the tie rod connection, avoiding the interference of background clutter information, which helps to more accurately extract the details of the tie rod edge, hole position, etc., and ensure the accuracy of detection. The overall image contains a large number of irrelevant areas, which may interfere with the image processing algorithm and reduce the accuracy of edge and hole detection. Collecting images in local areas can greatly reduce the amount of data, thereby reducing the computational burden of image processing and improving the system response speed. This is especially important for applications that require real-time or quasi-real-time processing, and can significantly improve the work efficiency of the system.
[0062] S2: Detect the edge of the tie rod and position the tie rod according to the result of the tie rod edge detection.
[0063] Furthermore, using the Canny algorithm, based on the edge gradient information extracted by the first-order differential operator, accurate edge positioning is 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 the axis of the tie rod and mark it, 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, and determine the distance between the axis of the lower tie rod and it. If the lower axis is in the negative direction of the reference coordinate system, move the upper tie rod in the negative direction of the coordinate system; otherwise, move the upper tie rod in the positive direction of the coordinate system; the horizontal distance at the vertical center line is 0, thus completing the tie rod positioning. Figure 2 shown.
[0065] It should be noted that the sheet structures are constructed at both ends of the tie rod, and the two sheet structures are symmetrical about the tie rod axis. Therefore, after the alignment of the axis is completed, the position of the sheet structure will naturally be aligned. Using the Canny algorithm for edge detection, the contour edge of the tie rod can be accurately identified. The Canny algorithm calculates the gradient change through the first-order differential operator, combines non-maximum suppression and double threshold judgment, effectively filters out noise, and obtains a clear tie rod edge. This provides high-precision edge information for subsequent positioning operations, ensuring that the calculated tie rod axis is accurate and reliable. Based on the detected tie rod edge, the tie rod axis is calculated and marked, which is equivalent to establishing an abstract linear reference on the actual position of the tie rod. Through this axis, the offset distance between the upper and lower tie rods can be measured intuitively and effectively, providing a clear positioning target. When the horizontal distance of the vertical center line tends to 0, it means that the axis of the upper and lower tie rods coincide, thereby completing the precise positioning. This coincidence state serves as a stop condition to ensure the correct positioning of the tie rod.
[0066] S3: After positioning is completed, the rod is pulled to align the hole, and the pixel points of the hole position are binarized.
[0067] Furthermore, the binarization processing includes adaptive threshold processing: the adaptive threshold has a better processing effect on images with large differences in brightness and darkness. 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 the binary pixel points to perform edge detection on the hole position.
[0069] The first connected domain analysis is performed on the binary image to find out the points with the same pixel value in the neighborhood and mark them, and remove the connected domains with an area smaller than the preset value; Connected domain analysis: For the binary image, find out the points with the same pixel value in the neighborhood and mark them. Through the connected domain analysis, the area size, center position and other parameter information of each connected domain can be obtained. Usually, 4 neighborhoods or 8 neighborhoods are used, and their schematic diagrams are as follows: Figure 3 As shown on the left and right.
[0070] The binary image is morphologically expanded using the morphological closing operation, and then morphologically eroded to connect the non-connected areas in the binary image, so as to facilitate the subsequent extraction of edge information.
[0071] After completing the first morphological closing operation, the second connected domain analysis is performed to eliminate non-target edge connection domains.
[0072] Through median filtering, the protruding parts of the edges are reduced and the edges are smoothed.
[0073] The second morphological closing operation is used to eliminate the internal holes of the connected domain and enhance the edges.
[0074] Get the edge detection result of the hole position, the specific process is as follows Figure 4 .
[0075] It should be said that connected domain analysis is a standard method in binary image processing. It can find adjacent pixels and calculate the area and center position of each connected domain through 4-neighborhood or 8-neighborhood analysis. This method has been widely used in noise removal and target area extraction. Common image processing libraries (such as OpenCV) support direct implementation of connected domain analysis. Closing operation is a classic method in morphological processing, which includes two-step operations of dilation and erosion, which are used to fill small holes in binary images and enhance edge connectivity and smoothness. Dilation and erosion operations can use different structural elements, such as rectangles, circles, etc., to adapt to different image structural features. OpenCV and other libraries provide a direct calling interface for closing operations, which can stably implement this step. Median filtering is a commonly used smoothing technique that can effectively remove noise and reduce the protruding parts of the edge, making the edge smoother. Median filtering is very common in image processing applications, supports various filter window size settings, and can adapt to different image smoothing requirements. The above steps can be combined in the same image processing pipeline and executed step by step. The implementation complexity of each step is low, and all steps are supported by ready-made algorithms. When combined, edge detection and enhancement of the hole can be easily achieved, ensuring the stability and accuracy of the results.
[0076] S5: Based on the edge detection result, the edge of the circular hole of the pull rod is fitted to obtain the contour of the hole.
[0077] Specifically, Hough transform is used as a method to extract the geometric features of the image to realize the extraction of the circular hole edge features. In the process of extracting the circular hole edge features, the parameters of Hough circle transform are set: the radius range is set to [r min ,r max ], set the angle range to (0, 360°]; select edge points and vote, and after 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.
[0078] Among them, r min Indicates the minimum identification radius of the circular hole, r max Indicates the maximum recognition radius of a circular hole.
[0079] It should be noted that by observing the circular hole image features, it can be found that it is circular, so based on the edge detection results in the previous section, the circular hole edge is fitted to extract relevant parameters. In digital image processing, Hough transform is an important method for extracting image geometric features, and is often used to extract straight line, circle and ellipse features. The following will analyze the extraction of circular hole edge features using Hough transform.
[0080] The essence of Hough detection is to transform the feature points with mutual relationship in the image space into a specific parameter space to realize clustering. The basic idea is to transform the pixel points in the image space into curves or surfaces in the parameter space. The points with the same features in the image space will intersect in the parameter space after the transformation. The image features are usually detected according to the accumulation of these intersection points. Taking the Hough transform to realize line detection as an example, it is assumed that the equation of the line in the image space and the parameter space equation corresponding to the coordinate point in the image space after the Hough transform are as follows.
[0081] y=kx+b
[0082] ρ=xcosθ+ysinθ
[0083] Then for the line feature y=k in the image space 1 x+b 1 , after Hough transform processing, in the parameter space, it will be the same as the point (θ 1 ,ρ 1 ). The detection principle of image space and parameter space is as follows: Figure 5 As shown. For Hough circle detection, the principle is similar to the above-mentioned line detection method, that is, mapping the feature curve to the corresponding parameter space for solution. Unlike line detection, which can determine the line by the slope and intercept of the line, the circle requires the center coordinates (a, b) and the radius r to determine the circle, so it needs to be converted to a higher-dimensional three-dimensional parameter space H (a, b, r) when performing the transformation. When performing Hough circle detection, curve fitting is implemented based on edge features, and it is usually used in conjunction with the Canny algorithm.
[0084] 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 circular hole edge is directly output; at the same time, the fitting results of the current hole position that are identified as not occluded for n times are obtained, and the radius in the n characteristic parameters is weighted averaged to obtain the standard radius. When the angle range of the extracted partial circle is less than 360°, it is determined that the hole position of the pull rod is blocked by the sheet structure, and the hole position is completed according to the identified hole position edge.
[0085] Wherein, n represents the preset number of sampling times; in the weighted averaging process, the weight in each sampling result is related to the position of the detection target in the original sampling image and the stability of the detection target at the sampling moment.
[0086] The original coefficient of the weight of the mth sampling result is expressed as:
[0087]
[0088] Among them, x m Indicates the horizontal axis position of the center coordinate of the mth sampling, ym Indicates the vertical axis position of the center coordinate of the mth sampling, x 0 Indicates the horizontal axis position of the midpoint coordinates of the original image captured by the camera, y m Indicates the vertical axis position of the midpoint coordinates of the original image captured by the camera, D 0 Indicates the standard distance length, V 0 represents the standard speed, β and γ represent the preset adjustment coefficients (which are set according to factors such as camera screen size and image quality frame rate. Generally, it is set to 1), V m Indicates the estimated moving speed at the current sampling time.
[0089]
[0090] Among them, x m-1 Indicates the horizontal axis position of the center of the circle at the moment before the mth sampling, x m+1 The horizontal axis position of the center of the circle at the moment after the mth sampling, y m-1 Indicates the vertical axis position of the center of the circle at the moment before the mth sampling, y m+1 The vertical axis position of the center of the circle at the moment after the mth sampling, t m+1 represents the moment after the mth sampling, t m-1 After the calculation of the n-th sampling results is completed, the original coefficients of the n weights are geometrically reduced so that their cumulative sum is equal to 1; after the calculation of the standard radius is completed, the radius parameter in the characteristic parameter is updated.
[0091] It should be noted that this process is a re-fitting process for the same object. Due to certain errors in the circle fitting process and certain differences between different qualified sample individuals, 20 sample individuals are selected for circle fitting, and data statistics are performed on various characteristic parameters after circle fitting to ensure accurate circular hole parameters.
[0092] It should be noted that the weight factor is calculated based on position deviation and stability. Specifically, the closer the detection target is to the center of the image and the more stable it is, the greater the weight. This design effectively ensures that stable and centered images contribute more to the results, reducing errors caused by position offset or unstable sampling. After calculating the standard radius, updating the radius parameters in the system ensures that the latest and optimized parameters can be used for subsequent detections, which is particularly critical to maintaining the real-time effectiveness and accuracy of the system.
[0093] Furthermore, the hole position completion includes, according to the center of the circle and the updated radius in the characteristic parameters, completing the circular hole contour at the hole position with respect to the center of the circle, and 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, when aligning the holes, it is analyzed whether the two circular hole contours overlap. When the two circular hole contours overlap, the hole alignment is completed.
[0094] If the radius lengths are not equal, obtain the circular hole contour with a shorter radius as circular hole contour 1, and obtain the circular hole contour with a larger radius as circular hole contour 2; connect the dots of the circular hole contour 1 and the circular hole contour 2, move the pull rod in 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 does not need to be completed to obtain the circular hole contour with a complete hole position, the hole is completed.
[0095] By using the center of the circle and the updated radius to complete the outline of the obscured circular hole, the part obscured by the sheet structure can be restored, so that the circular hole has complete outline information, which is convenient for subsequent hole alignment operations. This automatic completion processing method can ensure the accuracy of hole alignment in the case of occlusion, avoid manual intervention, and improve the automation level of detection.
[0096] In actual applications, the radii of the circular holes of the upper and lower tie rods may be different. By comparing the radius lengths of the circular holes of the upper and lower tie rods, different processing methods are adopted for different radii to ensure that the two can be smoothly aligned. Even if there are size differences, accurate connection can be achieved, which improves the compatibility and flexibility of the system. The circular hole with a short radius is set as circular hole contour 1, and the circular hole contour 2 with a large radius. This can clarify the processing object, simplify subsequent operation steps, and reduce the risk of error. In the case of unequal radii, the movement of the tie rod is guided by connecting the center points of the two circular holes to ensure the accuracy of the movement direction, and the need for hole completion is detected in real time, so that it can quickly determine whether the circular hole contour has reached a complete state. This method of dynamic adjustment and real-time detection can provide real-time feedback during the tie rod hole alignment process, avoid hole alignment failures due to position deviation, and ensure hole alignment accuracy.
[0097] By intelligently completing the circular hole contour, the complete edge of the circular hole is restored to the greatest extent possible in the case of occlusion, so as to facilitate accurate hole alignment. At the same time, the system dynamically determines the completion requirements based on the real-time detection results to avoid over-completion and unnecessary operations, thereby achieving accurate alignment of the holes while maximizing the exposed area of the circular holes. This method can effectively reduce redundant operations in the completion process while ensuring accuracy, thereby improving detection efficiency and system response speed.
[0098] S6: according to the edge detection result, the inclination angle of the upper and lower pull rods is solved.
[0099] Furthermore, Hough line detection is used to extract the long side features of the logo and calculate the angle between the long side features of the upper and lower pull rods.
[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 a local image based on the deep hole accident door pull rod.
[0102] The positioning unit detects the edge of the tie rod and positions the tie rod according to the result of the tie rod edge detection.
[0103] After the processing unit completes the positioning, it pulls the rod to align the hole and performs binary processing on the pixel points of the hole position.
[0104] The detection unit performs edge detection on the hole position by using the binarized pixel points; and based on the edge detection result, the circular hole edge of the pull rod is fitted to obtain the contour of the hole position.
[0105] The angle analysis unit solves the inclination angle of the upper and lower pull rods according to the edge detection result.
[0106] If the above functions are implemented in the form of 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 the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0107] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0108] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0109] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0110] Example 2 is an embodiment of the present invention, which provides a contour detection method based on a deep hole emergency door pull rod. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.
[0111] The experimental object is a set of connecting parts simulating deep hole emergency door pull rods. The experimental equipment includes high-resolution industrial cameras, image processing software, robotic arm control unit, energy consumption detection instruments, and traditional manual detection methods for comparison. The experiment is mainly divided into four steps: data collection, intelligent detection and completion, hole operation, and energy consumption and accuracy evaluation.
[0112] Experimental objects and data collection: The experimental objects are tie rod connection parts with different occlusion conditions, simulating the real scene of deep hole structure. The experiment uses a high-resolution camera to collect 10 consecutive images, with a sampling interval of 0.5 seconds each time. The collected data includes key features such as the edge of the circular hole and the position of the center of the circle. The degree of occlusion is set to the normal state in order 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 the edge information of each sample, and accurate edge extraction is achieved through non-maximum suppression and double threshold judgment. In the case of occlusion, morphological closing operations are applied and secondary connected domain analysis is performed to remove non-target edges and noise, and the circular hole contour is completed through intelligent completion technology. When there is no occlusion, the circular hole edge fitting result is directly output; under occlusion, the occluded part is automatically completed according to the center and radius parameters to ensure that the maximum exposed area is achieved.
[0114] Hole alignment and automatic control: The hole alignment of the upper and lower tie rods is performed through the completed contour. If the radius of the upper and lower tie rod holes is the same, a coincidence check is performed; if the radius is different, the small radius hole is taken as hole 1 and the large radius hole is taken as hole 2 to determine the connection direction and control the movement of the axis shifting trolley. By detecting whether the hole contour is completely completed, it is determined whether the hole alignment operation is completed. During this process, the energy consumption data of the axis shifting trolley and the control unit are recorded.
[0115] Energy consumption, accuracy, and labor efficiency evaluation: The energy consumption, accuracy, and completion time of the intelligent completion and hole alignment operations are recorded, and compared with the energy consumption and accuracy of traditional manual inspection methods. Manual hole alignment methods include human eye inspection, manual hole alignment, and manual calibration. The experiment mainly compares labor consumption, accuracy, and time efficiency.
[0116] Table 1 Experimental data
[0117]
[0118] It can be seen from the experimental data that the intelligent detection and completion method based on the present invention is superior to the traditional manual detection method in terms of hole alignment accuracy, control unit energy consumption, manpower consumption and hole alignment accuracy.
[0119] Hole alignment accuracy: The hole alignment accuracy of intelligent detection is significantly higher than that of traditional detection. In the test, the hole alignment accuracy of intelligent detection was maintained between 97.8% and 99.2%, while the traditional detection method was only between 85.6% and 87.3%. This accuracy advantage is due to the advantages of intelligent detection in edge extraction and hole position completion, which ensures the exposure of the maximum area of the circular hole, thereby improving the 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 detection tests, the average energy consumption of the control unit was 12.8 kJ, while the average energy consumption of the traditional manual detection method was 18.4 kJ. The energy consumption of intelligent detection is reduced by about 25% compared with the traditional method, mainly because the dynamic adjustment in the intelligent completion process can minimize redundant actions, thereby effectively reducing the power consumption of the control unit. In addition, intelligent completion can quickly complete the hole alignment without the energy consumption of multiple manual calibrations in the traditional method. Therefore, the intelligent detection and completion method saves significant energy resources in the hole alignment process and has a good energy-saving effect.
[0121] Manpower consumption and efficiency improvement: The intelligent detection system is fully automated and does not require human intervention, while the traditional detection method requires manual hole alignment and multiple calibrations, with an average manpower consumption of 1 person / experiment. The automated operation of intelligent detection significantly reduces labor costs and operation time. For enterprises, reducing manpower input means reducing labor costs and improving work efficiency, especially in complex or dangerous deep hole environments, where intelligent detection has greater practical value. In addition, automated completion and hole alignment operations also reduce human errors, further ensuring the accuracy of hole alignment results.
[0122] Overall accuracy improvement: The accuracy of intelligent detection methods has been significantly improved. Intelligent detection has improved the accuracy by about 20% compared to traditional methods, which is particularly significant in cases where occlusion conditions are more complex. Intelligent completion can ensure high-precision completion of holes, while manual detection is not effective in such complex situations and takes longer. Therefore, intelligent detection and completion technology has shown excellent adaptability and reliability.
[0123] Comprehensive analysis shows that the intelligent detection and completion method has significant advantages in hole alignment accuracy, energy consumption and manpower consumption. Traditional detection methods not only have low accuracy, but also require more manual operations and higher energy consumption. The intelligent detection system can quickly and efficiently complete hole alignment under occlusion conditions, reduce energy consumption and save human resources. The intelligent detection and completion method of the present invention is innovative and novel, and its adaptive completion design makes it have extremely high practical value 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 rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in 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: Obtain a local image based on the deep hole accident door tie rod; Detect the edge of the tie rod and position the tie rod according to the result of the tie rod edge detection; After positioning is completed, the rod is pulled to align the hole, and the pixel points of the hole position are binarized; Use binary pixel points to perform edge detection on the hole position; Based on the edge detection result, the edge of the circular hole of the pull rod is fitted to obtain the contour of the hole position; At the same time, the inclination angles of the upper and lower pull rods are solved according to the edge detection results.
2. The contour detection method based on the deep hole emergency door pull rod according to claim 1 is characterized in that: The local image includes an image of a specific area obtained by locating visual features; The two ends of the pull rod can be connected to each other, and the upper and lower sections each extend two identical sheet structures, the front of the sheet structure has a circular hole, and the connection is made by inserting a pin in the circular hole, the spacing between the two sheet structures at the upper end is smaller than the spacing between the two sheet structures at the lower end, and the inner spacing between the two sheet structures at the upper end is equal to the outer spacing between the two sheet structures at the lower end; The specific area includes, when positioning the pull rod, collecting the side image area of the sheet structure when the upper and lower pull rods are connected; when aligning the pull rod holes, collecting the front image area of the sheet structure when the upper and lower pull rods are connected.
3. The contour detection method based on the deep hole emergency door pull rod according to claim 2 is characterized in that: 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; The tie rod positioning includes: after obtaining the tie rod edge, calculating the tie rod axis and marking it, calculating the axis distance between the two tie rods, establishing a two-dimensional reference coordinate system with the center axis of the upper tie rod as the origin, judging the distance between the axis of the lower tie rod and the lower tie rod, if the lower axis is in the negative direction of the reference coordinate system, 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, thereby completing the tie rod positioning.
4. The contour detection method based on the deep hole emergency door pull rod according to claim 3 is characterized in that: The edge detection of the hole position includes, after the pull rod is positioned, performing edge detection on the hole positions of the upper and lower pull rods throughout the whole process; the edge detection of the hole position includes generating a binary image by a method of adaptive threshold processing; Perform the first connected domain analysis on the binary image, find out the points with the same pixel value in the neighborhood and mark them, and remove the connected domains with an area smaller than the preset value; The binary image is morphologically expanded using morphological closing operations, and then morphologically eroded to connect the non-connected areas in the binary image. After completing the first morphological closing operation, the second connected domain analysis is performed to remove non-target edge connection domains; Through median filtering, the protruding parts of the edge are reduced to make the edge smooth; The second morphological closing operation is used to eliminate the internal holes of the connected domain and enhance the edges. The edge detection result of the hole position is obtained.
5. The contour detection method based on the deep hole emergency door pull rod according to claim 4 is characterized in that: The fitting of the circular hole edge of the pull rod includes using Hough transform as a method for extracting image geometric features to achieve the extraction of circular hole edge features; In the process of extracting the edge features of the circular hole, set the parameters of the Hough circle transform: set the radius range to [r min ,r max ], set the angle range to (0, 360°]; select edge points and vote, make cumulative judgments, confirm the partial circle features, and obtain the feature parameters of the partial circle results; The characteristic parameters of the output partial circle include: the angular range of the center, radius and arc length; Among them, r min Indicates the minimum identification radius of the circular hole, r max Indicates the maximum recognition radius of a circular hole; 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 circular hole edge is directly output; at the same time, the fitting results of the current hole position that are identified as not having occlusion n times are obtained, and the radii in the n characteristic parameters are weighted averaged to obtain the standard radius; When the angle range of the extracted partial circle is less than 360°, it is determined that the hole position of the tie rod is blocked by the sheet structure, and the hole position is completed according to the identified hole position edge; Wherein, n represents the preset number of sampling times; in the weighted averaging process, the weight in each sampling result is related to the position of the detection target in the original sampling image and the stability of the detection target at the sampling moment; The original coefficient of the weight of the mth sampling result is expressed as: Among them, x m Indicates the horizontal axis position of the center coordinate of the mth sampling, y m represents the vertical axis position of the center coordinates of the mth sampling, x0 represents the horizontal axis position of the midpoint coordinates of the original image collected by the camera, and y m represents the vertical axis position of the midpoint coordinate of the original image captured by the camera, D0 represents the standard distance length, V0 represents the standard speed, β and γ represent the preset adjustment coefficients, V m Indicates the estimated value of the moving speed at the current sampling moment; Among them, x m-1 Indicates the horizontal axis position of the center of the circle at the moment before the mth sampling, x m+1 The horizontal axis position of the center of the circle at the moment after the mth sampling, y m-1 Indicates the vertical axis position of the center of the circle at the moment before the mth sampling, y m+1 The vertical axis position of the center of the circle at the moment after the mth sampling, t m+1 represents the moment after the mth sampling, t m-1 Indicates the moment before the mth sampling; After completing the calculation of the n sampling results, the original coefficients of the n weights are geometrically reduced so that their cumulative sum is equal to 1; After the calculation of the standard radius is completed, the radius parameter in the characteristic parameter is updated.
6. The contour detection method based on the deep hole emergency door pull rod according to claim 5 is characterized in that: The hole position completion includes completing the circular hole contour at the hole position with respect to the circle center and the updated radius in the characteristic parameters, and aligning the hole according to the completed circular hole; During the hole alignment process, the radii of the upper and lower tie rods are compared. If the radius lengths are equal, the hole alignment is analyzed to see whether the contours of the two circular holes coincide. When the contours of the two circular holes coincide, the hole alignment is completed. If the radius lengths are not equal, obtain the circular hole contour with a shorter radius as circular hole contour 1, and obtain the circular hole contour with a larger radius as circular hole contour 2; connect the dots of the circular hole contour 1 and the circular hole contour 2, move the pull rod in 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 does not need to be completed to obtain the circular hole contour with a complete hole position, the hole is completed.
7. The contour detection method based on the deep hole emergency door pull rod according to claim 6 is characterized in that: The method for solving the inclination angle of the upper and lower pull rods includes extracting the long side features of the identification by using Hough line detection, and calculating the angle of the long side features of the upper and lower pull rods.
8. A contour detection system based on a deep hole emergency door pull rod using the method according to any one of claims 1 to 7, characterized in that: An acquisition unit, which obtains a local image based on the pull rod of the deep hole accident door; The positioning unit detects the edge of the tie rod and positions the tie rod according to the result of the tie rod edge detection; The processing unit, after completing the positioning, performs the rod alignment and performs binary processing on the pixel points of the hole position; The detection unit performs edge detection on the hole position using the binarized pixel points; based on the edge detection result, the circular hole edge of the pull rod is fitted to obtain the contour of the hole position; The angle analysis unit solves the inclination angle of the upper and lower pull rods according to the edge detection result.
9. A computer device comprising: A memory and a processor; the memory stores a computer program, wherein the processor implements the steps of any method as claimed in claim 1 when executing the computer program.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
System and method for measuring width between perforated lines and width between perforated line and edge for tipping paper of cigarette
CN101603818A
Method for correcting azimuth errors of inner bore of part in process of assembling axle hole
CN102128589A
Machine vision based turn plate angle high-precision online measurement method
CN108007388A
Automatic upward cylindrical deep hole aligning method and underground explosive on-site mixed loading truck
CN112907606A
Detection method and detection equipment for thickness of cable insulation layer
CN114199139A
Cited By
Self-adaptive detection method and device for molded surface size and volume density of energy-gathered cutting cable
CN121384158A