Cable joint defect automatic identification method and system for cable construction
By combining multi-angle shooting and image correction with a deep learning model, cable joint defects can be automatically identified, solving the problems of low efficiency and poor environmental adaptability of traditional manual inspection, and achieving efficient and accurate cable joint inspection.
Patent Information
- Application Number
- CN202510654895.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-09-12
AI Technical Summary
Traditional cable joint defect detection relies on manual inspection, which is inefficient and easily affected by environmental factors. Existing automated detection technology lacks adaptability and accuracy in complex environments, resulting in missed detections and false detections.
The camera parameters are obtained through the calibration device, multi-angle shooting and image correction are performed, and defect identification and classification are performed in combination with the deep learning model. The image synthesis technology is used to fuse the images and the edge detection algorithm is applied to extract the key areas to determine the defect location and size.
It realizes the automatic and accurate identification of cable joint defects, improves the detection efficiency and accuracy, adapts to complex construction environments, reduces missed detections, and ensures the reliability of detection results.
Smart Images

Figure CN120635531A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of installation, maintenance and detection of power cables, and in particular to a method and system for automatically identifying cable joint defects in cable construction. Background Art
[0002] Traditional cable joint defect detection relies primarily on manual inspection, which is inefficient and susceptible to factors such as ambient lighting and worker experience, leading to missed detections and false positives. While existing automated inspection technologies have made some progress, most still lack adaptability and accuracy in real-world construction environments. This is particularly true in complex environments, where factors such as uneven lighting and angle variations can affect detection accuracy and efficiency.
[0003] Existing manual inspection methods are inefficient and easily affected by environmental factors, often leading to missed detections and false detections. The automated inspection method provided by the present invention enables comprehensive monitoring of cable joint quality during construction and maintenance. Summary of the Invention
[0004] To solve the above technical problems, the present invention provides the following technical solutions: a method for automatically identifying cable joint defects in cable construction, comprising:
[0005] The calibration device is used to shoot a standard pattern to obtain the camera's intrinsic parameters, extrinsic parameters, and distortion coefficients;
[0006] Use the calibration results to adjust the camera position and shoot the cable connector from multiple angles;
[0007] Use the calibration parameters to perform geometric correction and color correction on the captured image, eliminate distortion and convert the image into HSV format;
[0008] Multiple images are fused through image synthesis technology, and image noise is reduced using denoising algorithms;
[0009] Apply edge detection and contour detection algorithms to extract the key areas of the cable joint from the rectified image;
[0010] Extract the defect location within the critical area and determine the spatial coordinates.
[0011] A deep learning model is used to identify and classify defects and to quantify the defect size.
[0012] As a preferred solution of the method for automatically identifying cable joint defects in cable construction according to the present invention, wherein: said adjusting the camera position using the calibration result includes determining the shooting range and coverage area and adjusting the camera position and angle;
[0013] The shooting range is expressed as,
[0014]
[0015] Among them, θ x Indicates the field of view of the camera in the x-axis direction, θ y Indicates the camera's field of view in the y-axis direction, W indicates the width of the image, H indicates the height of the image, and f x Indicates the focal length of the camera in the x-axis direction, f y Indicates the focal length of the camera in the y-axis direction, and arctan represents the inverse tangent function.
[0016] The coverage area includes determining the actual size of the cable connector, including length, width and height, based on the field of view angle θ x and θ y As well as the size of the cable connector, calculate the range that the camera can cover at different distances, expressed as,
[0017]
[0018] Among them, W FOV Indicates the horizontal field of view of the camera at a specific distance D, H FOV Indicates the vertical field of view of the camera at a specific distance D, where D is the distance from the camera to the cable connector, θ x Indicates the field of view of the camera in the x-axis direction, θ y Represents the camera's field of view in the y-axis direction, tan represents the tangent function, N x Indicates the number of shots in the x-axis direction, N y Indicates the number of shots in the y-axis direction, W target Indicates the width of the cable connector, H target Indicates the height of the cable connector, Indicates the rounding symbol;
[0019] According to the calculated number of shots N x and N y , determine the camera's shooting position and angle.
[0020] As a preferred embodiment of the method for automatically identifying cable joint defects in cable construction according to the present invention, the method of determining the shooting position and angle of the camera includes determining the size of the overlapping portion, calculating the moving step length of the camera position, planning the shooting position of the camera, and adjusting the shooting angle;
[0021] The size of the determined overlapping portion is expressed as,
[0022] O x =R x W FOV
[0023] O y =R y ·H FOV
[0024] Among them, O x Indicates the size of the horizontal overlap, O y Indicates the size of the vertical overlap, R x Indicates the horizontal overlap ratio, R y Indicates the vertical overlap ratio;
[0025] The moving step length of the camera position is expressed as,
[0026]
[0027] Among them, S x Indicates the movement step of the camera in the x-axis direction, S y Indicates the camera's moving step in the y-axis direction, W target Indicates the width of the cable connector, H target Indicates the height of the cable connector, N x Indicates the number of shots in the x-axis direction, N y Indicates the number of shots in the y-axis direction.
[0028] As a preferred solution of the method for automatically identifying cable joint defects in cable construction according to the present invention, wherein: the shooting position of the planning camera includes horizontal planning and vertical planning;
[0029] The horizontal planning includes setting the initial position at the upper left corner of the cable connector; starting from the initial position, the camera moves along the x-axis direction with a step length S each time. x ; Take an image each time after moving a step, until the shooting of this row is completed; Take N x An image that covers the desired target area and has O x The last shooting point in each row covers the boundary of the target area;
[0030] The vertical planning includes moving the camera downward along the y-axis by a step length S after completing a row of shooting. y ; At the new position, the camera starts shooting horizontally again from left to right, repeating the above horizontal planning steps; moving down and shooting in sequence until all rows are shot.
[0031] As a preferred solution of the method for automatically identifying cable joint defects in cable construction according to the present invention, wherein: said adjusting the shooting angle includes vertical rotation and horizontal rotation;
[0032] The vertical rotation is to adjust the angle of the camera in the vertical direction according to the height and shape of the cable connector so as to capture a complete vertical plane;
[0033] The horizontal rotation is to rotate the camera on a horizontal plane to capture the side of the cable connector.
[0034] As a preferred solution of the method for automatically identifying cable joint defects in cable construction according to the present invention, wherein: the fusing of multiple images by image synthesis technology includes extracting local feature points with scale invariance and rotation invariance from each image using a scale-invariant feature transformation algorithm;
[0035] The feature points are matched using the bidirectional nearest neighbor algorithm, and the correct matching points that meet the projection relationship are screened using the random sampling consensus algorithm;
[0036] For the H, S, and V channels of multiple images after matching and alignment, the Laplacian pyramid is used for multi-scale fusion;
[0037] After the fusion is completed, the H, S, and V channels of the image are denoised separately. The H and S channels are denoised using a nonlinear mean filter, and the V channel is smoothed using a multi-scale Gaussian filter.
[0038] The denoised H, S, and V channels are re-merged to obtain the final denoised image.
[0039] As a preferred embodiment of the method for automatically identifying cable joint defects in cable construction according to the present invention, the method for extracting the key area of the cable joint comprises extracting the V channel from the denoised HSV image and performing grayscale processing, and applying Gaussian filtering to smooth the image to reduce noise interference;
[0040] Edges are detected by calculating the gradient of the image, and significant edges in the image are extracted using non-maximum suppression and double threshold detection techniques to generate a binary edge image.
[0041] Extract all closed contours from the binary edge image, and filter the contours by calculating their area and perimeter to filter out contours that do not meet the cable connector characteristics;
[0042] The filtered key contours are marked to generate key areas.
[0043] Another object of the present invention is to provide a control system for cable laying, which can solve the problems of low manual detection accuracy, poor environmental adaptability, missed detection and false detection in existing cable construction by constructing an automatic recognition system combining multi-angle shooting and deep learning.
[0044] To solve the above technical problems, the present invention provides the following technical solutions: a control system for cable laying, comprising: a calibration module, a position adjustment module, an image correction module, a synthesis denoising module, an edge contour module, a defect location module, and a defect recognition module; the calibration module is used to capture a standard pattern using a calibration device to obtain the camera's internal parameters, external parameters, and distortion coefficients; the position adjustment module is used to adjust the camera position using the calibration results and capture cable joints from multiple angles; the image correction module is used to perform geometric and color correction on the captured image using the calibration parameters, eliminate distortion, and convert the image into HSV format; the synthesis denoising module is used to fuse multiple images using image synthesis technology and reduce image noise using a denoising algorithm; the edge contour module is used to apply edge detection and contour detection algorithms to extract key areas of the cable joint from the corrected image; the defect location module is used to extract the defect position within the key area and determine the spatial coordinates. The defect recognition module is used to use a deep learning model to identify and classify defects and to quantitatively measure the defect size.
[0045] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the control method for cable laying as described above when executing the computer program.
[0046] A computer-readable storage medium stores a computer program thereon, which implements the steps of the control method for cable laying when the computer program is executed by a processor.
[0047] The present invention's beneficial effects: Through image correction and denoising algorithms, it can automatically identify potential defects in cable joints, including cracks, looseness, and damage, without manual intervention. This method is particularly suitable for the long-term operation and maintenance of power cable systems, quickly identifying any problems at the joint location and preventing serious consequences such as power outages and equipment damage caused by substandard joint quality.
[0048] Through an automated inspection process, this invention significantly improves the efficiency and accuracy of cable joint defect identification. By employing multi-angle imaging and panoramic fusion technology, it ensures comprehensive coverage of every critical part of the cable joint, effectively reducing missed inspections due to joint location or environmental factors. Furthermore, this method operates stably in complex construction environments and adapts to varying external environmental conditions such as lighting, temperature, and humidity, ensuring the reliability of inspection results. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0050] Figure 1 The present invention provides an overall flow chart of a method for automatically identifying cable joint defects in cable construction according to an embodiment of the present invention.
[0051] Figure 2 This is a rendering of the effect before image stitching of a method for automatically identifying cable joint defects in cable construction provided by one embodiment of the present invention.
[0052] Figure 3 This is an image stitching effect diagram of a method for automatically identifying cable joint defects in cable construction provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0053] To make the above-mentioned objects, features, and advantages of the present invention more clearly understood, the following detailed description of the specific embodiments of the present invention is given in conjunction with the accompanying drawings. It is obvious that the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in this field without creative work should fall within the scope of protection of the present invention.
[0054] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0055] Example 1, with reference to Figure 1-Figure 3 , as one embodiment of the present invention, provides a method for automatically identifying cable joint defects in cable construction, comprising:
[0056] Step 1: Use the calibration device to shoot a standard pattern to obtain the camera's intrinsic parameters, extrinsic parameters, and distortion coefficients;
[0057] Step 1.1: Acquire calibration images:
[0058] Use a camera to capture a standard calibration pattern (in this case, a checkerboard pattern) from multiple angles and positions, ensuring the images cover the camera's entire field of view. Capture at least 10 images from different perspectives to later calculate the camera's intrinsic and extrinsic parameters.
[0059] Step 1.2 Extract feature points:
[0060] In each calibration image, the corner detection algorithm is used to extract the corner points of the checkerboard. The image coordinates of these corner points are m = [u, v, 1] T and their known positions in three-dimensional space M = [X, Y, Z, 1] T It will serve as the basic data for solving the camera parameters.
[0061] Step 1.3 Define the projection model:
[0062] The imaging process of a camera can be represented by the following projection model, which is the mapping relationship from 3D world coordinates to 2D image coordinates:
[0063] s·m=A·[R|t]·M
[0064] Where: m = [u, v, 1] T are the pixel coordinates in the image plane.
[0065] A is the intrinsic parameter matrix of the camera, including the focal length f x ,f y and principal point (optical axis offset) c x ,c y , expressed as:
[0066]
[0067] R is a 3×3 rotation matrix, which represents the rotation state of the camera relative to the calibration pattern and is expressed as:
[0068]
[0069] t is a 3×1 translation vector, which represents the translation of the camera relative to the calibration pattern and is expressed as:
[0070]
[0071] M=[X,Y,Z,1] T is the position of the corner point on the calibration pattern in the world coordinate system.
[0072] s is the scale factor, which indicates the proportional relationship between image coordinates and world coordinates.
[0073] Step 1.4 Preliminary solution of internal parameter A and external parameter (R, t):
[0074] Through a linear solution, the feature point data in multiple images are used to preliminarily estimate the camera's intrinsic and extrinsic parameter matrices.
[0075] The focal length f in the intrinsic parameter matrix A x ,f y and principal point (optical axis offset) cx ,c y By fitting with the least squares method, we can solve:
[0076]
[0077] The external parameters include the rotation matrix R and the translation vector t, which describe the position and orientation of the camera relative to the calibration plate. These values can be preliminarily estimated by solving a system of linear equations.
[0078] Step 1.5 Solve the linear equations to find R and t:
[0079] Expand the projection equation and decompose the rotation matrix R and translation vector t:
[0080] A -1 ·(s·m)=R·M+t
[0081] The rotation matrix R and translation vector t are solved using the image coordinates m and three-dimensional coordinates M of at least 6 known points.
[0082] Step 1.6 Orthogonalization of the rotation matrix:
[0083] Since the solved R may not completely satisfy the properties of the orthogonal matrix (i.e. R·R T =I), use singular value decomposition (SVD) to orthogonalize it:
[0084] R=U·V T
[0085] Among them, U and V are matrices obtained by SVD decomposition.
[0086] Step 1.7 Solution for translation vector t:
[0087] Solve for the translation vector t using the following relationship:
[0088] t=s·A -1 ·mR·M
[0089] Step 1.8 uses the Levenberg-Marquardt (LM) algorithm for nonlinear optimization:
[0090] Based on the preliminary solution, the LM algorithm is used for nonlinear optimization. The optimization goal is to minimize the reprojection error:
[0091]
[0092] Among them, m i are the actual measured image coordinates, are the predicted coordinates calculated by the model, and n is the number of feature points.
[0093] Step 1.9 uses the RANdom SAmple Consensus (RANSAC) algorithm for robust optimization:
[0094] To remove abnormal data points in the calibration image, the RANSAC algorithm is used to robustly optimize the intrinsic and extrinsic parameters. The RANSAC algorithm finds the combination of internal and external parameters that minimizes the reprojection error through random sampling and iterative optimization.
[0095] Step 1.10 Distortion model definition:
[0096] The camera lens usually has radial and tangential distortion, which will cause straight lines in the image to become curves. The distortion model is defined as follows:
[0097] Radial distortion:
[0098] Δx=x(1+k1r 2 +k2r 4 +k3r 6 )
[0099] Δy=y(1+k1r 2 +k2r 4 +k3r 6 )
[0100] where r 2 =x 2 +y 2 is the distance to the center of the image, k1, k2, k3 are the radial distortion coefficients.
[0101] Tangential distortion:
[0102] Δx=2p1xy+p2(r 2 +2x 2 )
[0103] Δy=p1(r 2 +2y 2 )+2p2xy
[0104] Where p1 and p2 are tangential distortion coefficients.
[0105] Step 1.11 Minimize the distortion error:
[0106] A nonlinear optimization algorithm (such as Levenberg-Marquardt) is used to fit the distortion model to minimize the distortion error and obtain the optimal distortion coefficients. These coefficients will be used to correct the distortion in the image.
[0107] Step 1.12 Verify the calibration results:
[0108] Apply the calibration results to the new calibration image, calculate its reprojection error, and verify the accuracy of the calibration. If the error is greater than the preset threshold, return to step 4 to re-optimize or adjust the calibration image acquisition method.
[0109] First, consider the camera's resolution and focal length, as well as the spatial positioning accuracy requirements of subsequent applications. For common industrial vision systems, a single pixel typically corresponds to 0.01 mm to 0.1 mm in physical space. Therefore, the optimal reprojection error should be controlled within 1 pixel to ensure that the spatial error of subsequent defect detection does not exceed the allowable range.
[0110] Specifically, the threshold can be set by:
[0111] Theoretical and empirical method: Based on industry experience, the reprojection error threshold is typically set between 0.3 and 1 pixel. For precision applications (such as high-precision defect detection), the threshold is set to ≤ 0.5 pixel, while for general applications, the threshold is set to ≤ 1 pixel.
[0112] Statistical analysis method: During the calibration phase, 10 to 20 different calibration images are collected, the mean μ and standard deviation σ of the reprojection error of each group are calculated, and the threshold is set as:
[0113] T=μ+2σ
[0114] This method can adapt to data fluctuations in different environments and eliminate abnormally large errors.
[0115] Step 1.3 Result Adjustment:
[0116] Based on the calibration results, the focal length, principal point position and distortion coefficient are fine-tuned to ensure the stability and consistency of the calibration results under different shooting conditions.
[0117] Step 2: Use the calibration results to adjust the camera position and take multi-angle, high-resolution photos of the cable connector;
[0118] The adjusting the camera position by using the calibration result includes determining the shooting range and coverage area and adjusting the camera position and angle;
[0119] The shooting range is expressed as,
[0120]
[0121] Among them, θ x Indicates the field of view of the camera in the x-axis direction, θ y Indicates the camera's field of view in the y-axis direction, W indicates the width of the image, H indicates the height of the image, and f x Indicates the focal length of the camera in the x-axis direction, fy Indicates the focal length of the camera in the y-axis direction, and arctan represents the inverse tangent function.
[0122] The coverage area includes determining the actual size of the cable connector, including length, width and height, based on the field of view angle θ x and θ y As well as the size of the cable connector, calculate the range that the camera can cover at different distances, expressed as,
[0123]
[0124] Among them, W FOV Indicates the horizontal field of view of the camera at a specific distance D, H FOV Indicates the vertical field of view of the camera at a specific distance D, where D is the distance from the camera to the cable connector, θ x Indicates the field of view of the camera in the x-axis direction, θ y Represents the camera's field of view in the y-axis direction, tan represents the tangent function, N x Indicates the number of shots in the x-axis direction, N y Indicates the number of shots in the y-axis direction, W target Indicates the width of the cable connector, H target Indicates the height of the cable connector, Indicates the rounding symbol;
[0125] According to the calculated number of shots N x and N y , determine the camera's shooting position and angle.
[0126] Ensure that multiple camera positions cover all critical areas of the cable connector, including areas where defects may exist.
[0127] Based on the calculated coverage area, a shooting plan is developed to ensure that multiple images can fully cover all parts of the cable connector.
[0128] Determining the shooting position and angle of the camera includes determining the size of the overlapping portion, calculating the moving step length of the camera position, planning the shooting position of the camera, and adjusting the shooting angle;
[0129] The size of the determined overlapping portion is expressed as,
[0130] O x =R x W FOV
[0131] O y =R y ·H FOV
[0132] Among them, O x Indicates the size of the horizontal overlap, O y Indicates the size of the vertical overlap, R x Indicates the horizontal overlap ratio, R y Indicates the vertical overlap ratio, the ratio is preferably 0.2-0.3;
[0133] The moving step length of the camera position is expressed as,
[0134]
[0135] Among them, S x Indicates the movement step of the camera in the x-axis direction, S y Indicates the camera's moving step in the y-axis direction, W target Indicates the width of the cable connector, H target Indicates the height of the cable connector, N x Indicates the number of shots in the x-axis direction, N y Indicates the number of shots in the y-axis direction.
[0136] The planned shooting position of the camera includes horizontal planning and vertical planning;
[0137] The horizontal planning includes setting the initial position at the upper left corner of the cable connector; starting from the initial position, the camera moves along the x-axis direction with a step length S each time. x ; Take an image each time after moving a step, until the shooting of this row is completed; Take N x An image that covers the desired target area and has O x The last shooting point in each row covers the boundary of the target area;
[0138] The vertical planning includes moving the camera downward along the y-axis by a step length S after completing a row of shooting. y ; At the new position, the camera starts shooting horizontally again from left to right, repeating the above horizontal planning steps; moving down and shooting in sequence until all rows are shot.
[0139] Step 3: Use the calibration parameters to perform geometric correction and color correction on the captured image, eliminate distortion and convert the image into HSV format;
[0140] First, use the distortion model (radial distortion and tangential distortion coefficients) obtained in step 1.10 to correct the distortion in the image. The distortion model is as follows:
[0141] The radial distortion model is expressed as:
[0142] x′=x·(1+k1·r2 +k2·r 4 +k3·r 6 )
[0143] y′=y·(1+k1·r 2 +k2·r 4 +k3·r 6 )
[0144] The tangential distortion model is expressed as:
[0145] x′=x+2p1·x·y+p2·(r 2 +2x 2 )
[0146] y′=y+p1·(r 2 +2y 2 )+2p2·x·y
[0147] Among them, x′, y′ represents the coordinates of the distorted image, x, y represents the coordinates of the undistorted image, and r 2 =x 2 +y 2 Represents the square of the distance from the pixel to the image center, k1, k2, k3 represent the radial distortion coefficients, and p1, p2 represent the tangential distortion coefficients.
[0148] The detailed steps include:
[0149] Initialization: For each distorted pixel coordinate (x′, y′), it is initially assumed that the corresponding undistorted coordinate (x, y) is equal to it, that is, (x0, y0) = (x′, y′).
[0150] Iterative solution: Using an iterative optimization algorithm, the present invention preferably adopts the Newton-Raphson method to gradually update the value of (x, y) so that (x′, y′) after being substituted into the distortion model is close to the actual distortion coordinates until it converges to an acceptable accuracy.
[0151]
[0152] Among them, f(x n ) represents the function value under the distortion model, f′(x n ) represents the derivative of the function value under the distortion model.
[0153] Mapping coordinates: The undistorted coordinates (x, y) of each distorted pixel are obtained through iterative solution and mapped back to the undistorted image plane.
[0154] The coordinates (x, y) corrected by the above steps are used to generate the corrected image: the above iterative solution process is repeated for all pixels in the image to generate the entire undistorted image.
[0155] Rearrange and interpolate image pixels to ensure the corrected image is intact.
[0156] The corrected image eliminates the geometric distortion caused by lens distortion, provides a more realistic scene image, and lays the foundation for subsequent image processing and analysis.
[0157] The goal of color correction is to eliminate color deviations caused by factors such as lighting conditions and camera sensitivity, making image colors more realistic and natural.
[0158] White balance correction is a key step in color correction. It adjusts the ratio of different color channels in the image to make the white area appear natural white. The steps include:
[0159] Calculate the average RGB value of the image: Calculate the average value of each color channel (R, G, B) for the entire image, expressed as:
[0160]
[0161] Among them, N is the total number of pixels, Avg R Represents the average value of the red channel pixels in the image, Avg G Represents the average value of the green channel pixels in the image, Avg B Represents the average value of the blue channel pixels in the image, R i Represents the value of the red channel of the i-th pixel in the image, G i Represents the value of the green channel of the i-th pixel in the image, B i Represents the value of the blue channel of the i-th pixel in the image.
[0162] Adjust the gain of each channel so that the white areas in the image have nearly equal values on each channel, expressed as:
[0163]
[0164] Among them, R corrected Represents the adjusted red channel pixel value, the red value after white balance correction, B corrected Represents the adjusted blue channel pixel value, the blue value after white balance correction, R represents the original red channel pixel value, B represents the original blue channel pixel value, Indicates the ratio of adjusting the red channel gain, which is adjusted by the ratio of the average value of the green channel to the average value of the red channel. Indicates the ratio of adjusting the blue channel gain, which is adjusted by the ratio of the average value of the green channel to the average value of the blue channel.
[0165] Reassign the adjusted RGB values to the image to complete the white balance correction.
[0166] After completing the white balance correction, the image is further color-enhanced to optimize the visual effect of the image. The steps include:
[0167] Adjust the contrast and brightness of an image using a linear transformation:
[0168] I new =α·I original +β
[0169] Among them, I new Represents the adjusted image brightness and contrast, I original Represents the pixel value of the original image. α is the contrast gain factor, which is used to control the contrast of the image. If α > 1, the contrast is enhanced; if α < 1, the contrast is reduced. β is the brightness offset, which is used to control the brightness of the image. If β > 0, the brightness is increased; if β < 0, the brightness is reduced.
[0170] Enhance the color saturation of the image to make the colors more vivid:
[0171] S new =S original ×γ
[0172] Among them, S new Indicates the enhanced color saturation, S original It represents the color saturation of the original image. γ is the saturation adjustment factor. If γ>1, the color will be more vivid and the saturation will be enhanced; if γ<1, the color will become more dull and the saturation will be weakened.
[0173] According to the subsequent processing requirements, the image is converted from RGB color space to other color spaces for further processing. Use the color space conversion formula to convert the image from RGB to the target color space, expressed as:
[0174] HSV=f(RGB)
[0175] Where f represents the color space conversion function.
[0176] like Figure 2 and Figure 3 As shown, step 4: fuse multiple images through image synthesis technology and use denoising algorithm to reduce image noise;
[0177] The scale-invariant feature transform (SIFT) algorithm is used to extract local feature points from the image. Compared to other feature extraction methods, images of cable connectors may have different scales due to changes in shooting angle and distance. The SIFT algorithm processes the multi-scale features of the image by constructing a Gaussian pyramid, which can stably detect and describe feature points at different scales. Even when the scale of the image changes, the features extracted by the SIFT algorithm remain consistent. In actual construction, it is often difficult to maintain consistent shooting angles and distances. The SIFT algorithm ensures that the extraction and description of feature points at different scales are stable and accurate.
[0178] Cable connectors may rotate when viewed from different angles. The SIFT algorithm calculates the principal orientation of each feature point to generate a rotationally invariant feature descriptor. Regardless of how the cable connector image is rotated, the feature point descriptors extracted by the SIFT algorithm remain directional stable. Even when the cable connector is rotated at different angles, the recognition system can still accurately match feature points, enabling precise defect detection.
[0179] Images of cable joints captured at construction sites may be subject to noise (e.g., uneven lighting, complex backgrounds, etc.). The SIFT algorithm uses a Differential of Gaussian Pyramid (DoG) to eliminate high-frequency noise and enhance low-frequency features, effectively extracting stable feature points. This allows the SIFT algorithm to maintain efficient feature extraction even when processing noisy images. Noise in construction environments can significantly impact image quality. The SIFT algorithm can extract representative feature points in these situations, ensuring recognition accuracy.
[0180] The SIFT algorithm generates a 128-dimensional feature descriptor for each feature point. These high-dimensional features meticulously describe the local image information of the feature point, including details such as the direction and magnitude of the image gradient. Using these high-dimensional descriptors, the SIFT algorithm achieves higher precision during feature point matching, helping to eliminate false matches and improve the accuracy of the recognition system.
[0181] The SIFT algorithm extracts key points and refines them, ensuring that the extracted feature points are highly stable across different images. Even with variations in lighting, scale, and perspective, the SIFT algorithm maintains high accuracy in matching feature points. This stable feature point matching ensures effective alignment of images from different perspectives and shooting conditions, allowing for precise defect location.
[0182] The SIFT algorithm boasts robustness against scale, rotation, and noise, as well as high-precision feature matching. The SIFT algorithm ensures stable and accurate feature point extraction and matching under varying shooting conditions, providing a reliable foundation for subsequent image processing and defect detection. It is suitable for defect identification in the complex environments of cable joints, ensuring the overall accuracy and robustness of the recognition system.
[0183] Step 4.1 Construct a Gaussian pyramid:
[0184] Perform multi-scale processing on the input image I(x,y) and construct a Gaussian pyramid. At each scale, perform Gaussian smoothing on the image, which can be expressed as:
[0185] G(x,y,σ)=I(x,y)*G(x,y,σ)
[0186] Where I(x, y) represents the input image, G(x, y, σ) represents the image after Gaussian smoothing, * represents the convolution operation, and σ represents the standard deviation of the Gaussian filter, which controls the degree of smoothing.
[0187] By differentiating the Gaussian pyramid between adjacent scales, a differential Gaussian pyramid (DoG) is constructed, which is expressed as:
[0188] D(x,y,σ)=G(x,y,kσ)-G(x,y,σ)
[0189] Where D(x, y, σ) represents the difference Gaussian image and k represents the scale space factor used to generate adjacent scales.
[0190] In the DoG pyramid, find extreme points (i.e. local minimum or maximum values), which are used as initial key point candidates:
[0191] At each pixel (x, y), its 26 neighboring pixels at 3 scales are checked, and if their values are local extreme values, the point is marked as a key point.
[0192] Each initial key point is refined to exclude key points with low contrast and optimize the key point position and scale.
[0193] The gradient direction histogram is calculated for the local area of each key point, and the main direction is selected to ensure rotation invariance, which is expressed as:
[0194]
[0195] Among them, θ(x,y) represents the gradient direction, G x (x, y), G y (x, y) represents the gradient of the image in the x-axis and y-axis directions.
[0196] Based on the main direction of the key point, a descriptor is generated, and the local features of the key point are represented by a 128-dimensional feature vector.
[0197] Step 4.2 The bidirectional nearest neighbor algorithm is used for feature point matching to ensure the symmetry and accuracy of the matching.
[0198] For each feature point, the 128-dimensional feature descriptor f generated by the SIFT algorithm is used i as input.
[0199] For each feature point f1 in image 1, calculate the Euclidean distance between it and all feature points in image 2, expressed as:
[0200]
[0201] Among them, d(f1,f2) represents the Euclidean distance between the two feature point descriptors, f1,f2 represent the descriptor vectors of the two feature points, n represents the dimension of the descriptor (128 dimensions), f 1i ,f 2i Represents the i-th component of the descriptor vector.
[0202] Find the closest matching point f2 in image 1 to image 2 and record the distance d 12 .
[0203] Find the feature point f′1 closest to f2 in image 2 and calculate the distance d 21 .
[0204] If d is satisfied 12 =d 21 , then the matching is considered to be established. If the matching symmetry does not hold, that is, d 12 ≠d 21 , then remove the matching pair.
[0205] Image 1 is an image selected from a set of images as a "reference". This reference image is used to find the corresponding feature points in other images.
[0206] Image 2 refers to another image to be compared with Image 1. Find the correspondence between the feature points in Image 2 and the feature points extracted in Image 1.
[0207] Step 4.3 uses the RANSAC algorithm to filter the matching points and remove incorrect matches. By randomly sampling matching points, the homography matrix H is calculated and applied to the matching points. If the reprojection error ∈ is less than the set threshold, the match is retained, which is expressed as:
[0208]
[0209] Among them, ∈ represents the reprojection error, which represents the square error between the matching point transformed by the homography matrix H and the original matching point, n represents the number of points, which represents the total number of matching point pairs involved in the calculation, and p i Represents the coordinates of the matching point in the original image, expressed in the form of (x, y), p′ i The coordinates of the matching points in the transformed image are expressed in the form of (x′, y′). H represents the homography matrix, which is used to describe the projective transformation relationship between the two images. Calculated by matching points, it is possible to map points in one image to the other.
[0210] Randomly select a minimum subset (usually 4 pairs of points) from the matching point set and calculate the homography matrix H based on these points. Using the calculated H, point p in the original image is i Project it into the transformed image and calculate the projected point and the actual matching point p′ i The error ∈ between them. Set an error threshold. If ∈ is less than the threshold, the matching pair is considered to be a correct match, otherwise it is considered to be an incorrect match. Repeat the above steps multiple times (the present invention determines 1000 times), randomly selecting a different subset each time. Finally, select H with the largest number of correct matching pairs as the final homography matrix. All matching points are screened through the final H, retaining the correct matching points that meet the projection relationship and removing the incorrect matches with large errors.
[0211] Step 4.4 Channel fusion:
[0212] After completing feature point matching and RANSAC algorithm screening, the images of each channel (H, S, V) are fused. A multi-scale fusion strategy is adopted, using Laplacian pyramid fusion technology to retain the high-frequency information of the image while smoothing the low-frequency noise.
[0213] Construct a Laplacian pyramid: Construct a Laplacian pyramid for each channel image (H, S, V) and fuse them at different scales.
[0214] The fusion formula is expressed as:
[0215]
[0216] Among them, L fused (x, y) represents the pixel value of the fused image at the (x, y) position, which represents the image result after multi-scale fusion. L represents the number of levels of the Laplacian pyramid. It represents the number of levels of image decomposition at different scales, usually from lower resolution to higher resolution. G l Represents the Gaussian pyramid of the image pyramid at level l, and represents the image after Gaussian filtering at level l. i ,Si ,V i Represents the pixel values of the H (hue), S (saturation), and V (value) channels of the i-th image.
[0217] The fusion weights are adaptively adjusted according to the local features of the image to retain edge detail information, which can be expressed as:
[0218]
[0219] Among them, w i (x,y) represents the adaptive weight of the i-th image at pixel (x,y) during channel fusion. This weight determines the contribution of each image during fusion. σ represents an adjustment factor, controlling the weight's sensitivity to image edge information. A larger σ reduces the influence of edges, while a smaller σ increases them. E(x,y) represents the edge strength or gradient information at position (x,y). This is typically obtained by calculating the gradient of the image and indicates the saliency of the image edge. N represents the number of images involved in the fusion, typically multiple images.
[0220] Step 4.5 Channel merging:
[0221] The fused H, S, and V channels are recombined to generate a complete fused image.
[0222] Step 4.6 Channel separation:
[0223] The fused HSV image is separated into three channels: H, S, and V, and denoising is performed separately.
[0224] Step 4.7 Denoising algorithm selection:
[0225] In HSV format images, different channels have different noise characteristics, so targeted denoising is required.
[0226] The denoising formula for the H channel and S channel is expressed as:
[0227]
[0228] Among them, I denoised (x,y) represents the pixel value at position (x,y) in the denoised image. represents the image after denoising filtering. Ω represents the filter window, which encompasses a set of pixels centered at (x,y). represents the size of the filter's applied area within the image. h(i,j) represents the filter weight, which is typically determined by the spatial distance between pixels and the difference in pixel values. It represents the degree of influence of the filter on different pixels.
[0229] For the H channel and S channel, a nonlinear mean filter (such as a bilateral filter) is used for denoising to retain edge information and details while reducing noise; when using a bilateral filter, the filter weight is calculated by combining information in the spatial domain and the pixel value domain to ensure that the filtering effect adapts to the edge and texture structure of the image.
[0230] The V channel denoising formula is expressed as:
[0231]
[0232] Among them, V denoised (x,y) represents the pixel value at position (x,y) in the denoised V channel image. It represents the V channel result after denoising filtering. k represents the radius of the filter window, which determines the scale of the filter. It represents the area over which the filter is applied. h(i,j) represents the Gaussian weight of the filter, which is typically determined by the spatial distance between pixels and the difference in pixel values. It represents the strength of the filter applied to different pixels.
[0233] For the V channel, a multi-scale Gaussian filter is used for denoising to smooth brightness changes and reduce the impact of noise. When using Gaussian filtering, the scale and standard deviation of the filter are adjusted to ensure a balanced denoising effect, eliminating noise while retaining brightness details.
[0234] Step 4.8 Channel merging:
[0235] The denoised H, S, and V channels are re-merged to form the final denoised image.
[0236] Step 5: Apply edge detection and contour detection algorithms to extract the key areas of the cable joint from the rectified image;
[0237] Edges are extracted from the image through edge detection to generate a binary edge image.
[0238] Step 5.1: Grayscale processing extracts the brightness information from the denoised HSV image to prepare for subsequent edge detection.
[0239] Extract the V channel from the merged HSV image and process it as a grayscale image, expressed as:
[0240] I gray (x,y)=V(x,y)
[0241] Among them, I gray (x,y) represents the pixel value of the grayscale image at the (x,y) position, and V(x,y) represents the pixel value of the V channel at the (x,y) position after denoising.
[0242] Generate grayscale image I gray(x,y), contains the brightness information of the image.
[0243] Step 5.2: Gaussian filtering is used to smooth the grayscale image and reduce the impact of noise on edge detection.
[0244] Applying Gaussian filtering to a grayscale image is expressed as:
[0245] I blurred (x,y)=G(x,y,σ)*I gray (x,y)
[0246] Among them, I blurred (x,y) represents the pixel value of the blurred image at the (x,y) position, G(x,y,σ) represents the Gaussian filter function, σ is the standard deviation of the Gaussian filter, which controls the smoothness of the filter, and * represents the convolution operator, which means convolution operation is performed on the image and the Gaussian filter.
[0247] Generate blurred image I blurred (x,y), reducing the impact of noise.
[0248] Step 5.3: Calculate the gradient. Calculate the gradient of the blurred image to detect edges in the image.
[0249] Calculate the gradient of the image in the x-axis and y-axis directions, expressed as:
[0250]
[0251] Among them, G x (x,y) represents the gradient of the image in the x-axis direction, and represents the edge strength of the image in the horizontal direction. y (x,y) represents the gradient of the image in the y-axis direction, which represents the edge strength of the image in the vertical direction. Represents the derivative of the blurred image in the x-axis direction, representing the horizontal gradient, Represents the derivative of the blurred image in the y-axis direction, which represents the vertical gradient.
[0252] Generate gradient images G in the x and y directions x (x,y) and G y (x,y), these images contain the direction and intensity information of the edge.
[0253] Step 5.4: Non-maximum suppression: This process preserves the edge information of local maxima in the gradient image and removes other non-edge points, making the edges more precise and clear. Perform non-maximum suppression on the gradient image. This generates a non-maximum suppressed image in which only the edge pixels of the local maxima are retained.
[0254] Step 5.5: Double threshold detection: By setting two thresholds, high and low, we can further identify and connect strong edge areas and eliminate the influence of noise.
[0255] Apply double threshold detection to divide the gradient image into strong edge, weak edge and non-edge areas. Result: Generate a binary edge image I edges (x,y), where 1 represents the edge area and 0 represents the non-edge area.
[0256] Step 5.6: Edge extraction: Based on the results of double threshold detection, extract the final binary edge image.
[0257] According to the threshold result, the edge area and the non-edge area are distinguished to obtain the edge image, which is expressed as:
[0258]
[0259] Among them, I edges (x,y) represents the pixel value of the edge image at the (x,y) position, 1 represents the edge area, and 0 represents the non-edge area.
[0260] Get the final binary edge image I edges (x,y), this image will be used as input for contour detection.
[0261] All closed contours are extracted from the binary edge image and the key areas of the cable joints are screened out.
[0262] Step 5.7: Contour extraction: extract all closed contours from the binary edge image.
[0263] Apply a contour extraction algorithm that scans the binary image, finds connected pixels, and combines them into contours, which are expressed as:
[0264] C = findContours(I edges ,R_EX,C_APP)
[0265] Among them, indContours represents the findContours function, C represents the contour list, which contains all detected contours, each contour is a set of points (x, y), I edges (x,y) represents the binary edge image, R_EX means only detecting the external contour and ignoring the internal nested contour, and C_APP means using the simplified point chain code method to save the contour points and reduce redundant information.
[0266] Get a list of contours C, where each contour consists of multiple points (x i ,y i ) and represents each closed area detected in the image.
[0267] Step 5.8: Contour screening: screening out contours that meet the characteristics of cable connectors.
[0268] Filter by geometric properties of contours, such as area and perimeter:
[0269] For each contour, calculate the pixel area it contains, expressed as:
[0270]
[0271] Among them, A represents the area of the contour, n represents the number of points on the contour, (x i ,y i ) represents the coordinates of the i-th point on the contour, (x i+1 ,y i+1 ) represents the coordinates of the i+1th point on the contour.
[0272] For each contour, calculate its perimeter, which is the sum of the distances between the points on the contour, expressed as:
[0273]
[0274] Among them, P represents the perimeter of the contour, n represents the number of points, (x i ,y i ) represents the coordinates of the i-th point on the contour, (x i+1 ,y i+1 ) represents the coordinates of the i+1th point on the contour.
[0275] Set area and perimeter thresholds to filter contours that meet specific requirements, expressed as:
[0276] ifA>A min andP>P min , then keep the contour
[0277] Among them, A min Indicates the area threshold. Contours smaller than this value will be filtered out. min The threshold value representing the perimeter length. Contours smaller than this value will be filtered out.
[0278] Filter out contours that meet the characteristics, which usually represent the boundaries of cable connectors.
[0279] Step 5.9: Mark key areas and mark the selected contours for subsequent processing.
[0280] Mark the contours that meet the screening criteria. You can use rectangular boxes or polygons to mark these areas. Generate marked key areas for subsequent analysis and processing.
[0281] Step 5.10: Output the critical areas. Output the detected critical areas for subsequent defect identification and classification.
[0282] Step 6: Extract the defect location within the critical area and determine the spatial coordinates.
[0283] In the key area, the Canny edge detection algorithm is used to extract edge information, and the texture analysis (using local binary pattern LBP and gray level co-occurrence matrix GLCM) is combined to extract the characteristics of the defect.
[0284] Edge detection algorithms can accurately extract edge information from images and reduce noise interference.
[0285] LBP texture analysis extracts local texture features of an image and represents the texture information of the image through a binary pattern.
[0286] GLCM texture analysis captures the differences in different texture patterns in an image by counting the grayscale co-occurrence relationships between pixels.
[0287] The extracted defect features are located and the pixel coordinates of the defect in the image are determined, which is expressed as
[0288] (x def ,y def )=centroid(defect_contour)
[0289] Among them, (x def ,y def ) represents the position coordinates of the defect, centroid(defect_contour) represents the centroid of the defect contour, and represents the center position of the defect.
[0290] Using the camera calibration parameters, the image coordinates are converted into real space coordinates, which can be expressed as:
[0291] (X,Y,Z)=K -1 ·(x def ,y def ,1) T
[0292] Among them, (X, Y, Z) represents the coordinates of the defect in space, K represents the camera internal parameter matrix, which includes the focal length and principal point offset information, (x def ,y def ,1) T Represents the homogeneous coordinates of the defect in the image.
[0293] Step 7: Use deep learning models to identify and classify defects and quantify the defect size.
[0294] The extracted key areas and defect locations are cropped and used as the input image for the deep learning model. The image is resized to 224x224 pixels and normalized to meet the input requirements of the model.
[0295] Select the ResNet deep learning model. The ResNet model, with its high accuracy and deep structure, is well-suited for complex image classification tasks. Use a large-scale annotated dataset for pre-training and fine-tuning to ensure the model can accurately identify different types of defects.
[0296] The trained ResNet model is used to infer the input image and identify the defect category (such as cracks, corrosion, and wear). The model outputs the probability of each category and determines the defect type based on the maximum probability.
[0297] Using the position data in spatial coordinates, the actual size of the defect is calculated as:
[0298]
[0299] Among them, (X end ,Y end ) and (X start , Y start ) represent the spatial coordinates of the starting and ending points of the defect respectively.
[0300] Output the defect category, confidence level, and defect size measurement results.
[0301] Embodiment 2, an embodiment of the present invention, provides a control system for cable laying, comprising:
[0302] Calibration module, position adjustment module, image correction module, synthesis denoising module, edge contour module, defect positioning module and defect recognition module.
[0303] The calibration module is used to capture a standard pattern through a calibration device to obtain the intrinsic parameters, extrinsic parameters and distortion coefficients of the camera.
[0304] The position adjustment module is used to adjust the camera position using the calibration results and shoot the cable connector from multiple angles.
[0305] The image correction module is used to perform geometric correction and color correction on the captured image using calibration parameters, and convert the image into HSV format after eliminating distortion.
[0306] The synthesis denoising module is used to fuse multiple images through image synthesis technology and use a denoising algorithm to reduce image noise.
[0307] The edge contour module is used to apply edge detection and contour detection algorithms to extract the key area of the cable joint from the rectified image.
[0308] The defect location module is used to extract the defect location in the key area and determine the spatial coordinates.
[0309] The defect recognition module is used to identify and classify defects using a deep learning model and to quantitatively measure the defect size.
[0310] Example 3, an embodiment of the present invention, is different from the previous two embodiments in that:
[0311] If the 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 and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0312] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing the 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 (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0313] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium may even be 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 processing in another suitable manner as necessary, and then stored in a computer memory.
[0314] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, it can be implemented using a combination of any of the following technologies known in the art: a discrete logic circuit having logic gate circuits for implementing logic functions on data signals, an application-specific integrated circuit having suitable combinational logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0315] 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 the present invention. 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 method for automatically identifying cable joint defects in cable construction, characterized in that: include: The calibration device is used to shoot a standard pattern to obtain the camera's intrinsic parameters, extrinsic parameters, and distortion coefficients; Use the calibration results to adjust the camera position and shoot the cable connector from multiple angles; Use the calibration parameters to perform geometric correction and color correction on the captured image, eliminate distortion and convert the image into HSV format; Multiple images are fused through image synthesis technology, and image noise is reduced using denoising algorithms; Apply edge detection and contour detection algorithms to extract the key areas of the cable joint from the rectified image; Extract the defect location in the critical area and determine the spatial coordinates; A deep learning model is used to identify and classify defects and to quantify the defect size.
2. The method for automatically identifying cable joint defects in cable construction according to claim 1, wherein: The adjusting the camera position by using the calibration result includes determining the shooting range and coverage area and adjusting the camera position and angle; The shooting range is expressed as, Among them, θ x Indicates the field of view of the camera in the x-axis direction, θ y Indicates the camera's field of view in the y-axis direction, W indicates the width of the image, H indicates the height of the image, and f x Indicates the focal length of the camera in the x-axis direction, f y Indicates the focal length of the camera in the y-axis direction, arctan represents the inverse tangent function; The coverage area includes determining the actual size of the cable connector, including length, width and height, based on the field of view angle θ x and θ y As well as the size of the cable connector, calculate the range that the camera can cover at different distances, expressed as, Among them, W FOV Indicates the horizontal field of view of the camera at a specific distance D, H FOV Indicates the vertical field of view of the camera at a specific distance D, where D is the distance from the camera to the cable connector, θ x Indicates the field of view of the camera in the x-axis direction, θ y Represents the camera's field of view in the y-axis direction, tan represents the tangent function, N x Indicates the number of shots in the x-axis direction, N y Indicates the number of shots in the y-axis direction, W target Indicates the width of the cable connector, H target Indicates the height of the cable connector, Indicates the rounding symbol; According to the calculated number of shots N x and N y , determine the camera's shooting position and angle.
3. The method for automatically identifying cable joint defects in cable construction according to claim 2, wherein: Determining the shooting position and angle of the camera includes determining the size of the overlapping portion, calculating the moving step length of the camera position, planning the shooting position of the camera, and adjusting the shooting angle; The size of the determined overlapping portion is expressed as, O x =R x ·W FOV O y =R y ·H FOV Among them, O x Indicates the size of the horizontal overlap, O y Indicates the size of the vertical overlap, R x Indicates the horizontal overlap ratio, R y Indicates the vertical overlap ratio; The moving step length of the camera position is expressed as, Among them, S x Indicates the movement step of the camera in the x-axis direction, S y Indicates the camera's moving step in the y-axis direction, W target Indicates the width of the cable connector, H target Indicates the height of the cable connector, N x Indicates the number of shots in the x-axis direction, N y Indicates the number of shots in the y-axis direction.
4. The method for automatically identifying cable joint defects in cable construction according to claim 3, wherein: The planned shooting position of the camera includes horizontal planning and vertical planning; The horizontal planning includes setting the initial position at the upper left corner of the cable connector; starting from the initial position, the camera moves along the x-axis direction with a step length S each time. x ; Take an image each time after moving a step, until the shooting of this row is completed; Take N x An image that covers the desired target area and has O x The last shooting point in each row covers the boundary of the target area; The vertical planning includes moving the camera downward along the y-axis by a step length S after completing a row of shooting. y ; At the new position, the camera starts shooting horizontally again from left to right, repeating the above horizontal planning steps; moving down and shooting in sequence until all rows are shot.
5. The method for automatically identifying cable joint defects in cable construction according to claim 4, characterized in that: Said adjusting of the shooting angle includes vertical rotation and horizontal rotation; The vertical rotation is to adjust the angle of the camera in the vertical direction according to the height and shape of the cable connector so as to capture a complete vertical plane; The horizontal rotation is to rotate the camera on a horizontal plane to capture the side of the cable connector.
6. The method for automatically identifying cable joint defects in cable construction according to claim 5, characterized in that: The fusing of multiple images by the image synthesis technique includes extracting local feature points with scale invariance and rotation invariance from each image using a scale invariant feature conversion algorithm; The feature points are matched using the bidirectional nearest neighbor algorithm, and the correct matching points that meet the projection relationship are screened using the random sampling consensus algorithm; For the H, S, and V channels of multiple images after matching and alignment, the Laplacian pyramid is used for multi-scale fusion; After the fusion is completed, the H, S, and V channels of the image are denoised separately. The H and S channels are denoised using a nonlinear mean filter, and the V channel is smoothed using a multi-scale Gaussian filter. The denoised H, S, and V channels are re-merged to obtain the final denoised image.
7. The method for automatically identifying cable joint defects in cable construction according to claim 6, wherein: The key area of the cable joint extraction includes extracting the V channel from the denoised HSV image and graying it, and applying Gaussian filtering to smooth the image to reduce noise interference; Edges are detected by calculating the gradient of the image, and significant edges in the image are extracted using non-maximum suppression and double threshold detection techniques to generate a binary edge image. Extract all closed contours from the binary edge image, and filter the contours by calculating their area and perimeter to filter out contours that do not meet the cable connector characteristics; The filtered key contours are marked to generate key areas.
8. A control system for cable laying, using the method for automatically identifying cable joint defects in cable construction according to any one of claims 1 to 7, characterized in that: include: Calibration module, position adjustment module, image correction module, synthesis denoising module, edge contour module, defect location module and defect recognition module; The calibration module is used to capture a standard pattern through a calibration device to obtain the intrinsic parameters, extrinsic parameters and distortion coefficients of the camera; The position adjustment module is used to adjust the camera position using the calibration results to shoot the cable connector from multiple angles; The image correction module is used to perform geometric correction and color correction on the captured image using calibration parameters, and convert the image into HSV format after eliminating distortion; The synthesis denoising module is used to fuse multiple images through image synthesis technology and use a denoising algorithm to reduce image noise; The edge contour module is used to apply edge detection and contour detection algorithms to extract the key area of the cable joint from the corrected image; The defect location module is used to extract the defect location in the key area and determine the spatial coordinates; The defect recognition module is used to identify and classify defects using a deep learning model and to quantitatively measure the defect size.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for automatically identifying cable joint defects in cable construction according to any one of claims 1 to 7 are implemented.
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 for automatically identifying cable joint defects in cable construction according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Deep learning-based fan blade image accurate splicing and defect positioning method
CN122265635A